/* Estilos para a Seção de Produtos */

.products-section {
    background-color: #fff;
    position: relative;
    padding: 0;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    margin: 0;
    font-family: 'santral', sans-serif;
}

/* Grid de Produtos 3x2 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
    border-top: 1px solid #eee;
    border-left: 1px solid #eee;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    gap: 0;
    height: 100vw;
    max-height: 1600px;
}

/* Células do Grid */
.product-cell {
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Células com imagem */
.image-cell {
    position: relative;
    background-color: #f9f9f9;
    padding: 0;
}

.image-cell .swiper,
.bouquets-swiper,
.arrangements-swiper,
.bags-swiper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
}

.image-cell .swiper-wrapper,
.image-cell .swiper-slide {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Estilos para os carrosséis na seção de produtos */
.product-swiper {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #f8f8f8;
}

.swiper-slide {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.swiper-slide:hover img {
    transform: scale(1.05);
}

.swiper-pagination {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 10;
}

.swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background-color: #fff;
    opacity: 0.7;
    margin: 0 5px;
    border-radius: 50%;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: #fff;
    width: 12px;
    height: 12px;
}

/* Garantir que todos os carrosséis sejam visíveis */
.product-swiper,
.bouquets-swiper,
.arrangements-swiper,
.bags-swiper {
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
}

/* Células com texto */
.text-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    position: relative;
    padding: 20px;
    width: 100%;
    height: 100%;
}

.text-cell .product-content {
    width: 80%;
    max-width: 320px;
    padding: 0;
    text-align: center;
}

.product-content {
    text-align: center;
    max-width: 320px;
    position: relative;
    z-index: 2;
}

/* Ícones circulares */
.product-icon {
    margin-bottom: 20px;
}

.icon-circle {
    width: 90px;
    height: 90px;
    background-color: #cde8a9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.icon-circle:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.icon-circle img {
    max-width: 60%;
    max-height: 60%;
}

/* Estilo de texto */
.product-content h3 {
    font-family: 'santral', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #333;
    position: relative;
    display: inline-block;
}

.product-content h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background-color: #8AAE92;
}

.text-cell p {
    font-family: 'santral', sans-serif;
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
}

/* Media Queries para Responsividade */
@media (max-width: 991px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
        height: 150vw;
        max-height: 1200px;
    }
    
    /* Ordem explícita para cada célula para garantir a sequência correta */
    .product-cell:nth-child(1) { order: 1; } /* Bouquets imagem */
    .product-cell:nth-child(2) { order: 2; } /* Bouquets texto */
    .product-cell:nth-child(3) { order: 3; } /* Arranjos imagem */
    .product-cell:nth-child(4) { order: 4; } /* Arranjos texto */
    .product-cell:nth-child(5) { order: 5; } /* Bags imagem */
    .product-cell:nth-child(6) { order: 6; } /* Bags texto */
    
    .product-cell {
        min-height: 350px;
    }
    
    .icon-circle {
        width: 80px;
        height: 80px;
        margin: 0 auto 20px;
    }
}

@media (max-width: 767px) {
    /* Reset completo do grid para mobile */
    .products-grid {
        display: block !important;
        grid-template-columns: none !important;
        grid-template-rows: none !important;
        grid-template-areas: none !important;
        height: auto !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Cada produto é um bloco independente com seu carrossel e texto */
    .mobile-product-block {
        display: block !important;
        width: 100% !important;
        margin-bottom: 40px !important;
        overflow: visible !important;
    }
    
    /* Estilizar cada célula como um bloco independente */
    .product-cell {
        width: 100% !important;
        height: auto !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        overflow: visible !important;
        margin: 0 !important;
        float: none !important;
    }
    
    /* Garantir que as células de imagem tenham altura adequada */
    .image-cell {
        height: 100vw !important;
        max-height: 500px !important;
        min-height: 300px !important;
        display: block !important;
        position: relative !important;
        overflow: hidden !important;
        margin-bottom: 0 !important;
    }
    
    /* Ajustar células de texto para ficarem logo abaixo do carrossel */
    .text-cell {
        min-height: auto !important;
        height: auto !important;
        padding: 20px 15px 30px !important;
        margin-bottom: 0 !important;
    }
    
    /* Garantir que todos os carrosséis sejam visíveis */
    .product-swiper,
    .bouquets-swiper,
    .arrangements-swiper,
    .bags-swiper {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        z-index: 1 !important;
        visibility: visible !important;
        opacity: 1 !important;
        display: block !important;
    }
    
    /* Forçar exibição de todos os elementos */
    .product-cell.image-cell,
    .product-cell.text-cell,
    .swiper,
    .swiper-wrapper,
    .swiper-slide,
    .swiper-pagination {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Garantir que as paginações sejam visíveis */
    .swiper-pagination {
        bottom: 10px !important;
        z-index: 10 !important;
    }
    
    /* Esconder elementos desktop que possam interferir */
    .desktop-only {
        display: none !important;
    }
    
    /* Mostrar elementos mobile */
    .mobile-only {
        display: block !important;
    }
    
    /* Garantir que os wrappers e slides sejam visíveis */
    .swiper-wrapper,
    .swiper-slide {
        width: 100% !important;
        height: 100% !important;
        visibility: visible !important;
        opacity: 1 !important;
        display: block !important;
        position: relative !important;
    }
    
    /* Garantir que as imagens preencham corretamente */
    .swiper-slide img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
    }
    
    /* Garantir que os slides sejam visíveis */
    .swiper-slide {
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* Ajustar a paginação para ser mais visível */
    .swiper-pagination {
        bottom: 15px !important;
        z-index: 20 !important;
    }
    
    .swiper-pagination-bullet {
        width: 10px !important;
        height: 10px !important;
        background: rgba(255, 255, 255, 0.9) !important;
        opacity: 0.8 !important;
        margin: 0 5px !important;
    }
    
    .swiper-pagination-bullet-active {
        opacity: 1 !important;
        background: #fff !important;
        width: 12px !important;
        height: 12px !important;
    }
    
    .product-cell:nth-child(1) { order: 1; }
    .product-cell:nth-child(2) { order: 2; }
    .product-cell:nth-child(3) { order: 3; }
    .product-cell:nth-child(4) { order: 4; }
    .product-cell:nth-child(5) { order: 5; }
    .product-cell:nth-child(6) { order: 6; }
    
    .text-cell {
        padding: 0;
    }
    
    .text-cell .product-content {
        width: 80%;
        max-width: 300px;
    }
    
    .product-content h3 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }
}
