

/* --- MODAL DE CHECKOUT (FINALIZAR PEDIDO) --- */

/* Input de Nome Específico do Checkout */
#checkout-customer-name {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid var(--cor-borda);
    border-radius: 12px;
    background-color: var(--cor-fundo); /* Garante contraste no tema dark */
    color: var(--cor-texto-primario);
    font-size: 1rem;
    font-family: var(--font-corpo);
    transition: all 0.3s ease;
    outline: none;
}

#checkout-customer-name:focus {
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.15);
    background-color: var(--cor-surface);
}

#checkout-customer-name::placeholder {
    color: var(--cor-texto-secundario);
    opacity: 0.7;
}

/* Ajuste dos Botões de Pagamento no Modal */
.modal-content .payment-method-selector {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Divide em 2 colunas iguais */
    gap: 12px;
    margin-top: 0.5rem;
}

.modal-content .payment-method-selector label {
    background-color: var(--cor-fundo);
    border: 2px solid var(--cor-borda);
    border-radius: 12px;
    padding: 1rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 100%;
    color: var(--cor-texto-secundario);
    font-weight: 500;
}

.modal-content .payment-method-selector label i {
    font-size: 1.6rem;
    margin-bottom: 2px;
    color: var(--cor-texto-secundario);
    transition: color 0.2s;
}

.modal-content .payment-method-selector label:hover {
    border-color: var(--cor-texto-secundario);
    background-color: color-mix(in srgb, var(--cor-surface) 95%, black);
}

/* Estado Selecionado */
.modal-content .payment-method-selector input:checked + label {
    border-color: var(--cor-primaria);
    background-color: color-mix(in srgb, var(--cor-primaria) 8%, transparent);
    color: var(--cor-primaria);
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.15);
    transform: translateY(-2px);
}

.modal-content .payment-method-selector input:checked + label i {
    color: var(--cor-primaria);
}

/* Botão Confirmar */
#confirm-checkout-btn {
    width: 100%;
    padding: 1.1rem;
    font-size: 1.1rem;
    border-radius: 50px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(25, 135, 84, 0.3);
    margin-top: 0.5rem;
}

#confirm-checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(25, 135, 84, 0.4);
}

/* Ajuste do Header e Labels do Modal */
.modal-content .buy-now-form .form-group label {
    font-weight: 600;
    color: var(--cor-texto-primario);
    margin-bottom: 0.6rem;
    display: block;
    font-size: 0.95rem;
}

.modal-content .modal-product-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    text-align: center;
    width: 100%;
}

/* Ajuste para Mobile pequeno */
@media (max-width: 380px) {
    .modal-content .payment-method-selector {
        grid-template-columns: 1fr; /* 1 coluna em telas muito pequenas */
    }
    .modal-content .payment-method-selector label {
        flex-direction: row;
        padding: 0.8rem;
    }
    .modal-content .payment-method-selector label i {
        margin-bottom: 0;
    }
}

:root {
    --cor-primaria: #0d6efd;
    --cor-primaria-dark: #0b5ed7;
    --cor-secundaria: #FFFFFF;
    --cor-fundo: #F8F9FA;
    --cor-surface: #FFFFFF;
    --cor-texto-primario: #212529;
    --cor-texto-secundario: #6C757D;
    --cor-sucesso: #198754;
    --cor-erro: #DC3545;
    --cor-borda: #dee2e6;
    --sombra-leve: 0 4px 8px rgba(0,0,0,0.04);
    --sombra-media: 0 8px 24px rgba(0,0,0,0.08);
    --borda-radius: 16px;
    --font-titulo: 'Lora', serif;
    --font-corpo: 'Poppins', sans-serif;
    --header-height: 92px;
    --header-height-mobile: 76px;
    --cor-ticker-fundo: #0b5ed7;
}

html[data-theme='dark'] {
    --cor-fundo: #121212;
    --cor-surface: #1e1e1e;
    --cor-texto-primario: #e0e0e0;
    --cor-texto-secundario: #a0a0a0;
    --cor-borda: #3a3b3c;
    --sombra-leve: 0 4px 8px rgba(0,0,0,0.2);
    --sombra-media: 0 8px 24px rgba(0,0,0,0.3);
}

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

html { 
    scroll-behavior: smooth; 
    height: 100vh; /* Fallback */
    height: 100dvh;
}
body {
    background-color: var(--cor-fundo);
    color: var(--cor-texto-primario);
    font-family: var(--font-corpo);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s, color 0.3s;
    height: 100%;
    position: relative;
    overflow: hidden; /* The body acts as a static frame */
}

/* Double scrollbar bug fix */
#app {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Replaces the old rule to lock the new scroll container */
body.modal-open #app {
    overflow: hidden;
}

.container { width: 95%; max-width: 1280px; margin: 0 auto; padding: 2rem 0; }
h1, h2, h3 { font-family: var(--font-titulo); font-weight: 700; color: var(--cor-texto-primario); }

/* --- Image Loading Optimization --- */
.produto-imagem-container,
.modal-product-carousel .carousel-slide,
.search-result-item img,
.cart-item-card img {
    background-color: var(--cor-borda);
}

.produto-imagem-container img,
.carousel-slide img,
.search-result-item img,
.cart-item-card img {
    opacity: 0;
    transition: opacity 0.2s ease-in-out; /* Speed up transition for snappier feel */
}

.produto-imagem-container img.loaded,
.carousel-slide img.loaded,
.search-result-item img.loaded,
.cart-item-card img.loaded {
    opacity: 1;
}


