/* Fonte: reaproveitamos a mesma do painel (plugin Base Core), licença OFL — sem Google Fonts. */
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

  /* ---------- Tokens (sobrescritos pelo Personalizar) ---------- */
  :root {
    --mb-bg: #eef1f6;
    --mb-surface: #ffffff;
    --mb-text: #14182b;
    --mb-muted: #5d6478;
    --mb-accent: #2547f5;
    --mb-accent-contrast: #ffffff;
    --mb-accent-tint: #e4eaff;
    --mb-warm: #ff6b4a;
    --mb-line: #d5dae6;
    --mb-wa: #25d366;
    /* Dois contextos de cor: sobre o FUNDO da página e sobre os CARTÕES (--mb-surface).
       Nos modos claro/escuro são iguais; no modo "Personalizado" o PHP define cada
       um com contraste garantido (inc/colors.php). */
    --mb-bg-paint: var(--mb-bg);
    --mb-on-bg: var(--mb-text);
    --mb-on-bg-muted: var(--mb-muted);
    --mb-accent-on-bg: var(--mb-accent);
    --mb-bg-line: var(--mb-line);
    --mb-on-bg-shadow: none;
    --mb-radius: 20px;
    --mb-radius-sm: 12px;
    --mb-font: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  }
  /* O Personalizar pode aplicar data-theme="dark" no <html>; sem data-theme ("automático"),
     segue a preferência do celular. As duas listas de tokens precisam ficar iguais. */
  :root[data-theme="dark"] {
    color-scheme: dark;
    --mb-bg: #0f1220;
    --mb-surface: #1a1e33;
    --mb-text: #f1f3fb;
    --mb-muted: #a3aac2;
    --mb-accent-tint: #26305e;
    --mb-line: #2e3554;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
      color-scheme: dark;
      --mb-bg: #0f1220;
      --mb-surface: #1a1e33;
      --mb-text: #f1f3fb;
      --mb-muted: #a3aac2;
      --mb-accent-tint: #26305e;
      --mb-line: #2e3554;
    }
  }

  /* ---------- Base ---------- */
  *, *::before, *::after { box-sizing: border-box; }
  [hidden] { display: none !important; }
  html { -webkit-text-size-adjust: 100%; background: var(--mb-bg); }
  body {
    margin: 0;
    min-height: 100dvh;
    background: var(--mb-bg-paint);
    background-attachment: fixed; /* o degradê acompanha a tela (o iOS ignora e rola junto, sem problema) */
    color: var(--mb-on-bg);
    font-family: var(--mb-font);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
  }
  img, svg, video { display: block; max-width: 100%; }
  a { color: inherit; text-decoration: none; }
  button { font: inherit; color: inherit; cursor: pointer; }
  ul { list-style: none; margin: 0; padding: 0; }
  :focus-visible { outline: 3px solid var(--mb-accent); outline-offset: 3px; }
  /* Dedo ou mouse: sem contorno de foco (o JS devolve o foco ao fechar painéis, e o
     navegador desenharia o contorno mesmo para quem tocou). Teclado: contorno de volta. */
  .is-pointer :focus-visible { outline: none; }
  /* Sem o retângulo cinza/azul que o Android desenha ao tocar */
  a, button, [role="button"] { -webkit-tap-highlight-color: transparent; }
  .sr-only {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }

  .page {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding:
      calc(40px + env(safe-area-inset-top, 0px))
      20px
      calc(112px + env(safe-area-inset-bottom, 0px));
  }
  .page > * + * { margin-top: 32px; }
  /* Textos que ficam direto sobre o fundo (não sobre cartões). */
  .profile-name, .profile-description, .btn-more, .story-title { text-shadow: var(--mb-on-bg-shadow); }

  /* ---------- Barra do dono (só para quem está logado) ---------- */
  .owner-bar {
    padding-top: env(safe-area-inset-top, 0px);
    background: var(--mb-surface);
    border-bottom: 1px solid var(--mb-line);
    color: var(--mb-text);
  }
  .owner-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 480px;
    margin: 0 auto;
    padding: 8px 20px;
  }
  .owner-bar-text {
    min-width: 0;
    overflow: hidden;
    color: var(--mb-muted);
    font-size: .8125rem;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .owner-bar-btn {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--mb-accent-tint);
    color: var(--mb-accent);
    font-size: .8125rem;
    font-weight: 600;
    transition: background-color .15s ease;
  }
  .owner-bar-btn svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.25;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  /* A barra já cuida da área do entalhe; a página não precisa somar de novo. */
  .owner-bar + .page { padding-top: 28px; }

  /* ---------- Perfil ---------- */
  .profile { text-align: center; }
  .profile-photo {
    width: 112px; height: 112px;
    margin: 0 auto 20px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--mb-accent-tint);
    /* Contorno com folga transparente: funciona sobre cor sólida e sobre degradê. */
    outline: 2px solid var(--mb-accent);
    outline-offset: 4px;
  }
  .profile-photo--placeholder {
    display: grid;
    place-items: center;
    color: var(--mb-accent);
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
  }
  .profile-name {
    margin: 0;
    font-size: 1.75rem;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-wrap: balance;
  }
  .profile-description {
    max-width: 34ch;
    margin: 10px auto 0;
    color: var(--mb-on-bg-muted);
    text-wrap: pretty;
  }

  .btn-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    padding: 4px 2px;
    border: 0;
    background: none;
    color: var(--mb-accent-on-bg);
    font-size: .875rem;
    font-weight: 600;
  }
  .btn-more svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .15s ease;
  }

  .about-image {
    width: 100%;
    border-radius: var(--mb-radius-sm);
    margin-bottom: 16px;
  }
  .about-text { color: var(--mb-text); text-wrap: pretty; }
  .about-text p { margin: 0 0 14px; }
  .about-text p:last-child { margin-bottom: 0; }

  /* ---------- Stories ---------- */
  .stories-track {
    display: flex;
    gap: 16px;
    margin: 0 -20px;
    padding: 4px 20px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .stories-track::-webkit-scrollbar { display: none; }
  .story {
    flex: 0 0 auto;
    width: 76px;
    padding: 0;
    border: 0;
    background: none;
    text-align: center;
    scroll-snap-align: start;
  }
  /* O anel é recortado por máscara: a folga entre anel e capa fica transparente,
     então combina com qualquer fundo (cor sólida ou degradê). */
  .story-ring {
    position: relative;
    display: block;
    width: 76px; height: 76px;
    padding: 6px;
    border-radius: 50%;
  }
  .story-ring::before {
    content: "";
    position: absolute; inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 210deg, var(--mb-accent), var(--mb-warm), var(--mb-accent));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  }
  .story-thumb {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%; height: 100%;
    border-radius: 50%;
    background: var(--g, var(--mb-accent-tint));
    background-size: cover;
    background-position: center;
    color: #fff;
  }
  .story-thumb svg { width: 18px; height: 18px; fill: currentColor; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
  .story-title {
    display: block;
    margin-top: 8px;
    font-size: 0.8125rem;
    line-height: 1.25;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .story.is-viewed .story-ring::before { background: var(--mb-bg-line); }

  /* Selo "Novo": pílula pequena sobre a base do anel, na cor de destaque. */
  .story-new {
    position: absolute; left: 50%; bottom: -5px; z-index: 1;
    transform: translateX(-50%);
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--mb-accent);
    color: var(--mb-accent-contrast);
    font-size: .625rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(20, 24, 43, .22);
    animation: story-new-in .4s ease-out .3s both;
  }
  .story.is-viewed .story-new { display: none; }
  @keyframes story-new-in { from { transform: translateX(-50%) scale(.8); } }

  /* ---------- Links ---------- */
  .links { display: grid; gap: 12px; }
  .link {
    display: grid;
    grid-template-columns: 56px 1fr 20px;
    align-items: center;
    gap: 14px;
    min-height: 72px;
    padding: 10px 16px 10px 10px;
    background: var(--mb-surface);
    border: 1px solid var(--mb-line);
    border-radius: var(--mb-radius);
    color: var(--mb-text);
    transition: background-color .15s ease, border-color .15s ease;
  }
  .link--no-image { grid-template-columns: 1fr 20px; padding: 10px 16px 10px 20px; }

  /* Link em formato de imagem (banner): a imagem ocupa a largura toda do card */
  .link--banner { display: block; min-height: 0; padding: 0; overflow: hidden; }
  .link-cover {
    width: 100%;
    height: auto; /* sem isto, o height="…" que o WordPress põe na <img> vence o aspect-ratio */
    aspect-ratio: 2 / 1; /* casa com o tamanho 'incluaweb-link-banner-2x1' (1200×600) */
    object-fit: cover;
    background: var(--mb-accent-tint);
  }
  .link-banner-body {
    display: grid;
    grid-template-columns: 1fr 20px;
    align-items: center;
    gap: 14px;
    padding: 14px 16px 14px 20px;
  }
  .link-thumb {
    width: 56px; height: 56px;
    border-radius: var(--mb-radius-sm);
    object-fit: cover;
    background: var(--mb-accent-tint);
  }
  .link-text { min-width: 0; }
  .link-title {
    display: block;
    font-weight: 600;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }
  .link-sub {
    display: block;
    margin-top: 2px;
    color: var(--mb-muted);
    font-size: 0.875rem;
    line-height: 1.3;
  }
  .link-icon { width: 18px; height: 18px; color: var(--mb-muted); transition: transform .15s ease, color .15s ease; }

  /* Link em destaque (opção no Personalizar) */
  .link--featured { background: var(--mb-accent); border-color: var(--mb-accent); color: var(--mb-accent-contrast); }
  .link--featured .link-sub, .link--featured .link-icon { color: color-mix(in srgb, var(--mb-accent-contrast) 78%, transparent); }

  /* ---------- Catálogo ---------- */
  /* minmax(0, 1fr): sem isso a grade cresce até caber a faixa inteira e estica a página */
  .catalog { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .cat-group { min-width: 0; }
  .cat-row-wrap { position: relative; }
  .cat-row-btn {
    position: absolute; top: 68px; z-index: 2; /* meio da foto (cartão de 136px) */
    display: grid; place-items: center;
    width: 38px; height: 38px; margin-top: -19px;
    border: 1px solid var(--mb-line); border-radius: 50%;
    background: var(--mb-surface); color: var(--mb-text);
    box-shadow: 0 2px 10px rgba(20, 24, 43, .2);
    transition: opacity .15s ease;
  }
  .cat-row-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
  .cat-row-btn--prev { left: -8px; }
  .cat-row-btn--next { right: -8px; }
  .cat-row-btn:disabled { opacity: 0; pointer-events: none; }
  /* No celular a faixa desliza com o dedo; as setas são para mouse */
  @media not ((hover: hover) and (pointer: fine)) { .cat-row-btn { display: none !important; } }
  .cat-group-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
  .cat-group-title { margin: 0; font-size: 1.125rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
  .cat-group-count { display: block; margin-top: 2px; color: var(--mb-on-bg-muted); font-size: .8125rem; }
  .cat-group-head h3, .cat-group-head span { text-shadow: var(--mb-on-bg-shadow); }
  .cat-group-all {
    flex: none; padding: 4px 0; border: 0; background: none;
    color: var(--mb-accent-on-bg); font-size: .875rem; font-weight: 700;
    text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px;
  }
  .cat-row {
    display: flex; gap: 12px;
    margin: 0 -20px; padding: 2px 20px 6px;
    list-style: none;
    overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: 20px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .cat-row::-webkit-scrollbar { display: none; }
  .cat-row > li { flex: 0 0 136px; scroll-snap-align: start; }

  .product-card {
    display: grid; gap: 6px; align-content: start;
    width: 100%; padding: 0; border: 0; background: none;
    color: var(--mb-on-bg); text-align: left;
  }
  .product-thumb {
    position: relative; display: block;
    aspect-ratio: 1; overflow: hidden;
    border-radius: 16px;
    background: var(--mb-surface);
    border: 1px solid var(--mb-line);
    transition: transform .15s ease;
  }
  .product-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .product-thumb-empty { display: grid; place-items: center; width: 100%; height: 100%; background: var(--mb-accent-tint); color: var(--mb-accent); font-size: 2rem; font-weight: 700; }
  .product-badge {
    position: absolute; left: 8px; top: 8px;
    padding: 2px 8px; border-radius: 999px;
    background: rgba(20, 24, 43, .82); color: #fff;
    font-size: .6875rem; font-weight: 700;
  }
  .product-name {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
    font-size: .875rem; font-weight: 600; line-height: 1.3;
  }
  .product-price { font-size: .875rem; font-weight: 700; color: var(--mb-accent-on-bg); }
  .product-price s { margin-left: 4px; color: var(--mb-on-bg-muted); font-weight: 500; font-size: .75rem; }

  /* Dentro dos painéis os cartões ficam sobre a cor dos cartões, não sobre o fundo da página */
  .sheet .product-card { color: var(--mb-text); }
  .sheet .product-price { color: var(--mb-accent); }
  .sheet .product-price s { color: var(--mb-muted); }
  .catalog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 12px; margin: 0; padding: 0; list-style: none; }

  /* Detalhe do produto */
  #product-sheet { z-index: 210; } /* abre por cima do "Ver todos" */
  .pd-category { color: var(--mb-muted); font-size: .875rem; font-weight: 600; }
  .pd-gallery { margin: -20px -20px 16px; }
  .pd-photos {
    display: flex; margin: 0; padding: 0; list-style: none;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  }
  .pd-photos::-webkit-scrollbar { display: none; }
  .pd-photos li { flex: 0 0 100%; scroll-snap-align: start; }
  .pd-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; background: color-mix(in srgb, var(--mb-text) 5%, var(--mb-surface)); }
  .pd-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
  .pd-dots:empty { display: none; }
  .pd-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--mb-line); transition: background-color .15s ease, transform .15s ease; }
  .pd-dots i.is-active { background: var(--mb-accent); transform: scale(1.2); }
  .pd-name { margin: 0; font-size: 1.375rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance; }
  .pd-price { margin: 6px 0 0; }
  .pd-now { font-size: 1.25rem; font-weight: 800; color: var(--mb-accent); }
  .pd-old { margin-left: 6px; color: var(--mb-muted); }
  .pd-old:empty { display: none; }
  .pd-soldout { display: inline-block; margin: 10px 0 0; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--mb-text) 8%, var(--mb-surface)); font-size: .875rem; font-weight: 600; }
  .pd-desc { margin: 14px 0 0; color: var(--mb-muted); white-space: pre-line; text-wrap: pretty; }
  .pd-actions { display: grid; gap: 10px; margin-top: 20px; }
  .pd-actions:not(:has(a:not([hidden]))) { display: none; }
  .pd-store, .pd-wa {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 50px; padding: 0 20px; border-radius: 999px;
    font-weight: 700; text-decoration: none;
  }
  .pd-store { background: var(--mb-accent); color: var(--mb-accent-contrast); }
  .pd-store svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
  .pd-wa { background: var(--mb-wa); color: #fff; }
  .pd-wa svg { width: 20px; height: 20px; fill: currentColor; }

  /* ---------- Redes sociais ---------- */
  .social { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
  .social a {
    display: grid; place-items: center;
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--mb-surface);
    border: 1px solid var(--mb-line);
    color: var(--mb-text);
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
  }
  .social svg { width: 20px; height: 20px; fill: currentColor; } /* logos oficiais, preenchidos */

  /* ---------- Endereço e horário ---------- */
  .info {
    padding: 4px 20px;
    background: var(--mb-surface);
    border: 1px solid var(--mb-line);
    border-radius: var(--mb-radius);
    color: var(--mb-text);
  }
  .info-row {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 14px;
    padding: 16px 0;
  }
  .info-row + .info-row { border-top: 1px solid var(--mb-line); }
  .info-icon {
    width: 20px; height: 20px;
    margin-top: 1px;
    fill: none; stroke: var(--mb-accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  }
  .info-body { min-width: 0; }
  .info-label {
    margin: 0 0 4px;
    color: var(--mb-muted);
    font-size: .8125rem;
    font-weight: 600;
  }
  .info-text { margin: 0; line-height: 1.4; overflow-wrap: anywhere; }
  .info-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    color: var(--mb-accent);
    font-size: .875rem;
    font-weight: 600;
  }
  .info-link svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s ease; }
  .info-hours { margin: 0; }
  .info-hours div { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }
  .info-hours dt { min-width: 0; }
  .info-hours dd { margin: 0; color: var(--mb-muted); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

  /* ---------- WhatsApp flutuante ---------- */
  .wa-float {
    position: fixed;
    right: calc(20px + env(safe-area-inset-right, 0px));
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    z-index: 50;
    display: grid; place-items: center;
    width: 60px; height: 60px;
    border-radius: 50%;
    background: var(--mb-wa);
    color: #fff;
    box-shadow: 0 6px 18px rgba(20, 24, 43, .28);
  }
  .wa-float svg { width: 32px; height: 32px; fill: currentColor; }
  .wa-float::after {
    content: "";
    position: absolute; inset: 0;
    border-radius: 50%;
    border: 2px solid var(--mb-wa);
    opacity: 0;
    animation: wa-pulse 2.4s ease-out 1.5s 3;
  }
  @keyframes wa-pulse {
    0%   { transform: scale(1);   opacity: .7; }
    100% { transform: scale(1.6); opacity: 0; }
  }

  /* ---------- Visualizador de stories ---------- */
  .viewer {
    position: fixed; inset: 0; z-index: 100;
    display: grid; place-items: center;
    background: rgba(8, 10, 20, .92);
  }
  .viewer-stage {
    position: relative;
    width: min(100vw, calc(100dvh * 9 / 16));
    height: min(100dvh, calc(100vw * 16 / 9));
    background: #000;
    overflow: hidden;
    color: #fff;
  }
  @media (min-width: 560px) { .viewer-stage { border-radius: 20px; } }
  .viewer-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .viewer-yt-wrap { position: absolute; inset: 0; overflow: hidden; }
  .viewer-yt {
    /* Janela um pouco maior e deslocada para cima: empurra a barra de título/canal (topo)
       e a marca do YouTube (rodapé) para fora da área visível, deixando só o vídeo à mostra
       — o YouTube não tem uma opção oficial para desligar isso. Se ainda sobrar alguma faixa
       em algum vídeo ou tamanho de tela, ajuste a altura e o deslocamento abaixo. */
    position: absolute;
    inset: 0;
    width: 100%;
    height: 130%;
    margin-top: -105px;
    overflow: hidden;
  }
  .viewer-yt iframe {
    display: block;
    width: 100%; height: 100%;
    border: 0;
    pointer-events: none; /* cosmético: quem recebe o toque é o viewer-yt-shield, logo abaixo */
  }
  .viewer-yt-shield { position: absolute; inset: 0; background: transparent; } /* recebe o toque; o iframe do YouTube não deixa o nosso JS ouvir cliques */
  .viewer-empty {
    position: absolute; inset: 0;
    display: grid; place-content: center; gap: 6px;
    padding: 32px; text-align: center;
    background: linear-gradient(160deg, #1d2450, #0b0e1f);
  }
  .viewer-empty p { margin: 0; }
  .viewer-empty p:first-child { font-size: 1.125rem; font-weight: 600; }
  .viewer-empty p:last-child { color: rgba(255,255,255,.7); font-size: .9375rem; }
  .viewer-top {
    position: absolute; top: 0; left: 0; right: 0; z-index: 3;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 12px 24px;
    background: linear-gradient(rgba(0,0,0,.55), transparent);
    pointer-events: none;
  }
  .viewer-progress { display: flex; gap: 4px; }
  .viewer-progress .bar { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.35); overflow: hidden; }
  .viewer-progress .bar i { display: block; width: 0; height: 100%; background: #fff; }
  .viewer-head { display: flex; align-items: center; gap: 4px; margin-top: 10px; }
  .viewer-title { flex: 1; min-width: 0; font-weight: 600; font-size: .9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .viewer-btn {
    pointer-events: auto;
    display: grid; place-items: center;
    width: 40px; height: 40px;
    border: 0; border-radius: 50%;
    background: transparent;
    color: #fff;
  }
  .viewer-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

  /* Badge "Toque para ativar o som", logo abaixo do botão de som, com a seta apontando para ele. */
  .viewer-mute { position: relative; display: grid; }
  .viewer-sound-hint {
    pointer-events: auto;
    position: absolute; top: calc(100% + 10px); right: -2px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff;
    color: #14182b;
    font-size: .8125rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
    cursor: pointer;
    animation: sound-hint-in .3s ease-out, sound-hint-nudge 1.6s ease-in-out .5s 2;
  }
  .viewer-sound-hint::before { /* seta: centralizada sob o botão de 40px */
    content: "";
    position: absolute; bottom: 100%; right: 16px;
    border: 6px solid transparent;
    border-bottom-color: #fff;
  }
  @keyframes sound-hint-in { from { opacity: 0; transform: translateY(-6px); } }
  @keyframes sound-hint-nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
  .viewer-nav { position: absolute; top: 0; bottom: 0; z-index: 2; border: 0; background: transparent; }
  .viewer-nav--prev { left: 0; width: 22%; }
  .viewer-nav--toggle { left: 22%; width: 56%; } /* toque rápido pausa/retoma; segurar também pausa enquanto pressionado */
  .viewer-nav--next { right: 0; width: 22%; }

  .viewer-bottom {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
    padding: 24px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(transparent, rgba(0,0,0,.6));
    pointer-events: none;
  }
  .viewer-wa {
    pointer-events: auto;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; min-height: 48px;
    border-radius: 999px;
    background: var(--mb-wa);
    color: #fff;
    font-weight: 600; font-size: .9375rem;
    text-decoration: none;
  }
  .viewer-wa svg { width: 20px; height: 20px; fill: currentColor; flex: none; }

  /* ---------- Portfólio: link, painel deslizante e galeria ---------- */
  button.link { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }

  .sheet {
    position: fixed; inset: 0; z-index: 200;
    visibility: hidden; pointer-events: none;
    transition: visibility 0s linear .32s;
  }
  .sheet.is-open { visibility: visible; pointer-events: auto; transition-delay: 0s; }
  .sheet-backdrop {
    position: absolute; inset: 0;
    background: rgba(8, 10, 20, .55);
    opacity: 0;
    transition: opacity .28s ease;
  }
  .sheet.is-open .sheet-backdrop { opacity: 1; }
  .sheet-panel {
    position: absolute; left: 0; right: 0; bottom: 0;
    width: 100%; max-width: 480px; max-height: 90dvh;
    margin: 0 auto;
    display: flex; flex-direction: column;
    background: var(--mb-surface);
    color: var(--mb-text);
    border-radius: 24px 24px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    transform: translateY(100%);
    transition: transform .32s cubic-bezier(.22, .8, .3, 1);
  }
  .sheet.is-open .sheet-panel { transform: translateY(0); }
  .sheet-panel.is-dragging { transition: none; }
  .sheet-head { padding: 10px 12px 4px 20px; touch-action: none; cursor: grab; }
  .sheet-grip { width: 40px; height: 4px; margin: 0 auto 10px; border-radius: 4px; background: var(--mb-line); }
  .sheet-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .sheet-title { margin: 0; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
  .sheet-close {
    display: grid; place-items: center;
    width: 40px; height: 40px;
    border: 0; border-radius: 50%;
    background: color-mix(in srgb, var(--mb-text) 7%, var(--mb-surface)); /* fica no painel (cartão), não no fundo */
    color: var(--mb-text);
  }
  .sheet-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 20px; }

  /* O carrossel de categorias continua de ponta a ponta (cancela o padding novo do sheet-body). */
  .cat-wrap { position: relative; margin: 0 -20px; }
  .cat-track {
    position: relative;
    display: flex; gap: 12px;
    padding: 4px 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 20px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .cat-track::-webkit-scrollbar { display: none; }
  .cat-item { flex: 0 0 min(68%, 260px); scroll-snap-align: start; }
  .cat {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    padding: 0;
    border: 0;
    border-radius: var(--mb-radius);
    overflow: hidden;
    background: var(--mb-accent-tint);
    color: #fff;
    text-align: left;
  }
  .cat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .cat-text {
    position: absolute; left: 0; right: 0; bottom: 0;
    display: block;
    padding: 44px 16px 16px;
    background: linear-gradient(transparent, rgba(8, 10, 20, .74));
  }
  .cat-title { display: block; font-size: 1.125rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
  .cat-count { display: block; margin-top: 2px; font-size: .875rem; color: rgba(255, 255, 255, .84); }

  .cat-dots { display: flex; justify-content: center; gap: 2px; margin-top: 12px; }
  .cat-dot { position: relative; width: 22px; height: 22px; padding: 0; border: 0; background: none; }
  .cat-dot::after {
    content: "";
    position: absolute; top: 50%; left: 50%;
    width: 8px; height: 8px; margin: -4px 0 0 -4px;
    border-radius: 50%;
    background: var(--mb-line);
    transition: background-color .15s ease, transform .15s ease;
  }
  .cat-dot.is-active::after { background: var(--mb-accent); transform: scale(1.25); }

  .cat-arrow {
    display: none;
    position: absolute; top: 50%; z-index: 2;
    width: 40px; height: 40px; margin-top: -20px;
    place-items: center;
    border: 0; border-radius: 50%;
    background: var(--mb-surface);
    color: var(--mb-text);
    box-shadow: 0 2px 10px rgba(20, 24, 43, .28);
  }
  .cat-arrow--prev { left: 8px; }
  .cat-arrow--next { right: 8px; }
  .cat-arrow:disabled { opacity: 0; pointer-events: none; }
  .cat-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  @media (hover: hover) and (pointer: fine) { .cat-arrow { display: grid; } }

  .lightbox {
    position: fixed; inset: 0; z-index: 300;
    display: grid; grid-template-rows: auto minmax(0, 1fr);
    background: rgba(6, 8, 16, .96);
    color: #fff;
    animation: lb-fade .18s ease-out;
  }
  @keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
  .lb-top {
    display: flex; align-items: center; gap: 12px;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px 20px;
  }
  .lb-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .lb-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .lb-count { font-size: .8125rem; color: rgba(255, 255, 255, .7); }
  .lb-btn {
    display: grid; place-items: center;
    width: 44px; height: 44px;
    border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
  }
  .lb-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .lb-stage {
    position: relative;
    display: grid; grid-template-rows: minmax(0, 1fr) auto;
    place-items: center;
    margin: 0;
    padding: 0 16px calc(16px + env(safe-area-inset-bottom, 0px));
    min-height: 0;
    touch-action: pan-y;
  }
  .lb-img {
    max-width: 100%; max-height: 100%;
    width: auto; height: auto;
    object-fit: contain;
    border-radius: 8px;
    user-select: none;
    -webkit-user-drag: none;
  }
  .lb-img.is-in { animation: lb-photo .2s ease-out; }
  @keyframes lb-photo { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }
  .lb-caption { max-width: 60ch; margin-top: 12px; font-size: .9375rem; text-align: center; color: rgba(255, 255, 255, .85); }
  .lb-nav { position: absolute; top: 50%; z-index: 2; margin-top: -22px; }
  .lb-nav--prev { left: 12px; }
  .lb-nav--next { right: 12px; }

  @media (prefers-reduced-motion: reduce) {
    .wa-float::after { animation: none; }
    .link, .link-icon, .social a { transition: none; }
    .sheet, .sheet-backdrop, .sheet-panel, .cat-dot::after { transition: none; }
    .lightbox, .lb-img.is-in { animation: none; }
    .viewer-sound-hint, .story-new { animation: none; }
    .product-thumb, .pd-dots i, .cat-row-btn { transition: none; }
    .cat-row { scroll-behavior: auto; }
  }

  /* Efeitos de hover só onde existe mouse: no celular o hover "gruda" depois do toque
     (ex.: o ícone da rede social ficava colorido até tocar em outro lugar). */
  @media (hover: hover) and (pointer: fine) {
    .owner-bar-btn:hover { background: color-mix(in srgb, var(--mb-accent) 20%, transparent); }
    .btn-more:hover svg { transform: translateX(2px); }
    .link:hover { background: var(--mb-accent-tint); border-color: var(--mb-accent); }
    .link:hover .link-icon { color: var(--mb-accent); transform: translate(2px, -2px); }
    .link--featured:hover { background: var(--mb-accent); filter: brightness(1.08); }
    .link--featured:hover .link-icon { color: var(--mb-accent-contrast); }
    .product-card:hover .product-thumb { transform: translateY(-2px); }
    .pd-store:hover, .pd-wa:hover { filter: brightness(1.06); }
    .social a:hover { background: var(--mb-accent); border-color: var(--mb-accent); color: var(--mb-accent-contrast); }
    .info-link:hover svg { transform: translateX(2px); }
    .viewer-btn:hover { background: rgba(255,255,255,.16); }
    .viewer-wa:hover { filter: brightness(1.06); }
    .link--portfolio:hover .link-icon { transform: translateY(-2px); }
    .sheet-close:hover { background: var(--mb-accent-tint); }
    .lb-btn:hover { background: rgba(255, 255, 255, .22); }
  }
