/* =========================================
   1. VARIÁVEIS E RESET GLOBAL
   ========================================= */
: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 12px rgba(0,0,0,0.05);
    --sombra-media: 0 10px 30px rgba(0,0,0,0.1);
    --borda-radius: 16px;
    --font-titulo: 'Lora', serif;
    --font-corpo: 'Poppins', sans-serif;
    --header-height: 92px;
    --header-height-mobile: 76px;
    --cor-ticker-fundo: #0b5ed7;
    --cor-estoque-baixo: #ff9800;
    --cor-estoque-baixo-rgb: 255, 152, 0;
    --easing-suave: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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 12px rgba(0,0,0,0.3);
    --sombra-media: 0 10px 30px rgba(0,0,0,0.5);
}

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

/* 
   FIX PERFORMANCE & SMOOTH SCROLL
*/
html { 
    scroll-padding-top: 180px; /* Aumentado para compensar Header + Barra de Busca */
    scroll-behavior: smooth !important; /* Ativa rolagem suave nativa */
    -webkit-tap-highlight-color: transparent;
    height: 100%;
}

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;
    position: relative;
    overflow-x: hidden;
    width: 100%;
    backface-visibility: hidden; 
}

/* --- SCROLLBAR PREMIUM (WebKit) --- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--cor-fundo); }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; border: 2px solid var(--cor-fundo); }
::-webkit-scrollbar-thumb:hover { background: var(--cor-primaria); }
html[data-theme='dark'] ::-webkit-scrollbar-thumb { background: #4a4a4a; border-color: var(--cor-fundo); }
html[data-theme='dark'] ::-webkit-scrollbar-thumb:hover { background: var(--cor-primaria); }

#app {
    width: 100%;
    min-height: 100vh;
    position: relative;
}

body.modal-open { overflow: hidden; padding-right: 0px; }
body.loading-state { 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); }

/* --- SKELETON LOADING --- */
.skeleton {
    background-color: var(--cor-borda);
    background-image: linear-gradient(90deg, var(--cor-borda) 0px, var(--cor-surface) 40px, var(--cor-borda) 80px);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite linear;
    border-radius: 4px;
    color: transparent !important;
    pointer-events: none;
}
@keyframes skeleton-shimmer { 0% { background-position: -200px 0; } 100% { background-position: calc(200px + 100%) 0; } }

.skeleton-header { height: 92px; width: 100%; margin-bottom: 1rem; }
.skeleton-banner { height: 30vh; width: 100%; border-radius: 0; margin-bottom: 2rem; }
.skeleton-nav { height: 50px; width: 100%; margin-bottom: 2rem; display: flex; gap: 1rem; overflow: hidden; }
.skeleton-pill { height: 40px; width: 100px; border-radius: 50px; flex-shrink: 0; }
.skeleton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; padding: 0 1rem; }
@media(min-width: 768px) { .skeleton-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); } }
.skeleton-card { height: 320px; border-radius: 16px; }

/* --- FORMULÁRIOS E CHECKOUT --- */
#checkout-customer-name, #customer-name {
    width: 100%; padding: 1rem 1.2rem;
    border: 2px solid var(--cor-borda); border-radius: 12px;
    background-color: var(--cor-fundo); color: var(--cor-texto-primario);
    font-size: 1rem; font-family: var(--font-corpo);
    transition: all 0.3s var(--easing-suave); outline: none;
}
#checkout-customer-name:focus, #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);
}

/* --- ESTILO SELETOR DE PAGAMENTO --- */
.payment-method-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 0.5rem; }
.payment-method-selector input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.payment-method-selector label {
    background-color: var(--cor-surface); 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 var(--easing-suave); height: 100%;
    color: var(--cor-texto-secundario); font-weight: 500;
    user-select: none; touch-action: manipulation;
}
.payment-method-selector label i { font-size: 1.6rem; margin-bottom: 2px; color: var(--cor-texto-secundario); transition: color 0.2s; }
.payment-method-selector label:hover {
    border-color: var(--cor-primaria); background-color: var(--cor-fundo);
    transform: translateY(-2px); box-shadow: var(--sombra-leve);
}
.payment-method-selector input:checked + label {
    border-color: var(--cor-primaria);
    background-color: color-mix(in srgb, var(--cor-primaria) 10%, var(--cor-surface)); 
    color: var(--cor-primaria); font-weight: 700;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.2); transform: translateY(-2px);
}
.payment-method-selector input:checked + label i { color: var(--cor-primaria); }