/* --- LOADER --- */
.loader-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); display: flex; justify-content: center; align-items: center; z-index: 9999; backdrop-filter: blur(4px); visibility: hidden; opacity: 0; transition: opacity 0.3s, visibility 0.3s; }
.loader-container.visible { visibility: visible; opacity: 1; }
.loader {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    /* A single conic gradient creates a "sweep" effect that fades out */
    background: conic-gradient(var(--cor-primaria), color-mix(in srgb, var(--cor-primaria) 20%, transparent));
    /* Mask to create the ring shape */
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 0);
    mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 0);
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- VISÃO CLIENTE --- */
#ticker-bar { 
    background-color: var(--cor-ticker-fundo); 
    color: var(--cor-secundaria); 
    text-align: center; 
    padding: 0.5rem; 
    font-size: 0.9rem; 
    font-weight: 500; 
    overflow: hidden; 
    height: 32px; 
    white-space: nowrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3); /* Borda branca solicitada */
}
#ticker-text { display: inline-block; }
@keyframes fade-in-out { 0%, 100% { opacity: 0; } 10%, 90% { opacity: 1; } }

#ticker-bar.scroll-enabled #ticker-text {
    animation-name: scroll-left;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    padding-left: 100%;
}
@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* --- BARRA DE ALERTA (NOVA) --- */
#alert-bar {
    width: 100%;
    text-align: center;
    padding: 0.8rem 1rem;
    font-weight: 700;
    z-index: 190;
    position: relative;
    line-height: 1.4;
}
.anim-fade {
    animation-name: alert-fade;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}
@keyframes alert-fade {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.anim-blink {
    animation-name: alert-blink;
    animation-timing-function: steps(2, start);
    animation-iteration-count: infinite;
}
@keyframes alert-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

#header-cliente { background-color: var(--cor-primaria); color: var(--cor-secundaria); padding: 1rem 0; box-shadow: var(--sombra-media); position: sticky; top: 0; z-index: 200; height: var(--header-height); }
#header-cliente .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.5rem 2.5%; height: 100%; }
.header-left, .header-right { display: flex; align-items: center; gap: 0.8rem; flex: 1; }
.header-right { justify-content: flex-end; }
.header-left { justify-content: flex-start; }
#header-cliente .logo-area { display: flex; align-items: center; gap: 1rem; } /* Kept for desktop */
#header-cliente .logo-area a { text-decoration: none; color: inherit; display: flex; align-items: center; gap: 1rem;}
#header-cliente .logo-area img { height: 60px; width: 60px; border-radius: 50%; object-fit: cover; background-color: white; padding: 4px; border: 2px solid var(--cor-secundaria); }
#header-cliente .logo-area h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 700; color: var(--cor-secundaria); }
.header-actions button, .header-actions a.back-to-catalog-btn,
.header-left button, .header-right button, .header-left a, .header-right a { background: none; border: none; color: var(--cor-secundaria); cursor: pointer; font-size: 1.6rem; padding: 0.5rem; position: relative; flex-shrink: 0; text-decoration: none;}
.header-actions a.back-to-catalog-btn { font-size: 1rem; font-weight: 600; display: flex; align-items: center; gap: 0.5rem; border: 1px solid rgba(255,255,255,0.3); padding: 0.5rem 1rem; border-radius: 50px; transition: background 0.2s; }
.header-actions a.back-to-catalog-btn:hover { background-color: rgba(255,255,255,0.1); }
#header-cliente .cart-badge { position: absolute; top: 0px; right: 0px; background-color: var(--cor-erro); color: white; border-radius: 50%; width: 20px; height: 20px; font-size: 0.75rem; font-weight: bold; display: flex; justify-content: center; align-items: center; }

.hamburger-menu { display: none; background: none; border: none; color: var(--cor-secundaria); cursor: pointer; padding: 0.5rem; flex-shrink: 0; }
.hamburger-menu i { font-size: 30px; }

/* --- NOVA BUSCA MODAL --- */
#search-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4rem 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
#search-container.visible {
    opacity: 1;
    visibility: visible;
}
#search-input-wrapper {
    position: relative;
    width: 100%;
    max-width: 700px;
    margin-bottom: 2rem;
}
#search-input {
    width: 100%;
    padding: 1.2rem 2rem;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    border-radius: 50px;
    border: 2px solid var(--cor-borda);
    background-color: var(--cor-surface);
    color: var(--cor-texto-primario);
    transition: all 0.2s;
}
#search-input:focus {
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.25);
    outline: none;
}
#search-close-btn {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    color: var(--cor-secundaria);
    transition: transform 0.2s;
    z-index: 2; /* above input wrapper */
}
#search-close-btn:hover {
    transform: scale(1.1);
}
#search-results-container {
    width: 100%;
    max-width: 700px;
    overflow-y: auto;
    max-height: calc(100vh - 150px); /* Adjust based on padding and input height */
}
.search-result-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
    background-color: var(--cor-surface);
    border-radius: var(--borda-radius);
    margin-bottom: 1rem;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    border: 1px solid var(--cor-borda);
}
.search-result-item:hover {
    background-color: var(--cor-fundo);
    transform: scale(1.02);
}
.search-result-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}
.search-result-info h4 {
    font-size: 1.2rem;
    color: var(--cor-texto-primario);
    margin: 0 0 0.25rem;
}
.search-result-info p {
    font-size: 1rem;
    color: var(--cor-primaria);
    font-weight: 600;
    margin: 0;
}
#search-no-results {
    color: var(--cor-secundaria);
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
}
/* --- FIM NOVA BUSCA --- */

/* --- BANNER CAROUSEL --- */
#hero-banner-carousel {
    width: 100%;
    height: 40vh;
    max-height: 400px;
    position: relative;
    overflow: hidden;
    background-color: var(--cor-fundo);
}
.banner-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}
.banner-slide {
    flex: 0 0 100%;
    height: 100%;
    position: relative;
}

/* --- BANNER TRANSITIONS --- */

