* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

:root {
    --primary-color: #ff5a1f;
    --background-color: #0d0e10;
    --text-color: #ffffff;
    --card-background: #141619;
    --border-color: rgba(255, 255, 255, 0.06);
    --bg-texture-url: none;
    --bg-opacity-amount: 0.6; /* controlado pelo ADM */
}

html { -webkit-text-size-adjust: 100%; }

body {
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== FUNDO (imagem + escurecimento controlado pelo ADM) ===== */
.bg-layer {
    position: fixed;
    inset: 0;
    background-image: var(--bg-texture-url);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    z-index: -1;
}
html.tem-textura .bg-layer::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, var(--bg-opacity-amount, 0.6));
}

/* ===== BANNER DO TOPO ===== */
.top-bar-alert {
    background-color: #000;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 10px 0;
    text-transform: uppercase;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}
.marquee-text {
    display: flex;
    width: max-content;
    animation: marqueeAnimation var(--marquee-dur, 30s) linear infinite;
}
.marquee-text span {
    padding-right: 50px;
    white-space: nowrap;
}
@keyframes marqueeAnimation {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== CABEÇALHO (preto sólido, linha na cor de destaque) ===== */
.main-header {
    background-color: #000;
    border-bottom: 2px solid var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}
/* slogan logo abaixo do nome, menor (acompanha o tamanho do nome) */
.logo-slogan {
    font-size: clamp(11px, calc(var(--logo-size, 24px) * 0.45), 16px);
    font-weight: 400;
    color: #c3c7d0;
    line-height: 1.3;
    margin-top: 3px;
    max-width: 440px;
}
.logo h1 {
    font-size: var(--logo-size, 24px); /* tamanho definido no ADM */
    font-weight: 700;
    color: #fff;
    letter-spacing: -1px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}
.search-box {
    display: flex;
    width: 100%;
    max-width: 450px;
    background: #181a1e;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.search-box input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    padding: 12px;
    color: #fff;
    font-size: 13px;
    outline: none;
}
.search-box input::placeholder { color: #6c717c; }
.search-box button {
    background: var(--primary-color);
    border: none;
    padding: 0 16px;
    cursor: pointer;
}

/* ===== MENU DE CATEGORIAS (caixa alta, ativo na cor de destaque) ===== */
.categories-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 30px;
    background: #090a0c;
    padding: 12px 20px;
}
.categories-nav a {
    color: #989aa0;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    transition: color 0.2s;
}
.categories-nav a.active,
.categories-nav a:hover {
    color: var(--primary-color);
}

/* ===== PRODUTOS ===== */
.store-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}
.section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    border-left: 4px solid var(--primary-color);
    padding-left: 12px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.product-card {
    display: flex;
    flex-direction: column;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 16px;
    transition: transform 0.2s, border-color 0.2s;
}
@media (hover: hover) {
    .product-card:hover {
        transform: translateY(-4px);
        border-color: var(--primary-color);
    }
}
.product-card .img-wrapper {
    width: 100%;
    aspect-ratio: 1;
    background: #1c1f24;
    border-radius: 4px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.product-card .img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.product-card .no-img { font-size: 12px; color: #6c717c; }
.product-card .product-name {
    font-size: 13px;
    font-weight: 500;
    color: #e2e5ec;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.4em * 2);
}
.product-card .price-tag {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-top: auto;
}
.product-card .installment-tag {
    font-size: 11px;
    color: var(--primary-color);
    margin-top: 2px;
}

/* ===== RODAPÉ ===== */
.main-footer {
    background: #000;
    border-top: 1px solid var(--border-color);
    margin-top: 80px;
    padding-top: 30px;
}
.marquee-container {
    width: 100%;
    overflow: hidden;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}
.marquee-track {
    display: flex;
    width: max-content;
    animation: marqueeAnimation 40s linear infinite;
}
.marquee-track span {
    padding-right: 30px;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 2px;
}
.footer-content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}
.footer-info h3,
.footer-contacts h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #fff;
}
.footer-info p,
.footer-contacts p {
    font-size: 13px;
    color: #888c94;
    line-height: 1.7;
}
.footer-contacts p + p { margin-top: 8px; }
.footer-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}
.footer-btn {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    transition: filter 0.2s;
}
.footer-btn:hover { filter: brightness(1.1); }
.footer-btn.btn-whatsapp { background: #40c057; }
.footer-btn.btn-instagram { background: #e1306c; }

.footer-copyright {
    text-align: center;
    padding: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 11px;
    color: #555;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .header-container { flex-direction: column; gap: 12px; padding: 15px; text-align: center; }
    .logo h1 { font-size: calc(var(--logo-size, 24px) * 0.85); }
    .search-box { max-width: 100%; }
    .search-box input { padding: 11px 12px; font-size: 16px; }

    .categories-nav {
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 18px;
        padding: 12px 15px;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .categories-nav::-webkit-scrollbar { display: none; }
    .categories-nav a { font-size: 12px; flex-shrink: 0; }

    .logo-slogan { font-size: clamp(11px, calc(var(--logo-size, 24px) * 0.38), 13px); margin-inline: auto; }

    .store-container { margin: 24px auto; }
    .section-title { font-size: 18px; margin-bottom: 16px; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-card { padding: 10px; }
    .product-card .product-name { font-size: 12px; }
    .product-card .price-tag { font-size: 15px; }
    .product-card .installment-tag { font-size: 10px; }

    .main-footer { margin-top: 50px; }
    .footer-content { grid-template-columns: 1fr; gap: 30px; padding: 0 20px; }
    .footer-info h3,
    .footer-contacts h3 { margin-bottom: 10px; }
    .footer-btn { flex: 1 1 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    .marquee-text,
    .marquee-track { animation: none; }
    * { transition: none !important; }
}


/* ===== ALERTA +18 (compacto) ===== */
.age-gate {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(5, 6, 8, 0.96);
}
html.age-lock .age-gate { display: flex; }
html.age-lock body { overflow: hidden; }

.age-box {
    width: 100%;
    max-width: 340px;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 10px;
    padding: 18px;
    text-align: center;
    opacity: 0; /* aparece só depois que o JS preencher o conteúdo */
    transition: opacity 0.15s;
}
.age-gate.pronto .age-box { opacity: 1; }

.age-img {
    display: block;
    margin: 0 auto 12px;
    max-width: 100%;
    max-height: 110px;
    object-fit: contain;
    border-radius: 6px;
}
.age-img[hidden] { display: none; }
.age-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 8px;
}
.age-text {
    font-size: 13px;
    line-height: 1.5;
    color: #b3b8c2;
    white-space: pre-line;
    margin-bottom: 16px;
}
.age-actions { display: flex; gap: 8px; }
.age-btn {
    flex: 1;
    padding: 11px 10px;
    border-radius: 6px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.2s;
}
.age-btn:hover { filter: brightness(1.12); }
.age-btn.confirmar { background: var(--primary-color); color: #fff; }
.age-btn.negar { background: transparent; color: #b3b8c2; border-color: rgba(255, 255, 255, 0.15); }
@media (max-width: 380px) {
    .age-actions { flex-direction: column-reverse; }
}


/* ===== CABEÇALHO: busca + carrinho ===== */
.logo { flex-shrink: 0; }
.header-actions { display: flex; align-items: stretch; gap: 10px; flex: 0 1 520px; min-width: 0; }
.header-actions .search-box { flex: 1; max-width: none; }

.cart-btn {
    position: relative;
    flex-shrink: 0;
    min-width: 46px;
    background: #181a1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: border-color 0.2s;
}
.cart-btn:hover { border-color: var(--primary-color); }
.cart-count {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--primary-color);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 19px;
    text-align: center;
}
.cart-count[hidden] { display: none; }

/* ===== AVISO DE LOJA FECHADA ===== */
.store-closed {
    padding: 10px 20px;
    background: #3a1214;
    border-bottom: 1px solid rgba(255, 90, 90, 0.35);
    color: #ffb4b4;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}
.store-closed[hidden] { display: none; }

/* ===== CARDS: botão, promoção, esgotado ===== */
.add-cart-btn {
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    border: none;
    border-radius: 4px;
    background: var(--primary-color);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.2s, transform 0.1s, background 0.2s;
}
.add-cart-btn:hover { filter: brightness(1.1); }
.add-cart-btn:active { transform: scale(0.98); }
.add-cart-btn.adicionado { background: #2f9e44; }
.add-cart-btn:disabled { background: #2a2d33; color: #8a8f99; cursor: not-allowed; filter: none; transform: none; }

.product-card { position: relative; }
.product-card .badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
    padding: 3px 8px;
    border-radius: 4px;
    background: var(--primary-color);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}
.product-card .badge.esgotado { background: #2a2d33; color: #b3b8c2; }
.product-card.is-esgotado .img-wrapper { opacity: 0.45; }
.product-card .old-price {
    margin-top: auto;
    font-size: 12px;
    color: #787e8a;
    text-decoration: line-through;
}
.product-card .old-price + .price-tag { margin-top: 0; }
.product-card .pix-tag { font-size: 11px; color: #69db7c; margin-top: 2px; }

/* ===== CARRINHO ===== */
.cart-overlay { display: none; position: fixed; inset: 0; z-index: 8999; background: rgba(0, 0, 0, 0.6); }
.cart-overlay.aberto { display: block; }
.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 9000;
    width: min(400px, 100vw);
    display: flex;
    flex-direction: column;
    background: #0f1013;
    border-left: 1px solid var(--border-color);
    transform: translateX(100%);
    visibility: hidden; /* fechado: não recebe foco do teclado */
    transition: transform 0.25s, visibility 0s 0.25s;
}
.cart-drawer.aberto { transform: none; visibility: visible; transition: transform 0.25s; }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--border-color); }
.cart-head h2 { font-size: 18px; font-weight: 700; }
.cart-close { width: 36px; height: 36px; background: transparent; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 6px; color: #fff; font-size: 15px; cursor: pointer; }
.cart-close:hover { border-color: var(--primary-color); }
.cart-body { flex: 1; overflow-y: auto; padding: 6px 20px; }
.cart-vazio { padding: 50px 10px; text-align: center; font-size: 14px; line-height: 1.6; color: #888c94; }
.cart-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 6px 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border-color); }
.cart-item.indisponivel { opacity: 0.55; }
.cart-item-img { width: 56px; height: 56px; border-radius: 6px; background: #1c1f24; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #6c717c; }
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cart-item-nome { font-size: 13px; font-weight: 500; line-height: 1.35; color: #e8eaf0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-item-preco { margin-top: 3px; font-size: 12px; color: #9a9ea6; }
.cart-item-sub { font-size: 14px; font-weight: 700; text-align: right; }
.cart-item-controles { grid-column: 2 / 4; display: flex; align-items: center; gap: 8px; }
.cart-qtd-btn { width: 30px; height: 30px; background: #1c1f24; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 6px; color: #fff; font-size: 16px; cursor: pointer; }
.cart-qtd-btn:hover { border-color: var(--primary-color); }
.cart-qtd { min-width: 26px; text-align: center; font-size: 14px; font-weight: 700; }
.cart-remover { margin-left: auto; background: none; border: none; color: #c75b5b; font-size: 12px; cursor: pointer; text-decoration: underline; }

.cart-foot { padding: 16px 20px 20px; border-top: 1px solid var(--border-color); background: #0b0c0e; overflow-y: auto; max-height: 62vh; }
.cart-foot[hidden] { display: none; }
.cart-resumo { margin-bottom: 8px; }
.cart-linha { display: flex; justify-content: space-between; align-items: baseline; padding: 3px 0; font-size: 13px; color: #9a9ea6; }
.cart-linha.destaque { color: #69db7c; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 0 12px; font-size: 14px; color: #b3b8c2; }
.cart-total strong { font-size: 22px; color: #fff; }
.cart-aviso { margin-bottom: 8px; padding: 8px 10px; border-radius: 6px; background: rgba(255, 90, 31, 0.12); border: 1px solid rgba(255, 90, 31, 0.35); color: #ffc4ad; font-size: 12px; line-height: 1.4; }
.cart-aviso[hidden] { display: none; }
.cart-label { display: block; margin: 10px 0 5px; font-size: 12px; font-weight: 500; color: #b3b8c2; }
.cart-foot input, .cart-foot select, .cart-foot textarea { width: 100%; padding: 10px 12px; background: #181a1e; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 6px; color: #fff; font-size: 14px; outline: none; }
.cart-foot textarea { min-height: 64px; resize: vertical; }
.cart-foot input:focus, .cart-foot select:focus, .cart-foot textarea:focus { border-color: var(--primary-color); }
.cart-foot select option { background: #181a1e; }
.cart-checkout { width: 100%; margin-top: 14px; padding: 14px; background: #2f9e44; border: none; border-radius: 6px; color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; transition: filter 0.2s; }
.cart-checkout:hover { filter: brightness(1.1); }
.cart-checkout:disabled { background: #2a2d33; color: #8a8f99; cursor: not-allowed; filter: none; }
.cart-clear { display: block; margin: 10px auto 0; background: none; border: none; color: #888c94; font-size: 12px; text-decoration: underline; cursor: pointer; }

.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 9500;
    max-width: calc(100vw - 32px);
    padding: 11px 18px;
    border-radius: 8px;
    background: #1c1f24;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, 10px);
    transition: opacity 0.2s, transform 0.2s;
}
.toast.visivel { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 768px) {
    .header-actions { flex: none; width: 100%; }
    .add-cart-btn { padding: 9px 6px; font-size: 12px; margin-top: 10px; }
    .product-card .badge { top: 6px; left: 6px; font-size: 10px; }
}


/* ===== ESSENCIAIS ===== */
[hidden] { display: none !important; }

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 20000;
    padding: 10px 14px;
    border-radius: 6px;
    background: var(--primary-color);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: top 0.15s;
}
.skip-link:focus { top: 12px; }

.noscript-msg { padding: 14px 20px; background: #3a1214; color: #ffb4b4; font-size: 14px; text-align: center; }

.vazio { grid-column: 1 / -1; text-align: center; color: #787e8a; padding: 40px 0; }

.footer-extra { margin-top: 14px; }
.footer-extra p { font-size: 13px; color: #888c94; line-height: 1.6; }
.footer-extra p + p { margin-top: 4px; }


/* ===== BARRA DA VITRINE (contagem + ordenar) ===== */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: -8px 0 18px; }
.toolbar-count { font-size: 13px; color: #9a9ea6; }
.sort-wrap { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #9a9ea6; }
.sort-wrap select { padding: 9px 10px; min-height: 40px; background: #181a1e; border: 1px solid rgba(255,255,255,.12); border-radius: 6px; color: #fff; font-size: 13px; outline: none; }
.sort-wrap select:focus { border-color: var(--primary-color); }
.sort-wrap select option { background: #181a1e; }

/* ===== FOTO CLICÁVEL ===== */
.product-card .img-wrapper.zoom { cursor: zoom-in; }

/* ===== BOTÕES FLUTUANTES ===== */
.fab {
    position: fixed; right: 16px; z-index: 900;
    width: 52px; height: 52px; border-radius: 50%; border: none;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 22px; text-decoration: none; cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,.5);
    transition: transform .15s, filter .2s, opacity .2s;
}
.fab:active { transform: scale(.94); }
.fab:hover { filter: brightness(1.1); }
.fab-wa { bottom: calc(16px + env(safe-area-inset-bottom)); background: #25d366; }
.fab-topo { bottom: calc(80px + env(safe-area-inset-bottom)); width: 44px; height: 44px; right: 20px; background: #2a2d33; border: 1px solid rgba(255,255,255,.15); font-size: 20px; }

/* ===== FOTO AMPLIADA ===== */
.lightbox { position: fixed; inset: 0; z-index: 9800; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; background: rgba(0,0,0,.92); }
.lightbox img { max-width: 100%; max-height: 78vh; max-height: 78dvh; object-fit: contain; border-radius: 8px; }
.lightbox-legenda { max-width: 560px; text-align: center; font-size: 14px; color: #d4d7de; }
.lightbox-close { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 14px; width: 44px; height: 44px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 50%; color: #fff; font-size: 18px; cursor: pointer; }

/* ===== MOBILE REFINADO ===== */
@media (max-width: 768px) {
    html { scroll-padding-top: 130px; }

    /* cabeçalho compacto: nome + carrinho em cima, busca embaixo */
    .header-container {
        display: grid; grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "logo cart" "search search";
        align-items: center; gap: 10px 12px; padding: 10px 14px 12px; text-align: left;
    }
    .header-actions { display: contents; }
    .logo { grid-area: logo; min-width: 0; }
    .cart-btn { grid-area: cart; width: 48px; height: 44px; font-size: 20px; }
    .header-actions .search-box { grid-area: search; width: 100%; }
    .logo h1 { font-size: min(calc(var(--logo-size, 24px) * .85), 26px); letter-spacing: -.5px; }
    .logo-slogan { margin-inline: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
    .search-box input { min-height: 44px; }
    .search-box button { min-width: 48px; }
    .top-bar-alert { padding: 8px 0; font-size: 10px; }

    /* categorias: rolagem lateral com fade e alvo de toque maior */
    .categories-nav { position: sticky; top: 0; z-index: 90; gap: 6px; padding: 8px 12px; scroll-snap-type: x proximity; border-bottom: 1px solid var(--border-color); }
    .categories-nav a { padding: 9px 14px; border-radius: 999px; background: #14161a; scroll-snap-align: start; letter-spacing: .2px; }
    .categories-nav a.active { background: var(--primary-color); color: #fff; }

    .store-container { padding: 0 12px; margin: 18px auto; }
    .toolbar { margin: -4px 0 14px; }
    .sort-wrap span { display: none; }
    .sort-wrap select { max-width: 170px; }

    /* cards */
    .products-grid { gap: 10px; }
    .product-card { padding: 8px; border-radius: 10px; }
    .product-card .img-wrapper { margin-bottom: 10px; border-radius: 8px; }
    .product-card .product-name { font-size: 12.5px; }
    .add-cart-btn { min-height: 42px; border-radius: 8px; }

    /* carrinho ocupa a tela toda */
    .cart-drawer { width: 100vw; border-left: none; }
    .cart-head { padding: 14px 16px; padding-top: calc(14px + env(safe-area-inset-top)); }
    .cart-close { width: 44px; height: 44px; }
    .cart-body { padding: 4px 16px; }
    .cart-qtd-btn { width: 40px; height: 40px; font-size: 18px; }
    .cart-remover { padding: 10px 4px; }
    .cart-foot { padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); max-height: 66vh; max-height: 66dvh; }
    .cart-foot input, .cart-foot select, .cart-foot textarea { font-size: 16px; min-height: 44px; } /* 16px evita zoom automático no iPhone */
    .cart-checkout { min-height: 52px; font-size: 16px; }
    .cart-clear { padding: 10px; }

    /* rodapé */
    .footer-content { margin: 28px auto; text-align: center; }
    .footer-btn { padding: 14px 16px; }
    .footer-copyright { padding-bottom: calc(90px + env(safe-area-inset-bottom)); } /* espaço para o botão do WhatsApp */
    .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }

    .age-btn { min-height: 46px; }
}

@media (max-width: 360px) {
    .products-grid { gap: 8px; }
    .product-card .price-tag { font-size: 14px; }
    .categories-nav a { padding: 8px 11px; font-size: 11px; }
}

@media (min-width: 769px) {
    .fab-topo { right: 24px; bottom: 92px; }
    .fab-wa { right: 20px; }
}

/* ===== LINK LEGAL NO RODAPÉ + PÁGINA DE PRIVACIDADE ===== */
.footer-legal { margin-top: 6px; }
.footer-legal a { color: #6c717c; font-size: 11px; text-decoration: underline; }
.footer-legal a:hover { color: #fff; }

.doc { max-width: 760px; margin: 0 auto; padding: 28px 20px 60px; }
.doc a.voltar { display: inline-block; margin-bottom: 20px; color: var(--primary-color); font-size: 14px; text-decoration: none; }
.doc h1 { font-size: 26px; margin-bottom: 6px; }
.doc .atualizado { font-size: 12px; color: #787e8a; margin-bottom: 24px; }
.doc h2 { font-size: 17px; margin: 26px 0 8px; border-left: 4px solid var(--primary-color); padding-left: 10px; }
.doc p, .doc li { font-size: 14px; line-height: 1.7; color: #c3c7d0; }
.doc ul { padding-left: 20px; margin-top: 6px; }
.doc li + li { margin-top: 4px; }


/* ===== MOBILE V2: cabeçalho que encolhe, menu fixo funcionando, carrinho rolável ===== */
@media (max-width: 768px) {
    html { -webkit-tap-highlight-color: transparent; }
    body { min-height: 100vh; min-height: 100dvh; }
    button, a, select, .product-card .img-wrapper.zoom { touch-action: manipulation; }

    /* Cabeçalho: nome em cima; busca + carrinho embaixo. Ao rolar, o nome sai da tela e
       ficam só a busca e o carrinho (sempre à mão). --hdr-off e --hdr-keep vêm do loja.js (valores abaixo são reserva). */
    .header-container { grid-template-areas: "logo logo" "search cart"; }
    .main-header { top: var(--hdr-off, -64px); }
    .categories-nav {
        top: var(--hdr-keep, 74px);          /* gruda logo abaixo do cabeçalho, em vez de ficar escondido atrás dele */
        background: #090a0c;
        scroll-padding-inline: 12px;         /* a 1ª categoria não encosta mais na borda ao "encaixar" */
    }
    html { scroll-padding-top: calc(var(--hdr-keep, 74px) + 52px); }

    /* Toque dá retorno visual */
    .product-card:active { border-color: var(--primary-color); }
    .categories-nav a:active { filter: brightness(1.25); }
    .cart-btn:active, .cart-qtd-btn:active, .cart-checkout:active { transform: scale(0.96); }

    /* Carrinho: a gaveta inteira rola (antes a lista de itens ficava espremida acima do formulário) */
    .cart-drawer { width: 100%; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
    .cart-head { position: sticky; top: 0; z-index: 2; background: #0f1013; }
    .cart-body { flex: 1 0 auto; overflow: visible; min-height: 96px; }
    .cart-foot { max-height: none; overflow: visible; }
    .cart-checkout {
        position: sticky; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 1;
        box-shadow: 0 -10px 18px 4px #0b0c0e;   /* esconde o conteúdo que passa por trás do botão */
    }
    /* Aviso "Adicionado ao carrinho" vai para o topo quando o carrinho está aberto (não cobre o botão) */
    .cart-drawer.aberto ~ .toast { bottom: auto; top: calc(66px + env(safe-area-inset-top)); }
}

/* celulares maiores / deitados: 3 colunas */
@media (min-width: 520px) and (max-width: 768px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); }
}


/* ===== BARRA "VER CARRINHO" ===== */
.cart-bar {
    position: fixed; left: 12px; right: 84px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 950;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 14px 16px; border: none; border-radius: 10px;
    background: var(--primary-color); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,.5);
}
.cart-bar[hidden] { display: none; }
.cart-bar:active { transform: scale(.98); }
body.tem-carrinho { padding-bottom: 84px; }
body.tem-carrinho .toast { bottom: 88px; }
@media (min-width: 900px) { .cart-bar { left: auto; right: 84px; width: 340px; } }


/* =====================================================================
   REFINO VISUAL (etapa 1): ícones, espaçamento, cards, estados
   Fica no fim do arquivo de propósito: sobrepõe as regras anteriores.
   ===================================================================== */
:root {
    --radius: 12px;
    --radius-sm: 8px;
    --surface: #141619;
    --surface-2: #1b1e23;
    --line: rgba(255, 255, 255, 0.08);
    --muted: #9a9fa9;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

body { font-size: 15px; letter-spacing: 0.005em; text-rendering: optimizeLegibility; }
h1, h2, h3 { text-wrap: balance; }

/* ----- Ícones ----- */
.ico {
    width: 1.15em;
    height: 1.15em;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -0.2em;
}
.ico-lg { width: 26px; height: 26px; }
.ico-xl { width: 40px; height: 40px; stroke-width: 1.4; opacity: 0.6; }

/* ----- Banner do topo: mais discreto ----- */
.top-bar-alert {
    background: #050607;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.06em;
    padding: 9px 0;
    color: #d6d9df;
}
.marquee-text span { padding-right: 0; display: inline-flex; align-items: center; }
.marquee-text span::after {
    content: "";
    width: 4px;
    height: 4px;
    margin: 0 28px;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0.8;
}
/* ----- Cabeçalho ----- */
.main-header {
    background: rgba(0, 0, 0, 0.92);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
    backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 0 var(--primary-color), 0 6px 20px rgba(0, 0, 0, 0.25);
}
.logo h1 { letter-spacing: -0.02em; font-weight: 800; }
.search-box {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 25%, transparent);
}
.search-box input { padding: 12px 14px; font-size: 14px; }
.search-box button {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding: 0 16px;
    transition: filter 0.2s;
}
.search-box button:hover { filter: brightness(1.1); }
.search-box button .ico { width: 18px; height: 18px; }

.cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}
.cart-btn .ico { width: 21px; height: 21px; }
.cart-count { top: -6px; right: -6px; box-shadow: 0 0 0 2px #000; }

/* ----- Categorias: pílulas também no desktop ----- */
.categories-nav { background: #08090b; border-bottom: 1px solid var(--line); gap: 8px; padding: 12px 20px; }
.categories-nav a {
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--muted);
    border: 1px solid transparent;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.categories-nav a:hover { color: #fff; border-color: var(--line); background: var(--surface); }
.categories-nav a.active { color: #fff; background: var(--primary-color); border-color: transparent; }

/* ----- Vitrine ----- */
.store-container { margin: 36px auto; }
.section-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.01em;
    border-left: 0;
    padding-left: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--line), transparent);
}
.toolbar { margin: 0 0 20px; }
.toolbar-count { font-size: 13px; color: var(--muted); }
.sort-wrap select { border-radius: var(--radius-sm); border-color: var(--line); background: var(--surface-2); }

.products-grid { gap: 22px; }
.product-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px 12px 14px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
@media (hover: hover) {
    .product-card:hover {
        transform: translateY(-3px);
        border-color: color-mix(in srgb, var(--primary-color) 60%, transparent);
        box-shadow: var(--shadow);
    }
    .product-card .img-wrapper img { transition: transform 0.45s ease; }
    .product-card:hover .img-wrapper img { transform: scale(1.04); }
}
.product-card .img-wrapper {
    background: var(--surface-2);
    border-radius: calc(var(--radius) - 4px);
    margin-bottom: 14px;
}
.product-card .no-img { font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.product-card .product-name { font-size: 14px; font-weight: 600; color: #eceef2; line-height: 1.35; }
.product-card .price-tag { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.product-card .old-price { font-variant-numeric: tabular-nums; }
.product-card .installment-tag { color: var(--muted); font-size: 12px; margin-top: 3px; }
.product-card .pix-tag { font-size: 12px; font-weight: 600; margin-top: 3px; }
.product-card .badge { top: 14px; left: 14px; border-radius: 6px; padding: 4px 9px; letter-spacing: 0.02em; }

.add-cart-btn {
    margin-top: 14px;
    padding: 11px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    letter-spacing: 0.02em;
}

/* ----- Esqueleto de carregamento ----- */
.product-card.skeleton { pointer-events: none; }
.sk-img, .sk-linha, .sk-botao {
    border-radius: 8px;
    background: linear-gradient(100deg, #1b1e23 30%, #252930 50%, #1b1e23 70%);
    background-size: 200% 100%;
    animation: skShimmer 1.4s ease-in-out infinite;
}
.sk-img { aspect-ratio: 1; border-radius: calc(var(--radius) - 4px); margin-bottom: 14px; }
.sk-linha { height: 12px; margin-bottom: 10px; }
.sk-linha.curta { width: 55%; height: 16px; }
.sk-botao { height: 40px; margin-top: 14px; }
@keyframes skShimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ----- Estado vazio ----- */
.vazio {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 64px 20px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    font-size: 14px;
}

/* ----- Rodapé ----- */
.main-footer { margin-top: 72px; background: #050607; }
.footer-info h3, .footer-contacts h3 { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; }
.footer-info p, .footer-contacts p, .footer-extra p {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--muted);
}
.footer-info > p { display: block; }
.footer-contacts p .ico, .footer-extra p .ico { margin-top: 0.25em; color: var(--primary-color); }
.footer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.01em;
}
.footer-btn.btn-whatsapp { background: #1fa855; }
.footer-btn.btn-instagram { background: linear-gradient(135deg, #8a3ab9, #e1306c 55%, #f7a23b); }
.footer-copyright { border-top: 1px solid var(--line); color: #6a6f79; }

/* ----- Carrinho ----- */
.cart-drawer { background: #0d0e11; box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45); }
.cart-head h2 { font-size: 17px; font-weight: 800; }
.cart-close { display: flex; align-items: center; justify-content: center; border-radius: 50%; border-color: var(--line); }
.cart-close .ico { width: 18px; height: 18px; }
.cart-item-img { border-radius: var(--radius-sm); }
.cart-qtd-btn { border-radius: var(--radius-sm); }
.cart-foot input, .cart-foot select, .cart-foot textarea { border-radius: var(--radius-sm); border-color: var(--line); background: var(--surface-2); }
.cart-foot input:focus, .cart-foot select:focus, .cart-foot textarea:focus {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 22%, transparent);
}
.cart-checkout { background: #1fa855; border-radius: var(--radius-sm); letter-spacing: 0.01em; }
.cart-total strong { font-variant-numeric: tabular-nums; }

/* ----- Botões flutuantes, barra do carrinho, toast, lightbox ----- */
.fab-wa { background: #1fa855; }
.fab-topo { background: var(--surface-2); }
.fab .ico { width: 22px; height: 22px; }
.fab .ico-lg { width: 26px; height: 26px; }
.cart-bar { border-radius: var(--radius); gap: 12px; }
.cart-bar-rotulo { display: inline-flex; align-items: center; gap: 8px; }
.cart-bar-rotulo .ico { width: 20px; height: 20px; }
.toast { background: #1b1e23; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.lightbox-close { display: flex; align-items: center; justify-content: center; }
.lightbox-close .ico { width: 20px; height: 20px; }
.lightbox img { border-radius: var(--radius); }

/* ----- Páginas de texto (privacidade, 404) ----- */
.doc h2 { border-left: 0; padding-left: 0; font-size: 16px; letter-spacing: 0.01em; }
.doc h1 { font-weight: 800; letter-spacing: -0.01em; }

/* ----- Celular ----- */
@media (max-width: 768px) {
    .top-bar-alert { font-size: 11px; }
    .marquee-text span::after { margin: 0 20px; }
    .categories-nav a { border-radius: 999px; font-size: 12px; padding: 9px 15px; background: var(--surface); border-color: var(--line); }
    .categories-nav a.active { background: var(--primary-color); border-color: transparent; }
    .section-title { font-size: 19px; margin-bottom: 14px; }
    .products-grid { gap: 12px; }
    .product-card { padding: 8px 8px 10px; border-radius: 10px; }
    .product-card .product-name { font-size: 13px; }
    .product-card .price-tag { font-size: 17px; }
    .product-card .badge { top: 12px; left: 12px; }
    .footer-contacts p, .footer-extra p { justify-content: center; }
    .vazio { padding: 44px 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .sk-img, .sk-linha, .sk-botao { animation: none; }
    .product-card:hover { transform: none; }
}


/* ===== TRAVA DE TAMANHO DOS ÍCONES (garante que nenhum ícone fique gigante) ===== */
svg.ico { max-width: 48px !important; max-height: 48px !important; }


/* ===== ACRESCENTADOS: logo, frete por km, Pix por link e detalhes ===== */
.fab[hidden] { display: none; }
body.tem-carrinho .fab-wa { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
body.tem-carrinho .fab-topo { bottom: calc(148px + env(safe-area-inset-bottom, 0px)); }
.lightbox[hidden] { display: none; }
.lightbox-legenda:empty { display: none; }
.lightbox-close:hover { border-color: var(--primary-color); }
.cart-bar:hover { filter: brightness(1.08); }

.logo { display: flex; align-items: center; gap: 12px; }
.logo-textos { min-width: 0; }
.logo-img { width: var(--logo-img-tam, 48px); height: var(--logo-img-tam, 48px); object-fit: contain; flex-shrink: 0; }
.logo-img[hidden] { display: none; }
.logo-topo { display: flex; justify-content: center; padding: 10px 15px 0; }
.logo-topo[hidden] { display: none; }
.logo-topo img { width: var(--logo-img-tam, 48px); height: var(--logo-img-tam, 48px); object-fit: contain; }
html.logo-redondo .logo-img, html.logo-redondo .logo-topo img { border-radius: 50%; object-fit: cover; }

.frete-km[hidden] { display: none; }
.frete-btn { width: 100%; margin-top: 8px; padding: 10px; background: #23262c; border: 1px solid rgba(255, 255, 255, .15); border-radius: 6px; color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; }
.frete-btn:hover { border-color: var(--primary-color); }
.frete-btn:disabled { opacity: .55; cursor: wait; }
.frete-res { margin-top: 8px; padding: 8px 10px; border-radius: 6px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); font-size: 12px; line-height: 1.45; color: #d0d4dc; white-space: pre-line; overflow-wrap: anywhere; }
.frete-res[hidden] { display: none; }
.frete-res.ok { border-color: rgba(105, 219, 124, .45); background: rgba(105, 219, 124, .08); color: #b2f2bb; }
.frete-res.erro { border-color: rgba(255, 107, 107, .45); background: rgba(255, 107, 107, .08); color: #ffc9c9; }

.pix-box { margin-top: 12px; padding: 12px; border-radius: 8px; background: rgba(105, 219, 124, .07); border: 1px solid rgba(105, 219, 124, .35); }
.pix-box[hidden] { display: none; }
.pix-valor { font-size: 13px; color: #d0d4dc; }
.pix-valor strong { font-size: 16px; color: #69db7c; }
.pix-aviso { margin-top: 4px; font-size: 12px; line-height: 1.4; color: #9a9ea6; }
.pix-aviso:empty { display: none; }
.pix-acoes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pix-btn { flex: 1 1 auto; padding: 10px 12px; border: none; border-radius: 6px; background: #2f9e44; color: #fff; font-size: 13px; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer; }
.pix-btn:hover { filter: brightness(1.1); }
.pix-btn.sec { background: #23262c; border: 1px solid rgba(255, 255, 255, .15); }
.pix-btn[hidden] { display: none; }

/* trava final: nenhum ícone passa de 48 px */
svg.ico { max-width: 48px !important; max-height: 48px !important; }