#confirm-checkout-btn, .buy-now-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;
    background-color: var(--cor-sucesso); color: white; border: none; cursor: pointer;
    transition: transform 0.2s var(--easing-suave), box-shadow 0.2s var(--easing-suave);
    touch-action: manipulation;
}
#confirm-checkout-btn:hover, .buy-now-btn:hover {
    transform: translateY(-2px); box-shadow: 0 6px 20px rgba(25, 135, 84, 0.4);
}
.modal-content .buy-now-form .form-group label,
.product-page-checkout-area .form-group label {
    font-weight: 600; color: var(--cor-texto-primario); margin-bottom: 0.6rem; display: block; font-size: 0.95rem;
}

/* --- PERFORMANCE TWEAKS & ANCHOR SCROLL --- */
.categoria-section {
    content-visibility: auto; 
    min-height: 400px; 
    contain-intrinsic-size: 1px 1200px;
    scroll-margin-top: 200px; /* Aumentado para garantir visibilidade com busca aberta */
    contain: layout paint style;
    transform: translateZ(0);
}
@media (max-width: 991px) {
    .categoria-section { scroll-margin-top: 180px; }
}

/* --- IMAGEM LOADING --- */
.produto-imagem-container, .modal-product-carousel .carousel-slide, .cart-item-card img {
    background-color: var(--cor-borda); position: relative; overflow: hidden;
    aspect-ratio: 1 / 1; transform: translateZ(0); contain: paint; 
}
.img-loading { opacity: 0; transition: opacity 0.3s ease-in-out; }
.img-loaded { opacity: 1; }
.produto-imagem-container:has(.img-loading)::after, .carousel-slide:has(.img-loading)::after {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 1.5s infinite; z-index: 1;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* --- LOADER --- */
.loader-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--cor-fundo);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    z-index: 9999; visibility: hidden; opacity: 0;
    transition: opacity 0.3s var(--easing-suave), visibility 0.3s; gap: 1.5rem;
}
.loader-container.visible { visibility: visible; opacity: 1; }
.loader-spinner {
    width: 80px; height: 80px; border-radius: 50%;
    border: 4px solid rgba(0, 0, 0, 0.1); border-top-color: var(--cor-primaria);
    animation: loader-spin 1s linear infinite;
}
html[data-theme='dark'] .loader-spinner { border-color: rgba(255, 255, 255, 0.1); border-top-color: var(--cor-primaria); }
.loader-icon { font-size: 2rem; color: var(--cor-primaria); animation: loader-pulse 1.5s ease-in-out infinite; position: absolute; }
.loader-text { font-family: var(--font-titulo); font-size: 1.1rem; font-weight: 600; color: var(--cor-texto-secundario); letter-spacing: 1px; animation: loader-fade 2s ease-in-out infinite; }
@keyframes loader-spin { to { transform: rotate(360deg); } }
@keyframes loader-pulse { 0% { transform: scale(0.9); opacity: 0.8; } 50% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(0.9); opacity: 0.8; } }
@keyframes loader-fade { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }

/* --- BARRA DE NOTÍCIAS (TICKER) --- */
#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); contain: strict;
}
#ticker-text { display: inline-block; will-change: transform; }
@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%); } }
#alert-bar {
    width: 100%;
    text-align: center;
    padding: 0.85rem 1rem;
    font-weight: 700;
    z-index: 190;
    position: relative;
    line-height: 1.25;
    contain: content;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
}
#alert-bar .alert-bar-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0.5rem;
}
#alert-bar .alert-bar-text {
    display: block;
    width: 100%;
    font-size: var(--alert-font-size-desktop, 16px);
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-wrap: balance;
}
#alert-bar.alert-size-long .alert-bar-text {
    font-size: calc(var(--alert-font-size-desktop, 16px) * 0.88);
}
#alert-bar.alert-size-xlong .alert-bar-text {
    font-size: calc(var(--alert-font-size-desktop, 16px) * 0.76);
}
@media (max-width: 768px) {
    #alert-bar {
        min-height: 58px;
        padding: 0.8rem 0.9rem;
    }
    #alert-bar .alert-bar-inner {
        padding: 0 0.2rem;
    }
    #alert-bar .alert-bar-text {
        font-size: var(--alert-font-size-mobile, 14px);
        line-height: 1.2;
    }
    #alert-bar.alert-size-long .alert-bar-text {
        font-size: calc(var(--alert-font-size-mobile, 14px) * 0.9);
    }
    #alert-bar.alert-size-xlong .alert-bar-text {
        font-size: calc(var(--alert-font-size-mobile, 14px) * 0.8);
    }
}
.anim-fade { animation: alert-fade 2s infinite ease-in-out; }
@keyframes alert-fade { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.anim-blink { animation: alert-blink 1s infinite steps(2, start); }
@keyframes alert-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* --- HEADER --- */
#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-mobile); 
    contain: layout style;
}
#header-cliente .container { 
    display: grid; grid-template-columns: 1fr auto 1fr; 
    align-items: center; padding: 0 0.8rem; height: 100%; gap: 0.5rem; 
}
.header-left, .header-right { display: flex; align-items: center; gap: 0.5rem; }
.header-right { justify-content: flex-end; }
.header-left { justify-content: flex-start; }

#header-cliente .logo-area { 
    grid-column: 2 / 3; justify-content: center; display: flex; 
    align-items: center; gap: 1rem; flex: 0 1 auto; 
}
#header-cliente .logo-area a { text-decoration: none; color: inherit; display: flex; align-items: center; gap: 1rem; }
#header-cliente .logo-area img { 
    height: 50px; width: 50px; border-radius: 50%; object-fit: cover; 
    background-color: white; padding: 4px; border: 2px solid var(--cor-secundaria); 
}
#header-cliente .logo-area h1 { 
    display: none; font-size: 1.2rem; white-space: nowrap; 
    overflow: hidden; text-overflow: ellipsis; max-width: 150px; 
}

.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; touch-action: manipulation; transition: transform 0.2s;
}
.header-actions button:hover, .header-right button:hover { transform: scale(1.1); }
.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: 18px; height: 18px; font-size: 0.7rem; 
    font-weight: bold; display: flex; justify-content: center; align-items: center; 
}
.header-left button i, .header-right button i { font-size: 24px; }
.header-left a, .header-right a { font-size: 1.2rem; }
.hamburger-menu { display: block; background: none; border: none; color: var(--cor-secundaria); cursor: pointer; padding: 0.5rem; flex-shrink: 0; touch-action: manipulation; }
.hamburger-menu i { font-size: 30px; }

/* --- MENU LATERAL (OTIMIZADO) --- */
#mobile-nav-sidebar-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 998; opacity: 0; visibility: hidden; 
    transition: opacity 0.3s ease, visibility 0.3s ease;
    -webkit-backdrop-filter: none; backdrop-filter: none; will-change: opacity;
}
@media (min-width: 992px) {
    #mobile-nav-sidebar-overlay { backdrop-filter: blur(2px); }
}
#mobile-nav-sidebar-overlay.visible { opacity: 1; visibility: visible; }

#mobile-nav-sidebar {
    position: fixed; top: 0; left: 0; width: 85%; max-width: 320px; height: 100%;
    background: var(--cor-surface); z-index: 999;
    transform: translate3d(-100%, 0, 0); 
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 15px rgba(0,0,0,0.1);
    display: flex; flex-direction: column; will-change: transform;
}
#mobile-nav-sidebar.visible { transform: translate3d(0, 0, 0); }