/* Default Slide is handled by flex + transform on .banner-track */

/* Fade Effect */
.banner-track.effect-fade {
    display: block; /* Remove flex behavior */
}
.banner-track.effect-fade .banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    z-index: 1;
}
.banner-track.effect-fade .banner-slide.active {
    opacity: 1;
    z-index: 2;
}

/* Zoom Effect */
.banner-track.effect-zoom {
    display: block; /* Remove flex behavior */
}
.banner-track.effect-zoom .banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(1.1);
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    z-index: 1;
}
.banner-track.effect-zoom .banner-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.banner-slide a, .banner-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.banner-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.4);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    z-index: 5;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s;
}
.banner-nav:hover { background-color: rgba(0,0,0,0.6); }
.banner-nav.prev { left: 15px; }
.banner-nav.next { right: 15px; }
.banner-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 5;
}
.banner-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.2);
    transition: background-color 0.3s;
}
.banner-dot.active { background-color: white; }

/* --- NOVIDADES SLIDER --- */
#novidades-slider-section {
    padding: 3rem 0;
}
#novidades-slider-section .container { padding: 0 2.5%; }
.section-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}
.section-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--cor-texto-primario);
}
.novidades-swiper-container {
    overflow: hidden;
    padding: 1rem; /* Padding for box-shadow visibility */
    margin: -1rem; /* Offset padding */
}
.novidade-card {
    background-color: var(--cor-surface);
    border-radius: var(--borda-radius);
    box-shadow: var(--sombra-leve);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
    height: auto; /* For swiper */
    text-decoration: none; /* Remove underline from card link */
}
.novidade-card h3 {
    text-decoration: none !important; /* Force remove underline */
    color: var(--cor-texto-primario);
}

html[data-theme='dark'] .novidade-card { border-color: var(--cor-borda); }
.novidade-card:hover { transform: translateY(-5px); box-shadow: var(--sombra-media); }
.novidade-card .produto-imagem-container { height: 200px; } /* Consistent height */
.novidade-card-info { padding: 1.2rem; }
.novidade-card-info h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.5rem; line-height: 1.3; }
.novidade-card-info .price-display .preco-promocional { font-size: 1.4rem; font-weight: 700; color: var(--cor-primaria); }

#menu-wrapper { display: flex; flex-direction: column; gap: 2rem; }
#category-nav-mobile { background-color: var(--cor-surface); padding: 0.5rem 0; position: sticky; top: var(--header-height); z-index: 100; box-shadow: var(--sombra-leve); }
#category-nav-mobile .container { 
    display: flex; 
    overflow-x: auto; 
    scrollbar-width: none; 
    -ms-overflow-style: none; 
    padding: 0.5rem 2.5%; 
    gap: 1rem; 
    cursor: grab; /* Enable grab cursor */
    user-select: none; /* Disable text selection during drag */
}
#category-nav-mobile .container.dragging {
    cursor: grabbing;
}
#category-nav-mobile .container.dragging a {
    pointer-events: none; /* Prevent link clicks while dragging */
}
#category-nav-mobile::-webkit-scrollbar { display: none; }
#category-nav-mobile a { white-space: nowrap; padding: 0.6rem 1.2rem; border-radius: 50px; text-decoration: none; font-weight: 600; color: var(--cor-texto-secundario); background-color: var(--cor-fundo); transition: all 0.3s ease; }
#category-nav-mobile a:hover { filter: brightness(0.95); }
#category-nav-mobile a.active { background-color: var(--cor-primaria); color: var(--cor-secundaria); transform: scale(1.05); }

#menu-nav-sidebar { display: none; }

.categoria-section { padding-top: 2rem; margin-top: -2rem; }
.categoria-titulo { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 2.5rem; padding-bottom: 1rem; border-bottom: 3px solid var(--cor-primaria); }
.produtos-container.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }

.produto-card { background-color: var(--cor-surface); border-radius: var(--borda-radius); box-shadow: var(--sombra-leve); overflow: hidden; display: flex; flex-direction: column; transition: transform 0.3s ease, box-shadow 0.3s ease; position: relative; border: 1px solid transparent; cursor: pointer; }
html[data-theme='dark'] .produto-card { border-color: var(--cor-borda); }
.produto-card:hover { transform: translateY(-8px); box-shadow: var(--sombra-media); }
.produto-card.indisponivel { opacity: 0.6; pointer-events: none; }
.produto-card.indisponivel::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(44, 44, 44, 0.3); z-index: 1; }
.indisponivel-selo { position: absolute; top: 1rem; right: 1rem; background-color: var(--cor-texto-secundario); color: var(--cor-surface); padding: 0.3rem 0.8rem; border-radius: 50px; font-size: 0.8rem; font-weight: 600; z-index: 2; }
.produto-info { padding: 1.2rem; display: flex; flex-direction: column; flex-grow: 1; }
.produto-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;  
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.6em; /* 2 lines * 1.3 line-height */
}
.produto-info .description-markdown-wrapper {
    color: var(--cor-texto-secundario);
    margin-bottom: 1rem;
    flex-grow: 1;
    font-size: 0.9rem;
    line-height: 1.5;
    height: 4.5em; /* 3 lines * 1.5 line-height */
    overflow: hidden;
    position: relative;
}
.description-markdown-wrapper p, .description-markdown-wrapper ul, .description-markdown-wrapper ol { font-size: inherit; line-height: inherit; }

.produto-card-footer { display: flex; justify-content: space-between; align-items: flex-end; margin-top: auto; padding-top: 1rem; }

.price-display .preco-original { font-size: 0.9rem; color: var(--cor-texto-secundario); text-decoration: line-through; display: block; }
.price-display .preco-promocional { font-size: 1.5rem; font-weight: 700; color: var(--cor-primaria); line-height: 1.1; }

