/* ==========================================================================
   1. SEÇÃO BANNER PRINCIPAL
   ========================================================================== */

#banner {
    width: 100%;
    max-width: 1440px;
    margin-top: 30px;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
    font-family: var(--font-main);
    border-radius: 20px;
}

.banner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 80px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.banner-content {
    flex-shrink: 0;
    color: var(--text-primary);
    width: 50%;
}

.banner-content h1 {
    font-size: 5.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
}

.h1-second-line {
    display: flex;
    align-items: center;
    gap: 15px;
}

.title-icon {
    font-size: 4rem;
    vertical-align: middle;
}

.banner-content p {
    font-size: 1.5rem;
    margin-bottom: 40px;
    max-width: 450px;
    color: var(--text-muted);
}

.icon-group {
    display: flex;
    gap: 25px;
    margin-top: 30px;
    color: var(--text-muted);
}

.icon-group i {
    font-size: 3rem;
}

.banner-image {
    position: relative;
    display: flex;
    /* Alterado para flex para centralizar a figura */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-height: 500px;
    /* A altura máxima agora é no container */
}

.banner-image figure {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.banner-image img {
    max-height: 400px;
    /* Altura máxima da imagem em si */
    filter: drop-shadow(10px 10px 20px rgba(0, 0, 0, 0.25));
    transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1), filter 0.4s ease;
}

.banner-image img:hover {
    transform: scale(1.05);
    filter: drop-shadow(10px 15px 30px rgba(0, 0, 0, 0.3));
}

/* NOVO ESTILO PARA O NOME DO PRODUTO */
.product-caption {
    font-family: var(--font-main);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 15px;
    text-align: center;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
    transition: color 0.4s ease;
}

/* Nuvens do Banner */
.cloud {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    color: var(--cloud-color);
    filter: drop-shadow(15px 10px 5px rgba(0, 0, 0, 0.15));
    transition: color 0.4s ease;
    opacity: 0;
    transform: translateY(20px);
    font-size: clamp(4rem, 10vw, 12rem);
    will-change: transform, opacity, color;
}


.cloud--flashing {
    animation: lightning-flash 0.7s ease-in-out 1;
}

.cloud--glimmering {
    animation: sun-glimmer 2s ease-in-out 1;
}

@keyframes lightning-flash {

    0%,
    100% {
        color: var(--cloud-color);
        filter: drop-shadow(15px 10px 5px rgba(0, 0, 0, 0.15));
    }

    40%,
    60% {
        color: #f0e68c;
        filter: drop-shadow(0 0 20px #f0e68c) brightness(2.5);
    }

    50% {
        color: #ffffff;
        filter: drop-shadow(0 0 30px #ffffff) brightness(3);
    }
}

@keyframes sun-glimmer {

    0%,
    100% {
        /* Estado inicial/final: sombra e opacidade normais */
        filter: drop-shadow(15px 10px 5px rgba(0, 0, 0, 0.15));
        opacity: var(--initial-opacity, 0.8);
    }

    50% {
        /* Meio da animação: sombra mais quente e opacidade máxima */
        filter: drop-shadow(20px 15px 10px rgba(255, 230, 150, 0.5));
        opacity: 1;
    }

    /* A propriedade 'transform: scale()' foi REMOVIDA para evitar conflito com o JS */
}

/* ==========================================================================
   2. DIVISOR DE SEÇÃO
   ========================================================================== */

.divider-svg {
    margin: -1px 0;
    width: 100%;
    height: auto;
    line-height: 0;
}

/* ==========================================================================
   3. SEÇÃO DE PRODUTOS
   ========================================================================== */

.products-section {
    width: 100%;
    background-color: var(--products-background);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 80px 5%;
    transition: background-color 0.4s ease;
}

.products-section h2 {
    font-family: var(--font-main);
    font-size: 3rem;
    color: var(--transition-color);
    margin-bottom: 40px;
    text-align: center;
}

.products-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); */
    gap: 40px;
    width: 100%;
    max-width: 1280px;
}

.product-card,
.product-error {
    background-color: var(--bg-secondary);
    display: flex;
    width: 350px;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.4s ease;
    border-radius: 20px;
}

.product-card a {
    color: var(--text-primary);
    text-decoration: none;
}

