/* Global styles used across the site. Home-specific sections live in style.css. */

:root {
    --brand: #0A2342; /*RGB: (10, 35, 66)*/
    --brand-soft: rgba(10, 35, 66, 0.08);
    --brand-glow: rgba(10, 35, 66, 0.18);
    --brand-faint: rgba(10, 35, 66, 0.06);
    --brand-shadow: rgba(10, 35, 66, 0.28);
    --white: #ffffff;
    --black: #0a0a0a;
    --gray-light: #f7f7f7;
    --gray-soft: #f2f5f9;
    --text: #111827;
    --muted: #6b7280;
    --success: #1f9d55;
    --success-soft: #e6f6ed;
    --danger: #c53030;
    --danger-soft: #fde7e7;
    /* Promo (verde emerald) - preço promocional, tag OFERTA, badge sale */
    --promo: #16a34a;
    --promo-deep: #15803d;
    --promo-bg: #dcfce7;
    --promo-border: #16a34a;
    --promo-text: #15803d;
    --promo-on: #ffffff;
    /* CTA "Comprar agora" (laranja) - decisão rápida, checkout */
    --cta-buy: #ea580c;
    --cta-buy-deep: #c2410c;
    --cta-buy-shadow: rgba(234, 88, 12, 0.18);
    --cta-buy-shadow-hover: rgba(234, 88, 12, 0.24);
    /* PIX (verde-água) - benefício adicional, sem roubar o holofote do preço principal */
    --pix: #047857;
    --pix-deep: #065f46;
    --pix-bg: #ecfdf5;
    --pix-border: #10b981;
    --pix-on: #ffffff;
    --radius: 20px;
    --radius-sm: 14px;
    --shadow: 0 24px 50px var(--brand-soft);
    --shadow-lg: 0 32px 64px var(--brand-glow);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* Aliases compartilhados entre PDP e Carrinho */
    --rule: #e2e8f0;
    --ink: var(--text);
    --ink-soft: var(--muted);
    --ink-mute: var(--muted);
    --ink-faint: #94a3b8;
    --emerald: #16a34a;
    --emerald-bg: #dcfce7;
    --emerald-border: #16a34a;
    --emerald-deep: #15803d;
    --ff-body: inherit;
    --ff-display: inherit;
}

* {
    box-sizing: border-box;
}

.is-hidden {
    display: none !important;
}

html, body {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    background: var(--gray-light);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100vw;
}

/* Sticky footer: o footer fica grudado no fim da viewport quando
   o conteúdo da página é mais curto que a altura visível. */
html { height: 100%; }
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
/* O <header class="site-header"> é position:fixed e não deve contar
   no flex flow do body (já está fora da viewport, sobreposto). */
body > .site-header {
    flex: 0 0 auto;
}
body > .header-spacer {
    flex: 0 0 auto;
}
body > main,
body > .home-page,
body > .shop-page,
body > .cart-page,
body > .page-pagamento-pix,
body > .page-default,
body > .scara-checkout,
body > [role="main"] {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
}
.site-footer {
    flex-shrink: 0;
    margin-top: auto;
}

body.menu-open {
    overflow-x: visible;
    overflow-y: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
    cursor: pointer;
    border: none;
}

.btn--primary {
    background: var(--brand);
    color: var(--white);
    box-shadow: 0 12px 28px var(--brand-glow);
}

.btn--primary:hover,
.btn--primary:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px var(--brand-glow);
}

.btn--ghost {
    background: transparent;
    color: var(--brand);
    border: 2px solid var(--brand-soft);
    box-shadow: none;
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
    background: var(--brand-soft);
    transform: translateY(-2px);
}

.btn--white {
    background: var(--white);
    color: var(--brand);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.btn--white:hover,
.btn--white:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.2);
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 40px;
}

.section-head--center {
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.section-head__eyebrow {
    display: block;
    margin: 0 auto 10px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand);
}

.section-head h2 {
    margin: 0 0 12px;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    line-height: 1.15;
    color: var(--text);
}

.section-head p {
    margin: 0;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 520px;
}

.section-head--center p {
    max-width: none;
}

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal--delay { transition-delay: 0.1s; }
.reveal--delay-1 { transition-delay: 0.05s; }
.reveal--delay-2 { transition-delay: 0.12s; }
.reveal--delay-3 { transition-delay: 0.19s; }
.reveal--delay-4 { transition-delay: 0.26s; }

/* ============================================================
   SCARA FRETE GRÁTIS BADGE — exibido DENTRO do <header> (e do
   <header-spacer> clone) acima da faixa de navegação. Cor de fundo
   alinhada ao `--brand` principal do tema; visual consistente
   com o header.
   ============================================================ */
.scara-free-ship-badge {
    background: var(--brand);
    color: #ffffff;
    font-family: inherit;
    line-height: 1.35;
    position: relative;
    z-index: 2;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.scara-free-ship-badge__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 9px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* IMPORTANTE: nunca usar `flex-wrap: wrap`. Se o <p> do texto for
       largo demais em mobile, o ícone pularia para uma linha acima.
       `nowrap` força ícone + texto na MESMA linha; o <p> encolhe
       (flex: 1 1 auto + min-width: 0) e o valor R$ 250,00 fica em
       pill branco sem quebrar (white-space: nowrap). */
    flex-wrap: nowrap;
    gap: 12px;
    text-align: center;
}

.scara-free-ship-badge__icon {
    /* SVG não encolhe; align-self:center garante alinhamento vertical
       mesmo se o <p> tiver line-height diferente. */
    flex: 0 0 auto;
    align-self: center;
    color: #ffffff;
}