/* Payment Options Styling (Card) */
.payment-options {
    font-size: 0.85rem;
    color: var(--cor-texto-secundario);
    margin-top: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.payment-options div {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.payment-options i, .payment-options svg {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    color: var(--cor-primaria);
    fill: var(--cor-primaria);
}
.payment-options strong {
    color: var(--cor-texto-primario);
}
.pix-discount-badge {
    color: var(--cor-sucesso);
    font-weight: 700;
}

/* Quick Add to Cart Button */
.quick-add-to-cart-btn {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background-color: var(--cor-primaria);
    color: var(--cor-secundaria);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
    transition: transform 0.2s, background-color 0.2s, opacity 0.2s;
    opacity: 0;
    transform: translateY(10px);
}
.produto-card:hover .quick-add-to-cart-btn {
    opacity: 1;
    transform: translateY(0);
}
.quick-add-to-cart-btn:hover {
    background-color: var(--cor-primaria-dark);
    transform: scale(1.1);
}


/* --- NOVO CARROSSEL NO CARD DE PRODUTO --- */
.produto-card .produto-imagem-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: var(--cor-fundo);
}
.produto-card .produto-imagem-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.produto-imagem-container.swiper { cursor: grab; }
.produto-imagem-container .swiper-slide { display: flex; justify-content: center; align-items: center; }
.produto-imagem-container .swiper-pagination { bottom: 8px !important; }
.produto-imagem-container .swiper-pagination-bullet {
    background-color: rgba(255, 255, 255, 0.7);
    opacity: 1;
    border: 1px solid rgba(0,0,0,0.2);
    transition: background-color 0.2s, border-color 0.2s;
}
.produto-imagem-container .swiper-pagination-bullet-active {
    background-color: var(--cor-primaria);
    border-color: transparent;
}
.produto-imagem-container .swiper-button-next,
.produto-imagem-container .swiper-button-prev {
    color: var(--cor-secundaria);
    background-color: rgba(0,0,0,0.3);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s, background-color 0.2s;
}
.produto-imagem-container .swiper-button-next:hover,
.produto-imagem-container .swiper-button-prev:hover {
    background-color: rgba(0,0,0,0.5);
}
.produto-imagem-container .swiper-button-next::after,
.produto-imagem-container .swiper-button-prev::after {
    font-size: 14px;
    font-weight: bold;
}
.produto-card:hover .produto-imagem-container .swiper-button-next,
.produto-card:hover .produto-imagem-container .swiper-button-prev {
    opacity: 1;
}
/* --- FIM CARROSSEL NO CARD --- */


/* --- REVISED LIST VIEW STYLES --- */
.produtos-container.list .produto-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    grid-template-rows: auto;
    gap: 1.5rem;
    padding: 1.5rem;
    align-items: start;
}
.produtos-container.list .produto-card .produto-imagem-container {
    width: 120px;
    height: 120px;
    border-radius: var(--borda-radius);
    grid-column: 1 / 2;
    align-self: center;
}
.produtos-container.list .produto-info {
    grid-column: 2 / 3;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}
.produtos-container.list .produto-info .description-markdown-wrapper {
    height: 3.2em; /* 2 lines * 1.6 line-height */
    margin-bottom: 1rem;
}
.produtos-container.list .produto-card-footer {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
    padding-top: 0;
    width: 100%;
}
.produtos-container.list .price-display .preco-promocional {
    font-size: 1.5rem;
}
.produtos-container.list .produto-imagem-container .swiper-button-next,
.produtos-container.list .produto-imagem-container .swiper-button-prev {
    width: 24px;
    height: 24px;
}
.produtos-container.list .produto-imagem-container .swiper-button-next::after,
.produtos-container.list .produto-imagem-container .swiper-button-prev::after {
    font-size: 10px;
}


/* NOVO FOOTER */
#footer-cliente { background-color: var(--cor-surface); color: var(--cor-texto-secundario); padding: 4rem 2.5% 2rem; margin-top: 4rem; border-top: 1px solid var(--cor-borda); }
.footer-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 3rem; max-width: 1280px; margin: 0 auto; padding-bottom: 3rem; border-bottom: 1px solid var(--cor-borda); }
.footer-column h4 { font-family: var(--font-titulo); font-size: 1.2rem; color: var(--cor-texto-primario); margin-bottom: 1.5rem; }
.footer-about .logo-area { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.footer-about img { height: 50px; width: 50px; border-radius: 50%; object-fit: cover; }
.footer-about p { font-size: 0.9rem; line-height: 1.6; }
.footer-socials { display: flex; gap: 1rem; margin-top: 1.5rem; }
.footer-socials a { color: var(--cor-texto-secundario); transition: color 0.2s; }
.footer-socials a:hover { color: var(--cor-primaria); }
.footer-socials i { font-size: 24px; }
.footer-links ul { list-style: none; }
.footer-links a { color: var(--cor-texto-secundario); text-decoration: none; display: block; margin-bottom: 0.8rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--cor-primaria); }
.footer-payments .payment-flags { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }
.footer-payments .payment-flags img {
    height: 28px;
    width: auto;
    filter: grayscale(1);
    opacity: 0.7;
    transition: all 0.2s;
}
.footer-payments .payment-flags img:hover {
    filter: grayscale(0);
    opacity: 1;
}
.footer-payments :is(i, svg) { height: 28px; font-size: 28px; color: var(--cor-texto-secundario); fill: var(--cor-texto-secundario); }
.footer-bottom { text-align: center; padding-top: 2rem; font-size: 0.9rem; }
.footer-bottom a { color: var(--cor-primaria); font-weight: 600; text-decoration: none; }
.footer-bottom a:hover { text-decoration: underline; }