.mobile-nav-header {
    display: flex; align-items: center; padding: 1.2rem;
    border-bottom: 1px solid var(--cor-borda);
    background-color: var(--cor-primaria); color: var(--cor-secundaria);
    gap: 1rem; contain: content;
}
.mobile-nav-header button { 
    background: none; border: none; color: inherit; 
    font-size: 1.4rem; cursor: pointer; padding: 0.2rem; touch-action: manipulation;
}
.mobile-nav-header h3 { margin: 0; font-size: 1.2rem; flex-grow: 1; font-weight: 600; }
.sidebar-search-wrapper { padding: 1rem; border-bottom: 1px solid var(--cor-borda); background: var(--cor-fundo); contain: content; }
#sidebar-category-search { 
    width: 100%; padding: 0.8rem 1rem 0.8rem 2.5rem; border-radius: 50px; 
    border: 1px solid var(--cor-borda); background-color: var(--cor-surface); 
    color: var(--cor-texto-primario);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23999' d='M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0s208 93.1 208 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: 12px center; background-size: 16px; outline: none;
}
#sidebar-category-search:focus { border-color: var(--cor-primaria); box-shadow: 0 0 0 3px rgba(13,110,253,0.1); }
#mobile-nav-sidebar ul { list-style: none; padding: 0; margin: 0; overflow-y: auto; flex: 1; overscroll-behavior: contain; }
#mobile-nav-sidebar li { border-bottom: 1px solid var(--cor-borda); content-visibility: auto; contain-intrinsic-size: 50px; }
#mobile-nav-sidebar a {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.2rem 1.5rem; text-decoration: none;
    color: var(--cor-texto-primario); font-weight: 500; font-size: 1rem;
    transition: background 0.2s;
}
#mobile-nav-sidebar a:active, #mobile-nav-sidebar a:hover {
    background-color: rgba(13, 110, 253, 0.05); color: var(--cor-primaria);
}
#mobile-nav-sidebar a::after { content: '\f054'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 0.9rem; color: var(--cor-texto-secundario); opacity: 0.5; }
#menu-nav-sidebar { display: none; }

/* --- BARRA DE BUSCA INLINE (PREMIUM) --- */
#inline-search-container {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 0; max-height: 0; overflow: hidden;
    transition: max-height 0.4s var(--easing-suave), padding 0.4s var(--easing-suave), opacity 0.3s;
    position: sticky; top: var(--header-height); z-index: 195;
    box-shadow: 0 4px 15px -5px rgba(0, 0, 0, 0.05);
    contain: layout paint;
    opacity: 0;
}
html[data-theme='dark'] #inline-search-container {
    background-color: rgba(30, 30, 30, 0.9);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
@media (max-width: 991px) { #inline-search-container { top: var(--header-height-mobile); } }
#inline-search-container.visible { max-height: 100px; padding: 1rem 0; opacity: 1; }

.search-input-wrapper { position: relative; width: 95%; max-width: 800px; margin: 0 auto; display: flex; align-items: center; }
#inline-search-input {
    -webkit-appearance: none; appearance: none; width: 100%; padding: 0.9rem 1.4rem;
    border: 2px solid var(--cor-borda); border-radius: 50px; font-size: 1rem;
    background-color: var(--cor-surface); color: var(--cor-texto-primario);
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.2s; 
    outline: none; padding-right: 3rem;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.03);
}
#inline-search-input:focus { 
    border-color: var(--cor-primaria); 
    box-shadow: 0 0 0 5px rgba(13, 110, 253, 0.15); 
    transform: scale(1.01);
}
.search-clear-btn {
    position: absolute; right: 15px; background: none; border: none;
    color: var(--cor-texto-secundario); cursor: pointer; font-size: 1.2rem; 
    padding: 5px; display: none; transition: color 0.2s;
}
.search-clear-btn:hover { color: var(--cor-erro); }
.hidden-by-search { display: none !important; }
#search-no-results { text-align: center; padding: 4rem 1rem; display: none; color: var(--cor-texto-secundario); }
#search-no-results.visible { display: block; animation: fadeIn 0.4s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
#search-no-results i { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }

/* --- BANNER CAROUSEL --- */
#hero-banner-carousel {
    width: 100%; height: 40vh; max-height: 400px;
    position: relative; overflow: hidden; background-color: var(--cor-fundo);
    contain: layout paint;
}
.banner-track { display: flex; height: 100%; transition: transform 0.6s var(--easing-suave); will-change: transform; }
.banner-slide { flex: 0 0 100%; height: 100%; position: relative; }
.banner-track.effect-fade { display: block; }
.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; }
.banner-track.effect-zoom { display: block; }
.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(255,255,255,0.8); color: var(--cor-texto-primario); border: none; border-radius: 50%;
    width: 45px; height: 45px; cursor: pointer; z-index: 5; font-size: 1.2rem;
    display: flex; justify-content: center; align-items: center; 
    transition: all 0.2s var(--easing-suave); box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.banner-nav:hover { background-color: white; transform: translateY(-50%) scale(1.1); }