.scara-free-ship-badge__text {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    flex: 1 1 auto;
    min-width: 0;
}

.scara-free-ship-badge__headline {
    font-weight: 700;
    margin-right: 4px;
}

.scara-free-ship-badge__amount {
    font-style: normal;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.18);
    padding: 1px 8px;
    border-radius: 999px;
    margin: 0 2px;
    display: inline-block;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .scara-free-ship-badge__inner { padding: 8px 14px; gap: 8px; }
    .scara-free-ship-badge__text { font-size: 13px; }
    .scara-free-ship-badge__icon { width: 18px; height: 18px; }
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--brand);
    width: 100%;
    will-change: transform;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--white);
    transition: padding var(--transition), box-shadow var(--transition), background var(--transition);
    max-width: 100vw;
}

.header-spacer > .site-header {
    position: static !important;
    top: 0;
    left: 0;
    background: transparent;
    box-shadow: none;
    border-bottom: none;
    visibility: hidden !important;
    pointer-events: none;
    min-height: 0;
    margin: 0;
    z-index: -1;
    width: 100%;
    /* não fixamos height: o conteúdo do clone define a altura real,
       idêntica ao .site-header de verdade (mesma marca, mesmo nav, mesmo btn). */
}

/* Blindagem: o clone dentro do .header-spacer não pode abrir nada,
   apenas reservar a altura/largura do botão do carrinho. */
.header-spacer .header-cart__dropdown,
.header-spacer .header-cart__count,
.header-spacer .header-cart__panel,
.header-spacer .header-cart.is-loading,
.header-spacer .header-cart.is-loading * {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Header spacer: reserva a altura do header real no fluxo. Não fixamos
   height aqui — o .site-header interno (visibility:hidden, mas com
   padding/conteúdo idênticos ao real) define a altura. Assim a
   altura é exatamente a mesma do header em qualquer viewport. */
.header-spacer {
    /* sem height fixa */
}

.site-header.is-scrolled {
    box-shadow: 0 12px 40px var(--brand-shadow);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 32px;
}

.brand {
    display: flex;
    flex-shrink: 0;
    position: relative;
    z-index: 102;
}

.brand a {
    display: inline-flex;
    align-items: center;
    transition: opacity var(--transition);
}

.brand a:hover,
.brand a:focus-visible {
    opacity: 0.85;
}

.brand img {
    display: block;
    max-height: 44px;
    width: auto;
}

.brand-text {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--white);
}

.header-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    overflow: visible;
    gap: 36px;
    min-width: 0;
    z-index: 999;
}

.site-nav {
    flex: 1;
    min-width: 0;
}

.nav-list {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-list li {
    margin: 0;
    padding: 0;
}

.nav-list a {
    position: relative;
    display: inline-block;
    padding: 8px 14px;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 500;
    font-size: 0.92rem;
    letter-spacing: 0.02em;
    border-radius: 8px;
    transition: color var(--transition), background var(--transition);
}

.nav-list a::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 4px;
    height: 2px;
    background: var(--white);
    border-radius: 999px;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform var(--transition);
}

.nav-list a:hover,
.nav-list a:focus-visible {
    color: var(--white);
    background: rgba(255, 255, 255, 0.06);
}

.nav-list a:hover::after,
.nav-list a:focus-visible::after {
    transform: scaleX(1);
}

.header-button {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    color: var(--brand);
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
    transition: box-shadow var(--transition), background var(--transition), border-color var(--transition), filter var(--transition);
    white-space: nowrap;
    cursor: pointer;
    position: relative;
}

.header-button:hover,
.header-button:focus-visible {
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
    background: var(--gray-soft);
    filter: brightness(1.02);
}

.header-button__icon {
    width: 22px;
    height: 22px;
    display: block;
    object-fit: contain;
    filter: invert(1) brightness(0.25);
}

.header-button__count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: #d93025;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.header-button__count.is-hidden {
    display: none;
}

.header-cart {
    position: relative;
    flex-shrink: 0;
    display: flex !important;
    align-items: center !important;
}

.header-cart__dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(480px, calc(100vw - 24px));
    max-height: min(74vh, 620px);
    overflow: auto;
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(10, 35, 66, 0.12);
    box-shadow: 0 20px 36px rgba(10, 35, 66, 0.22);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    z-index: 150;
}

.header-cart.is-open .header-cart__dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* ============================================================
   HEADER USER BUTTON — login / minha conta (mesmo padrao do cart)
   ============================================================ */
.header-user {
    position: relative;
    flex-shrink: 0;
    margin-left: -20px;
    display: flex;
    align-items: center;
}

.header-user__avatar,
.header-user__btn img.header-button__icon,
.header-user__icon {
    border-radius: 999px;
    object-fit: cover;
    background: #f5f7fb;
}

.header-user__icon {
    color: var(--brand);
    filter: none;
}

/* Quando logado: avatar redondo com foto do usuario */
.header-user.is-logged-in .header-user__btn {
    overflow: hidden;
    padding: 0;
    /* Se o conteúdo for imagem (Google/Nend), não mostramos o fundo
       branco circular: a própria foto do avatar preenche o botão.
       Mantém o aspect-ratio quadrado mesmo quando o servidor devolve
       uma imagem não-quadrada, evitando "borda branca" no entorno. */
    background: transparent;
}
.header-user.is-logged-in .header-user__btn .header-button__icon,
.header-user.is-logged-in .header-user__btn .header-user__avatar {
    /* Foto preenche 100% do botão; sem filtro de inversão (que é
       aplicado por padrão em .header-button__icon para ícones SVG
       escuros). */
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: none;
    background: #f5f7fb;
}

