/* The shop's lithophane catalog (catalogo.js): the featured piece with a swipeable gallery, chips, cards, and a detail view.
   Tokens only (--wall --paper --tone --ink --muted --cobalt --r); no shadows, gradients or hairlines. Rounded cards as the platform's. */
.cat { max-width: 1240px; margin: 0 auto; padding: 18px 16px 8px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.cat *, .cat-mais * { min-width: 0; }
@media (min-width: 900px) { .cat { padding: 28px 32px 12px; gap: 28px; } }
.cat { scroll-margin-top: 132px; }
.cat-topo { display: grid; gap: 6px; }
.cat[data-vista="detalhe"] .cat-topo { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cat-t { margin: 0; font-size: clamp(32px, 4.4vw, 44px); line-height: 1.08; font-weight: 600; letter-spacing: -.015em; }
.cat-lead { margin: 0; font-size: var(--t-body); line-height: 1.45; color: var(--muted); max-width: 60ch; }

/* a place held for the featured piece and the cards, so nothing jumps when the data arrives */
.cat-vista { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; min-height: 940px; align-content: start; }
@media (min-width: 900px) { .cat-vista { min-height: 880px; gap: 28px; } }
.cat.pronto .cat-vista { min-height: 0; }
.cat-vista[hidden], .cat-detalhe[hidden] { display: none; }
.cat.sem .cat-vista { min-height: 0; }

/* ---- the gallery ---- */
.gal { position: relative; border-radius: var(--r); overflow: hidden; background: var(--paper); }
.gal-fila { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; }
.gal-fila::-webkit-scrollbar { display: none; }
.gal-fila:focus-visible { outline: 3px solid var(--cobalt); outline-offset: -3px; }
.gal-slide { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; aspect-ratio: 1; }
.gal-slide picture, .gal-slide img { display: block; width: 100%; height: 100%; }
.gal-slide img { object-fit: cover; -webkit-user-drag: none; }
.gal-n { position: absolute; left: 12px; bottom: 12px; min-height: 32px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 999px; background: var(--paper); color: var(--ink); font-size: var(--t-small); font-weight: 600; font-variant-numeric: tabular-nums; pointer-events: none; }
.gal-seta { position: absolute; top: 50%; width: 48px; height: 48px; margin-top: -24px; border: 0; border-radius: 50%; background: var(--paper); color: var(--ink); display: none; align-items: center; justify-content: center; cursor: pointer; }
.gal-ant { left: 12px; } .gal-seg { right: 12px; }
@media (hover: hover) and (pointer: fine) {
  .gal-seta { display: inline-flex; opacity: 0; }
  .gal:hover .gal-seta, .gal:focus-within .gal-seta { opacity: 1; }
  .gal-seta:hover { background: var(--tone); }
}
.gal-seta:focus-visible { opacity: 1; outline: 3px solid var(--cobalt); outline-offset: 2px; }
.gal-mini { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; padding: 3px; }
.gal-mini::-webkit-scrollbar { display: none; }
.gal-t { flex: 0 0 64px; width: 64px; height: 64px; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--paper); cursor: pointer; opacity: .62; }
.gal-t picture, .gal-t img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gal-t[aria-current="true"] { opacity: 1; outline: 3px solid var(--cobalt); outline-offset: 0; }
.gal-t:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; opacity: 1; }
@media (hover: hover) and (pointer: fine) { .gal-t:hover { opacity: 1; } }

/* ---- the featured piece ---- */
.cat-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.cat-hero-txt { display: grid; gap: 8px; align-content: start; }
.cat-hero-n { margin: 0; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.08; font-weight: 600; letter-spacing: -.015em; }
.cat-hero-d { margin: 0; font-size: var(--t-lead); line-height: 1.35; max-width: 34ch; }
.cat-meta { margin: 0; font-size: var(--t-body); color: var(--muted); }
.cat-preco { margin: 4px 0 0; font-size: var(--t-lead); font-weight: 600; color: var(--cobalt); line-height: 1.2; }
.cat-preco b, .pc-preco b { font-weight: 600; }
.cat-fmt { font-size: var(--t-small); font-weight: 400; color: var(--muted); }
.pd-nota { margin: 0; font-size: var(--t-small); line-height: 1.5; color: var(--muted); max-width: 46ch; }
.cat-bts { display: grid; gap: 10px; margin-top: 8px; }
.cat-bts .btn { width: 100%; justify-content: center; text-align: center; }
@media (min-width: 900px) {
  .cat-hero { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 36px; align-items: center; }
  .cat-hero-gal { width: 100%; max-width: calc(100vh - 190px); }
  .cat-hero-txt { gap: 12px; }
  .cat-bts { grid-template-columns: repeat(2, auto); justify-content: start; }
  .cat-bts .btn { width: auto; }
}

/* ---- the collection chips: the shell's .sh-chips (YouTube-style, held under the bar), full-bleed inside the page's padding ---- */
.cat .sh-chips { margin: 0 -16px; padding-inline: 16px; min-height: 60px; align-items: center; }
@media (min-width: 900px) { .cat .sh-chips { margin: 0 -32px; padding-inline: 32px; } }
.cat-aviso { margin: -6px 0 0; display: flex; align-items: center; gap: 10px; font-size: var(--t-small); line-height: 1.4; color: var(--muted); }
.cat-aviso[hidden] { display: none; }
.cat-aviso::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--cobalt); }