/* Mobile Nav Sidebar (Hamburger) */
#mobile-nav-sidebar-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); z-index: 1000; visibility: hidden; opacity: 0; transition: opacity 0.3s, visibility 0.3s; }
#mobile-nav-sidebar-overlay.visible { visibility: visible; opacity: 1; }
#mobile-nav-sidebar { position: fixed; top: 0; left: 0; width: 300px; height: 100%; background-color: var(--cor-surface); z-index: 1001; transform: translateX(-100%); transition: transform 0.3s ease-in-out; padding: 2rem 0; }
#mobile-nav-sidebar.visible { transform: translateX(0); }
#mobile-nav-sidebar h3 { padding: 0 2rem; margin-bottom: 1rem; }
#mobile-nav-sidebar ul { list-style: none; }
#mobile-nav-sidebar a { display: block; padding: 1rem 2rem; text-decoration: none; color: var(--cor-texto-primario); font-weight: 600; border-bottom: 1px solid var(--cor-borda); }

/* --- NOTIFICAÇÕES --- */
#notification-area { position: fixed; bottom: 20px; right: 20px; z-index: 10000; display: flex; flex-direction: column; align-items: flex-end; }
.notification { padding: 1rem 1.5rem; border-radius: 8px; color: white; margin-bottom: 1rem; box-shadow: var(--sombra-media); opacity: 0; transform: translateX(100%); animation: slideIn 0.5s forwards; }
.notification.success { background-color: var(--cor-sucesso); }
.notification.error { background-color: var(--cor-erro); }
@keyframes slideIn { to { opacity: 1; transform: translateX(0); } }

/* --- MODAL PRODUTO --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.visible { opacity: 1; visibility: visible; }
.modal-content {
    background-color: var(--cor-surface);
    padding: 0;
    border-radius: var(--borda-radius);
    box-shadow: var(--sombra-media);
    width: 90%;
    max-width: 600px;
    max-height: 90dvh; /* Changed to dvh for better mobile support */
    overflow: hidden;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}
.modal-overlay.visible .modal-content { transform: scale(1); }

.modal-carousel-wrapper { flex-shrink: 0; }
.modal-details-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 0; /* Fix for flexbox overflow */
}
.modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex-grow: 1;
}
.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--cor-texto-secundario);
    z-index: 10;
    transition: color 0.2s;
}
.modal-close-btn:hover { color: var(--cor-texto-primario); }

/* Modal Produto: Carrossel */
.modal-product-carousel { position: relative; width: 100%; height: 350px; background-color: var(--cor-fundo); }
.carousel-track { display: flex; height: 100%; transition: transform 0.3s ease-in-out; }
.carousel-slide { flex: 0 0 100%; height: 100%; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); background-color: rgba(0,0,0,0.5); color: white; border: none; border-radius: 50%; width: 40px; height: 40px; cursor: pointer; z-index: 5; }
.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }
.carousel-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.carousel-dot { width: 10px; height: 10px; border-radius: 50%; background-color: rgba(255,255,255,0.6); cursor: pointer; }
.carousel-dot.active { background-color: white; }

.modal-product-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.modal-product-header h2 { font-size: clamp(1.8rem, 5vw, 2.5rem); font-family: var(--font-titulo); line-height: 1.2; }
.modal-product-price-wrapper .price-display .preco-promocional { font-size: 2rem; }