/* Dropdown do usuario (mesmo padrao do cart) */
.header-user__dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(280px, calc(100vw - 24px));
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(10, 35, 66, 0.12);
    box-shadow: 0 20px 36px rgba(10, 35, 66, 0.22);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    z-index: 151;
}

.header-user.is-open .header-user__dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.header-user__dropdown-content {
    padding: 14px;
}

.header-user__greeting {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 6px 14px;
    border-bottom: 1px solid rgba(10, 35, 66, 0.08);
    margin-bottom: 10px;
}

.header-user__dropdown-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    object-fit: cover;
    background: #f5f7fb;
    flex-shrink: 0;
}

.header-user__greeting-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
}

.header-user__greeting-label {
    font-size: 12px;
    color: #6b7280;
}

.header-user__greeting-name {
    font-size: 14px;
    font-weight: 700;
    color: #0A2342;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-user__action {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #0A2342;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.header-user__action:hover,
.header-user__action:focus-visible {
    background-color: rgba(10, 35, 66, 0.06);
}

.header-user__action--logout {
    margin-top: 6px;
    color: #c53030;
}

.header-user__action--logout:hover,
.header-user__action--logout:focus-visible {
    background-color: rgba(197, 48, 48, 0.08);
}

.header-user__action svg {
    flex-shrink: 0;
    color: currentColor;
}

/* No FAB o dropdown abre como bottom sheet (mobile-first via media query).
   No desktop, fallback: abre para cima como popup ancorado. */
.header-cart-fab .header-cart__dropdown {
    top: auto;
    bottom: calc(100% + 10px);
    right: 0;
    transform: translateY(-6px);
}

.header-cart-fab.is-open .header-cart__dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* Handle visual da bottom sheet (só mobile, escondido no desktop) */
.header-cart-fab__sheet-handle {
    display: none;
}

/* Backdrop da bottom sheet (só mobile) */
.cart-sheet-backdrop {
    display: none;
}

.header-cart__panel {
    display: flex;
    flex-direction: column;
}

/* ============================================
   ESTADO DE LOADING (lock AJAX — estilo Amazon)
   ============================================ */
.header-cart.is-loading .header-cart__panel {
    position: relative;
    pointer-events: none;
    opacity: 0.55;
    transition: opacity 0.15s ease;
}

.header-cart.is-loading .header-cart__panel::after {
    content: '';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.55);
    pointer-events: none;
}

.header-cart.is-loading .header-cart__panel::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 22px;
    margin-top: -11px;
    margin-left: -11px;
    border-radius: 50%;
    border: 2.5px solid rgba(10, 35, 66, 0.18);
    border-top-color: var(--brand);
    animation: header-cart-spin 0.7s linear infinite;
    z-index: 2;
    pointer-events: none;
}

/* Quando um item já está com is-updating, ele tem seu próprio spinner
   inline (28x28). Para não mostrar DOIS spinners ao mesmo tempo
   (item + panel), escondemos o spinner central do panel e o overlay
   branco — mantemos só a opacidade reduzida do panel como feedback
   de "está processando". Isso elimina o "2 loadings" no desktop. */
.header-cart.is-loading .header-cart__panel:has(.header-cart__item.is-updating)::before,
.header-cart.is-loading .header-cart__panel:has(.header-cart__item.is-updating)::after,
.header-cart.is-loading .header-cart__panel:has(.header-cart__item.is-removing)::before,
.header-cart.is-loading .header-cart__panel:has(.header-cart__item.is-removing)::after {
    content: none;
    display: none;
    animation: none;
    background: transparent;
}

/* Garantia: o header duplicado dentro de .header-spacer (template de altura)
   nunca deve exibir spinner de loading, mesmo se alguma rotina atribuir
   .is-loading nele por engano. O panel inteiro já está com visibility:
   hidden herdado, mas blindamos o ::before/::after também. */
.header-spacer .header-cart.is-loading .header-cart__panel::before,
.header-spacer .header-cart.is-loading .header-cart__panel::after {
    content: none;
    display: none;
    animation: none;
}

@keyframes header-cart-spin {
    to { transform: rotate(360deg); }
}

/* Botões/inputs bloqueados ficam esmaecidos e não reagem a hover */
.header-cart.is-loading .header-cart__qty-btn,
.header-cart.is-loading .header-cart__remove,
.header-cart.is-loading .header-cart__qty-input {
    cursor: wait !important;
    opacity: 0.6;
    background: #eef2f8;
}

.header-cart.is-loading .header-cart__qty-btn:hover,
.header-cart.is-loading .header-cart__remove:hover,
.header-cart.is-loading .header-cart__qty-btn:focus-visible,
.header-cart.is-loading .header-cart__remove:focus-visible {
    background: #eef2f8;
}

/* Badges de contagem (cabeçalho) também indicam loading */
.header-cart.is-loading [data-cart-count] {
    position: relative;
    color: transparent !important;
}

.header-cart.is-loading [data-cart-count]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    margin-top: -5px;
    margin-left: -5px;
    border-radius: 50%;
    border: 1.5px solid rgba(10, 35, 66, 0.2);
    border-top-color: var(--brand);
    animation: header-cart-spin 0.7s linear infinite;
}

/* ============================================
   ITEM SENDO REMOVIDO/ALTERADO (optimistic + ajax)
   Mostra opacidade reduzida + spinner inline para
   dar feedback visual de que a ação está em voo.
   ============================================ */