/* ---- the cards ---- */
.cat-grelha { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .cat-grelha { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1100px) { .cat-grelha { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pc { position: relative; display: grid; grid-template-rows: auto 1fr; background: var(--paper); border-radius: var(--r); overflow: hidden; }
.pc-media { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: var(--paper); color: inherit; -webkit-tap-highlight-color: transparent; }
.pc-media picture, .pc-media img { display: block; width: 100%; height: 100%; }
.pc-media img { object-fit: cover; }
.pc-luzimg { position: absolute; inset: 0; opacity: 0; }
@media (prefers-reduced-motion: no-preference) { .pc-luzimg { transition: opacity .25s ease; } }
.pc-media[data-luz="on"] .pc-luzimg { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .pc-media:hover .pc-luzimg { opacity: 1; } }
.pc-media:focus-visible { outline: 3px solid var(--cobalt); outline-offset: -3px; }
.pc-luz { position: absolute; right: 12px; top: 12px; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--paper); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.pc-luz[aria-pressed="true"] { background: var(--ink); color: var(--wall); }
.pc-luz:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.pc-txt { display: grid; gap: 4px; align-content: start; padding: 14px 16px 16px; }
.pc-n { margin: 0; font-size: var(--t-lead); font-weight: 600; line-height: 1.2; }
.pc-n a { color: var(--ink); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .pc-n a:hover { color: var(--cobalt); text-decoration: underline; text-underline-offset: 5px; } }
.pc-n a:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }
.pc-meta { margin: 0; font-size: var(--t-small); line-height: 1.4; color: var(--muted); }
.pc-preco { margin: 2px 0 0; font-size: var(--t-body); font-weight: 600; color: var(--cobalt); }
.pc-bt { width: 100%; justify-content: center; text-align: center; margin-top: 10px; }
.pc-embreve, .pd-bt[disabled] { cursor: default; opacity: .72; }
.cat-vazio { grid-column: 1 / -1; padding: 20px 4px; color: var(--muted); font-size: var(--t-body); }

/* ---- the detail view ---- */
.cat-detalhe { display: grid; grid-template-columns: minmax(0, 1fr); }
.pd { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.pd-volta { justify-self: start; min-height: 48px; padding: 0 18px 0 12px; gap: 6px; }
.pd-topo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.pd-info { display: grid; gap: 10px; align-content: start; }
.pd-n { margin: 0; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.08; font-weight: 600; letter-spacing: -.015em; }
.pd-n:focus { outline: none; }
.pd-d { margin: 0; font-size: var(--t-body); line-height: 1.5; max-width: 46ch; }
.pd-bt { width: 100%; justify-content: center; text-align: center; margin-top: 6px; }
@media (min-width: 900px) {
  .pd-topo { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 36px; align-items: start; }
  .pd-bt { width: auto; justify-self: start; }
}
.pd-sec { display: grid; gap: 12px; background: var(--paper); border-radius: var(--r); padding: 18px 18px 20px; }
.pd-sec h3 { margin: 0; font-size: var(--t-lead); font-weight: 600; line-height: 1.2; }
.pd-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pd-lista li { position: relative; padding-left: 26px; font-size: var(--t-body); line-height: 1.45; }
.pd-lista li::before { content: ""; position: absolute; left: 4px; top: .6em; width: 10px; height: 10px; border-radius: 50%; background: var(--cobalt); }
.pd-medidas { margin: 0; display: grid; gap: 12px; }
.pd-m { display: grid; gap: 2px; }
.pd-m dt { font-size: var(--t-small); color: var(--muted); }
.pd-m dd { margin: 0; font-size: var(--t-body); font-weight: 600; line-height: 1.35; }
.pd-passos { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.pd-passos li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start; }
.pd-num { width: 44px; height: 44px; border-radius: 50%; background: var(--tone); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: var(--t-body); font-weight: 600; }
.pd-passos h4 { margin: 0 0 2px; font-size: var(--t-body); font-weight: 600; line-height: 1.3; }
.pd-passos p { margin: 0; font-size: var(--t-small); line-height: 1.5; color: var(--muted); max-width: 44ch; }
@media (min-width: 900px) {
  .pd-fundo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .pd-sec { padding: 22px 24px 24px; }
}

/* the rest of the shop: the earlier cards, under the catalog */
.cat-mais-t { margin: 0 0 12px; font-size: var(--t-lead); font-weight: 600; line-height: 1.2; }
.cat-mais { max-width: 1240px; margin: 0 auto; padding: 8px 16px 20px; }
@media (min-width: 900px) { .cat-mais { padding: 12px 32px 28px; } }
/* the older cards under the catalog: rounded like the platform's, not a grout grid */
.cat-mais .cat-vista, .cat-mais .cat-lista { background: none; padding: 0; gap: 16px; }
.cat-mais .cat-lista li { border-radius: var(--r); overflow: hidden; background: var(--paper); }
@media (min-width: 900px) { .cat-mais .cat-lista { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
/* the shell paints every .on in the LIVE red (shell.css); the order form's selected options are not a live badge */
html.sh .opcao.on { color: var(--paper) !important; }
/* the collections draw the older cards too, so the separate strip under the catalog steps aside (it stays as the fallback if the catalog does not load) */
.cat.pronto + .cat-mais { display: none; }
.cat-ajuda { margin: 4px 0 0; font-size: var(--t-small); color: var(--muted); }
.cat-ajuda a { color: var(--muted); text-decoration: underline; text-underline-offset: 4px; padding: 10px 0; }