/* Payment Options Styling (Modal & Product Page) */
.modal-payment-options {
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.modal-payment-options div {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background-color: var(--cor-fundo);
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    font-size: 0.95rem;
    color: var(--cor-texto-secundario);
    border: 1px solid var(--cor-borda);
}
.modal-payment-options i, .modal-payment-options svg {
    font-size: 1.25rem;
    color: var(--cor-primaria);
    fill: var(--cor-primaria);
    width: 22px;
    text-align: center;
}
.modal-payment-options strong {
    color: var(--cor-texto-primario);
}

.modal-product-description { color: var(--cor-texto-secundario); line-height: 1.8; margin-top: 1.5rem; }
.modal-product-description p { margin-bottom: 1rem; }
.modal-product-description p:last-child { margin-bottom: 0; }
.modal-product-description ul,
.modal-product-description ol {
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}
.modal-product-description li { margin-bottom: 0.5rem; }

.modal-add-to-cart-form { margin-top: 2rem; border-top: 1px solid var(--cor-borda); padding-top: 2rem; }

/* Modal Produto: Opções de Personalização (Pill Style) */
.customization-group {
    margin-bottom: 1.5rem;
    border: none;
    padding: 0;
}
.customization-group legend {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    font-family: var(--font-titulo);
}
.options-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.options-container .option-label {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.8rem 1.2rem;
    border: 2px solid var(--cor-borda);
    border-radius: 12px;
    margin: 0;
    background-color: var(--cor-fundo);
    transition: all 0.2s ease;
    cursor: pointer;
    font-weight: 500;
}
.options-container .option-label:hover {
    border-color: var(--cor-primaria);
    color: var(--cor-primaria);
}
.options-container .option-label.selected {
    background-color: var(--cor-primaria);
    border-color: var(--cor-primaria);
    color: var(--cor-secundaria);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.options-container .option-label.selected .option-price {
    color: var(--cor-secundaria);
    opacity: 0.9;
}
.options-container .option-label input[type="radio"],
.options-container .option-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.options-container .option-label div {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
}
.options-container .option-label .option-price {
    font-size: 0.9em;
    font-weight: 600;
    color: var(--cor-primaria);
}

.modal-footer {
    margin-top: auto;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--cor-borda);
    background-color: var(--cor-surface);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.modal-total-price { font-size: 1.5rem; font-weight: bold; }
.modal-add-to-cart-btn { background-color: var(--cor-primaria); color: var(--cor-secundaria); border: none; padding: 0.8rem 1.5rem; font-size: 1rem; font-weight: 600; border-radius: 8px; cursor: pointer; transition: background-color 0.2s; }
.modal-add-to-cart-btn:hover { background-color: var(--cor-primaria-dark); }
.modal-add-to-cart-btn:disabled { background-color: var(--cor-texto-secundario); cursor: not-allowed; }

/* --- NOVO CARRINHO SIDEBAR --- */
#cart-sidebar-container.visible .cart-sidebar-backdrop { opacity: 1; visibility: visible; }
#cart-sidebar-container.visible .cart-sidebar { transform: translateX(0); }

.cart-sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background-color: var(--cor-surface);
    z-index: 10001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 25px rgba(0,0,0,0.1);
}
.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--cor-borda);
    flex-shrink: 0;
}
.cart-header h3 { font-size: 1.5rem; margin: 0; }
.close-cart-btn { background: none; border: none; font-size: 2rem; cursor: pointer; color: var(--cor-texto-secundario); }
.cart-body { flex-grow: 1; overflow-y: auto; padding: 1.5rem; }
.cart-item-card {
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid var(--cor-borda);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}
.cart-item-card:last-child { border-bottom: none; margin-bottom: 0; }
.cart-item-card img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.cart-item-details { flex-grow: 1; display: flex; flex-direction: column; }
.cart-item-details h4 { font-size: 1.1rem; margin: 0 0 0.5rem; }
.cart-item-options-list { list-style: none; font-size: 0.85rem; color: var(--cor-texto-secundario); margin-bottom: auto; }
.cart-item-price { font-weight: 600; color: var(--cor-primaria); font-size: 1.1rem; margin-top: 0.5rem; }
.cart-item-actions { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.quantity-control { display: flex; align-items: center; gap: 0.8rem; }
.quantity-control button { background-color: var(--cor-fundo); border: 1px solid var(--cor-borda); width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 1.2rem; }
.remove-item-btn { background: none; border: none; color: var(--cor-texto-secundario); cursor: pointer; font-size: 1rem; transition: color 0.2s; }
.remove-item-btn:hover { color: var(--cor-erro); }
.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--cor-borda);
    background-color: var(--cor-surface);
    box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
}
.cart-total { display: flex; justify-content: space-between; font-size: 1.2rem; font-weight: 600; margin-bottom: 1rem; }
.checkout-button { width: 100%; background-color: var(--cor-sucesso); color: white; border: none; padding: 1rem; font-size: 1.1rem; font-weight: 600; border-radius: 8px; cursor: pointer; transition: filter 0.2s; }
.checkout-button:hover { filter: brightness(1.1); }
.cart-empty-state { text-align: center; padding: 4rem 1rem; color: var(--cor-texto-secundario); }
.cart-empty-state i { font-size: 4rem; color: var(--cor-borda); margin-bottom: 1.5rem; }
.cart-empty-state h3 { font-size: 1.5rem; color: var(--cor-texto-primario); }
.continue-shopping-btn { background-color: var(--cor-primaria); color: var(--cor-secundaria); border: none; padding: 0.8rem 1.5rem; font-size: 1rem; font-weight: 600; border-radius: 8px; cursor: pointer; transition: background-color 0.2s; margin-top: 1.5rem; }
.continue-shopping-btn:hover { background-color: var(--cor-primaria-dark); }
/* --- FIM CARRINHO SIDEBAR --- */


/* --- MENSAGEM CATÁLOGO VAZIO --- */
.empty-menu-message { text-align: center; padding: 5rem 2rem; color: var(--cor-texto-secundario); }
.empty-menu-message h3 { font-size: 1.8rem; margin-bottom: 1rem; }

/* --- WHATSAPP WIDGET --- */
#whatsapp-widget-root { position: fixed; bottom: 25px; right: 25px; z-index: 100; }
.whatsapp-flutuante { background-color: #25D366; color: white; border: none; border-radius: 50%; width: 60px; height: 60px; display: flex; justify-content: center; align-items: center; box-shadow: var(--sombra-media); transition: transform 0.3s, opacity 0.3s, visibility 0.3s; cursor: pointer; }
.whatsapp-flutuante:hover { transform: scale(1.1); }
.whatsapp-flutuante i { font-size: 32px; }
.whatsapp-flutuante.hidden { transform: scale(0); opacity: 0; visibility: hidden; }

#whatsapp-chat-popup { position: absolute; bottom: 80px; right: 0; width: 320px; background-color: var(--cor-surface); border-radius: var(--borda-radius); box-shadow: var(--sombra-media); display: flex; flex-direction: column; overflow: hidden; transition: transform 0.3s ease-in-out, opacity 0.3s, visibility 0.3s; transform-origin: bottom right; }
#whatsapp-chat-popup.hidden { transform: scale(0); opacity: 0; visibility: hidden; }
.chat-header { background-color: var(--cor-primaria); color: var(--cor-secundaria); padding: 1rem; display: flex; align-items: center; gap: 1rem; }
.chat-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.chat-agent-name { font-weight: 600; }
.chat-status { font-size: 0.8rem; opacity: 0.9; }
#close-chat-popup { background: none; border: none; color: var(--cor-secundaria); font-size: 1.5rem; margin-left: auto; cursor: pointer; }
.chat-body { padding: 1rem; height: 150px; }
.chat-message.received { display: flex; }
.message-content { max-width: 90%; }
.message-bubble { background-color: var(--cor-fundo); padding: 0.8rem; border-radius: 0 var(--borda-radius) var(--borda-radius) var(--borda-radius); }
.message-bubble.hidden { display: none; }
.typing-indicator { display: flex; align-items: center; gap: 4px; padding: 12px; }
.typing-indicator span { width: 8px; height: 8px; background-color: var(--cor-texto-secundario); border-radius: 50%; animation: typing 1s infinite; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }
.chat-footer { display: flex; border-top: 1px solid var(--cor-borda); }
#whatsapp-message-input { flex-grow: 1; border: none; padding: 1rem; font-size: 1rem; background-color: transparent; color: var(--cor-texto-primario); }
#whatsapp-message-input:focus { outline: none; }
#send-whatsapp-message { background-color: var(--cor-primaria); color: var(--cor-secundaria); border: none; padding: 0 1.2rem; cursor: pointer; font-size: 1.2rem; }

/* --- PÁGINA DE PRODUTO INDIVIDUAL --- */
.product-page-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1.5rem 0;
}
.product-page-gallery {
    width: 100%;
}
.product-page-gallery .swiper {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
    border-radius: var(--borda-radius);
    overflow: hidden;
    background-color: var(--cor-fundo);
}
.product-page-gallery .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.product-page-gallery .swiper-pagination-bullet-active { background-color: var(--cor-primaria); }
.product-page-gallery .swiper-button-next, .product-page-gallery .swiper-button-prev { color: var(--cor-primaria); }