.header-cart__item {
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.header-cart__item.is-removing,
.header-cart__item.is-updating {
    opacity: 0.45;
    pointer-events: none;
    position: relative;
}

.header-cart__item.is-removing::before,
.header-cart__item.is-updating::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.65);
    border-radius: inherit;
    z-index: 1;
    pointer-events: none;
}

.header-cart__item.is-removing::after,
.header-cart__item.is-updating::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 28px;
    margin-top: -14px;
    margin-left: -14px;
    border-radius: 50%;
    border: 3.5px solid rgba(10, 35, 66, 0.22);
    border-top-color: var(--brand);
    animation: header-cart-spin 0.7s linear infinite;
    z-index: 2;
    pointer-events: none;
}

/* ============================================
   BOTTOM SHEET — espelhamento do is-loading
   (a sheet foi reparented para <body> no mobile,
   então .header-cart.is-loading do desktop não
   pega nela; aplicamos a classe direto no sheet).
   
   NOTA: NÃO mostramos um spinner "panel-wide" aqui
   para evitar o double-loading (item + sheet).
   O feedback visual vem do spinner inline do item
   (is-removing / is-updating) + bloqueio de cliques
   (pointer-events:none + opacity reduzida).
   ============================================ */
.header-cart__dropdown.is-bottom-sheet.is-loading {
    overflow: hidden;
}
.header-cart__dropdown.is-bottom-sheet.is-loading .header-cart__panel {
    position: relative;
    pointer-events: none;
    opacity: 0.85;
    transition: opacity 0.15s ease;
    min-height: 60px;
}

.header-cart__list {
    list-style: none;
    margin: 0;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.header-cart__item {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(10, 35, 66, 0.08);
    border-radius: 10px;
    padding: 8px;
    background: #fff;
}

.header-cart__item-media {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f7fb;
}

.header-cart__thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-cart__item-name {
    display: block;
    color: var(--brand);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
}

.header-cart__item-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.header-cart__item-meta {
    margin-top: 4px;
    color: #4c5a70;
    font-size: 0.78rem;
}

.header-cart__qty {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.header-cart__qty-btn {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: #eff3f9;
    color: var(--brand);
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
}

.header-cart__qty-btn:hover,
.header-cart__qty-btn:focus-visible {
    background: #e1e8f3;
}

.header-cart__qty-input {
    width: 48px;
    height: 28px;
    border: 1px solid rgba(10, 35, 66, 0.12);
    border-radius: 8px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--brand);
    padding: 0 4px;
}

.header-cart__qty-input::-webkit-outer-spin-button,
.header-cart__qty-input::-webkit-inner-spin-button {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
}

.header-cart__qty-input[type='number'] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.header-cart__remove {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    background: #eff3f9;
    color: var(--brand);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

.header-cart__remove:hover,
.header-cart__remove:focus-visible {
    background: #e1e8f3;
}

.header-cart__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 10px 10px;
}

.header-cart__action {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 38px;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
}

.header-cart__action--ghost {
    border: 1px solid rgba(10, 35, 66, 0.22);
    color: var(--brand);
    background: #fff;
}

.header-cart__action--ghost:hover,
.header-cart__action--ghost:focus-visible {
    color: var(--brand);
    background: #f4f6fa;
}

.header-cart__action--primary {
    border: 1px solid var(--brand);
    color: #fff;
    background: var(--brand);
}

.header-cart__action--primary:hover,
.header-cart__action--primary:focus-visible {
    color: #fff;
    background: #08234a;
}

.header-cart__empty {
    padding: 18px 14px;
    color: #53627a;
    font-size: 0.86rem;
    text-align: center;
}

.menu-toggle {
    display: none;
    position: relative;
    z-index: 102;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    margin-left: auto;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 0;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.22);
}

.menu-toggle__bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--white);
    border-radius: 999px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
    transform-origin: center;
}

.menu-toggle.is-active .menu-toggle__bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.is-active .menu-toggle__bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.menu-toggle.is-active .menu-toggle__bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.header-overlay {
    display: none;
}

.whatsapp-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,.3);
    transition: transform .2s ease;
    z-index: 9999;
}

.whatsapp-button:hover {
    transform: scale(1.1);
}

.whatsapp-button svg{
    width:34px;
    height:34px;
    fill:#fff;
}

/* ============================================================
   FAB do carrinho (visível só no mobile, só com produtos)
   ============================================================ */
.header-cart-fab {
    /* Escondido por padrão (no mobile e no desktop, com ou sem produtos).
       Mantém o elemento no DOM/layout para permitir animação de entrada/saída
       controlada por opacity/transform/pointer-events. */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(20px) scale(0.85);
    transition: opacity 0.32s cubic-bezier(0.2, 0.8, 0.2, 1),
                transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1),
                visibility 0s linear 0.32s;
    position: fixed;
    right: 20px;
    width: 60px;
    height: 60px;
    z-index: 10002; /* abaixo da sheet (10003), acima do backdrop (10000) */
}

.header-cart-fab.is-empty {
    /* Vazio: invisível, sem interação, e na posição "fora" da tela. */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(20px) scale(0.85);
    transition: opacity 0.28s cubic-bezier(0.4, 0, 0.6, 1),
                transform 0.28s cubic-bezier(0.4, 0, 0.6, 1),
                visibility 0s linear 0.28s;
}

.header-cart-fab:not(.is-empty) {
    /* Com produtos: visível, clicável e na posição final.
       A transição de visibility é imediata (0s) na entrada para que
       o elemento receba pointer-events assim que aparecer. */
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition: opacity 0.32s cubic-bezier(0.2, 0.8, 0.2, 1),
                transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1),
                visibility 0s linear 0s;
}

