/* ============================================================================
   ESTILOS GLOBAIS E SISTEMA DE CORES (Vite/PWA - M?dulo 01 / 02 / 03 / 05)
============================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* Remove outline azul no mobile */
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #0B0F19; /* Fundo escuro premium */
    color: #F3F4F6;
    overflow-x: hidden;
    line-height: 1.5;
}

/* ============================================================================
   1. SPLASH SCREEN ANIMADA (M?dulo 05)
============================================================================ */
.splash-screen{position:fixed;inset:0;width:100%;height:100vh;height:100dvh;z-index:9999;overflow:hidden;opacity:1;visibility:visible;transition:opacity .2s ease,visibility .2s ease;background:#0652c5;clip-path:circle(150% at 50% 50%);will-change:clip-path,opacity}
.splash-screen.fade-out{opacity:0;visibility:hidden;pointer-events:none}
.splash-screen.splash-closing{animation:splashCircularClose 1.8s cubic-bezier(.22,.61,.36,1) both}
.splash-scene{--splash-art-left:calc((100vw - min(100vw,56.22vh))/2);position:absolute;inset:0;overflow:hidden;background:#0652c5}
.splash-art{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:center;transition:opacity .3s ease}
.splash-art-static{opacity:1}
.splash-art-final{opacity:0}
.splash-screen.splash-final-transition .splash-art-static{opacity:0}
.splash-screen.splash-final-transition .splash-art-final{opacity:1}
/* Exclusivo da homologação: impede que a arte integrada concorra com a caminhada testada. */
.splash-screen.splash-test-walk-only .splash-art-final{display:none!important}
.splash-walk-clip{position:absolute;z-index:2;left:var(--splash-art-left);top:0;width:min(100vw,56.22vh);height:100%;overflow:hidden;pointer-events:none}
/* Diagnóstico local: o PNG A fica fixo, integral e destacável na camada oficial. */
.splash-screen.splash-static-visibility-test .splash-walker{display:block!important;visibility:visible!important;opacity:1!important;transform:translate3d(0,0,0)!important}
.splash-screen.splash-static-visibility-test .splash-walker-frame-b{display:none!important}
/* Camada independente, com as mesmas dimensões e proporção do teste aprovado. */
.splash-walker{position:absolute;z-index:2;left:0;bottom:23.17vh;width:min(64vw,35.9808vh);aspect-ratio:1237/1272;opacity:0;pointer-events:none;will-change:transform,opacity;transition:opacity .22s linear}
.splash-walker img{position:absolute;inset:0;display:block;width:100%;height:100%;max-width:none;object-fit:contain;object-position:center bottom;user-select:none}
.splash-walker .splash-walker-frame-b{opacity:0}
.splash-walker.frame-b .splash-walker-frame-a{opacity:0}
.splash-walker.frame-b .splash-walker-frame-b{opacity:1}
.splash-screen.splash-walking .splash-walker,.splash-screen.splash-test-walk-only .splash-walker{display:block!important;visibility:visible!important;opacity:1!important}
.splash-screen.splash-final-transition .splash-walker{opacity:0}
.splash-waver{position:absolute;z-index:3;left:0;bottom:23.17vh;width:min(64vw,35.9808vh);aspect-ratio:1237/1272;opacity:0;visibility:hidden;pointer-events:none;will-change:opacity;transition:opacity .12s linear}
.splash-waver img{position:absolute;inset:0;display:block;width:100%;height:100%;max-width:none;object-fit:contain;object-position:center bottom;user-select:none;transition:opacity .1s linear}
.splash-waver .splash-waver-frame-b{opacity:0}
.splash-waver.frame-b .splash-waver-frame-a{opacity:0}
.splash-waver.frame-b .splash-waver-frame-b{opacity:1}
.splash-screen.splash-waving .splash-walker{opacity:0!important}
.splash-screen.splash-waving .splash-waver{visibility:visible;opacity:1}
@keyframes splashCircularClose{0%{clip-path:circle(150% at 50% 50%)}100%{clip-path:circle(0% at 50% 50%)}}
@media (prefers-reduced-motion:reduce){.splash-art,.splash-walker img,.splash-waver img{transition:none!important;animation:none!important}.splash-screen.splash-closing{animation:none!important;clip-path:none}.splash-screen.fade-out{transition:opacity .2s linear!important}}

/*
 * Splash antiga: ciclo recuperado do Catálogo V3.
 * O V3 mantinha a tela preta visível por 3 s e fazia a saída em 0,5 s. O
 * ramo legado usa somente o conteúdo central abaixo; estas regras alteram
 * somente esse modo e não interferem na Splash Nova.
 */
.splash-screen.splash-mode-legacy{clip-path:none;background:#000;transition:opacity .5s ease,visibility .5s ease}
.splash-screen.splash-mode-legacy.fade-out{opacity:0;visibility:hidden;pointer-events:none}
.splash-screen.splash-mode-legacy .splash-scene-legacy{background:#000;display:flex;align-items:center;justify-content:center}
.splash-screen.splash-mode-legacy .splash-v3-content{position:relative;z-index:2;display:flex;flex-direction:column;align-items:center;text-align:center;padding:16px;max-width:calc(100vw - 32px);text-shadow:0 2px 12px rgba(0,0,0,.55)}
.splash-screen.splash-mode-legacy .splash-v3-logo-container{width:120px;height:120px;border-radius:50%;overflow:hidden;border:3px solid var(--color-primary);background:#fff;display:flex;justify-content:center;align-items:center;box-shadow:0 0 25px rgba(var(--color-primary-rgb),.4);animation:catalogo31LegacySplashPulse 2s infinite ease-in-out;margin-bottom:20px}
.splash-screen.splash-mode-legacy .splash-v3-logo{width:85%;height:85%;object-fit:contain}
.splash-screen.splash-mode-legacy .splash-v3-title{font-family:'Outfit',sans-serif;font-size:1.8rem;font-weight:800;color:#fff;margin:0 0 5px;letter-spacing:-.5px}
.splash-screen.splash-mode-legacy .splash-v3-slogan{font-size:.95rem;color:#f3f4f6;margin:0 0 30px;font-weight:300}
.splash-screen.splash-mode-legacy .splash-v3-loader{width:32px;height:32px;border:3px solid rgba(255,255,255,.25);border-radius:50%;border-top-color:var(--color-primary);animation:catalogo31LegacySplashSpin 1s linear infinite}
@keyframes catalogo31LegacySplashPulse{0%,100%{transform:scale(1);box-shadow:0 0 20px rgba(16,185,129,.3)}50%{transform:scale(1.05);box-shadow:0 0 35px rgba(16,185,129,.6)}}
@keyframes catalogo31LegacySplashSpin{to{transform:rotate(360deg)}}
@media (max-width:480px){.splash-screen.splash-mode-legacy .splash-v3-logo-container{width:104px;height:104px;margin-bottom:16px}.splash-screen.splash-mode-legacy .splash-v3-title{font-size:1.45rem}.splash-screen.splash-mode-legacy .splash-v3-slogan{font-size:.88rem;margin-bottom:22px}}
@keyframes splashPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 35px rgba(16, 185, 129, 0.6);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================================
   2. HEADER DA APLICA??O (M?dulo 01)
============================================================================ */
.app-header {
    background-color: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 16px;
}

.header-container {
    display: flex;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
    gap: 12px;
}

.header-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
    background-color: #ffffff;
}

.header-text {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.header-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: #ffffff;
    line-height: 1.2;
}

.header-subtitle {
    font-size: 0.75rem;
    color: #9CA3AF;
}

.vip-badge {
    background: linear-gradient(135deg, #FBBF24, #D97706);
    color: #111827;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 9999px;
    letter-spacing: 0.5px;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

/* ============================================================================
   3. ?REA DE BUSCA E FILTROS R?PIDOS (M?dulo 01 / 04)
============================================================================ */
.search-section {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px;
}

.search-container {
    position: relative;
    width: 100%;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* Glassmorphism search input */
#search-input {
    width: 100%;
    background-color: rgba(31, 41, 55, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px 50px 14px 16px;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: border-color 0.3s, box-shadow 0.3s;
}

#search-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.voice-search-btn {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s;
}

.voice-search-btn:active {
    background-color: rgba(255, 255, 255, 0.05);
}

.mic-icon {
    width: 22px;
    height: 22px;
    fill: #9CA3AF;
    transition: fill 0.3s;
}

.voice-search-btn.recording .mic-icon {
    fill: #EF4444;
    animation: recordingPulse 1.2s infinite ease-in-out;
}

@keyframes recordingPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Filtros r?pidos horizontais */
.filters-container {
    margin-top: 14px;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
}

.filters-container::-webkit-scrollbar {
    display: none; /* Safari e Chrome */
}

.filters-scroll {
    display: flex;
    gap: 8px;
    white-space: nowrap;
    padding-bottom: 6px;
    padding-right: 32px; /* Garante que o último botão do carrossel não fique cortado */
}

.filter-btn {
    background-color: rgba(31, 41, 55, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #F9FAFB; /* Cinza claro brilhante para alto contraste em fundo escuro */
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap; /* Evita quebra de linha interna e corte do texto */
}

.filter-btn:active {
    transform: scale(0.96);
}

.filter-btn.active {
    background-color: var(--color-primary);
    color: #111827;
    font-weight: 700;
    border-color: var(--color-primary);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
}

/* ============================================================================
   4. VITRINE DE PRODUTOS - GRID DE 2 COLUNAS FIXAS (M?dulo 01 / 02)
============================================================================ */
.app-main {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 16px 100px 16px; /* Padding extra no rodap? para a barra do carrinho */
}

.vip-info-banner {
    background-color: rgba(251, 191, 36, 0.1);
    border: 1px solid #D97706;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #FBBF24;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.revoke-vip-btn {
    background-color: #D97706;
    border: none;
    color: #111827;
    padding: 4px 10px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
}

/* Grid de cards fixado em 2 colunas */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
}

.home-block-title {
    margin: 18px 0 12px;
    color: #EF4444 !important;
    font-size: 1.15rem;
    font-weight: 800;
}

.recent-products-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 10px;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    scrollbar-width: thin;
}

.recent-product-card {
    flex: 0 0 clamp(82px, 24vw, 112px);
    width: clamp(82px, 24vw, 112px);
    min-width: clamp(82px, 24vw, 112px);
    max-width: clamp(82px, 24vw, 112px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 6px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface);
    color: var(--color-text);
    cursor: pointer;
    text-align: left;
    box-sizing: border-box;
}

.recent-product-image {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: 7px;
}

.recent-product-price {
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

/* ============================================================================
   5. ANATOMIA E ESTILO DO CARD DE PRODUTO (M?dulo 02)
============================================================================ */
.product-card {
    background-color: rgba(17, 24, 39, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.38);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

/* Efeito ao ser tocado/selecionado */
.product-card.selected {
    border-color: #EF4444; /* Vermelho */
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.22), 0 0 15px rgba(239, 68, 68, 0.1);
    background-color: rgba(239, 68, 68, 0.03);
    transform: translateY(-6px) scale(1.02); /* Efeito 3D elevado */
}

.card-media {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Mant?m aspect-ratio quadrado de 1:1 */
    background-color: #ffffff;
}

.card-img {
    position: absolute;
    top: 50%;
    left: 50%;
    max-width: 90%;
    max-height: 90%;
    transform: translate(-50%, -50%);
    object-fit: contain;
    transition: opacity 0.3s;
}

/* Tratamento discreto para imagens cadastradas sem arquivo disponível. */
.catalogo-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 0;
    min-height: 0;
    padding: 10px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(230, 240, 226, 0.96), rgba(247, 250, 245, 0.98));
    color: #526052;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
}

.card-media > .catalogo-image-placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.detail-img-container > .catalogo-image-placeholder,
.carousel-slide > .catalogo-image-placeholder {
    width: 100%;
    height: 100%;
}

.recent-product-card > .catalogo-image-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
}

.central-nav-products > .catalogo-image-placeholder {
    flex: 1 1 100%;
    width: 100%;
    height: 100%;
}

body.dark-mode .catalogo-image-placeholder,
body.theme-dark .catalogo-image-placeholder {
    background: linear-gradient(135deg, rgba(38, 55, 44, 0.96), rgba(31, 41, 35, 0.98));
    color: #d7e7d9;
}

/* Badges e Sele??o r?pida */
.card-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 5;
}

.card-badge-oferta {
    background-color: #EF4444;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3.5px 7px;
    border-radius: 6px;
    text-transform: uppercase;
    white-space: nowrap;
    display: inline-block;
}

.card-badge-campanha {
    background-color: #10B981;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3.5px 7px;
    border-radius: 6px;
    text-transform: uppercase;
    white-space: nowrap;
    display: inline-block;
}

.card-select-container {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
}

.card-select-checkbox {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(17, 24, 39, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.product-card.selected .card-select-checkbox {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.card-select-checkbox::after {
    content: '?';
    color: #111827;
    font-size: 0.8rem;
    font-weight: 900;
    display: none;
}

.product-card.selected .card-select-checkbox::after {
    display: block;
}

/* Conte?do de Texto do Card */
.card-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-brand {
    font-size: 0.7rem;
    color: #9CA3AF;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 38px;
    line-height: 1.3;
    margin-bottom: 6px;
}

.card-spec {
    font-size: 0.75rem;
    color: #6B7280;
    margin-bottom: 8px;
}

/* Pre?o e Bot?o */
.card-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-price-container {
    display: flex;
    flex-direction: column;
}

.price-old {
    font-size: 0.75rem;
    color: #6B7280;
    text-decoration: line-through;
    line-height: 1;
}

.price-main {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1.2;
}

.card-btn {
    width: 100%;
    background-color: var(--color-primary);
    color: #111827;
    border: none;
    border-radius: 10px;
    min-height: 44px;
    padding: 9px 12px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.card-actions {
    display: flex;
    align-items: stretch;
    gap: 6px;
    width: 100%;
    flex-wrap: nowrap;
}

.card-actions .card-details-btn {
    flex: 1 1 auto;
    min-width: 0;
    background-color: #10B981;
    color: #052e1b;
}

.card-actions .card-action-btn {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 8px;
    white-space: nowrap;
}

.card-action-label {
    min-width: 0;
    overflow-wrap: anywhere;
}

.card-action-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: transparent;
    color: var(--color-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    font: inherit;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.1;
    touch-action: manipulation;
}

.card-action-icon { font-size: 1.35rem; line-height: 1; }
.card-favorite-btn .card-action-icon { color: #ffffff; }
.card-favorite-btn .card-action-icon { font-size: 1.65rem; }
.card-favorite-btn .favorite-star-svg { display: block; width: 27px; height: 27px; }
.card-favorite-btn .favorite-star-svg { flex: 0 0 27px; min-width: 27px; min-height: 27px; overflow: visible; opacity: 1; visibility: visible; }
.card-favorite-btn .favorite-star-svg path { fill: none; stroke: #ffffff; opacity: 1; visibility: visible; }
.card-favorite-btn[aria-label^="Remover"] .favorite-star-svg path { fill: #facc15; stroke: #facc15; }
.card-favorite-btn { display: inline-flex; align-items: center; justify-content: center; }
.card-favorite-btn[aria-label^="Remover"] .card-action-icon { color: #facc15; }
.card-action-btn:focus-visible,
.card-btn:focus-visible { outline: 3px solid #facc15; outline-offset: 2px; }
.card-action-btn:hover { background: rgba(255,255,255,.12); }

@media (max-width: 420px) {
    .card-actions .card-action-btn { flex-basis: 44px; width: 44px; min-width: 44px; }
}

.card-btn:active {
    background-color: #059669;
}

/* ============================================================================
   6. FOOTER INSTITUCIONAL (M?dulo 05)
============================================================================ */
.app-footer {
    background-color: #080C14;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px 16px;
    text-align: center;
}

.footer-container {
    max-width: 600px;
    margin: 0 auto;
}

.footer-info h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.footer-address {
    font-size: 0.85rem;
    color: #9CA3AF;
    margin-bottom: 16px;
}

.footer-map-container {
    width: 100%;
    height: 140px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-map-mock {
    width: 100%;
    height: 100%;
    background-color: #1f2937;
    display: flex;
    justify-content: center;
    align-items: center;
}

.map-placeholder {
    color: #6B7280;
    font-size: 0.85rem;
    font-weight: 600;
}

.footer-route-btn {
    display: inline-block;
    background-color: rgba(31, 41, 55, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s;
}

.footer-route-btn:active {
    background-color: rgba(255, 255, 255, 0.05);
}

.footer-credits {
    margin-top: 24px;
    font-size: 0.75rem;
    color: #6B7280;
}

/* ============================================================================
   7. BARRA FLUTUANTE DE FINALIZA??O (M?dulo 02)
============================================================================ */
.cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(17, 24, 39, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 16px;
    z-index: 1000;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.cart-bar-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-bar-info {
    display: flex;
    flex-direction: column;
}

.cart-count {
    font-size: 0.95rem;
    font-weight: 700;
}

.send-whatsapp-btn {
    background-color: #25D366; /* Cor do Whatsapp */
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 12px 18px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.send-whatsapp-btn:active {
    background-color: #128C7E;
}

.clear-selection-btn {
    border: 1px solid var(--color-border);
    background: transparent;
    color: var(--color-text-muted);
    border-radius: 10px;
    min-height: 42px;
    padding: 0 12px;
    font-weight: 700;
    cursor: pointer;
}

.clear-selection-btn:hover,
.clear-selection-btn:focus-visible {
    color: var(--color-text);
    border-color: var(--color-primary);
}

/* ============================================================================
   8. TELA DE DETALHES MODAL (M?dulo 02)
============================================================================ */
.details-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Abre subindo do rodap? estilo Mobile */
}

.modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background-color: #111827;
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    border-radius: 24px 24px 0 0;
    overflow-y: auto;
    z-index: 2001;
    padding: 24px 16px;
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 1.8rem;
    color: #9CA3AF;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
}

/* Conte?do Interno do Detalhe */
.detail-header {
    text-align: center;
    margin-bottom: 20px;
}

.detail-img-container {
    width: 100%;
    max-width: 250px;
    height: 250px;
    margin: 0 auto 16px auto;
    background-color: #ffffff;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.detail-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.detail-brand {
    font-size: 0.75rem;
    color: var(--color-primary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

.detail-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    margin-top: 4px;
}

.detail-spec {
    font-size: 0.85rem;
    color: #6B7280;
    margin-top: 2px;
}

.detail-price-box {
    margin: 16px 0;
    padding: 12px;
    background-color: rgba(31, 41, 55, 0.4);
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-price-main {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--color-primary);
}

.detail-badges {
    display: flex;
    gap: 6px;
}

.detail-section {
    margin-bottom: 16px;
}

.detail-section h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    color: #F3F4F6;
    margin-bottom: 6px;
}

.detail-section p {
    font-size: 0.85rem;
    color: #9CA3AF;
    line-height: 1.4;
}

.detail-description ul,
.detail-description ol {
    margin-left: 0;
    padding-left: 1.25rem;
}

/* ============================================================================
   9. ANIMA??ES, LOADERS E AUXILIARES
============================================================================ */
.vitrine-loader {
    display: flex;
    justify-content: center;
    padding: 40px 0;
}

.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--color-primary);
    animation: spin 0.8s linear infinite;
}

.no-results-container {
    text-align: center;
    padding: 40px 16px;
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.clear-search-btn {
    margin-top: 16px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
}

.hidden {
    display: none !important;
}

#load-more-products.load-more-products-btn {
    box-sizing: border-box;
    display: flex;
    width: 100%;
    min-height: 58px;
    align-items: center;
    justify-content: center;
    margin: 24px 0;
    padding: 12px 18px;
    border: 2px solid #000000;
    border-radius: 8px;
    background: #FFD600;
    color: #000000;
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    touch-action: manipulation;
}

#load-more-products.load-more-products-btn:hover {
    background: #f5ca00;
}

#load-more-products.load-more-products-btn:active {
    background: #e6bd00;
}

#load-more-products.load-more-products-btn:focus-visible {
    outline: 3px solid #111111;
    outline-offset: 3px;
}

#load-more-products.load-more-products-btn:disabled {
    cursor: wait;
    opacity: 0.75;
}

.advanced-search-btn {
    display: block;
    width: min(100%, 260px);
    margin: 10px auto 0;
    padding: 10px 16px;
    border: 1px solid var(--color-primary);
    border-radius: 10px;
    background: transparent;
    color: var(--color-text);
    font-weight: 700;
    cursor: pointer;
}

.advanced-search-panel {
    position: absolute;
    inset: 0;
    z-index: 2100;
    display: flex;
    align-items: flex-start;
    justify-content: stretch;
    overflow-y: auto;
    padding: 0;
    background: #000000;
}

body.advanced-search-open .pwa-device-screen { overflow: hidden !important; }
body.advanced-search-open .desktop-stage { overflow: hidden !important; }

.advanced-search-dialog {
    width: 100%;
    min-height: 100%;
    box-sizing: border-box;
    padding: clamp(24px, 5vw, 48px);
    background: #000000;
    color: #ffffff;
}

.advanced-search-back,
.advanced-search-mode-back { border: 0; background: #ffffff; color: #000000; font-weight: 800; cursor: pointer; padding: 11px 16px; border-radius: 10px; }
.advanced-search-mode-back { display: none; }
.advanced-search-panel.mode-active .advanced-search-modes,
.advanced-search-panel.mode-active > .advanced-search-dialog > .advanced-search-back { display: none; }
.advanced-search-panel.mode-active .advanced-search-mode-back { display: inline-block; }
.advanced-search-dialog h2 { margin: 24px 0 8px; color: #ffffff; }
.advanced-search-dialog > p,
.advanced-search-form label { color: #ffffff; }
.advanced-search-modes { display: grid; gap: 10px; margin-top: 18px; }
.advanced-search-mode { display: grid; gap: 5px; width: 100%; padding: 16px; text-align: left; border: 0; border-radius: 12px; background: #ffffff; color: #000000; cursor: pointer; }
.advanced-search-mode.active { outline: 3px solid #60a5fa; }
.advanced-search-mode span { font-size: .9rem; color: #111827; }
.advanced-search-form { margin-top: 18px; }
.advanced-search-mode-back { margin-bottom: 18px; }
.advanced-search-form label { display: block; margin-bottom: 7px; font-weight: 700; }
.advanced-search-input-row { display: flex; gap: 8px; align-items: center; }
.advanced-search-input-row input { min-width: 0; flex: 1; padding: 12px; border: 0; border-radius: 9px; background: #ffffff; color: #000000; }
.advanced-search-input-row input::placeholder { color: #4b5563; opacity: 1; }
.advanced-search-voice { padding: 11px 14px; border: 0; border-radius: 9px; background: #2563eb; color: #ffffff; }
.advanced-search-input-row .btn-primary { border: 0; border-radius: 9px; background: #ffffff; color: #000000; padding: 12px 16px; font-weight: 800; }
.advanced-search-status { min-height: 1.3em; margin: 10px 0 0; color: #ffffff; }
.advanced-search-message {
    position: fixed;
    inset: 0;
    z-index: 10020;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .72);
}
.advanced-search-message-card {
    width: min(100%, 440px);
    box-sizing: border-box;
    padding: 22px;
    border-radius: 16px;
    background: #111827;
    color: #ffffff;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
}
.advanced-search-message-card h2 { margin: 0 0 12px; font-size: 1.15rem; }
.advanced-search-message-card p { margin: 0 0 18px; line-height: 1.5; }
.advanced-search-message-card .card-btn { min-width: 90px; }
.advanced-search-necessity-warning {
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid #fbbf24;
    border-radius: 10px;
    background: #111827;
    color: #ffffff;
    font-size: .9rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}
@media (max-width: 1023px) { .desktop-stage { position: relative; } }
@media (max-width: 480px) { .advanced-search-dialog { padding: 22px 16px; } .advanced-search-input-row { flex-wrap: wrap; } .advanced-search-input-row input { flex-basis: 100%; } .advanced-search-input-row .btn-primary { flex: 1; } }

/* ============================================================================
   10. M?DULO DE ACESSIBILIDADE E INCLUS?O (M?dulo 09)
============================================================================ */

/* N?veis de Fontes */
body.font-grande {
    font-size: 1.15rem;
}
body.font-grande .card-title {
    font-size: 1rem;
    height: 44px;
}
body.font-grande .price-main {
    font-size: 1.2rem;
}

body.font-extra-grande {
    font-size: 1.3rem;
}
body.font-extra-grande .card-title {
    font-size: 1.15rem;
    height: 50px;
}
body.font-extra-grande .price-main {
    font-size: 1.4rem;
}
body.font-extra-grande .card-btn {
    font-size: 0.95rem;
}

/* Modo Alto Contraste */
body.alto-contraste {
    background-color: #000000 !important;
    color: #ffffff !important;
}
body.alto-contraste *,
body.alto-contraste .product-card,
body.alto-contraste .app-header,
body.alto-contraste .search-input-wrapper input {
    background-color: #000000 !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
    box-shadow: none !important;
}
body.alto-contraste .card-btn,
body.alto-contraste .filter-btn.active,
body.alto-contraste .send-whatsapp-btn {
    background-color: #ffffff !important;
    color: #000000 !important;
    font-weight: 900 !important;
}

/* Modo Idoso / Toque Ampliado */
body.modo-idoso .card-btn,
body.modo-idoso .filter-btn,
body.modo-idoso .send-whatsapp-btn,
body.modo-idoso .card-select-checkbox {
    padding: 16px 20px !important;
    min-height: 48px; /* Altura ergon?mica m?nima recomendada */
}
body.modo-idoso .product-card {
    gap: 8px;
}
body.modo-idoso .card-select-checkbox {
    width: 32px;
    height: 32px;
}

/* Bot?o Flutuante de Ajuda */
.help-floating-btn {
    position: fixed;
    width: 50px;
    height: 50px;
    background-color: var(--color-accent);
    color: #ffffff;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    z-index: 999;
    transition: transform 0.2s;
}

.help-floating-btn:active {
    transform: scale(0.9);
}

/* Posi??es do Bot?o Help */
.help-top-left { top: 70px; left: 16px; }
.help-top-right { top: 70px; right: 16px; }
.help-bottom-left { bottom: 80px; left: 16px; }
.help-bottom-right { bottom: 80px; right: 16px; }

/* Controles de Acessibilidade no Topo do PWA */
.accessibility-bar {
    max-width: 600px;
    margin: 0 auto;
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(31, 41, 55, 0.3);
    border-radius: 10px;
    margin-top: 10px;
    font-size: 0.8rem;
    gap: 8px;
}

.accessibility-group {
    display: flex;
    gap: 4px;
}

.accessibility-btn {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.accessibility-btn.active {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: #ffffff;
}

/* ?rea de QR Code no Modal */
.qrcode-container {
    text-align: center;
    margin-top: 20px;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid var(--color-border);
}

.qrcode-img {
    background-color: #ffffff;
    padding: 8px;
    border-radius: 8px;
    margin-top: 8px;
}

/* ============================================================================
   11. LOYALTY & VIP MODAL (M?dulo 11)
============================================================================ */

/* Badge de Novidades */
.card-badge-novidade {
    background: linear-gradient(135deg, var(--color-accent), #2563EB);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 6px;
    border-radius: 6px;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(37, 99, 235, 0.3);
}

/* Modal VIP Horizontal Especial */
.vip-invite-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2100;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
}

.vip-modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    z-index: 1;
    pointer-events: none; /* Evita que o Firefox intercepte cliques nos bot?es do modal */
}

/* Formato Retangular Horizontal Estrito para Mobile */
.vip-modal-content {
    position: relative;
    background-color: #ffffff;
    width: 100%;
    max-width: 500px;
    border-radius: 16px;
    overflow: hidden;
    z-index: 2101;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    border: 2px solid #EF4444;
    animation: zoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Cabe?alho Vermelho Estrito com caixa alta AVISO */
.vip-modal-header {
    background-color: #EF4444;
    color: #ffffff;
    padding: 14px;
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: 2px;
    text-align: center;
}

/* Corpo com Fundo Branco e Textos Pretos */
.vip-modal-body {
    padding: 20px;
    background-color: #ffffff;
    color: #111827;
    text-align: center;
}

.vip-modal-body p {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 20px;
    font-weight: 500;
}

/* Tr?s bot?es horizontais de a??o */
.vip-modal-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.vip-action-btn {
    min-width: 0;
    min-height: 44px;
    border: none;
    border-radius: 10px;
    padding: 12px 6px;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

.vip-action-btn:active {
    transform: scale(0.95);
}

.vip-btn-yes {
    background-color: #25D366;
    color: #ffffff;
}

.vip-btn-no {
    background-color: #E5E7EB;
    color: #374151;
}

.vip-btn-info {
    background-color: #3B82F6;
    color: #ffffff;
}

.vip-btn-already {
    background-color: #7C3AED;
    color: #ffffff;
}

.vip-action-btn:focus-visible,
.vip-info-header button:focus-visible,
.vip-info-btn-close:focus-visible,
.vip-signup-content button:focus-visible {
    outline: 3px solid #111827;
    outline-offset: 3px;
}

/* Janela Secund?ria de Detalhes VIP (Sobreposta) */
.vip-info-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    z-index: 10;
    display: flex;
    flex-direction: column;
}

.vip-info-header {
    background-color: #EF4444;
    color: #ffffff;
    padding: 14px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 900;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: space-between;
    letter-spacing: 1px;
}
.vip-info-header button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: #b91c1c; color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; }

.vip-info-body {
    padding: 20px;
    color: #111827;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.vip-info-body ul {
    list-style-type: none;
    margin-bottom: 20px;
}

.vip-info-body li {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: block;
    text-align: left;
}

.vip-info-disclaimer {
    margin: 0 0 16px;
    padding: 10px;
    border-radius: 8px;
    background: #F3F4F6;
    color: #374151;
    font-size: 0.8rem;
    line-height: 1.45;
}

.vip-info-btn-close {
    margin-top: auto;
    background-color: #374151;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    width: 100%;
}

.vip-signup-modal {
    position: fixed;
    inset: 0;
    z-index: 2200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.vip-signup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
}

.vip-signup-content {
    position: relative;
    z-index: 1;
    width: min(100%, 500px);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 22px;
    border: 2px solid #EF4444;
    border-radius: 16px;
    background: #fff;
    color: #111827;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.vip-signup-content h2 {
    margin: 0 0 14px;
    color: #B91C1C;
    font-size: 1.25rem;
}

.vip-signup-content p {
    margin: 0 0 20px;
    font-size: 1rem;
    line-height: 1.5;
}

.vip-signup-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

@media (max-width: 420px) {
    .vip-modal-body { padding: 16px; }
    .vip-modal-actions { grid-template-columns: 1fr 1fr; gap: 7px; }
    .vip-action-btn { padding: 11px 5px; font-size: 0.8rem; }
    .vip-info-body { overflow-y: auto; padding: 16px; }
}

/* Claro (Light) Theme Override */
body.theme-light {
    background-color: #F3F4F6 !important;
    color: #111827 !important;
}

body.theme-light .app-header {
    background-color: #FFFFFF !important;
    border-bottom: 1px solid #E5E7EB !important;
}

body.theme-light .header-title {
    color: #111827 !important;
}

body.theme-light .product-card {
    background-color: #FFFFFF !important;
    border-color: #E5E7EB !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05) !important;
}

body.theme-light .card-brand, body.theme-light .card-spec {
    color: #4B5563 !important;
}

body.theme-light .card-title {
    color: #111827 !important;
}

body.theme-light .price-main {
    color: #059669 !important; /* Green primary */
}

body.theme-light .accessibility-bar {
    background-color: #FFFFFF !important;
    border-bottom: 1px solid #E5E7EB !important;
    color: #111827 !important;
}

body.theme-light .accessibility-btn {
    background-color: #F3F4F6 !important;
    color: #374151 !important;
    border-color: #D1D5DB !important;
}

body.theme-light .accessibility-btn.active {
    background-color: var(--color-primary) !important;
    color: #ffffff !important;
}

body.theme-light .search-container input {
    background-color: #FFFFFF !important;
    color: #111827 !important;
    border-color: #D1D5DB !important;
}

body.theme-light .modal-content {
    background-color: #FFFFFF !important;
    color: #111827 !important;
}

body.theme-light .detail-title, body.theme-light .detail-section h4 {
    color: #111827 !important;
}

body.theme-light .detail-price-box {
    background-color: #F9FAFB !important;
    border-color: #E5E7EB !important;
}

body.theme-light .detail-section {
    border-bottom-color: #E5E7EB !important;
}

body.theme-light .product-card.selected {
    background-color: #F3F4F6 !important;
    border-color: #EF4444 !important;
}

body.theme-light .filter-btn {
    background-color: #E5E7EB !important;
    color: #111827 !important; /* Cinza escuro de alto contraste */
    border-color: #D1D5DB !important;
    font-weight: 700 !important;
}

body.theme-light .filter-btn.active {
    background-color: var(--color-primary) !important;
    color: #ffffff !important;
    border-color: var(--color-primary) !important;
}

/* Sem Anima??o (Reduce Animations) Override */
body.reduce-animations *,
body.reduce-animations *::before,
body.reduce-animations *::after {
    animation-delay: -1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
}

.gear-icon {
    animation: spinGear 12s linear infinite;
    display: inline-block;
}
.adv-filters-toggle-btn:hover .gear-icon {
    animation: spinGear 2s linear infinite;
}

@keyframes spinGear {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Layout dedicado para telas grandes, preservando a prioridade mobile. */
@media (min-width: 1024px) {
    .app-main,
    .search-container,
    .filters-container,
    .header-container,
    .footer-container,
    .cart-bar-container {
        width: min(1180px, calc(100% - 48px));
        margin-left: auto;
        margin-right: auto;
    }

    .product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 18px;
    }

    .search-section {
        padding-left: 24px;
        padding-right: 24px;
    }

    .app-main {
        padding-top: 28px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Homologa??o visual: PWA em arma??o de smartphone nas telas grandes. */
.desktop-stage { min-height: 100vh; width: 100%; }
.pwa-device-frame, .pwa-device-screen { min-width: 0; }
.desktop-ornament { display: none; }

.accessibility-modal { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.accessibility-modal.hidden { display: none; }
.accessibility-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.62); backdrop-filter: blur(5px); }
.accessibility-modal-content { position: relative; z-index: 1; width: min(620px, 100%); max-height: min(720px, calc(100vh - 32px)); overflow: auto; padding: clamp(20px, 4vw, 32px); border-radius: 22px; background: #111827; border: 1px solid #64748b; box-shadow: 0 20px 60px rgba(0,0,0,.35); color: #f8fafc; }
.accessibility-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.accessibility-modal-content h2 { margin: 0; color: #fff; font-family: 'Outfit', sans-serif; font-size: clamp(1.45rem, 4vw, 2rem); }
#accessibility-modal-description { margin: 6px 0 0; color: #cbd5e1; font-size: 1rem; line-height: 1.45; }
.accessibility-close-btn { flex: 0 0 auto; min-height: 44px; padding: 10px 16px; border: 1px solid #94a3b8; border-radius: 10px; background: #fff; color: #0f172a; font: inherit; font-weight: 800; cursor: pointer; }
.accessibility-modal-content .accessibility-bar { display: grid; grid-template-columns: 1fr; gap: 18px; max-width: none; margin: 0; padding: 0; background: transparent; }
.accessibility-modal-content .accessibility-group { display: grid; grid-template-columns: 1fr; gap: 10px; }
.accessibility-modal-content .accessibility-group h3 { margin: 0; color: #f8fafc; font: 800 1rem/1.25 'Outfit', sans-serif; }
.accessibility-modal-content .accessibility-btn { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 10px; background: #1e293b; border: 1px solid #64748b; color: #fff; font: 700 1rem/1.25 inherit; text-align: left; white-space: normal; cursor: pointer; }
.accessibility-modal-content .accessibility-btn:hover { background: #334155; }
.accessibility-modal-content .accessibility-btn.active { background: var(--color-primary); border-color: var(--color-primary); color: #07120d; }
.accessibility-modal-content .accessibility-btn:focus-visible, .accessibility-close-btn:focus-visible { outline: 3px solid #facc15; outline-offset: 3px; }
body.alto-contraste .accessibility-modal-content { background: #000 !important; border-color: #fff; }
body.alto-contraste .accessibility-modal-content h2, body.alto-contraste .accessibility-modal-content h3, body.alto-contraste #accessibility-modal-description { color: #fff !important; }
body.alto-contraste .accessibility-modal-content .accessibility-btn { background: #000; border-color: #fff; color: #fff; }
body.alto-contraste .accessibility-modal-content .accessibility-btn.active { background: #fff; color: #000; }

@media (min-width: 1024px) {
    html, body { width: 100%; height: 100%; overflow: hidden; }
    body { background: #ffffff; color: #F3F4F6; }
    .desktop-stage { height: 100vh; min-height: 0; display: flex; align-items: stretch; gap: clamp(50px, 4vw, 72px); padding: 20px 20px 20px 100px; background: #ffffff; overflow: hidden; }
    .pwa-device-frame { flex: 0 1 650px; width: min(650px, 56vw); height: calc(100vh - 40px); min-height: 520px; padding: 12px; border: 12px solid #111827; border-radius: 46px; background: #111827; box-shadow: 0 18px 48px rgba(15,23,42,.28), 0 0 0 2px #374151; overflow: hidden; }
    .pwa-device-screen { position: relative; transform: translateZ(0); width: 100%; height: 100%; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; border-radius: 26px; background: #0B0F19; scrollbar-gutter: stable; }
    .pwa-device-screen .app-header { position: sticky; top: 0; }
    .pwa-device-screen .header-container, .pwa-device-screen .search-container, .pwa-device-screen .filters-container, .pwa-device-screen .app-main, .pwa-device-screen .footer-container, .pwa-device-screen .cart-bar-container { width: 100%; max-width: none; margin-left: 0; margin-right: 0; }
    .pwa-device-screen .search-section { padding-left: 16px; padding-right: 16px; }
    .pwa-device-screen .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .pwa-device-screen .app-main { padding: 20px 14px 110px; }
    .pwa-device-screen .details-modal { position: absolute; }
    .pwa-device-screen .cart-bar { position: absolute; }
    .pwa-device-screen .help-floating-btn { position: absolute; }
    .desktop-ornament { flex: 1 1 auto; min-width: 280px; display: flex; align-items: stretch; justify-content: stretch; overflow: hidden; }
    .ornament-card { width: 100%; max-width: none; height: 100%; max-height: none; padding: clamp(22px, 2vw, 34px); overflow: auto; border-radius: 28px; color: #0F172A; background: #F8FAFC; border: 1px solid #CBD5E1; box-shadow: 0 22px 60px rgba(15,23,42,.12); }
    .ornament-card h2 { margin-bottom: 8px; color: #0F172A; font: 800 clamp(1.4rem, 2.3vw, 2.2rem)/1.1 'Outfit', sans-serif; }
    .ornament-card p { margin: 8px 0; color: #334155; }
    .ornament-info-mode { min-height: 380px; background-size: cover; background-position: center; }
    .ornament-logo img { width: 78px; height: 78px; object-fit: contain; border-radius: 20px; background: #fff; padding: 8px; margin-bottom: 20px; }
    .store-map-frame { display: block; width: 100%; height: calc(100vh - 220px); min-height: 460px; margin: 18px 0; border: 0; border-radius: 18px; background: #E2E8F0; }
    .ornament-route-button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 12px 18px; border-radius: 12px; color: #fff; background: #059669; font-weight: 800; text-decoration: none; }
    .ornament-socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
    .ornament-socials a { padding: 9px 13px; border-radius: 10px; color: #1D4ED8; background: #DBEAFE; font-weight: 700; text-decoration: none; }
}

@media (min-width: 1024px) and (max-width: 1199px) {
    .desktop-stage { gap: 20px; }
    .pwa-device-frame { width: 390px; flex-basis: 390px; }
    .desktop-ornament { min-width: 250px; }
}

@media (max-width: 1023px) {
    .desktop-stage { display: block; min-height: 100vh; }
    .pwa-device-frame { display: contents; }
    .pwa-device-screen { display: contents; }
    .desktop-ornament { display: none; }
}

/* Consolida??o de homologa??o: seletor de apresenta??o em PC/tablet. */
.layout-mode-switch {
    position: absolute;
    top: 14px;
    right: 20px;
    z-index: 80;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border: 1px solid #CBD5E1;
    border-radius: 999px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 8px 20px rgba(15, 23, 42, .12);
}
.layout-mode-label { color: #475569; font-size: .72rem; font-weight: 800; padding: 0 4px; }
.layout-mode-btn { border: 1px solid #CBD5E1; border-radius: 999px; padding: 7px 10px; background: #F8FAFC; color: #334155; cursor: pointer; font-size: .72rem; font-weight: 800; }
.layout-mode-btn.active { background: #0F766E; color: #FFFFFF; border-color: #0F766E; }

@media (min-width: 1024px) {
    .desktop-stage { position: relative; }
    .desktop-stage.layout-full { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .62fr); align-items: start; gap: clamp(24px, 4vw, 72px); overflow: auto; }
    .desktop-stage.layout-full .pwa-device-frame { width: min(650px, 100%); min-width: 0; height: calc(100vh - 40px); min-height: 520px; padding: 12px; border: 12px solid #111827; border-radius: 46px; background: #111827; box-shadow: 0 18px 48px rgba(15,23,42,.28),0 0 0 2px #374151; overflow: hidden; }
    .desktop-stage.layout-full .pwa-device-screen { width: 100%; height: 100%; min-height: 0; overflow-x: hidden; overflow-y: auto; border-radius: 26px; background: #0B0F19; }
    .desktop-stage.layout-full .desktop-ornament { height: calc(100vh - clamp(40px, 3vw, 64px)); }
    .desktop-stage.layout-full .pwa-device-screen .app-main { max-width: 1180px; margin: 0 auto; }
    .desktop-stage.layout-full .details-modal { position: fixed; }
    .desktop-stage.layout-full .cart-bar,
    .desktop-stage.layout-full .help-floating-btn { position: fixed; }
}

@media (max-width: 420px) {
    .accessibility-modal { align-items: flex-start; padding: 12px; }
    .accessibility-modal-content { max-height: calc(100vh - 24px); padding: 18px; border-radius: 16px; }
    .accessibility-modal-header { gap: 12px; }
    .accessibility-close-btn { padding-inline: 13px; }
}

@media (min-width: 768px) and (max-width: 1023px) {
    html, body { overflow-x: hidden; }
    body:not(.layout-mode-full) { overflow: hidden; }
    body.layout-mode-full { overflow-y: auto; }
    .desktop-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; min-height: 100vh; padding: 64px 38px 38px; overflow-y: auto; background: #FFFFFF; }
    .pwa-device-frame { display: block; width: min(540px, 100%); height: calc(100vh - 102px); min-height: 560px; padding: 10px; border: 10px solid #111827; border-radius: 42px; background: #111827; box-shadow: 0 16px 38px rgba(15,23,42,.24); overflow: hidden; }
    .pwa-device-screen { display: block; width: 100%; height: 100%; overflow-x: hidden; overflow-y: auto; border-radius: 24px; background: #0B0F19; }
    .desktop-ornament { display: flex; width: min(720px, 100%); min-width: 0; max-height: 60vh; }
    .desktop-stage.layout-full { display: block; padding-top: 64px; overflow-y: auto; }
    .desktop-stage.layout-full .pwa-device-frame { display: block; width: 100%; height: auto; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
    .desktop-stage.layout-full .pwa-device-screen { width: 100%; height: auto; min-height: 0; overflow: visible; border-radius: 0; }
    .desktop-stage.layout-full .desktop-ornament { margin: 22px auto 0; max-height: none; }
}

@media (max-width: 767px) {
    .layout-mode-switch { display: none !important; }
}

/* Contraste dos preços e do filtro ativo em telas estreitas. */
@media (max-width: 767px) {
    body:not(.theme-light) .price-main { color: #F9FAFB; }
    body:not(.theme-light) .filter-btn.active { color: #FFFFFF; }
}

/* Tema claro completo e contraste consistente, preservando elementos de marca. */
body.theme-light .pwa-device-screen,
body.theme-light .desktop-stage { background: #F8FAFC !important; color: #111827 !important; }
body.theme-light .app-main,
body.theme-light .search-section,
body.theme-light .filters-container,
body.theme-light .recent-products-section,
body.theme-light .section-block { color: #111827; }
body.theme-light .section-title,
body.theme-light .app-main h2,
body.theme-light .app-main h3,
body.theme-light .app-main h4,
body.theme-light .recent-products-section h3,
body.theme-light .footer-social-block h4,
body.theme-light .footer-video-section h4 { color: #0F172A !important; text-shadow: none !important; }
body.theme-light .search-input-wrapper,
body.theme-light .adv-filters-panel,
body.theme-light .modal-content,
body.theme-light .cart-bar,
body.theme-light .vip-info-banner { background-color: #FFFFFF !important; color: #111827 !important; border-color: #CBD5E1 !important; }
body.theme-light .search-input-wrapper input,
body.theme-light .search-input-wrapper input::placeholder,
body.theme-light label,
body.theme-light .objective-btn,
body.theme-light .adv-filters-toggle-btn { color: #111827 !important; }
body.theme-light .adv-filters-toggle-btn { background: #E2E8F0 !important; border-color: #CBD5E1 !important; }
body.theme-light .objective-btn { background: #FFFFFF !important; }
body.theme-light .footer-container { background: #FFFFFF !important; color: #111827 !important; border-color: #CBD5E1 !important; }
body.theme-light .footer-container h4,
body.theme-light .footer-container p,
body.theme-light .footer-container span { color: #1E293B !important; }
body.theme-light .detail-section p,
body.theme-light .detail-section li,
body.theme-light .detail-meta,
body.theme-light .card-brand,
body.theme-light .card-spec { color: #475569 !important; }
body.theme-light .modal-close-btn { color: #0F172A !important; }
body.theme-light .layout-mode-switch { background: #FFFFFF; }

/* A+/A++/Modo Idoso: conten??o, quebra inteligente e filtros rol?veis. */
body.font-grande .pwa-device-screen,
body.font-extra-grande .pwa-device-screen,
body.modo-idoso .pwa-device-screen { overflow-x: hidden; }
body.font-grande .pwa-device-screen *,
body.font-extra-grande .pwa-device-screen *,
body.modo-idoso .pwa-device-screen * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
body.font-extra-grande .filters-scroll,
body.modo-idoso .filters-scroll { max-width: 100%; overflow-x: auto; padding-bottom: 6px; }
body.font-extra-grande .filter-btn,
body.modo-idoso .filter-btn,
body.font-extra-grande .card-btn,
body.modo-idoso .card-btn,
body.font-extra-grande .adv-filters-toggle-btn,
body.modo-idoso .adv-filters-toggle-btn { white-space: normal; line-height: 1.25; }
body.font-extra-grande .header-container,
body.font-extra-grande .search-container,
body.font-extra-grande .form-grid,
body.modo-idoso .header-container,
body.modo-idoso .search-container { flex-wrap: wrap; }

/* Contraste tem preced?ncia sobre temas para nunca perder legibilidade. */
body.alto-contraste .desktop-stage,
body.alto-contraste .pwa-device-screen { background: #000000 !important; color: #FFFFFF !important; }
body.alto-contraste .section-title,
body.alto-contraste h2,
body.alto-contraste h3,
body.alto-contraste h4,
body.alto-contraste p,
body.alto-contraste label { color: #FFFFFF !important; }
.layout-mode-toggle {
    flex: 0 0 42px;
    align-self: stretch;
    min-height: 180px;
    padding: 10px 7px;
    border: 0;
    border-radius: 14px;
    background: #1D4ED8;
    color: #FFFFFF;
    box-shadow: 0 10px 24px rgba(29, 78, 216, .22);
    cursor: pointer;
    font: 800 .72rem/1.1 'Plus Jakarta Sans', sans-serif;
    letter-spacing: .04em;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
    z-index: 90;
}
.layout-mode-toggle:hover { background: #1E40AF; box-shadow: 0 12px 28px rgba(29, 78, 216, .32); }
.layout-mode-toggle:focus-visible { outline: 3px solid #FACC15; outline-offset: 4px; }
.layout-mode-toggle.is-expanded { background: #0F766E; }

@media (min-width: 1024px) {
    .desktop-stage:not(.layout-full) { gap: clamp(16px, 1.5vw, 28px); }
    .desktop-stage.layout-full {
        display: block;
        padding: 20px 24px 32px;
        overflow-x: hidden;
        overflow-y: auto;
    }
    .desktop-stage.layout-full .pwa-device-frame {
        width: 100%;
        height: auto;
        min-height: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        overflow: visible;
    }
    .desktop-stage.layout-full .pwa-device-screen {
        width: 100%;
        height: auto;
        min-height: 0;
        overflow: visible;
        border-radius: 0;
    }
    .desktop-stage.layout-full .desktop-ornament {
        width: 100%;
        height: auto;
        min-width: 0;
        max-height: none;
        margin-top: 28px;
    }
    .desktop-stage.layout-full .ornament-card { height: auto; min-height: 420px; }
    .desktop-stage.layout-full .store-map-frame { height: clamp(420px, 52vw, 680px); min-height: 420px; }
    .desktop-stage.layout-full .pwa-device-screen .product-grid {
        width: min(100%, 1480px);
        margin-left: auto;
        margin-right: auto;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 18px;
    }
    .desktop-stage.layout-full .pwa-device-screen .app-main,
    .desktop-stage.layout-full .pwa-device-screen .search-section,
    .desktop-stage.layout-full .pwa-device-screen .filters-container,
    .desktop-stage.layout-full .pwa-device-screen .header-container,
    .desktop-stage.layout-full .pwa-device-screen .footer-container { width: 100%; max-width: none; }
    .desktop-stage.layout-full .pwa-device-screen .cart-bar { position: fixed; }
    .desktop-stage.layout-full .pwa-device-screen .help-floating-btn { position: fixed; }
    .desktop-stage.layout-full .layout-mode-toggle { position: fixed; top: 50%; right: 12px; transform: translateY(-50%) rotate(180deg); }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .desktop-stage:not(.layout-full) { gap: 16px; }
    .desktop-stage:not(.layout-full) .pwa-device-screen .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .desktop-stage:not(.layout-full) .layout-mode-toggle { align-self: center; min-height: 180px; height: auto; writing-mode: vertical-rl; transform: rotate(180deg); padding: 10px 7px; }
    .desktop-stage.layout-full { display: block; padding: 24px 24px 34px; overflow-x: hidden; overflow-y: auto; }
    .desktop-stage.layout-full .pwa-device-frame { display: block; width: 100%; height: auto; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
    .desktop-stage.layout-full .pwa-device-screen { width: 100%; height: auto; min-height: 0; overflow: visible; border-radius: 0; }
    .desktop-stage.layout-full .desktop-ornament { display: flex; width: 100%; min-width: 0; max-height: none; margin-top: 24px; }
    .desktop-stage.layout-full .ornament-card { height: auto; min-height: 420px; }
    .desktop-stage.layout-full .store-map-frame { height: clamp(380px, 58vw, 620px); min-height: 380px; }
    .desktop-stage.layout-full .pwa-device-screen .product-grid { width: min(100%, 980px); margin-left: auto; margin-right: auto; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
    .desktop-stage.layout-full .layout-mode-toggle { position: fixed; top: 50%; right: 10px; transform: translateY(-50%) rotate(180deg); }
}

@media (max-width: 767px) {
    .layout-mode-toggle { display: none !important; }
}

.catalogo9-footer-controls .catalogo9-update{margin:10px 0}
/* Exclusivo do REINICIAR: contraste independente dos estilos globais do rodapé. */
.catalogo9-update.catalogo31-restart-button{display:inline-flex!important;align-items:center;justify-content:center;min-height:48px!important;padding:10px 18px!important;border:2px solid #000!important;border-radius:12px!important;background:#FFD600!important;color:#000!important;font-size:18px!important;font-weight:800!important;line-height:1.2!important;letter-spacing:.02em!important;cursor:pointer!important;touch-action:manipulation}
.catalogo9-update.catalogo31-restart-button:hover{background:#FFE44D!important;color:#000!important}
.catalogo9-update.catalogo31-restart-button:active{background:#E6C000!important;color:#000!important;transform:translateY(1px)}
.catalogo9-update.catalogo31-restart-button:focus-visible{outline:3px solid #000!important;outline-offset:3px!important;box-shadow:0 0 0 5px #fff!important}
.catalogo-version-below-restart{margin:0 10px 10px;text-align:center;color:#fff;font-size:clamp(.78rem,2.4vw,1rem);font-weight:800;line-height:1.3;letter-spacing:.02em}

/* Capa visual da armação: aplicada somente em Tablet/PC (>= 768px). */
@media (min-width: 768px) {
    :root { --armacao-capa-cor: #E11D48; }

    .pwa-device-frame {
        background: var(--armacao-capa-cor);
        border: 0;
        padding: 18px;
        border-radius: 44px;
        box-shadow: 0 20px 48px rgba(15, 23, 42, .24), 0 0 0 3px rgba(15, 23, 42, .14);
    }

    .pwa-device-screen {
        border: 10px solid #050505;
        border-radius: 28px;
        background: #0B0F19;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
    }

    .desktop-stage:not(.layout-full) .pwa-device-frame {
        box-shadow: 0 5px 0 rgba(15, 23, 42, .2), 0 20px 44px rgba(15, 23, 42, .28), 0 0 0 3px rgba(15, 23, 42, .14);
    }

    .desktop-stage.layout-full .pwa-device-frame {
        position: relative;
        display: flow-root;
        width: 100%;
        height: auto;
        min-height: 0;
        padding: 18px 42px 18px 18px;
        border: 0;
        border-radius: 36px;
        background: var(--armacao-capa-cor);
        box-shadow: 0 20px 52px rgba(15, 23, 42, .22), 0 0 0 3px rgba(15, 23, 42, .14);
        overflow: visible;
    }

    .desktop-stage.layout-full .pwa-device-screen {
        display: flow-root;
        width: 100%;
        height: auto;
        min-height: 0;
        max-height: none;
        overflow: visible;
        border: 10px solid #050505;
        border-radius: 28px;
        background: #0B0F19;
    }

    .desktop-stage.layout-full .pwa-device-screen > .desktop-ornament {
        display: flex;
        flex: none;
        width: 100%;
        min-width: 0;
        height: auto;
        max-height: none;
        margin: 28px 0 0;
        overflow: visible;
    }

    .desktop-stage.layout-full .pwa-device-frame::before {
        content: '';
        position: absolute;
        top: 86px;
        right: 13px;
        z-index: 4;
        width: 11px;
        height: 34px;
        border-radius: 6px;
        background: #111827;
        box-shadow: 0 46px 0 #111827, inset 0 1px 1px rgba(255, 255, 255, .22);
        pointer-events: none;
    }
}