/* Reusing Modal Styles in Product Page Details */
.product-page-details {
    background-color: var(--cor-surface);
    border-radius: var(--borda-radius);
    box-shadow: var(--sombra-media);
    padding: 2rem;
    border: 1px solid var(--cor-borda);
    /* Ensure it behaves like a block, not restricted by flex shrink unnecessarily */
    min-width: 0;
}

/* Integrated Checkout Area */
.product-page-checkout-area {
    margin-top: 2rem;
    border-top: 2px dashed var(--cor-borda);
    padding-top: 2rem;
    background-color: var(--cor-fundo);
    padding: 2rem;
    border-radius: var(--borda-radius);
    margin: 2rem -1rem -2rem -1rem;
}

.checkout-divider {
    font-size: 1.4rem;
    font-family: var(--font-titulo);
    color: var(--cor-primaria);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.checkout-divider::before {
    content: '\f290'; /* fa-bag-shopping */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

.product-page-checkout-area .form-group {
    margin-bottom: 1.5rem;
}

.product-page-checkout-area input[type="text"] {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--cor-borda);
    border-radius: 12px;
    font-size: 1rem;
    background-color: var(--cor-surface);
    color: var(--cor-texto-primario);
    transition: border-color 0.2s;
}
.product-page-checkout-area input[type="text"]:focus {
    border-color: var(--cor-primaria);
    outline: none;
}

/* Reuse Payment Method Selector but tweak background */
.payment-method-selector label {
    background-color: var(--cor-surface);
}

.checkout-footer {
    margin-top: 2rem;
    border-top: 1px solid var(--cor-borda);
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checkout-footer .total-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--cor-texto-secundario);
}

.checkout-footer .final-price {
    font-size: 1.8rem;
    color: var(--cor-primaria);
    font-weight: 700;
}

.buy-now-btn {
    width: 100%;
    background-color: #25D366; /* WhatsApp Green */
    color: white;
    border: none;
    padding: 1.2rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.buy-now-btn:hover {
    background-color: #1ebe57;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.buy-now-btn:disabled {
    background-color: var(--cor-texto-secundario);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Custom Radio Button Styling for Payment */
.payment-method-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.8rem;
}

.payment-method-selector label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 2px solid var(--cor-borda);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    color: var(--cor-texto-secundario);
    text-align: center;
}

.payment-method-selector label i {
    font-size: 1.5rem;
    color: var(--cor-texto-secundario);
    transition: color 0.2s;
}

.payment-method-selector input:checked + label {
    border-color: var(--cor-primaria);
    background-color: color-mix(in srgb, var(--cor-primaria) 10%, transparent);
    color: var(--cor-primaria);
}

.payment-method-selector input:checked + label i {
    color: var(--cor-primaria);
}

/* --- Collapsible Description on Product Page --- */
.product-description-wrapper {
    margin-top: 1.5rem;
    border-top: 1px solid var(--cor-borda);
    padding-top: 1.5rem;
}
.product-description-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
}
.product-description-wrapper.expanded .product-description-content {
    max-height: 1000px; /* Large enough for content */
    transition: max-height 0.5s ease-in;
}
#toggle-description-btn {
    background: none;
    border: 1px solid var(--cor-borda);
    color: var(--cor-texto-secundario);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 1.5rem;
    width: 100%;
    transition: all 0.2s;
}
#toggle-description-btn:hover {
    background-color: var(--cor-fundo);
    color: var(--cor-primaria);
    border-color: var(--cor-primaria);
}

/* --- "See More" Slider on Product Page --- */
.related-products-section {
    padding: 3rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--cor-borda);
}
.related-products-section h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--cor-texto-primario);
    margin-bottom: 2rem;
    text-align: center;
}
.related-products-slider .novidade-card {
    cursor: pointer;
}