.header-cart-fab__button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    padding: 0;
    background: var(--white);
    color: var(--brand);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.header-cart-fab__button:hover,
.header-cart-fab__button:focus-visible {
    transform: scale(1.1);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
    outline: none;
}

.header-cart-fab__icon {
    width: 26px;
    height: 26px;
    display: block;
    object-fit: contain;
    filter: invert(1) brightness(0.25);
}

.header-cart-fab__count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #d93025;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
}

.header-cart-fab__count.is-hidden {
    display: none;
}

/* No desktop, o FAB NUNCA deve aparecer (ele é exclusivo do mobile).
   Sem essa regra, o FAB aparece no desktop quando há produtos no carrinho
   porque a regra .header-cart-fab:not(.is-empty) define opacity/visibility
   sem considerar o viewport. */
@media (min-width: 964px) {
    .header-cart-fab {
        display: none !important;
    }
}

@media (max-width: 963px) {
    /* Esconde o cart do header no mobile (FAB assume) */
    .header-cart.is-mobile-relocated {
        /* display: none !important; */ /* removido para permitir que JS reposicione */
        align-self: center;
        margin-left: -24px;
        margin-right: -24px;
    }

    /* Na home, fica acima do botão do WhatsApp */
    .header-cart-fab--with-whatsapp {
        bottom: 90px;
    }

    /* Em outras páginas, assume a posição do WhatsApp */
    .header-cart-fab--alone {
        bottom: 20px;
    }

    /* === Bottom sheet do carrinho no mobile ===
       O dropdown deixa de ser um popup ancorado e vira uma sheet
       que sobe do rodapé da tela, ocupando toda a largura.
       NOTA: usamos `.header-cart__dropdown.is-bottom-sheet` (em vez
       de `.header-cart-fab .header-cart__dropdown`) porque o JS
       REPARENTA o dropdown para <body> no mobile — isso é necessário
       pois o FAB usa `transform` (na animação de aparecer/desaparecer)
       e qualquer ancestral com transform cria um containing block
       para `position: fixed`, fazendo o `fixed` virar relativo ao
       FAB (60x60px) em vez da viewport.
       `!important` é necessário para sobrescrever a regra genérica
       `.header-cart__dropdown { right: 0; width: ...; }` definida
       mais adiante nesta mesma media query (header do mobile).
       Usa-se `left: 0; right: 0` (sem `width` explícita) para que
       o navegador use a viewport diretamente. */
    .header-cart__dropdown.is-bottom-sheet {
        position: fixed !important;
        top: auto !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        max-height: 90vh !important;
        box-sizing: border-box !important;
        border-radius: 16px 16px 0 0;
        border: 0;
        overflow-x: hidden !important; /* evita que conteúdo interno
            (ex: nome de produto longo, contador etc) cause scroll
            horizontal na página inteira ao abrir a sheet */
        transform: translateY(100%);
        transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1),
                    opacity 0.22s ease,
                    visibility 0.22s ease;
        box-shadow: 0 -10px 30px rgba(10, 35, 66, 0.25);
        z-index: 10003; /* acima do FAB (10002) e do backdrop (10000) */
    }

    .header-cart-fab.is-open .header-cart__dropdown,
    .header-cart__dropdown.is-bottom-sheet.is-open {
        transform: translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    /* === Fix de overflow horizontal na sheet (mobile) ===
       1) `100vw` no iOS/Android pode incluir a barra de URL
          (largura da janela > viewport visível). Trocar para
          `100%` faz a sheet respeitar o container do body, que
          tem `overflow-x: hidden` aplicado.
       2) O `.header-cart__item` é `display: grid` com 3 colunas
          (52px 1fr auto). Por padrão, o track `1fr` tem
          `min-width: auto` (= largura do conteúdo), o que faz
          o LI estourar o container quando o nome do produto ou
          o contador de quantidade é grande. Forçar `min-width: 0`
          no LI e nos descendentes libera o track para encolher.
       3) O botão "Finalizar compra" (`.header-cart__action`) é
          `display: inline-flex` sem `width` explícita; garantir
          `width: 100%` quando dentro da sheet faz ele preencher
          toda a largura disponível em vez de ficar do tamanho
          do texto. */
    .header-cart__dropdown.is-bottom-sheet {
        width: 100% !important;
        max-width: 100% !important;
    }
    .header-cart__dropdown.is-bottom-sheet .header-cart__item,
    .header-cart__dropdown.is-bottom-sheet .header-cart__item-main,
    .header-cart__dropdown.is-bottom-sheet .header-cart__qty,
    .header-cart__dropdown.is-bottom-sheet .header-cart__item-name,
    .header-cart__dropdown.is-bottom-sheet .header-cart__item-meta {
        min-width: 0;
    }
    .header-cart__dropdown.is-bottom-sheet .header-cart__item-name {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    .header-cart__dropdown.is-bottom-sheet .header-cart__actions {
        width: 100%;
    }
    .header-cart__dropdown.is-bottom-sheet .header-cart__action {
        width: 100%;
        flex: 1 1 auto;
    }

    /* Quando a sheet está aberta, esconde o FAB visualmente (mas mantém
       no DOM para o JS não perder a referência) e libera pointer-events
       para a sheet pegar todos os cliques. */
    .header-cart-fab.is-open {
        opacity: 0 !important;
        pointer-events: none !important;
        transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s !important;
        transform: scale(0.7) !important;
    }

    /* Handle da sheet (barrinha cinza no topo) */
    .header-cart-fab__sheet-handle {
        display: block;
        width: 44px;
        height: 5px;
        margin: 8px auto 0;
        border-radius: 999px;
        background: rgba(10, 35, 66, 0.18);
    }

    /* Backdrop escurecido atrás da sheet */
    .cart-sheet-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(10, 10, 10, 0.5);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.28s ease, visibility 0.28s ease;
        z-index: 10000;
    }

    body.cart-sheet-open .cart-sheet-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    /* Trava o scroll do body quando a sheet está aberta */
    body.cart-sheet-open {
        overflow: hidden;
    }
}