.product-info h3 a:hover {
    text-decoration: underline;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.product-image-container {
    background-color: var(--product-card-vector-bg);
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
}

.product-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-info {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-info h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.product-info p {
    color: var(--text-muted);
    flex-grow: 1;
    margin-bottom: 20px;
}

.product-info .cta-button {
    font-size: 1.2rem;
    padding: 12px 20px;
}

/* ==========================================================================
   SEÇÃO DE PROMOÇÕES ESPECIAIS
   ========================================================================== */

.promo-section {
    width: 100%;
    max-width: 1440px;
    padding: 0 20px;
    margin: 40px auto;
    /* Espaçamento entre o banner principal e as promoções */
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    /* Permite que os cards quebrem para a linha de baixo */
}

.promo-card {
    flex: 1 1 450px;
    /* Cresce, encolhe, com base de 450px */
    max-width: 600px;
    padding: 25px 35px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    overflow: hidden;
    /* Garante que os elementos não vazem */
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.promo-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

/* --- Imagens da Promoção --- */
.promo-images {
    position: relative;
    width: 150px;
    height: 150px;
    flex-shrink: 0;
    /* Impede que o container das imagens encolha */
}

.promo-images img {
    width: 80px;
    height: 120px;
    position: absolute;
    filter: drop-shadow(5px 5px 10px rgba(0, 0, 0, 0.2));
    transition: transform 0.4s ease;
}

.promo-card:hover .promo-images img {
    transform: rotate(5deg) scale(1.05);
}

/* Posicionamento criativo das imagens */
.promo-images .img-1 {
    top: 10px;
    left: 0;
    z-index: 2;
    transform: rotate(-15deg);
}

.promo-images .img-2 {
    bottom: 10px;
    right: 0;
    z-index: 1;
    transform: rotate(10deg) scale(0.9);
}

.promo-images .img-3 {
    top: -20px;
    left: 30%;
    transform: translateX(-30%) rotate(5deg) scale(1);
    z-index: 0;
}


/* --- Conteúdo de Texto da Promoção --- */
.promo-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.promo-tag {
    background-color: var(--accent-color);
    color: white;
    font-family: var(--font-main);
    font-weight: 600;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.promo-content h2 {
    font-family: var(--font-main);
    font-size: 2.2rem;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.promo-content p {
    font-size: 1rem;
    color: var(--text-muted);
    background-color: var(--glasmorphism-bg);
    padding: 5px 10px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.promo-content .cta-button {
    padding: 12px 30px;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .promo-card {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }

    .promo-content {
        align-items: center;
    }

    .promo-images {
        margin-bottom: 20px;
        width: 200px;
        /* Aumenta a área para as imagens não ficarem apertadas */
        height: 120px;
    }

    .promo-content h2 {
        font-size: 1.8rem;
    }
}

/* Media queries para responsividade */
@media (max-width: 1200px) {
    .banner-content h1 {
        font-size: 4.5rem;
    }

    .banner-image {
        left: -100px;
    }

    .banner-image img {
        max-height: 400px;
    }
}


@media (max-width: 992px) {
    .promo-section {
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }

    .promo-card {
        width: 100%;
        max-width: 550px;
        /* Um bom tamanho para tablets */
    }

    .banner-container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    #banner {
        margin-top: 10px;
        padding: 30px 15px;
    }

    .banner-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        align-content: center;
        text-align: center;
        width: 100%;
    }

    .banner-image {
        order: -1;
        margin-bottom: 20px;
        left: 0;
    }

    .banner-image img {
        max-height: 300px;
    }

    .product-caption {
        font-size: 1.2rem;
        margin-top: 10px;
    }

    .icon-group,
    .h1-second-line {
        justify-content: center;
    }

    .banner-content h1 {
        font-size: 3.5rem;
    }

    .title-icon {
        font-size: 3rem;
    }

    .banner-content p {
        font-size: 1.2rem;
        margin-bottom: 30px;
    }

    .cloud-1 {
        font-size: 8rem;
        top: auto;
        bottom: -20px;
        left: -10%;
    }

    .cloud-2,
    .cloud-3 {
        display: none;
    }

    .products-section h2 {
        font-size: 2.5rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

@media (max-width: 480px) {
    .banner-content h1 {
        font-size: 2.8rem;
    }

    .product-card,
    .product-error {
        width: 310px;
    }

    .banner-content p {
        font-size: 1rem;
    }

    .product-info h3 {
        font-size: 1.5rem;
    }
}