/* --- RESPONSIVIDADE --- */
@media (min-width: 992px) {
    .hamburger-menu { display: none !important; }
    #menu-wrapper { flex-direction: row; align-items: flex-start; gap: 3rem; }
    #menu-nav-sidebar { display: block; flex: 0 0 280px; position: sticky; top: calc(var(--header-height) + 2rem); align-self: flex-start; background-color: var(--cor-surface); border-radius: var(--borda-radius); padding: 1.5rem; box-shadow: var(--sombra-leve); border: 1px solid transparent; }
    html[data-theme='dark'] #menu-nav-sidebar { border-color: var(--cor-borda); }
    #menu-nav-sidebar h3 { font-size: 1.5rem; margin-bottom: 1.5rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--cor-borda); }
    #menu-nav-sidebar ul { list-style: none; }
    #menu-nav-sidebar li a { display: block; padding: 0.8rem 1rem; text-decoration: none; color: var(--cor-texto-primario); font-weight: 600; border-radius: 8px; transition: all 0.2s ease-in-out; border-left: 4px solid transparent; }
    #menu-nav-sidebar li a:hover { background-color: var(--cor-fundo); color: var(--cor-primaria); }
    #menu-nav-sidebar li a.active { background-color: var(--cor-fundo); color: var(--cor-primaria); border-left-color: var(--cor-primaria); transform: translateX(5px); }
    #menu-content { flex: 1; min-width: 0; }
    .modal-content:not(.modal-content-single-column) {
        max-width: 960px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: minmax(0, 1fr);
        padding: 0;
        height: 80vh;
        max-height: 80vh;
    }
    .modal-carousel-wrapper {
        min-width: 0;
        min-height: 0;
        overflow: hidden;
    }
    .modal-product-carousel {
        height: 100%;
    }
    .modal-details-wrapper {
        min-height: 0;
        min-width: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    .modal-body {
        padding: 2.5rem;
        flex-grow: 1;
        overflow-y: auto;
    }
    .modal-close-btn {
        color: var(--cor-texto-primario);
    }
    .product-page-container {
        display: grid;
        grid-template-columns: 1fr 1fr; /* Side by side layout for gallery and details */
        gap: 3rem;
        align-items: start;
        padding: 2rem 0;
    }
    .product-page-gallery .swiper {
        height: auto;
        max-width: 100%;
        max-height: 600px;
        aspect-ratio: 1 / 1;
        position: sticky;
        top: calc(var(--header-height) + 2rem);
    }
    .product-page-details {
        /* Ensure content doesn't break layout */
    }
    .product-page-checkout-area {
        margin-left: -2rem;
        margin-right: -2rem;
        padding: 2rem;
        border-radius: var(--borda-radius);
    }
}

@media (max-width: 991px) {
    .container { padding: 1.5rem 0; }
    #menu-content { min-width: 0; }
    .hamburger-menu { display: block; }
    #header-cliente { height: var(--header-height-mobile); }
    #category-nav-mobile { top: var(--header-height-mobile); }
    .product-page-container {
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 767px) {
    .container { width: 100%; padding-left: 1rem; padding-right: 1rem; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.8rem; }
    
    #header-cliente .container {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        padding: 0 1rem;
    }
    .header-left { justify-content: flex-start; }
    .header-right { justify-content: flex-end; }
    #header-cliente .logo-area { grid-column: 2 / 3; justify-content: center; flex: 0 1 auto; }
    #header-cliente .logo-area img { height: 50px; width: 50px; }
    #header-cliente .logo-area h1 { font-size: 1.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
    .header-actions { display: none; } /* Hide desktop actions */

    .header-left button i, .header-right button i { font-size: 24px; }
    .header-left a, .header-right a { font-size: 1.2rem; }
    #header-cliente .cart-badge { width: 18px; height: 18px; font-size: 0.7rem; }

    #hero-banner-carousel { height: 30vh; }

    .section-header h2 { text-align: center; width: 100%; }

    #whatsapp-chat-popup { width: calc(100vw - 30px); }

    .modal-body { padding: 1.25rem; }
    .modal-footer { padding: 1rem 1.25rem; }
    .modal-product-header h2 { font-size: 1.6rem; }
    
    /* Fix for tall modal on mobile */
    .modal-product-carousel {
        height: 220px; /* Reduced from 350px to save space */
    }
    
    /* --- MOBILE PRODUCT GRID REFINEMENT --- */
    .produtos-container.grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    
    .produto-card .produto-imagem-container {
        height: 140px; /* Reduced from 200px */
    }
    
    .produto-imagem-container .swiper-button-next,
    .produto-imagem-container .swiper-button-prev {
        display: none;
    }
    
    /* Mobile Quick Add Button */
    .quick-add-to-cart-btn {
        opacity: 1; /* Always visible */
        transform: translateY(0);
        top: 0.5rem; /* Reposition */
        right: 0.5rem;
        bottom: auto;
        width: 36px;
        height: 36px;
        font-size: 1.4rem;
        background-color: rgba(0,0,0,0.4);
    }

    .produto-info {
        padding: 0.75rem;
    }

    .produto-info h3 {
        font-size: 0.9rem;
        font-weight: 600;
        line-height: 1.3;
        margin-bottom: 0.3rem;
        min-height: 2.34em; /* 2 lines * 1.3 line-height */
    }
    
    .produto-info .description-markdown-wrapper {
        font-size: 0.8rem;
        line-height: 1.4;
        margin-bottom: 0.5rem;
        height: 4.2em; /* 3 lines * 1.4 line-height */
    }
    
    .price-display .preco-promocional {
        font-size: 1.25rem;
    }
    
    .price-display .preco-original {
        font-size: 0.8rem;
    }
    
    .payment-options {
        font-size: 0.75rem;
        margin-top: 0.4rem;
    }

    /* Product Page Mobile */
    .product-page-details {
        padding: 1.5rem;
    }
    .product-page-details .modal-product-header h2 {
        font-size: 1.8rem;
    }
    
    .payment-method-selector {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-page-checkout-area {
        margin: 2rem -1.5rem -1.5rem -1.5rem;
        padding: 1.5rem;
    }
}

/* More specific tweaks for very small screens */
@media (max-width: 420px) {
    .options-container {
        gap: 0.5rem;
    }
    .options-container .option-label {
        padding: 0.5rem 0.8rem; /* Even tighter padding */
        font-size: 0.85rem;
    }
    .modal-product-header h2 {
        font-size: 1.4rem;
    }
    .modal-product-price-wrapper .price-display .preco-promocional {
        font-size: 1.8rem;
    }
}