.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: 10px; height: 10px; border-radius: 50%; background-color: rgba(255,255,255,0.4); cursor: pointer; border: 1px solid rgba(0,0,0,0.1); transition: all 0.3s; }
.banner-dot.active { background-color: white; width: 25px; border-radius: 10px; }

/* --- NOVIDADES SLIDER --- */
#novidades-slider-section { padding: 3rem 0; contain: content; }
#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; margin: -1rem; }
.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.4s var(--easing-suave), box-shadow 0.4s var(--easing-suave); 
    border: 1px solid transparent; cursor: pointer; height: auto; text-decoration: none;
    contain: layout paint; will-change: transform;
}
.novidade-card h3 { text-decoration: none !important; color: var(--cor-texto-primario); }
html[data-theme='dark'] .novidade-card { border-color: var(--cor-borda); }
.novidade-card:hover { transform: translateY(-8px); box-shadow: var(--sombra-media); }
.novidade-card .produto-imagem-container { height: 200px; }
.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; }

/* --- NEW PRICE DISPLAY STYLES --- */
.price-container-card { display: flex; flex-direction: column; gap: 2px; }
.price-container-modal { display: flex; flex-direction: column; gap: 4px; margin-top: 0.5rem; }
.price-old { font-size: 0.85rem; color: var(--cor-texto-secundario); text-decoration: line-through; opacity: 0.8; }
.price-main-row { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.price-currency { font-size: 0.9rem; font-weight: 600; color: var(--cor-primaria); align-self: flex-start; margin-top: 4px; }
.price-value { font-size: 1.6rem; font-weight: 800; color: var(--cor-primaria); line-height: 1; letter-spacing: -0.5px; }
.price-label-pix { font-size: 0.75rem; font-weight: 600; color: var(--cor-primaria); background-color: color-mix(in srgb, var(--cor-primaria) 10%, transparent); padding: 2px 6px; border-radius: 4px; margin-left: 2px; }
.price-badge-off {
    background: linear-gradient(135deg, #198754, #20c997); color: white;
    font-size: 0.75rem; font-weight: 700; padding: 2px 8px; border-radius: 50px;
    margin-left: 6px; box-shadow: 0 2px 5px rgba(25, 135, 84, 0.3);
    animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge { 
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(25, 135, 84, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(25, 135, 84, 0); }
}
.price-secondary-row { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--cor-texto-secundario); margin-top: 2px; }
.price-secondary-row i { font-size: 0.9rem; color: var(--cor-texto-secundario); }

/* Modal Specific Adjustments */
.price-container-modal .price-value { font-size: 2.2rem; }
.price-container-modal .price-old { font-size: 1rem; }
.price-container-modal .price-secondary-row { font-size: 0.95rem; margin-top: 0.5rem; }

/* List View Adjustments */
.produtos-container.list .price-value { font-size: 1.4rem; }
.produtos-container.list .price-secondary-row { display: none; }
@media (min-width: 768px) { .produtos-container.list .price-secondary-row { display: flex; } }

#menu-wrapper { display: flex; flex-direction: column; gap: 2rem; }

/* --- CATEGORIAS E PRODUTOS --- */
.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);
    position: relative;
}
.categoria-titulo::after {
    content: ''; position: absolute; bottom: -3px; left: 0; width: 50px; 
    height: 3px; background-color: var(--cor-primaria-dark);
}
.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.4s var(--easing-suave), box-shadow 0.4s var(--easing-suave); 
    position: relative; border: 1px solid transparent; cursor: pointer;
    transform: translateZ(0); contain: layout style;
}
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; }

/* Low Stock Badge */
.low-stock-badge {
    position: absolute; top: 1rem; left: 1rem;
    background-color: var(--cor-estoque-baixo); color: white;
    padding: 0.3rem 0.8rem; border-radius: 50px;
    font-size: 0.8rem; font-weight: 700; z-index: 2;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--cor-estoque-baixo) 40%, transparent);
    animation: pulse-low-stock 2s infinite ease-in-out;
}
@keyframes pulse-low-stock { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }

.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;
}
.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; overflow: hidden; position: relative;
}
.produto-card-footer { display: flex; justify-content: space-between; align-items: flex-end; margin-top: auto; padding-top: 1rem; }
.payment-options { display: none; }

