/* ============================================================
   responsive.css — Camada isolada de responsividade mobile
   ------------------------------------------------------------
   Carregar SEMPRE depois dos demais CSS (mac.css, shop.css,
   admin.css, theme-stripe.css) para vencer a cascata.

   Breakpoints:
     - tablet      : (max-width: 1024px)
     - mobile      : (max-width: 768px)
     - small       : (max-width: 480px)
     - xsmall      : (max-width: 360px)
     - landscape   : (orientation: landscape) e height ≤ 480px
   ============================================================ */

/* -----------------------------------------------------------
   COMPACT UI — Header & Footer mais densos em todas as larguras.
   Vem ANTES dos blocos mobile, pois eles sobrescrevem em telas
   pequenas. Aplica no desktop e cascateia para tablet.
   ----------------------------------------------------------- */

/* ---------- HEADER ---------- */
/* Topbar vermelha — fininha de verdade */
.shop-topbar { font-size: 10.5px; }
.topbar-inner { padding: 2px 16px; gap: 6px; }
.topbar-inner .topbar-tag { padding: 0 6px; font-size: 9.5px; }

/* Barra principal — logo / busca / ações */
.shop-header-bar { border-bottom-width: 0.5px; }
.shop-header-inner {
    padding: 4px 16px;
    gap: 12px;
    grid-template-columns: auto minmax(0, 460px) auto;
    justify-content: space-between;
}
.shop-logo { gap: 6px; font-size: 13.5px; letter-spacing: -0.012em; }
.shop-logo .logo-dot { width: 24px; height: 24px; border-radius: 6px; }
.shop-logo .logo-dot svg { width: 12px; height: 12px; }
.shop-logo.has-logo .logo-dot img { height: 24px; max-height: 24px; }

/* Busca — discreta */
.shop-search { border-radius: 6px; border-width: 0.5px; }
.shop-search input { padding: 5px 10px; font-size: 12.5px; }
.shop-search button { width: 32px; }
.shop-search button svg { width: 13px; height: 13px; }

/* Ações (login + carrinho + admin) */
.shop-actions { gap: 2px; }
.hdr-action-btn {
    gap: 6px;
    padding: 3px 6px;
    border-radius: 6px;
}
.hdr-action-btn .ico { width: 24px; height: 24px; border-radius: 6px; }
.hdr-action-btn .ico svg { width: 13px; height: 13px; }
.hdr-action-btn .acct-line { font-size: 11px; line-height: 1.15; }
.hdr-action-btn .acct-sub { font-size: 9px; line-height: 1.15; }
.hdr-icon-btn { width: 28px; height: 28px; border-radius: 6px; }
.hdr-icon-btn svg { width: 14px; height: 14px; }
.cart-badge { font-size: 8.5px; padding: 0 3px; min-width: 12px; top: -2px; right: -2px; border-width: 1px; }

/* Nav inferior — categorias */
.shop-cats-nav { border-bottom-width: 0.5px; }
.cats-toggle { padding: 5px 10px; font-size: 11.5px; gap: 6px; }
.cats-toggle svg { width: 12px; height: 12px; }
.cat-link { padding: 5px 10px; font-size: 11.5px; gap: 4px; }

/* ---------- FOOTER ---------- */

/* Bloco superior (contato + marca) */
.shop-footer-top-inner {
    padding: 12px 64px 10px;
    gap: 14px;
}
.shop-footer .contact-cluster { padding-left: 10px; border-left-width: 2px; }
.shop-footer .contact-line {
    font-size: 11.5px;
    margin-bottom: 2px;
    gap: 6px;
}
.shop-footer .contact-line .ico svg { width: 12px; height: 12px; }
.shop-footer .contact-meta { font-size: 10px; }
.shop-footer .footer-brand { gap: 12px; }
.shop-footer .footer-brand-dot {
    width: 64px; height: 64px;
    border-radius: 14px;
}
.shop-footer .footer-brand-dot svg { width: 30px; height: 30px; }
.shop-footer .footer-brand.has-logo .footer-brand-dot img { height: 72px; max-height: 72px; }
.shop-footer .footer-brand-name { font-size: 18px; }
.shop-footer .footer-brand-name small { font-size: 10px; margin-top: 2px; letter-spacing: 0.07em; }

/* Grid principal — colunas equilibradas */
.shop-footer-inner {
    padding: 36px 64px 20px;
    gap: 28px;
    grid-template-columns: 1.15fr 1fr 1fr 1.05fr;
}
.shop-footer h4 {
    font-size: 9.5px;
    margin: 0 0 6px;
    letter-spacing: 0.06em;
}
.shop-footer h4.mt { margin-top: 9px; }
.shop-footer .footer-col ul { gap: 5px; }
.shop-footer .footer-col ul a { font-size: 11.5px; }

/* Pagamentos / selos */
.pay-grid { gap: 4px; }
.pay-pill { height: 16px; padding: 0; border-radius: 0; background: transparent; border: 0; }
.pay-pill svg, .pay-pill img { height: 16px; }
.seal-grid { gap: 5px; }
.seal { height: 22px; padding: 0 6px; font-size: 9.5px; gap: 4px; border-radius: 4px; }
.seal svg { width: 11px; height: 11px; }

/* Linha legal */
.shop-footer-legal {
    padding: 6px 0;
    font-size: 9px;
    text-align: center;
}
.shop-footer-legal-inner { line-height: 1.7; padding: 0 64px; text-align: center; }

/* Barra inferior escura */
.shop-footer-bottom {
    padding: 6px 0;
    font-size: 10.5px;
}
.shop-footer-bottom-inner { gap: 12px; font-size: 10.5px; padding: 0 16px; }
.shop-footer-bottom .social { gap: 5px; }
.shop-footer-bottom .social a { width: 22px; height: 22px; }
.shop-footer-bottom .social svg { width: 11px; height: 11px; }

/* Tablet — empilha colunas em 2x2 antes do mobile entrar */
@media (max-width: 1100px) {
    .shop-footer-inner { grid-template-columns: 1fr 1fr; gap: 18px; }
    .shop-footer-top-inner { gap: 12px; }
}


/* -----------------------------------------------------------
   0. GLOBAL — telas com toque, prevenir zoom em inputs iOS,
   suavizar rolagem, respeitar safe-area do iPhone.
   ----------------------------------------------------------- */
