* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f0f4f8;
    color: #1f2937;
    line-height: 1.6;
}

header {
    background-color: #ffffff;
    padding: 1rem 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 999;
    animation: fadeIn 0.8s ease-out;
}

.menu ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.menu a {
    text-decoration: none;
    color: #2d89ef;
    font-weight: 600;
    font-size: 1.05rem;
    position: relative;
    transition: color 0.3s;
    padding: 0.5rem 0;
}

    .menu a.active {
        color: #1b6cd7;
    }

        .menu a.active::after {
            width: 100%;
        }

    .menu a::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -4px;
        width: 0%;
        height: 2px;
        background-color: #2d89ef;
        transition: width 0.3s ease;
    }

    .menu a:hover {
        color: #1b6cd7;
    }

        .menu a:hover::after {
            width: 100%;
        }

/* Hero Section */
.products-hero {
    /*background: linear-gradient(135deg, #6e8efb, #a777e3);*/
    background: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><circle cx='30' cy='30' r='5' fill='rgba(255,255,255,0.1)'/><circle cx='80' cy='70' r='8' fill='rgba(255,255,255,0.1)'/><circle cx='150' cy='30' r='10' fill='rgba(255,255,255,0.1)'/><circle cx='30' cy='120' r='7' fill='rgba(255,255,255,0.1)'/><circle cx='170' cy='150' r='5' fill='rgba(255,255,255,0.1)'/><circle cx='100' cy='180' r='8' fill='rgba(255,255,255,0.1)'/></svg>"), linear-gradient(135deg, #6e8efb, #a777e3);
    text-align: center;
    padding: 4rem 2rem;
    color: white;
    margin-bottom: 3rem;
}

    .products-hero h1 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
        animation: slideIn 0.8s ease-out 0.2s both;
    }

    .products-hero p {
        font-size: 1.2rem;
        max-width: 800px;
        margin: 0 auto 2rem;
        animation: slideIn 0.8s ease-out 0.4s both;
    }

main {
    padding: 0 2rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, max-content));
    justify-content: center;
    gap: 2.5rem;
    margin-top: 2rem;
    padding: 0 1rem;
}

.product {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
    opacity: 0;
    transform: translateY(20px);
}

    .product.animated {
        opacity: 1;
        transform: translateY(0);
        transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    }

    .product:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 24px rgba(0,0,0,0.12);
    }

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #FF6B6B; /* Cor mais vibrante */
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2; /* Garante que fique acima da imagem */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.product img {
    border-radius: 10px;
    height: 180px;
    object-fit: contain;
    margin-bottom: 1.5rem;
    transition: transform 0.4s ease;
    position: relative; /* Adicionado */
    z-index: 1; /* Garante que fique abaixo da badge */
}

.product:hover img {
    transform: scale(1.1) rotate(-5deg);
}

.product h2 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: #1f2937;
}

.product p {
    margin-bottom: 1.5rem;
    color: #4b5563;
}

.product-price {
    font-size: 1.4rem;
    color: #2d89ef;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: block;
}

.btn {
    background: linear-gradient(45deg, #2d89ef, #3a9bff);
    color: white;
    padding: 0.9rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(45, 137, 239, 0.3);
    position: relative;
    overflow: hidden;
}

    .btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(45, 137, 239, 0.4);
    }

    .btn:active {
        transform: translateY(0);
    }

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
    overflow-y: auto;
}

.modal-content {
    background-color: #ffffff;
    margin: 2% auto; /* Margem reduzida para telas pequenas */
    padding: 2rem;
    border-radius: 16px;
    max-width: 700px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    animation: modalOpen 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: 90vh; /* Altura máxima */
    overflow-y: auto; /* Scroll interno se necessário */
}

/* Ajuste para telas pequenas */
@media (max-width: 600px) {
    .modal-content {
        padding: 1.5rem;
        margin: 1rem auto;
        max-height: 85vh;
    }

    #modal-desc {
        font-size: 0.95rem;
        line-height: 1.6;
    }
}

.modal-close {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    font-size: 1.8rem;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s;
}

    .modal-close:hover {
        color: #1f2937;
        transform: rotate(90deg);
    }

#modal-title {
    color: #1f2937;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

#modal-desc {
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 2rem;
    white-space: pre-line;
}

#modal-price {
    font-size: 1.6rem;
    color: #2d89ef;
    font-weight: 700;
    display: inline-block;
    margin-top: 1rem;
}

footer {
    text-align: center;
    padding: 3rem 1rem;
    font-size: 0.9rem;
    color: #64748b;
    background-color: #f1f5f9;
    margin-top: 4rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalOpen {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 768px) {
    .product-list {
        grid-template-columns: 1fr;
    }

    .menu ul {
        gap: 1rem;
    }

    .products-hero h1 {
        font-size: 2rem;
    }
}

/* Estilo do ícone USER */
.user-icon-container {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}


.user-icon {
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #e0f2fe;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

    .user-icon:hover {
        background-color: #2d89ef;
        color: white;
    }

.user-container {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn.comprar {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

    .btn.comprar:hover {
        background: linear-gradient(135deg, #43A047 0%, #1B5E20 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
    }

    .btn.comprar:active {
        transform: translateY(0);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

.btn.saiba-mais {
    flex: 1;
    transition: all 0.3s;
}

    .btn.saiba-mais:hover {
        transform: translateY(-2px);
    }

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.btn.comprar.added {
    animation: pulse 0.5s;
    background: linear-gradient(135deg, #2E7D32 0%, #1B5E20 100%);
}