.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: all 0.3s var(--easing-suave); 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); box-shadow: 0 4px 10px rgba(0,0,0,0.2); }

/* --- CARROSSEL NO CARD --- */
.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; transition: transform 0.5s ease; }
.produto-card:hover .produto-imagem-container img { transform: scale(1.05); }
.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; }

/* --- LIST VIEW --- */
.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; 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 .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; }

/* --- 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); contain: content; }
.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; }

/* --- 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 var(--easing-suave); }
.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.6); display: flex; justify-content: center; align-items: center; 
    z-index: 10001; backdrop-filter: blur(8px); 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; 
    overflow: hidden; position: relative; transform: scale(0.95); 
    transition: transform 0.3s var(--easing-suave); 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; }
.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-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(255,255,255,0.8); color: var(--cor-texto-primario); border: none; border-radius: 50%; width: 40px; height: 40px; cursor: pointer; z-index: 5; transition: background 0.2s; }
.carousel-btn:hover { background-color: white; }
.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-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-add-to-cart-form { margin-top: 2rem; border-top: 1px solid var(--cor-borda); padding-top: 2rem; }
.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 { 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; }

/* --- 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; backdrop-filter: blur(2px); }
.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 var(--easing-suave); 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); transition: transform 0.2s; }
.close-cart-btn:hover { color: var(--cor-erro); transform: rotate(90deg); }
.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; animation: slideIn 0.3s ease; }
.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; transition: background 0.2s; }
.quantity-control button:hover { background-color: var(--cor-borda); }
.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, transform 0.2s; }
.checkout-button:hover { filter: brightness(1.1); transform: translateY(-2px); }
.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); }

/* --- 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 cubic-bezier(0.175, 0.885, 0.32, 1.275), 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); }
.product-page-gallery .swiper-slide { cursor: zoom-in; overflow: hidden; }
.product-page-gallery .swiper-slide img { transition: transform 0.1s ease-out; transform-origin: center center; will-change: transform; cursor: zoom-in; }

/* Lightbox Styles */
#image-lightbox { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 20000; display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: 0.3s; backdrop-filter: blur(5px); }
#image-lightbox.visible { opacity: 1; visibility: visible; }
#image-lightbox img { max-width: 95%; max-height: 95%; object-fit: contain; transform: scale(1); transition: transform 0.3s; }
.lightbox-close { position: absolute; top: 20px; right: 20px; color: white; font-size: 2rem; cursor: pointer; background: none; border: none; padding: 10px; z-index: 20001; }

.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); min-width: 0; }
.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'; 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; }
.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; color: white; border: none; padding: 1.2rem; font-size: 1.2rem; font-weight: 700; border-radius: 50px; cursor: pointer; transition: all 0.2s var(--easing-suave); 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; }
.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; 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); }
.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; }

/* --- PROMO BANNER GRID (ESTILO KABUM) --- */
.promo-grid-section { padding: 2rem 0; background-color: var(--cor-fundo); }
.promo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; width: 95%; max-width: 1280px; margin: 0 auto; }
.promo-banner-item {
    position: relative; border-radius: 8px; overflow: hidden; background-color: #000;
    aspect-ratio: 21 / 9; box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s var(--easing-suave), box-shadow 0.3s var(--easing-suave);
}
.promo-banner-item:hover { transform: scale(1.01); box-shadow: 0 10px 20px rgba(0,0,0,0.15); }
.promo-banner-item img { width: 100%; height: 100%; object-fit: cover; opacity: 0.95; transition: opacity 0.3s ease; }
.promo-banner-item:hover img { opacity: 1; }
.promo-grid[data-count="3"] { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 768px) {
    .promo-grid { grid-template-columns: 1fr; gap: 1rem; }
    .promo-banner-item { aspect-ratio: 16 / 7; }
}

/* --- RESPONSIVIDADE --- */
@media (min-width: 992px) {
    #header-cliente { height: var(--header-height); }
    #header-cliente .logo-area img { height: 60px; width: 60px; }
    #header-cliente .logo-area h1 { display: block; font-size: clamp(1.5rem, 4vw, 2.2rem); max-width: none; }
    #inline-search-container { top: var(--header-height); }
    #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; 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-checkout-area { margin-left: -2rem; margin-right: -2rem; padding: 2rem; border-radius: var(--borda-radius); }
}

