/* ===================================================================
   PÁGINA DE DETALHES DO PRODUTO (product.php)
   =================================================================== */

.product-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}

/* --- Seção Principal do Produto (Onde o Blur é ESSENCIAL) --- */
.product-main-view {
    width: 95%;
    max-width: 1440px;
    padding: 40px;
    margin-bottom: 20px;
    border-radius: 25px;
    /* Manterá o glasmorphism do styles.css */
    /* REMOVIDO: max-height: 500px; - para ser mais flexível */
}

.product-itself {
    display: flex;
    gap: 40px;
    margin-bottom: 30px;
}

.product-gallery {
    display: flex;
    gap: 20px;
    flex-direction: row-reverse;
}

.gallery-thumbs {
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.gallery-thumbs img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid var(--border-color);
    transition: border-color 0.3s;
}

.gallery-thumbs img.active,
.gallery-thumbs img:hover {
    border-color: var(--accent-color);
}

.gallery-main {
    flex-shrink: 0;
}

.gallery-main img {
    max-width: 350px;
    max-height: 400px;
    border-radius: 20px;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.gallery-main img:hover {
    transform: scale(1.02);
}

/* --- Informações do Produto --- */
.product-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-info h1 {
    font-family: var(--font-main);
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 10px;
}

.product-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 20px;
}

#button-buy {
    font-size: 1.5rem;
    padding: 16px 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 300px;
    margin-bottom: 10px;
}

.product-stock {
    font-size: 1rem;
    font-weight: 500;
}

/* --- Descrição do Produto --- */
.product-specs h2 {
    font-family: var(--font-main);
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.product-specs p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-muted);
}

/* --- Divisores SVG --- */
.divider-svg-mobile,
.divider-svg-desktop {
    display: none;
    /* Ocultar ambos, vamos focar no layout sem divisores complexos por agora */
}

/* --- OTIMIZAÇÃO: Novo Wrapper para as Seções de Features e Outros Produtos --- */
.product-details-wrapper {
    width: 100%;
    /* REMOVIDO: background-color: var(--products-background); */
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Para centralizar as novas seções */
}

/* --- Seção de Features (A seção que DEVE ter Blur) --- */
.product-sections {
    width: 95%;
    max-width: 1440px;
    margin: 40px auto;
    padding: 40px;
    border-radius: 25px;
    display: flex;
    flex-direction: column;
    gap: 60px;
    /* Manterá o glasmorphism do styles.css */
    background: var(--glasmorphism-bg);
    /* Garante que o fundo é semi-transparente */
}

.product-feature {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    padding: 20px 0;
}

.product-feature.reverse {
    flex-direction: row-reverse;
}

.product-feature svg {
    max-width: 200px;
    height: auto;
    flex-shrink: 0;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.product-feature:hover svg {
    opacity: 1;
}

.feature-text {
    flex: 1;
}

.feature-text h2 {
    font-family: var(--font-main);
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.feature-text p {
    font-size: 1.1rem;
    color: var(--text-primary);
    line-height: 1.5;
}

/* ============================
* Dialogo de adicionado ao carrinho
* ============================ */


.cart-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    border-radius: 20px;
    padding: 30px;
    z-index: 2000;
    text-align: center;
    border: none;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
    visibility: hidden;
}

.cart-dialog.open {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    visibility: visible;
}

.cart-dialog-content i {
    font-size: 3rem;
    color: var(--brand-green);
    margin-bottom: 15px;
}

.cart-dialog-content h3 {
    font-family: var(--font-main);
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.cart-dialog-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.cart-dialog-actions .secondary-button {
    font-family: var(--text-primary);
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cart-dialog-actions .secondary-button:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* --- Seção de Outros Produtos (NÃO PRECISA de Blur) --- */
.other-products {
    width: 95%;
    max-width: 1440px;
    padding: 40px;
    margin-top: 20px;
    border-radius: 25px;
    background-color: var(--products-background);
    /* Fundo sólido para ser mais leve */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.other-products h2 {
    font-family: var(--font-main);
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.product-list {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    width: 100%;
}

.product-item {
    background: var(--bg-primary);
    /* Fundo contrastante e leve */
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    flex: 0 0 280px;
    /* Tamanho fixo para melhor visualização na lista */
}

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

.product-item img {
    max-width: 100%;
    height: 180px;
    object-fit: contain;
    border-radius: 10px;
    margin-bottom: 10px;
}

.product-item h3 {
    font-size: 1.4em;
    margin: 10px 0 5px 0;
    color: var(--text-primary);
}

.product-item p {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.product-item .btn {
    all: unset;
    /* Reset all styles for a clean slate */
    display: inline-block;
    background: var(--accent-color);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
    font-family: var(--font-main);
}

.product-item .btn:hover {
    background: var(--accent-hover);
}


/* =======================================================
   ESTILOS PARA TELAS MENORES (MOBILE)
   ======================================================= */
@media (max-width: 992px) {
    .product-main-view {
        padding: 20px;
        width: 100%;
        max-width: none;
        border-radius: 0;
        margin-bottom: 0;
    }

    .product-itself {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }

    .product-gallery {
        flex-direction: column;
        align-items: center;
    }

    .gallery-main img {
        max-width: 250px;
        max-height: 280px;
    }

    .gallery-thumbs {
        flex-direction: row;
        justify-content: center;
        width: 100%;
    }

    .product-info {
        max-width: 100%;
        align-items: center;
    }

    .product-info h1 {
        font-size: 2.5rem;
    }

    .product-price {
        font-size: 1.8rem;
    }

    #button-buy {
        max-width: 100%;
    }

    /* Features Section Mobile */
    .product-sections {
        width: 100%;
        border-radius: 0;
        padding: 30px 20px;
    }

    .product-feature,
    .product-feature.reverse {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .product-feature svg {
        order: -1;
        /* Move o SVG para cima */
    }

    /* Outros Produtos Mobile */
    .other-products {
        width: 100%;
        border-radius: 0;
        padding: 30px 20px;
    }

    .product-list {
        gap: 20px;
    }

    .product-item {
        flex: 1 1 150px;
        /* Permite 2 colunas */
        padding: 15px;
    }

    .product-item img {
        height: 120px;
    }

    .product-item h3 {
        font-size: 1.2em;
    }
}