.site-footer {
    background: var(--brand);
    color: rgba(255, 255, 255, 0.85);
    padding: 48px 0 32px;
}

.site-footer__inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px 40px;
}

.site-footer__brand strong {
    display: block;
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.site-footer__brand p {
    margin: 0;
    font-size: 0.9rem;
    max-width: 320px;
}

.site-footer__nav {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.site-footer__nav a {
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.site-footer__nav a:hover {
    color: var(--white);
}

.site-footer__copy {
    grid-column: 1 / -1;
    margin: 16px 0 0;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.55);
}

/* Redes sociais no rodapé (Instagram + Facebook).
   Não alteram o grid existente — ficam dentro da coluna da marca,
   abaixo da descrição, alinhados à esquerda. Em mobile continuam
   fluindo naturalmente porque o grid colapsa para 1 coluna. */
.site-footer__social {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0 0;
    padding: 0;
}

.site-footer__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: background-color 0.25s ease,
                border-color 0.25s ease,
                transform 0.25s ease,
                color 0.25s ease;
}

.site-footer__social-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    display: block;
}

.site-footer__social-link:hover,
.site-footer__social-link:focus-visible {
    background: var(--white);
    transform: translateY(-2px);
    outline: none;
}

.site-footer__social-link:focus-visible {
    box-shadow: 0 0 0 3px var(--brand-glow);
}

/* Hover colorido por rede: revela o tom da marca em vez do branco,
   criando um destaque visual sutil sem quebrar a paleta dark. */
.site-footer__social-link--instagram:hover,
.site-footer__social-link--instagram:focus-visible {
    background: linear-gradient(135deg, #f58529 0%, #dd2a7b 50%, #8134af 100%);
    border-color: transparent;
    color: var(--white);
}

.site-footer__social-link--facebook:hover,
.site-footer__social-link--facebook:focus-visible {
    background: #1877F2;
    border-color: transparent;
    color: var(--white);
}

@media (prefers-reduced-motion: reduce) {
    .site-footer__social-link {
        transition: none;
    }
    .site-footer__social-link:hover,
    .site-footer__social-link:focus-visible {
        transform: none;
    }
}

@media (max-width: 600px) {
    .site-footer__social {
        gap: 10px;
        margin-top: 16px;
    }
    .site-footer__social-link {
        width: 38px;
        height: 38px;
    }
    .site-footer__social-link svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 963px) {
    .menu-toggle {
        display: inline-flex;
        z-index: 1000;
        margin-left: 0;
    }

    .header-inner {
        justify-content: flex-start;
    }

    /* Mantém logo à esquerda e agrupa os controles no lado direito.
       O espaço automático pertence à logo, não aos controles, para
       evitar que o avatar do usuário seja centralizado. */
    .header-inner > .brand {
        margin-right: auto;
    }

    /* Cart reposicionado para fora do painel: à esquerda do hamburguer,
       próximo da brand. Reset das regras de animação que eram para
       o cart dentro do painel. */
    .header-cart.is-mobile-relocated {
        align-self: center;
        margin-top: 0;
        margin-right: 8px;
        opacity: 1;
        transform: none;
        transition: none;
    }

    .header-user.is-mobile-relocated {
          /* O header-inner tem gap:32px; neutraliza-o aqui para que o
              usuário fique imediatamente à esquerda do hamburguer, com
              8px visuais. */
        margin-left: -24px;
          margin-right: -24px;
        align-self: center;
    }

    .header-user.is-logged-in.is-mobile-relocated {
        /* Mantém o avatar no mesmo grupo do hamburguer quando logado. */
        margin-left: -24px;
        margin-right: -24px;
        position: relative;
        z-index: 1001;
    }

    .header-user.is-mobile-relocated .header-user__btn {
        width: 44px;
        height: 44px;
    }

    .header-panel {
        position: fixed;
        top: 0;
        right: 0;
        flex: none;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        width: min(360px, 100vw);
        height: 100dvh;
        height: 100vh;
        background: var(--brand);
        box-shadow: -18px 0 56px rgba(0, 0, 0, 0.28);
        transform: translateX(105%);
        transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        overflow-y: auto;
        padding: 24px 18px 20px;
        -webkit-overflow-scrolling: touch;
    }

    body.menu-open .header-panel {
        transform: translateX(0);
    }

    .site-nav {
        flex: none;
        width: 100%;
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        width: 100%;
        justify-content: flex-start;
    }

    .nav-list li {
        opacity: 0;
        transform: translateX(20px);
        transition: opacity 0.35s ease, transform 0.35s ease;
    }

    body.menu-open .nav-list li {
        opacity: 1;
        transform: translateX(0);
    }

    body.menu-open .nav-list li:nth-child(1) { transition-delay: 0.08s; }
    body.menu-open .nav-list li:nth-child(2) { transition-delay: 0.13s; }
    body.menu-open .nav-list li:nth-child(3) { transition-delay: 0.18s; }
    body.menu-open .nav-list li:nth-child(4) { transition-delay: 0.23s; }
    body.menu-open .nav-list li:nth-child(5) { transition-delay: 0.28s; }
    body.menu-open .nav-list li:nth-child(6) { transition-delay: 0.33s; }

    .nav-list a {
        display: block;
        padding: 14px 16px;
        font-size: 1.05rem;
        border-radius: 12px;
    }

    .nav-list a::after {
        display: none;
    }

    .nav-list a:hover,
    .nav-list a:focus-visible {
        background: rgba(255, 255, 255, 0.1);
    }

    .header-cart {
        align-self: flex-end;
        margin-top: 28px;
        opacity: 0;
        transform: translateY(12px);
        transition: opacity 0.35s ease 0.2s, transform 0.35s ease 0.2s, box-shadow var(--transition), background var(--transition);
    }

    .header-button {
        width: 48px;
        height: 48px;
        padding: 0;
        min-height: 44px;
        min-width: 44px;
    }

    .header-cart__dropdown {
        right: 0;
        width: min(440px, calc(100vw - 20px));
    }

    body.menu-open .header-cart {
        opacity: 1;
        transform: translateY(0);
    }

    .header-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(10, 10, 10, 0.55);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.4s ease;
        z-index: 121;
    }

    body.menu-open .header-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .site-footer__inner {
        grid-template-columns: 1fr;
    }

    .site-footer__nav {
        flex-wrap: wrap;
        gap: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal,
    .header-panel,
    .header-overlay,
    .nav-list li,
    .header-button,
    .menu-toggle__bar {
        transition: none !important;
        transform: none !important;
        animation: none !important;
    }

    .nav-list li,
    .header-button {
        opacity: 1 !important;
    }
}

.header-cart__qty-form,
.header-cart__remove-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.header-cart__qty-form--input {
    flex: 0 0 auto;
}

.header-cart__qty-form--input .header-cart__qty-input {
    height: 28px;
    width: 48px;
    margin: 0;
}

.header-cart__remove-form {
    align-self: center;
}

/* ============================================================================
   PRICE STACK (PIX) — usado em todos os pontos onde o preço é exibido.
   ============================================================================ */
.price-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    line-height: 1.25;
    font-family: inherit;
}