@media (min-width: 768px) {
    .command-palette-footer { display: flex; justify-content: flex-start; gap: 1rem; }
}

@media (max-width: 991px) {
    .container { padding: 1.5rem 0; }
    #menu-content { min-width: 0; }
    .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; }
    #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; }
    .modal-product-carousel { height: 220px; }
    .produtos-container.grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
    .produto-card .produto-imagem-container { height: 140px; }
    .produto-imagem-container .swiper-button-next, .produto-imagem-container .swiper-button-prev { display: none; }
    .quick-add-to-cart-btn { opacity: 1; transform: translateY(0); top: 0.5rem; 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; }
    .produto-info .description-markdown-wrapper { font-size: 0.8rem; line-height: 1.4; margin-bottom: 0.5rem; height: 4.2em; }
    .payment-options { font-size: 0.75rem; margin-top: 0.4rem; }
    .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; }
    .produto-card .low-stock-badge { top: auto; bottom: 0; left: 0; width: 100%; border-radius: 0; padding: 0.4rem 0.8rem; font-size: 0.75rem; text-align: left; background-color: transparent; background: linear-gradient(90deg, rgba(var(--cor-estoque-baixo-rgb), 0.85) 0%, rgba(var(--cor-estoque-baixo-rgb), 0.75) 60%, rgba(var(--cor-estoque-baixo-rgb), 0) 100%); animation: none; box-shadow: none; }
}

@media (max-width: 420px) {
    .options-container { gap: 0.5rem; }
    .options-container .option-label { padding: 0.5rem 0.8rem; font-size: 0.85rem; }
    .modal-product-header h2 { font-size: 1.4rem; }
}

/* Helper Classes */
.hidden { display: none !important; }

/* --- ADICIONAR AO FINAL DO ARQUIVO style.css --- */

/* 1. Remove o botão de limpar (X) nativo do navegador para usar o nosso customizado */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
    -webkit-appearance: none;
    display: none; 
}

/* 2. Estilo da Mensagem "Nenhum Resultado Encontrado" */
#search-no-results {
    text-align: center;
    padding: 6rem 1rem;
    display: none; /* Oculto por padrão */
    width: 100%;
    grid-column: 1 / -1; /* Ocupa toda a largura da grid */
    animation: fadeIn 0.5s ease-out;
}

#search-no-results.visible {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#search-no-results .no-results-icon {
    font-size: 3.5rem;
    color: var(--cor-texto-secundario);
    margin-bottom: 1.5rem;
    background: var(--cor-surface);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--sombra-leve);
    opacity: 0.7;
}

#search-no-results h3 {
    font-size: 1.5rem;
    color: var(--cor-texto-primario);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

#search-no-results p {
    color: var(--cor-texto-secundario);
    font-size: 1rem;
    max-width: 400px;
}

/* =========================================
   BARRA DE BUSCA - LÓGICA ABRE/FECHA (TOGGLE)
   (Substitua os estilos anteriores de busca por este)
   ========================================= */

#inline-search-container {
    /* 1. Posicionamento Fixo (Abaixo do Header) */
    position: fixed;
    top: var(--header-height); /* 92px em Desktop */
    left: 0;
    width: 100%;
    z-index: 198; /* Abaixo do Header (que costuma ser 200) */
    
    /* 2. Visual */
    background-color: var(--cor-surface);
    border-bottom: 1px solid var(--cor-borda);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);

    /* 3. ESTADO INICIAL: FECHADO (ESCONDIDO) */
    height: 0;          /* Altura zero */
    padding: 0;         /* Sem espaçamento interno */
    opacity: 0;         /* Transparente */
    visibility: hidden; /* Não clicável */
    overflow: hidden;   /* Conteúdo cortado */
    
    /* 4. Animação de Abertura/Fechamento */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Ajuste de topo para Celular */
@media (max-width: 991px) {
    #inline-search-container {
        top: var(--header-height-mobile); /* 76px em Mobile */
    }
}