@media (max-width: 1024px) {
    html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
    body { -webkit-tap-highlight-color: rgba(0,0,0,0); overflow-x: hidden; }
    img, video { max-width: 100%; height: auto; }
    /* SVGs inline com width/height attrs explícitos: respeita o tamanho declarado.
       Sem isso (height:auto) os ícones inflam em containers flex/grid. */
    svg[width][height] { max-width: 100%; }
    /* Inputs compactos no mobile (iOS pode dar zoom no focus, ok) */
    input, select, textarea, .mac-input, .mac-select, .mac-textarea {
        font-size: 13px !important;
    }
    /* Search header — ainda menor */
    .shop-search input { font-size: 12px !important; padding: 7px 10px !important; }
    .shop-search button { width: 32px !important; }
    .shop-search button svg { width: 13px !important; height: 13px !important; }
    /* Safe-area iPhone */
    body.shop > .shop-footer,
    .product-sticky-cta {
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
}

/* -----------------------------------------------------------
   1. TABLET (≤1024px) — ajustes leves de espaçamento.
   ----------------------------------------------------------- */
@media (max-width: 1024px) {
    .home-cats,
    .home-segments,
    .home-benefits {
        padding: 0 20px;
        margin-top: 36px;
    }
    .product-page,
    .cart-page,
    .checkout-grid,
    .account-shell {
        padding: 0 20px;
    }
    .shop-header-inner { padding: 12px 20px; }
    .shop-footer-inner,
    .shop-footer-top-inner { padding: 28px 20px; }
}

/* -----------------------------------------------------------
   2. MOBILE (≤768px) — reorganização da maioria das páginas.
   ----------------------------------------------------------- */
@media (max-width: 768px) {

    /* ---- Tipografia (compacta) ---- */
    h1 { font-size: 18px !important; line-height: 1.3; letter-spacing: -0.02em; }
    h2 { font-size: 15px !important; line-height: 1.35; letter-spacing: -0.01em; }
    h3 { font-size: 13px !important; line-height: 1.4; }
    h4 { font-size: 11px !important; }
    p, li, span, label { font-size: 12.5px; }
    small { font-size: 10.5px; }

    /* ============================================================
       HEADER MOBILE — estático (não-sticky), 3 linhas hierárquicas
       Linha 1: logo (esq) ────── ações (dir)
       Linha 2: busca em pill cheia
       Linha 3 (cats): scroll horizontal de categorias
       ============================================================ */
    .shop-header {
        position: relative !important;
        z-index: 80 !important;
        background: #fff !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        box-shadow: none !important;
    }
    .shop-header-bar {
        background: #fff !important;
        border-bottom: 0.5px solid rgba(60,66,87,0.08);
    }
    .shop-header-inner {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding: 4px 10px !important;
        gap: 8px !important;
        grid-template-columns: none !important;
        grid-template-rows: none !important;
        grid-template-areas: none !important;
    }

    /* Logo — linha 1, esquerda, sem padding pra ocupar mais altura */
    .shop-logo {
        order: 1 !important;
        flex: 0 1 auto !important;
        min-width: 0 !important;
        font-size: 18px !important;
        gap: 8px;
        font-weight: 800;
        margin: 0 !important;
        padding: 0 !important;
        grid-row: auto !important;
        grid-column: auto !important;
    }
    .shop-logo .logo-dot { width: 56px !important; height: 56px !important; border-radius: 12px !important; flex-shrink: 0; padding: 0 !important; margin: 0 !important; }
    .shop-logo .logo-dot svg { width: 26px !important; height: 26px !important; }
    .shop-logo.has-logo .logo-dot { padding: 0 !important; margin: 0 !important; background: transparent !important; }
    .shop-logo.has-logo .logo-dot img { height: 56px !important; max-height: 56px !important; width: auto !important; }
    .shop-logo .logo-name {
        font-size: 18px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Ações — todos os botões mesmo tamanho e mesma distância entre eles */
    .shop-actions {
        order: 2 !important;
        flex: 0 0 auto !important;
        margin-left: auto !important;
        gap: 2px !important;
        flex-wrap: nowrap !important;
        padding: 0 !important;
        grid-row: auto !important;
        grid-column: auto !important;
    }
    .hdr-action-btn,
    .hdr-icon-btn {
        width: 44px !important; height: 44px !important;
        min-width: 44px !important; min-height: 44px !important;
        padding: 0 !important;
        margin: 0 !important;
        gap: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
    }
    .hdr-action-btn .ico {
        width: 44px !important; height: 44px !important;
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .hdr-action-btn.cart .ico { background: transparent !important; color: var(--accent) !important; }
    .hdr-action-btn .ico svg,
    .hdr-icon-btn svg { width: 24px !important; height: 24px !important; }
    .hdr-action-btn .lbl { display: none !important; }
    .hdr-action-btn .acct-line,
    .hdr-action-btn .acct-sub { display: none !important; }
    .hdr-icon-btn.admin-btn { background: transparent !important; color: var(--text-primary) !important; }
    .hdr-icon-btn.install-btn { background: transparent !important; color: var(--accent) !important; }

    /* Quando logado: mostra foto + saudação ao lado do ícone */
    .hdr-action-btn.logged {
        width: auto !important;
        min-width: 0 !important;
        padding: 0 6px 0 0 !important;
        gap: 6px !important;
    }
    .hdr-action-btn.logged .ico {
        width: 36px !important; height: 36px !important;
        border-radius: 50% !important;
        overflow: hidden !important;
        background: rgba(var(--accent-rgb), 0.10) !important;
    }
    .hdr-action-btn.logged .ico img {
        width: 100% !important; height: 100% !important;
        object-fit: cover !important;
        border-radius: 50% !important;
    }
    .hdr-action-btn.logged .lbl {
        display: flex !important;
        flex-direction: column !important;
        line-height: 1.15 !important;
        max-width: 110px !important;
        overflow: hidden !important;
    }
    .hdr-action-btn.logged .acct-line {
        display: block !important;
        font-size: 11.5px !important;
        font-weight: 700 !important;
        color: var(--text-primary) !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    .hdr-action-btn.logged .acct-sub {
        display: block !important;
        font-size: 9.5px !important;
        color: var(--text-tertiary) !important;
        white-space: nowrap !important;
    }
    .cart-badge {
        font-size: 9px !important;
        min-width: 13px;
        padding: 0 3px !important;
        top: 4px !important; right: 4px !important;
        border-width: 1.5px !important;
    }

    /* Busca — linha 2 (forçada via flex: 0 0 100%), pill */
    .shop-search {
        order: 3 !important;
        flex: 0 0 100% !important;
        grid-row: auto !important;
        grid-column: auto !important;
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        height: 32px !important;
        padding: 2px 2px 2px 8px !important;
        border-radius: 999px !important;
        background: #f1f3f5 !important;
        border: 1px solid rgba(60,66,87,0.08) !important;
        overflow: visible !important;
        transition: border-color 140ms, background 140ms, box-shadow 140ms;
    }
    .shop-search:focus-within {
        background: #fff !important;
        border-color: var(--accent) !important;
        box-shadow: 0 0 0 3px rgba(227,30,36,0.10) !important;
    }
    .shop-search input {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        width: 100% !important;
        height: 100% !important;
        padding: 0 6px 0 0 !important;
        background: transparent !important;
        border: 0 !important;
        outline: none !important;
        font-size: 11.5px !important;
        font-weight: 500;
        color: var(--text-primary) !important;
    }
    .shop-search input::placeholder {
        color: var(--text-tertiary) !important;
        font-weight: 400;
    }
    .shop-search button {
        flex-shrink: 0 !important;
        width: 26px !important;
        height: 26px !important;
        border: 0 !important;
        border-radius: 50% !important;
        background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%) !important;
        color: #fff !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer;
        box-shadow: 0 1px 2px rgba(227,30,36,0.18);
    }
    .shop-search button svg { width: 12px !important; height: 12px !important; display: block; }

    .search-dropdown {
        position: absolute !important;
        top: calc(100% + 6px) !important;
        left: 0 !important; right: 0 !important;
        border-radius: 12px !important;
        border: 0.5px solid rgba(60,66,87,0.10) !important;
        box-shadow: 0 8px 24px rgba(0,0,0,0.10) !important;
        max-height: 70vh !important;
    }

    /* Topbar — fica oculta no mobile */
    .shop-topbar { display: none !important; }

    /* ---- Linha 3 — Menu de categorias (chips scrolláveis) ---- */
    .shop-cats-nav {
        background: #fafbfc !important;
        border-top: 0.5px solid rgba(60,66,87,0.06) !important;
        border-bottom: 0.5px solid rgba(60,66,87,0.08) !important;
    }
    .cats-inner {
        padding: 4px 10px !important;
        gap: 4px !important;
        align-items: center !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .cats-inner::-webkit-scrollbar { display: none; }

    /* Toggle "Todas" — flat, sem pill */
    .cats-toggle {
        flex-shrink: 0 !important;
        padding: 3px 6px !important;
        height: 24px !important;
        border-radius: 0 !important;
        font-size: 10px !important;
        font-weight: 600;
        gap: 4px !important;
        background: transparent !important;
        color: var(--text-primary) !important;
        border: 0 !important;
        white-space: nowrap;
    }
    .cats-toggle svg { width: 11px !important; height: 11px !important; }
    .cats-toggle span {
        display: inline !important;
        font-size: 9.5px !important;
        letter-spacing: 0.02em;
    }

    .cats-scroll {
        display: flex !important;
        gap: 4px !important;
        flex: 1;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
    }

    /* Cada categoria vira um chip arredondado bem compacto */
    .cat-link {
        flex-shrink: 0 !important;
        padding: 3px 8px !important;
        height: 24px !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 3px !important;
        font-size: 10.5px !important;
        font-weight: 500 !important;
        border-radius: 999px !important;
        background: #fff !important;
        border: 1px solid rgba(60,66,87,0.10) !important;
        color: var(--text-primary) !important;
        white-space: nowrap;
        min-height: 0 !important;
        transition: background 120ms, border-color 120ms, color 120ms;
    }
    .cat-link:hover,
    .cat-link.active {
        background: rgba(227,30,36,0.08) !important;
        border-color: rgba(227,30,36,0.24) !important;
        color: var(--accent) !important;
    }

    /* ---- HOME ---- */
    .home-cats,
    .home-segments,
    .home-benefits {
        margin-top: 28px !important;
        padding: 0 16px !important;
    }
    .home-cats-head { padding-bottom: 12px !important; margin-bottom: 16px !important; }
    .home-cats-head h2,
    .home-segments h3 { font-size: 15px !important; margin-bottom: 0 !important; }
    .home-cats-head .head-link { font-size: 11.5px !important; }
    .home-cats-grid { grid-template-columns: 1fr !important; gap: 16px; }
    .home-cats-side {
        position: static !important;
        flex-direction: row !important;
        overflow-x: auto;
        gap: 6px;
        padding: 4px 2px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .home-cats-side::-webkit-scrollbar { display: none; }
    .home-cats-side button {
        flex-shrink: 0;
        white-space: nowrap;
        min-height: 38px;
        font-size: 11.5px !important;
        padding: 9px 12px;
    }
    .home-cats-grid-inner {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
        gap: 12px !important;
    }
    .segments-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px;
    }
    .segment-card {
        padding: 14px;
        min-height: 76px;
        gap: 10px;
    }
    .segment-card .seg-icon { width: 36px; height: 36px; }
    .segment-card .seg-icon svg { width: 17px; height: 17px; }
    .segment-card .label { font-size: 11.5px !important; }
    .benefits-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
        padding: 18px;
    }
    .benefit { gap: 12px; }
    .benefit .b-ico { width: 38px; height: 38px; }
    .benefit .b-ico svg { width: 18px; height: 18px; }
    .benefit .b-title { font-size: 12px !important; }
    .benefit .b-text { font-size: 11px !important; line-height: 1.5; }

    /* ---- Cards de produto ---- */
    .product-card .pinfo { padding: 12px; }
    .product-card .pname { font-size: 11.5px !important; line-height: 1.35; }
    .product-card .pmeta { font-size: 10px !important; margin-bottom: 8px; }
    .product-card .pprice { font-size: 12.5px !important; }
    .product-card .pprice .from { font-size: 9.5px !important; }

    /* ---- Página de produto ---- */
    .product-page {
        grid-template-columns: 1fr !important;
        gap: 20px;
        margin: 16px auto;
        padding: 0 16px;
        padding-bottom: calc(100px + env(safe-area-inset-bottom));
    }
    .product-gallery { padding: 12px; }
    .product-gallery .main { aspect-ratio: 1/1; max-height: 56vh; }
    .product-gallery .thumbs { gap: 6px; margin-top: 10px; }
    .product-gallery .thumbs .thumb { width: 54px; height: 54px; }
    .product-detail h1 { font-size: 19px !important; line-height: 1.25; margin-bottom: 6px; }
    .product-detail .ptag { font-size: 11px !important; margin-bottom: 14px; line-height: 1.45; }
    .product-detail .pdesc { font-size: 13px !important; line-height: 1.55; }
    .price-block { padding: 14px 14px; }
    .price-block .total { font-size: 22px !important; }
    .price-block .unit { font-size: 11.5px !important; }
    .qty-row { flex-wrap: wrap; row-gap: 6px; }
    .qty-row > span { font-size: 11px !important; flex-basis: 100%; }
    .qty-control input { width: 60px; font-size: 15px; }
    .qty-control button { width: 44px; height: 44px; font-size: 20px; }
    .var-pill { padding: 9px 14px; font-size: 12px !important; min-height: 38px; }
    .var-pills { gap: 6px; margin-bottom: 14px; }
    .face-card { padding: 12px; }
    .face-head { flex-wrap: wrap; row-gap: 4px; }
    .face-controls { flex-wrap: wrap; gap: 8px; }
    .face-actions { flex-wrap: wrap; gap: 6px; }
    .face-actions .mac-btn { flex: 1 1 auto; }
    .tier-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .tier-table { font-size: 11.5px !important; min-width: 280px; }
    .tier-table th, .tier-table td { padding: 8px 10px; }
    .tier-table th { font-size: 10px !important; }

    /* ---- CTA sticky ---- */
    .product-sticky-cta {
        display: flex !important;
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 90;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
        gap: 12px;
    }
    .product-sticky-cta .mac-btn {
        flex: 1; min-height: 44px;
        font-size: 12.5px !important; font-weight: 600;
    }
    .product-sticky-cta .price-info .ttl { font-size: 14px !important; }
    .product-sticky-cta .price-info .qty { font-size: 9.5px !important; }

    /* ---- Carrinho ---- */
    .cart-page {
        grid-template-columns: 1fr !important;
        gap: 18px;
        padding: 0 12px;
        margin-top: 18px;
    }
    .cart-summary { position: static; padding: 16px; }
    .cart-summary h3 { font-size: 14px !important; margin-bottom: 12px; }
    .cart-summary .line { font-size: 12.5px !important; padding: 6px 0; }
    .cart-summary .line.total { font-size: 15px !important; }
    .cart-summary .delivery-note { font-size: 11.5px !important; padding: 8px 10px; }

    /* Cart-item: layout vertical compacto (thumb + info + preço) */
    .cart-item {
        grid-template-columns: 56px 1fr !important;
        grid-template-areas:
            "thumb info"
            "price price" !important;
        gap: 12px !important;
        padding: 14px !important;
    }
    .cart-item .thumb {
        grid-area: thumb;
        width: 56px !important; height: 56px !important;
    }
    .cart-item .thumb svg { width: 24px !important; height: 24px !important; }
    .cart-item .ci-info { grid-area: info; min-width: 0; }
    .cart-item .ci-info .name { font-size: 13px !important; line-height: 1.3; }
    .cart-item .ci-info .meta { font-size: 11px !important; }
    .cart-item .ci-info .qty-line { margin-top: 8px; font-size: 12px; }
    .cart-item .ci-info .qty-line .qty-control { height: 32px !important; }
    .cart-item .ci-info .qty-line .qty-control button { width: 30px !important; height: 30px !important; }
    .cart-item .ci-info .qty-line .qty-control input { width: 48px !important; font-size: 13px !important; }
    .cart-item .ci-actions {
        gap: 5px !important;
    }
    .cart-item .ci-actions .mac-btn {
        font-size: 11px !important;
        padding: 5px 8px !important;
        min-height: 30px !important;
    }
    .cart-item .ci-art a {
        max-width: 140px !important;
    }
    /* Preço vai pra linha inteira em baixo, ao lado do botão remover */
    .cart-item .ci-price {
        grid-area: price;
        text-align: left;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding-top: 10px;
        border-top: 0.5px dashed var(--divider);
    }
    .cart-item .ci-price .total { font-size: 16px !important; }
    .cart-item .ci-price .unit { font-size: 10.5px !important; }
    .cart-item .remove-btn {
        margin-top: 0 !important;
        font-size: 11.5px !important;
        padding: 5px 12px !important;
        flex-shrink: 0;
    }
    /* Cupom + cart-summary: blocos internos respiram */
    .cart-summary .discount-banner { padding: 10px 12px !important; gap: 8px !important; }
    .cart-summary .discount-banner > div { font-size: 12px !important; }

    /* ---- Checkout ---- */
    .cart-page.checkout-page {
        padding: 0 12px !important;
        gap: 14px !important;
    }
    .checkout-grid {
        grid-template-columns: 1fr !important;
        gap: 18px;
        padding: 0 12px;
    }
    .checkout-panel {
        padding: 16px 14px;
        margin-bottom: 14px;
        border-radius: 12px;
    }
    .checkout-panel h3 { font-size: 12px !important; margin-bottom: 12px; padding-bottom: 10px; }
    .address-grid { grid-template-columns: 1fr !important; gap: 10px; }
    .address-grid .row3 { grid-template-columns: 1fr !important; gap: 10px; }
    .pix-row { flex-direction: column; align-items: stretch; gap: 10px; }
    .ship-list { gap: 8px; }
    .ship-opt {
        padding: 12px;
        font-size: 12px;
        gap: 10px;
        flex-wrap: wrap;
    }
    .ship-opt .grow { flex: 1 1 60%; min-width: 0; }
    .ship-opt .lbl { font-size: 12.5px !important; }
    .ship-opt .eta { font-size: 11px !important; line-height: 1.4; }
    .ship-opt .price { font-size: 13px !important; }

    /* Itens do checkout (co-item): mesmo tratamento do cart-item */
    .co-item {
        grid-template-columns: 52px 1fr !important;
        grid-template-areas:
            "thumb info"
            "total total" !important;
        gap: 10px !important;
        padding: 12px 0 !important;
    }
    .co-item .thumb {
        grid-area: thumb;
        width: 52px !important; height: 52px !important;
    }
    .co-item .thumb svg { width: 22px !important; height: 22px !important; }
    .co-item .info { grid-area: info; min-width: 0; }
    .co-item .info .nm { font-size: 12.5px !important; line-height: 1.3; }
    .co-item .info .mt { font-size: 11px !important; line-height: 1.4; }
    .co-item .info .total { font-size: 13px !important; }
    .co-item > .total {
        grid-area: total;
        font-size: 15px !important;
        padding-top: 8px;
        border-top: 0.5px dashed var(--divider);
        text-align: right;
    }
    .art-slot { padding: 10px; gap: 8px; font-size: 12px !important; }
    .art-slot .nm { font-size: 12px !important; }
    .art-slot .mac-btn { font-size: 11px !important; padding: 4px 9px !important; }
    .art-slot.art-faces .art-faces-head { font-size: 12px !important; }
    .art-slot.art-faces .art-faces-list li { font-size: 11.5px !important; }

    /* Bloco de termos (produção industrial) */
    .checkout-panel ul { padding-left: 16px !important; }
    .checkout-panel ul li { font-size: 11.5px !important; line-height: 1.55; margin: 6px 0; }

    /* Cart-summary no checkout: padding/legendas mais respiráveis */
    body.shop .cart-page.checkout-page .cart-summary { padding: 16px 14px !important; }
    body.shop .cart-page.checkout-page .cart-summary h3 { font-size: 15px !important; }
    body.shop .cart-page.checkout-page .cart-summary p { font-size: 11.5px !important; line-height: 1.4; }
    #summary-address { padding: 10px !important; }
    #summary-address-body { font-size: 11.5px !important; }

    /* === Guardas de overflow GLOBAIS para carrinho/checkout/conta ===
       min-width: 0 em TODOS os descendentes — neutraliza o min-content
       default que faz flex/grid items recusarem encolher. */
    .cart-page,
    .cart-page *,
    .account-shell,
    .account-shell * {
        min-width: 0;
        max-width: 100%;
    }
    .cart-page,
    .account-shell {
        overflow-x: hidden;
    }
    .checkout-panel,
    .cart-summary,
    .order-block,
    .order-detail {
        overflow-wrap: anywhere;
        word-break: break-word;
        overflow-x: hidden;
    }
    /* Inputs/textareas/select: encolhem completamente (mas preservam radio/checkbox) */
    .cart-page input:not([type="radio"]):not([type="checkbox"]),
    .cart-page textarea,
    .cart-page select,
    .account-shell input:not([type="radio"]):not([type="checkbox"]),
    .account-shell textarea,
    .account-shell select {
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    .cart-page input[type="radio"],
    .cart-page input[type="checkbox"],
    .account-shell input[type="radio"],
    .account-shell input[type="checkbox"] {
        width: auto !important;
        max-width: none !important;
        flex-shrink: 0;
    }
    /* Imagens (QR, logos) — nunca passar do container */
    .cart-page img,
    .account-shell img {
        max-width: 100%;
        height: auto;
    }
    /* Grids inline em qualquer descendente da página de carrinho/checkout */
    .cart-page [style*="grid-template-columns:1fr 1fr"],
    .cart-page [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    .cart-page [style*="grid-template-columns:1fr 1fr 80px"],
    .cart-page [style*="grid-template-columns: 1fr 1fr 80px"] {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }
    .cart-page [style*="grid-template-columns:140px 1fr"],
    .cart-page [style*="grid-template-columns: 140px 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
    .cart-page [style*="grid-template-columns:1fr 100px"],
    .cart-page [style*="grid-template-columns: 1fr 100px"] {
        grid-template-columns: 1fr 80px !important;
        gap: 8px !important;
    }
    /* Exceção: grid de parcelas (repeat auto-fill) preserva layout */
    .cart-page [style*="repeat(auto-fill"] {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
    }
    /* Cabeçalho do formulário auth (#page > grid) — colapsa direto */
    #page > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        padding: 0 12px !important;
    }
    /* Painel interno do auth form: padding reduzido */
    #page > div > div[style*="padding:28px"] {
        padding: 16px 14px !important;
    }
    /* Termos: lista respira sem estourar */
    .checkout-panel ul,
    .checkout-panel ol {
        margin-left: 16px !important;
        padding-left: 0 !important;
        max-width: 100%;
    }
    .checkout-panel ul li,
    .checkout-panel ol li {
        overflow-wrap: anywhere;
    }

    /* ---- Login / Cadastro ---- */
    .auth-card {
        margin: 18px 16px !important;
        padding: 24px 18px !important;
        max-width: none;
    }
    .auth-card h1 { font-size: 16px !important; margin-bottom: 18px; }
    .auth-card .row { grid-template-columns: 1fr !important; gap: 12px; }

    /* ---- Conta / Painel do cliente ---- */
    .account-shell { padding: 0 12px; margin-top: 18px; }
    .account-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        gap: 4px;
        scrollbar-width: none;
        margin-bottom: 16px;
    }
    .account-tabs::-webkit-scrollbar { display: none; }
    .account-tabs button {
        flex-shrink: 0;
        white-space: nowrap;
        font-size: 11.5px !important;
        padding: 10px 14px;
        min-height: 40px;
    }
    .order-card { padding: 14px; gap: 10px; font-size: 11.5px; }

    /* Cards de pedido (.order-block / .order-detail) compactos */
    .order-block, .order-detail { padding: 14px !important; margin-bottom: 12px !important; border-radius: 12px !important; }
    .order-block h2, .order-detail h2 { font-size: 15px !important; gap: 8px !important; }
    .order-block .head-tail { width: 100%; margin-left: 0 !important; justify-content: flex-end; }
    .order-block .head-tail .total { font-size: 18px !important; }
    .order-block .meta, .order-detail .meta { font-size: 11.5px !important; gap: 6px !important; margin-bottom: 12px !important; }
    .order-block .od-section { padding: 12px 0 !important; }
    .order-block .od-section h4 { font-size: 11px !important; }
    .order-block-grid { gap: 12px !important; }

    /* Pix box dentro do detalhe do pedido */
    .pix-box { padding: 14px !important; margin: 10px 0 !important; }
    .pix-box [style*="grid-template-columns:auto 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        justify-items: center;
    }
    .pix-box img[alt="QR Code Pix"] { width: 160px !important; height: 160px !important; }
    .pix-row { gap: 6px !important; padding: 8px 10px !important; font-size: 12px !important; }
    .pix-row .lbl { min-width: 60px !important; font-size: 10px !important; }
    .pix-row .val.amount { font-size: 15px !important; }

    /* Lista de itens no detalhe do pedido (item-row): mesmo tratamento */
    .item-row {
        grid-template-columns: 48px 1fr !important;
        grid-template-areas:
            "thumb info"
            "total total" !important;
        gap: 10px !important;
        padding: 12px 0 !important;
        align-items: start !important;
    }
    .item-row .thumb {
        grid-area: thumb;
        width: 48px !important; height: 48px !important;
        font-size: 18px !important;
    }
    .item-row .thumb svg { width: 22px !important; height: 22px !important; }
    .item-row > div:not(.thumb):not(.total) { grid-area: info; min-width: 0; }
    .item-row .nm { font-size: 12.5px !important; line-height: 1.3; }
    .item-row .mt { font-size: 11px !important; line-height: 1.4; }
    .item-row .total {
        grid-area: total;
        font-size: 14px !important;
        padding-top: 8px;
        border-top: 0.5px dashed var(--divider);
        text-align: right;
    }
    .order-art-line { font-size: 11.5px !important; gap: 6px !important; }
    .order-art-line .mac-btn { margin-left: 0 !important; }

    /* Timeline: redução de fonte */
    .timeline li { font-size: 12px !important; padding: 6px 0 6px 20px; }
    .timeline .when { font-size: 10px !important; }

    /* Formulário de mensagens dentro do pedido */
    .msg-form { flex-direction: column !important; }
    .msg-form .mac-btn { width: 100% !important; }
    .msg-thread { max-height: 280px !important; }

    /* Profile: collapse de inline grids 1fr 1fr / 140px 1fr / 1fr 100px / 1fr 1fr 80px */
    .account-shell [style*="grid-template-columns:1fr 1fr"],
    .account-shell [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    .account-shell [style*="grid-template-columns:140px 1fr"],
    .account-shell [style*="grid-template-columns: 140px 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
    .account-shell [style*="grid-template-columns:1fr 100px"],
    .account-shell [style*="grid-template-columns: 1fr 100px"] {
        grid-template-columns: 1fr 80px !important;
        gap: 8px !important;
    }
    .account-shell [style*="grid-template-columns:1fr 1fr 80px"],
    .account-shell [style*="grid-template-columns: 1fr 1fr 80px"] {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }
    .account-shell .checkout-panel { padding: 16px 14px !important; margin-bottom: 14px !important; }
    .account-shell .checkout-panel h3 { font-size: 14px !important; }

    /* Avatar + ações de foto: linha quebra suave */
    .pf-avatar { width: 56px !important; height: 56px !important; }
    .pf-avatar svg { width: 26px !important; height: 26px !important; }

    /* Link de indicação: input + 2 botões quebram bem */
    #ref-link-input { min-width: 0 !important; flex: 1 1 100% !important; font-size: 11.5px !important; }
    .status-badge { font-size: 9.5px !important; padding: 2px 8px !important; }

    /* ---- Botões / formulários ---- */
    .mac-btn {
        min-height: 42px;
        padding: 10px 16px;
        font-size: 12.5px !important;
    }
    .mac-btn.btn-mini {
        min-height: 32px;
        padding: 6px 10px;
        font-size: 10.5px !important;
    }
    .mac-field { gap: 6px; }
    .mac-field label { font-size: 11px !important; }
    .mac-input, .mac-select, .mac-textarea {
        padding: 11px 12px;
    }

    /* ---- Modais ---- */
    .mac-modal {
        max-width: none !important;
        width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }
    .mac-modal-backdrop {
        padding: 0 !important;
        align-items: stretch !important;
    }
    .mac-modal-header { padding: 14px 16px; }
    .mac-modal-body {
        padding: 16px;
        max-height: none !important;
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* ---- Tabelas (admin e front) ---- */
    .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -18px;
        padding: 0 18px;
    }
    .admin-table { font-size: 12px !important; }
    .admin-table th, .admin-table td { padding: 12px 12px; }
    .admin-table .row-actions { gap: 6px; }

    /* ---- Footer ---- */
    .shop-footer { margin-top: 28px !important; }
    .shop-footer-top-inner { padding: 22px 16px !important; gap: 18px !important; }
    .shop-footer .contact-line { font-size: 11.5px !important; gap: 8px; margin-bottom: 5px; }
    .shop-footer .contact-line .ico svg { width: 13px !important; height: 13px !important; }
    .shop-footer .footer-brand-dot { width: 72px !important; height: 72px !important; border-radius: 16px !important; }
    .shop-footer .footer-brand-dot svg { width: 34px !important; height: 34px !important; }
    .shop-footer .footer-brand.has-logo .footer-brand-dot img { height: 80px !important; max-height: 80px !important; }
    .shop-footer .footer-brand-name { font-size: 19px !important; }
    .shop-footer .footer-brand-name small { font-size: 10px !important; }
    .shop-footer-inner {
        grid-template-columns: 1fr !important;
        gap: 22px !important;
        padding: 22px 16px 18px !important;
    }
    .shop-footer h4 { font-size: 9.5px !important; margin-bottom: 10px; }
    .shop-footer .footer-col ul { gap: 8px !important; }
    .shop-footer .footer-col ul a { font-size: 12px !important; }
    .shop-footer-bottom-inner {
        flex-wrap: wrap;
        gap: 12px !important;
        padding: 14px 16px !important;
        text-align: center;
        justify-content: center;
        font-size: 10.5px !important;
    }
    .shop-footer-bottom { padding: 0 !important; }
    .shop-footer-bottom .social a { width: 28px !important; height: 28px !important; }
    .shop-footer-bottom .social svg { width: 13px !important; height: 13px !important; }
    .shop-footer-legal { padding: 8px 0 !important; font-size: 9px !important; text-align: center !important; }
    .shop-footer-legal-inner { padding: 0 16px !important; text-align: center !important; }
    .pay-grid { display: flex !important; flex-wrap: wrap !important; gap: 5px !important; align-items: center !important; }
    .pay-pill { height: 16px !important; padding: 0 !important; border: 0 !important; background: transparent !important; border-radius: 0 !important; }
    .pay-pill svg, .pay-pill img { height: 16px !important; width: auto !important; }
    .seal { height: 24px !important; padding: 0 7px !important; font-size: 9.5px !important; }
    .seal svg { width: 11px !important; height: 11px !important; }

    /* ---- Páginas estáticas (blog, FAQ, termos, privacidade…) ---- */
    .mac-window,
    .mac-card {
        margin: 18px;
        padding: 24px 20px;
        border-radius: 14px;
    }
    article, .blog-post, .static-content {
        padding: 0 18px !important;
        font-size: 14px !important;
        line-height: 1.7;
    }
    article p, .blog-post p { margin: 14px 0; }
    article img, .blog-post img { border-radius: 12px; margin: 18px 0; }

    /* ---- Admin shell ---- */
    .admin-layout { flex-direction: column; }
    .admin-sidebar {
        position: fixed;
        top: 0; left: 0;
        width: 86%;
        max-width: 320px;
        height: 100vh;
        z-index: 200;
        transform: translateX(-100%);
        transition: transform 220ms cubic-bezier(.4,0,.2,1);
    }
    .admin-layout.sidebar-open .admin-sidebar { transform: translateX(0); }
    .admin-burger { display: inline-flex !important; }
    .admin-topbar { padding: 0 18px; gap: 12px; }
    .admin-topbar .title { font-size: 13.5px !important; }
    .admin-content { padding: 22px 18px !important; }
    .admin-empty { padding: 36px 18px; font-size: 12.5px !important; }

    /* ---- Toast (avisos pop-up) ---- */
    .mac-toast {
        left: 14px !important;
        right: 14px !important;
        bottom: calc(14px + env(safe-area-inset-bottom)) !important;
        max-width: none !important;
    }

    /* ---- Spinner / estados ---- */
    .empty-state { padding: 28px 18px; }
}

/* -----------------------------------------------------------
   3. SMALL (≤480px) — densificação extra.
   ----------------------------------------------------------- */
@media (max-width: 480px) {
    h1 { font-size: 16.5px !important; }
    h2 { font-size: 14px !important; }
    h3 { font-size: 12.5px !important; }
    p, li, span, label { font-size: 12px; }
    small { font-size: 10px; }

    /* Header — ainda mais compacto */
    .shop-header-inner { padding: 8px 12px 10px !important; row-gap: 8px !important; }
    .shop-logo { gap: 6px; font-size: 12px !important; }
    .shop-logo .logo-name { font-size: 12px !important; }
    .shop-logo .logo-dot { width: 24px !important; height: 24px !important; }
    .shop-logo .logo-dot svg { width: 12px !important; height: 12px !important; }
    .shop-logo.has-logo .logo-dot img { height: 24px !important; max-height: 24px !important; }
    .hdr-action-btn { padding: 3px 5px !important; min-width: 32px; min-height: 32px; }
    .hdr-action-btn .ico { width: 24px !important; height: 24px !important; }
    .hdr-action-btn .ico svg { width: 12px !important; height: 12px !important; }
    .hdr-icon-btn { width: 30px !important; height: 30px !important; }
    .hdr-icon-btn svg { width: 14px !important; height: 14px !important; }
    .shop-search input { padding: 8px 10px !important; }
    .shop-search button { width: 34px !important; }
    .shop-search button svg { width: 14px !important; height: 14px !important; }
    .cat-link { padding: 8px 10px !important; font-size: 11px !important; min-height: 34px; }

    /* Home — grid mais apertado */
    .home-cats-head h2,
    .home-segments h3 { font-size: 13.5px !important; }
    .home-cats-grid-inner {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    .product-card .pinfo { padding: 10px; }
    .product-card .pname { font-size: 11px !important; }
    .product-card .pmeta { font-size: 9.5px !important; }
    .product-card .pprice { font-size: 11.5px !important; }
    .product-card .thumb { aspect-ratio: 1/1; }

    .segments-grid { grid-template-columns: 1fr !important; gap: 10px; }
    .segment-card { padding: 12px; min-height: 64px; }
    .segment-card .seg-icon { width: 32px; height: 32px; }
    .segment-card .seg-icon svg { width: 15px; height: 15px; }
    .segment-card .label { font-size: 11px !important; }

    .benefits-grid { padding: 16px; gap: 14px; }
    .benefit .b-ico { width: 34px; height: 34px; }
    .benefit .b-ico svg { width: 16px; height: 16px; }
    .benefit .b-title { font-size: 11.5px !important; }
    .benefit .b-text { font-size: 10.5px !important; }

    /* Produto */
    .product-page { padding: 0 12px; gap: 16px; }
    .product-gallery { padding: 10px; }
    .product-gallery .main { max-height: 50vh; }
    .product-gallery .thumbs .thumb { width: 48px; height: 48px; }
    .product-detail h1 { font-size: 14.5px !important; }
    .product-detail .ptag { font-size: 10px !important; }
    .product-detail .pdesc { font-size: 12px !important; }
    .price-block .total { font-size: 16px !important; }
    .price-block .unit { font-size: 9.5px !important; }
    .var-pill { padding: 7px 11px; font-size: 11px !important; min-height: 34px; }
    .qty-control input { width: 46px; font-size: 13px; }
    .qty-control button { width: 38px; height: 38px; font-size: 16px; }
    .product-sticky-cta { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); gap: 10px; }
    .product-sticky-cta .mac-btn { font-size: 11.5px !important; min-height: 40px; }
    .product-sticky-cta .price-info .ttl { font-size: 13px !important; }

    /* Carrinho / checkout / auth */
    .cart-page { padding: 0 12px; gap: 14px; }
    .cart-summary { padding: 14px; }
    .cart-summary h3 { font-size: 12.5px !important; }
    .cart-summary .line { font-size: 11px !important; }
    .cart-summary .line.total { font-size: 12.5px !important; }
    .checkout-grid { padding: 0 12px; gap: 14px; }
    .checkout-panel { padding: 14px; }
    .checkout-panel h3 { font-size: 12.5px !important; }
    .auth-card { margin: 14px 12px !important; padding: 20px 16px !important; }
    .auth-card h1 { font-size: 14.5px !important; }

    .account-shell { padding: 0 12px; }
    .account-tabs button { font-size: 11px !important; padding: 9px 12px; min-height: 38px; }
    .order-card { padding: 12px; font-size: 11px; }

    /* Admin */
    .admin-content { padding: 16px 12px !important; }
    .admin-table th, .admin-table td { padding: 9px 9px; font-size: 11px !important; }
    .admin-table .row-actions { flex-direction: column; gap: 4px; }

    /* Footer */
    .shop-footer-top-inner { padding: 18px 14px !important; }
    .shop-footer-inner { padding: 18px 14px 14px !important; gap: 18px !important; }
    .shop-footer .footer-brand-name { font-size: 17px !important; }
    .shop-footer .footer-brand-dot { width: 64px !important; height: 64px !important; }
    .shop-footer .footer-brand.has-logo .footer-brand-dot img { height: 70px !important; max-height: 70px !important; }
    .shop-footer h4 { font-size: 9px !important; }
    .shop-footer .footer-col ul a { font-size: 11.5px !important; }
    .shop-footer-legal-inner { padding: 0 14px !important; text-align: center !important; }
    .shop-footer-bottom-inner { padding: 12px 14px !important; font-size: 10px !important; }
    /* (pay-grid já é flex no bloco anterior — nada a sobrescrever aqui) */

    /* Botões / modais */
    .mac-btn { font-size: 12px !important; padding: 9px 13px; min-height: 38px; }
    .mac-btn.btn-mini { font-size: 10px !important; padding: 5px 9px; min-height: 30px; }
    .mac-modal-header { padding: 12px 14px; }
    .mac-modal-header .ttl,
    .mac-modal-header h3 { font-size: 13px !important; }
    .mac-modal-body { padding: 14px; }
}

/* -----------------------------------------------------------
   4. XSMALL (≤360px) — telas estreitas (iPhone SE / antigos).
   ----------------------------------------------------------- */
@media (max-width: 360px) {
    .shop-logo .logo-name { display: none; }
    .home-cats-grid-inner { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
    .segments-grid { grid-template-columns: 1fr !important; }
    /* (pay-grid já é flex; ele quebra naturalmente em telas estreitas) */
    .product-card .pname { font-size: 12px; }
    .product-card .pprice { font-size: 13px; }
    .qty-control input { width: 48px; }
    .qty-control button { width: 40px; height: 40px; }
}

/* -----------------------------------------------------------
   5. LANDSCAPE em telefones (linha estreita vertical).
   ----------------------------------------------------------- */
@media (max-height: 480px) and (orientation: landscape) and (max-width: 1024px) {
    .product-sticky-cta { padding: 6px 12px calc(6px + env(safe-area-inset-bottom)); }
    .product-sticky-cta .mac-btn { min-height: 40px; }
    .auth-card { margin: 8px !important; padding: 14px !important; }
    .mac-modal-body { padding: 10px 14px; }
}

/* -----------------------------------------------------------
   6. Acessibilidade — quem prefere menos animação.
   ----------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* -----------------------------------------------------------
   7. Force-light — Copos é um produto light-only (vermelho em
   fundo claro). Neutraliza o dark mode automático que vinha
   herdado de mac.css e theme-stripe.css.
   ----------------------------------------------------------- */
:root { color-scheme: light !important; }

@media (prefers-color-scheme: dark) {
    :root {
        /* Volta ao tema claro Stripe (theme-stripe.css :root) */
        --bg-base:          #f6f9fc !important;
        --bg-surface:       rgba(255,255,255,0.92) !important;
        --bg-surface-solid: #ffffff !important;
        --bg-elevated:      #ffffff !important;
        --bg-hover:         rgba(60,66,87,0.05) !important;
        --bg-active:        rgba(60,66,87,0.10) !important;
        --text-primary:     #0a2540 !important;
        --text-secondary:   #425466 !important;
        --text-tertiary:    #8898aa !important;
        --border:           rgba(60,66,87,0.10) !important;
        --border-strong:    rgba(60,66,87,0.18) !important;
        --divider:          rgba(60,66,87,0.08) !important;
        color-scheme: light !important;
    }
    /* Força fundo/texto base claros mesmo se algo escapou via var */
    html, body { background: #f6f9fc !important; color: #0a2540 !important; }
    /* Reset de regras pontuais que pintavam em dark mode */
    .price-block .discount-bar { background: rgba(52,199,89,0.12) !important; color: #0a7d3a !important; }
}

/* ============================================================
   DESKTOP (≥1025px) — header espaçoso e logo maior.
   Sobrescreve a "COMPACT UI" do topo desse arquivo, que mantém
   denso até tablet/mobile.
   ============================================================ */
@media (min-width: 1025px) {
    /* Topbar — info mais legível */
    .shop-topbar { font-size: 13px; }
    .topbar-inner { padding: 8px 24px; gap: 14px; }
    .topbar-inner .topbar-tag { padding: 2px 10px; font-size: 11.5px; }

    /* Barra principal — bem mais alta */
    .shop-header-bar { border-bottom-width: 1px; }
    .shop-header-inner {
        padding: 22px 32px;
        gap: 32px;
        grid-template-columns: auto 1fr auto;
    }

    /* Logo grande */
    .shop-logo { gap: 14px; font-size: 22px; letter-spacing: -0.01em; }
    .shop-logo .logo-dot { width: 56px; height: 56px; border-radius: 12px; }
    .shop-logo .logo-dot svg { width: 30px; height: 30px; }
    .shop-logo.has-logo .logo-dot img { height: 56px; max-height: 56px; width: auto; }
    .shop-logo .logo-name { font-size: 22px; }

    /* Busca confortável */
    .shop-search { border-radius: 12px; border-width: 1px; }
    .shop-search input { padding: 12px 18px; font-size: 14px; }
    .shop-search button { width: 50px; }
    .shop-search button svg { width: 18px; height: 18px; }

    /* Ações (entrar / carrinho / admin) com info legível */
    .shop-actions { gap: 8px; }
    .hdr-action-btn { gap: 10px; padding: 8px 14px; border-radius: 10px; }
    .hdr-action-btn .ico { width: 36px; height: 36px; border-radius: 8px; }
    .hdr-action-btn .ico svg { width: 18px; height: 18px; }
    .hdr-action-btn .acct-line { font-size: 13px; line-height: 1.2; }
    .hdr-action-btn .acct-sub { font-size: 11px; line-height: 1.2; }
    .hdr-icon-btn { width: 40px; height: 40px; }
    .hdr-icon-btn svg { width: 20px; height: 20px; }

    /* Categorias nav — também respira mais */
    .shop-cats-nav { padding: 6px 0; }
    .cats-inner { padding: 0 32px; gap: 18px; }
}