.price-stack--sm { font-size: 0.85rem; }
.price-stack--md { font-size: 0.95rem; }
.price-stack--lg { font-size: 1.05rem; }

.price-stack__old {
    color: var(--muted);
    font-size: 0.82em;
    font-weight: 500;
    text-decoration: line-through;
    letter-spacing: 0.01em;
}

.price-stack__main {
    font-weight: 800;
    color: var(--text);
    font-size: 1.4em;
    line-height: 1.05;
    letter-spacing: -0.01em;
}

.price-stack--sm .price-stack__main { font-size: 1.05em; }
.price-stack--md .price-stack__main { font-size: 1.25em; }
.price-stack--lg .price-stack__main { font-size: 1.55em; }

.price-stack__pix {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    color: var(--pix-deep);
    font-weight: 600;
    font-size: 0.85em;
    line-height: 1.2;
}

.price-stack__pix strong {
    font-weight: 800;
    color: var(--pix);
}

.price-stack__pix-flag {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 6px;
    background: var(--pix);
    color: var(--pix-on);
    font-size: 0.82em;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.4;
}

.price-stack__installments {
    color: var(--muted);
    font-size: 0.78em;
    line-height: 1.25;
}

.price-stack__installments strong {
    color: var(--text);
    font-weight: 700;
}

/* Quando exibido no card (home/produtos/cross-sell do carrinho) — fonte
   menor, mais discreta, sem roubar a hierarquia do título. */
.product-card .price-stack,
.cart-page__upsell .price-stack {
    width: 100%;
    align-items: flex-start;
}

.product-card .price-stack__main,
.cart-page__upsell .price-stack__main {
    font-size: 1.2em;
    color: var(--text);
}

.product-card .price-stack__pix,
.cart-page__upsell .price-stack__pix {
    font-size: 0.78em;
}

/* Na PDP a linha "ou em até X vezes sem juros" (injetada pelo plugin
   Scara — MP Installments como <span class="scara-mp-installments">)
   ficava grande demais. Reduz para se alinhar ao PIX, sem roubar
   hierarquia do preço principal. */
.product-detail .scara-mp-installments {
    font-size: 0.72em;
    color: var(--muted);
    line-height: 1.3;
}