/* 5. ESTADO: ABERTO (VISIBLE) */
/* Quando o JS adiciona esta classe, a barra aparece */
#inline-search-container.visible {
    height: 80px;       /* Altura fixa suficiente para o input */
    padding: 15px 0;    /* Espaçamento interno devolvido */
    opacity: 1;         /* Opaco */
    visibility: visible;/* Visível */
}

/* Garante que o input dentro da barra fique centralizado */
.search-input-wrapper {
    width: 95%;
    max-width: 800px;
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    position: relative;
}

/* Ajuste do Input para preencher o espaço */
#inline-search-input {
    width: 100%;
    height: 50px; /* Altura confortável */
    padding-left: 1.5rem;
    font-size: 1rem;
    border-radius: 50px;
    border: 1px solid var(--cor-borda);
    background-color: var(--cor-fundo);
    outline: none;
}


.hidden-by-category-filter {
    display: none !important;
}

.category-filter-status {
    margin-bottom: 1.5rem;
    display: block;
}

.category-filter-status.hidden {
    display: none !important;
}

.category-filter-status-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-radius: 16px;
    background: color-mix(in srgb, var(--cor-primaria) 8%, var(--cor-surface));
    border: 1px solid color-mix(in srgb, var(--cor-primaria) 22%, var(--cor-borda));
    box-shadow: var(--sombra-leve);
}

.category-filter-copy {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    min-width: 0;
}

.category-filter-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--cor-texto-secundario);
}

#category-filter-name {
    font-size: 1.05rem;
    color: var(--cor-texto-primario);
    line-height: 1.3;
    word-break: break-word;
}

.clear-category-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    border: 1px solid var(--cor-primaria);
    background: var(--cor-primaria);
    color: #ffffff;
    padding: 0.8rem 1rem;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.clear-category-filter-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.clear-category-filter-btn i {
    font-size: 0.95rem;
}

#menu-nav-sidebar a.active,
#mobile-nav-sidebar a.active {
    color: var(--cor-primaria) !important;
    font-weight: 700;
    background: color-mix(in srgb, var(--cor-primaria) 8%, transparent);
}

@media (max-width: 768px) {
    .category-filter-status-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .clear-category-filter-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Botão flutuante voltar ao topo */
.back-to-top-btn {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    background: var(--cor-primaria);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease, filter 0.22s ease;
    z-index: 1200;
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-btn:hover {
    filter: brightness(1.06);
}

/* Botão topo dentro do sidebar desktop/mobile */
.sidebar-brand-top,
.mobile-sidebar-brand-top {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    border: 1px solid color-mix(in srgb, var(--cor-primaria) 28%, var(--cor-borda));
    background: color-mix(in srgb, var(--cor-primaria) 8%, var(--cor-surface));
    color: var(--cor-texto-primario);
    padding: 0.9rem 1rem;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.2s ease, filter 0.2s ease, border-color 0.2s ease;
    margin-bottom: 1rem;
}

.sidebar-brand-top:hover,
.mobile-sidebar-brand-top:hover {
    transform: translateY(-1px);
    filter: brightness(1.02);
    border-color: var(--cor-primaria);
}

.sidebar-brand-top i,
.mobile-sidebar-brand-top i {
    color: var(--cor-primaria);
    font-size: 1rem;
    flex-shrink: 0;
}

.sidebar-brand-top span,
.mobile-sidebar-brand-top span {
    line-height: 1.2;
}

#menu-nav-sidebar h3 {
    margin-top: 0.4rem;
}

@media (max-width: 768px) {
    .back-to-top-btn {
        right: 16px;
        bottom: 16px;
        width: 50px;
        height: 50px;
    }

    .mobile-nav-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .mobile-sidebar-brand-top {
        margin-bottom: 0;
    }
}



.price-meta-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-bottom: 0.1rem;
}

.price-ean {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--cor-primaria) 10%, transparent);
    color: var(--cor-texto-secundario);
    border: 1px solid color-mix(in srgb, var(--cor-primaria) 18%, var(--cor-borda));
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.price-container-modal .price-meta-row {
    gap: 0.7rem;
    margin-bottom: 0.25rem;
}

.price-container-modal .price-ean {
    font-size: 0.8rem;
    padding: 0.24rem 0.65rem;
}

@media (max-width: 768px) {
    .price-meta-row {
        gap: 0.4rem;
    }

    .price-ean {
        font-size: 0.7rem;
    }
}