/* ===================================================================
   Calculadora de frete (compartilhado: PDP + Carrinho)
   Classes .pdp-shipping* movidas aqui para reutilização
=================================================================== */
/* Calculadora de frete (Melhor Envio) â€” simples e funcional */
.pdp-shipping {
  display: block;
  margin: 16px 0 0;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--rule, #e2e8f0);
  border-radius: 10px;
  color: var(--ink, #111827);
  font-family: var(--ff-body, inherit);
}

.pdp-shipping__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.pdp-shipping__icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #f1f5f9;
  color: var(--ink, #111827);
  flex-shrink: 0;
}
.pdp-shipping__icon svg { width: 18px; height: 18px; }

.pdp-shipping__heading {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.pdp-shipping__title {
  font-family: var(--ff-display, inherit);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink, #111827);
  line-height: 1.3;
}

.pdp-shipping__subtitle {
  font-size: 12.5px;
  color: var(--ink-soft, #6b7280);
  line-height: 1.3;
}

/* Variante frete grátis - verde "money/saving" com borda forte */
.pdp-shipping--free {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--emerald-bg);
  border: 1.5px solid var(--emerald-border);
  color: var(--emerald-deep);
}
.pdp-shipping--free .pdp-shipping__icon {
  background: var(--emerald);
  color: #fff;
}
.pdp-shipping--free .pdp-shipping__title {
  color: var(--emerald-deep);
  font-size: 14px;
  font-weight: 700;
}
.pdp-shipping--free .pdp-shipping__subtitle {
  color: var(--emerald-deep);
  font-weight: 500;
  opacity: 0.85;
}

.pdp-shipping__body { display: block; }

/* Esconde a UI nativa do shortcode do Melhor Envio */
.pdp-shipping .containerCalculator,
.pdp-shipping .containerCalculator > form,
.pdp-shipping .containerCalculator .resultado-frete,
.pdp-shipping .containerCalculator .border-none,
.pdp-shipping .containerCalculator table,
.pdp-shipping .containerCalculator input.iptCepShortcode,
.pdp-shipping .containerCalculator .observation-shipping-free-shortcode,
.pdp-shipping #calcular-frete-loader,
.pdp-shipping #melhor-envio-shortcode > form > div {
  display: none !important;
}

/* Form: input + botÃ£o Calcular */
.pdp-shipping__form {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.pdp-shipping__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--rule, #e2e8f0);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 14px;
  color: var(--ink, #111827);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pdp-shipping__input::placeholder { color: #94a3b8; }
.pdp-shipping__input:focus {
  border-color: var(--ink, #111827);
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}
.pdp-shipping__input:disabled { opacity: 0.6; }

.pdp-shipping__btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 16px;
  border: 1px solid var(--ink, #111827);
  border-radius: 8px;
  background: var(--ink, #111827);
  color: #fff;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.pdp-shipping__btn:hover { background: #1f2937; border-color: #1f2937; }
.pdp-shipping__btn:disabled { opacity: 0.5; cursor: not-allowed; }
.pdp-shipping__btn svg { width: 14px; height: 14px; }

.pdp-shipping__form.is-error .pdp-shipping__input {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Loader */
.pdp-shipping__loader {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--ink-soft, #6b7280);
  font-size: 13px;
}
.pdp-shipping__loader.is-active { display: flex; }
.pdp-shipping__spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--rule, #e2e8f0);
  border-top-color: var(--ink, #111827);
  border-radius: 50%;
  animation: pdp-spin 0.7s linear infinite;
}
@keyframes pdp-spin { to { transform: rotate(360deg); } }

/* Resultados */
.pdp-shipping__results {
  display: none;
  margin-top: 14px;
}
.pdp-shipping__results.is-active { display: block; }
.pdp-shipping__results-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.pdp-shipping__results-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pdp-shipping__result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--rule, #e2e8f0);
  border-radius: 8px;
  font-size: 13.5px;
}
.pdp-shipping__result-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.pdp-shipping__result-name {
  font-weight: 600;
  color: var(--ink, #111827);
  line-height: 1.3;
}
.pdp-shipping__result-eta {
  font-size: 12px;
  color: var(--ink-soft, #6b7280);
  font-weight: 400;
}
.pdp-shipping__result-price {
  font-weight: 700;
  color: var(--ink, #111827);
  white-space: nowrap;
  font-size: 14px;
}
.pdp-shipping__result--free .pdp-shipping__result-price { color: #16a34a; }
.pdp-shipping__result--free { background: #f0fdf4; border-color: #bbf7d0; }

/* v1.8.0 — radios para seleção de frete (carrinho + PDP).
   O <label> cobre o <li> inteiro, dando área de clique ampla; o
   <input> em si fica visualmente escondido, com um círculo custom
   que ganha a borda/cheia do brand quando selecionado. */
.pdp-shipping__result { position: relative; padding: 0; }
.pdp-shipping__option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color .12s ease, border-color .12s ease;
}
.pdp-shipping__option-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
.pdp-shipping__option-radio {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  background: #fff;
  position: relative;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.pdp-shipping__option-input:checked + .pdp-shipping__option-radio {
  border-color: var(--brand, #0A2342);
}
.pdp-shipping__option-input:checked + .pdp-shipping__option-radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--brand, #0A2342);
}
.pdp-shipping__option-input:focus-visible + .pdp-shipping__option-radio {
  box-shadow: 0 0 0 3px var(--brand-glow, rgba(10, 35, 66, .25));
}
.pdp-shipping__option-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.pdp-shipping__result.is-selected {
  background: transparent;
  border-color: var(--brand, #0A2342);
  box-shadow: 0 0 0 1px var(--brand, #0A2342) inset;
}
.pdp-shipping__result.is-selected .pdp-shipping__result-name { color: var(--brand, #0A2342); }

/* Resumo do carrinho: o "Frete (PAC)" inline com o nome do método */
.cart-page__totals li > span em[data-cart-shipping-label] {
  font-style: normal;
  color: var(--ink-soft, #6b7280);
  font-weight: 500;
}
.cart-page__totals li > span em[data-cart-shipping-label][data-active="1"] {
  color: var(--ink, #111827);
  font-weight: 600;
}
.cart-page__totals li > strong[data-shipping="free"] { color: #16a34a; }

.pdp-shipping__results-empty {
  padding: 10px 12px;
  font-size: 13.5px;
  color: var(--ink-soft, #6b7280);
  background: #f8fafc;
  border: 1px solid var(--rule, #e2e8f0);
  border-radius: 8px;
  list-style: none;
}

/* Responsivo */
@media (max-width: 600px) {
  .pdp-shipping { padding: 14px; }
  .pdp-shipping__form { flex-direction: column; }
}
