/* /shop/product_types — passo 1 "Style" do fluxo de compra (redesign do storefront).
   Escopo só desta página: tudo pendurado em .pt-page / .pt-qv.
   Tokens usam --bs-* quando existem (com fallback) pra encaixar quando o tema global novo chegar.
   Laranja só como preenchimento com texto escuro; como texto usa --pt-orange-ink. */
.pt-page, .pt-qv {
  --pt-bg: #F6F4F0;
  --pt-surface: #fff;
  --pt-line: #E4E0D9;
  --pt-line-2: #CFC9BF;
  --pt-ink: #23282D;
  --pt-muted: #5B636A;
  --pt-dark: var(--bs-dark, #21252A);
  --pt-slate: var(--bs-secondary, #273F4F);
  --pt-orange: var(--bs-primary, #FE7743);
  --pt-orange-ink: #B4461B;
  --pt-chip: #F1EEE8;
  --pt-ph: #ECE8E1;
  --pt-f-display: Archivo, "Helvetica Neue", Arial, sans-serif;
  --pt-f-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --pt-f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --pt-r: 6px;
  font-family: var(--pt-f-body);
  color: var(--pt-ink);
}
.pt-page { background: var(--pt-bg); font-size: 15px; line-height: 1.5; }
.pt-page :focus-visible, .pt-qv :focus-visible { outline: 2px solid var(--pt-slate); outline-offset: 2px; }

/* ---------- stepper ---------- */
.pt-stepper { background: var(--pt-surface); border-bottom: 1px solid var(--pt-line); }
.pt-stepper__in { max-width: 1320px; margin: 0 auto; height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 32px; font-size: 14px; }
.pt-step { display: flex; align-items: center; gap: 10px; color: var(--pt-muted); white-space: nowrap; }
.pt-step b { width: 24px; height: 24px; border-radius: 50%; border: 1px solid #A9A39A; display: grid; place-items: center; font: 500 12px var(--pt-f-mono); }
.pt-step.is-on { color: var(--pt-dark); font-weight: 600; }
.pt-step.is-on b { background: var(--pt-orange); border-color: var(--pt-orange); color: var(--pt-dark); font-weight: 600; }
.pt-step__rule { width: 40px; height: 1px; background: var(--pt-line-2); }
.pt-stepbar { display: none; }

/* ---------- cabeçalho da página ---------- */
.pt-main { max-width: 1320px; margin: 0 auto; padding: 48px 32px 56px; display: flex; flex-direction: column; gap: 32px; }
.pt-lead { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.pt-lead h1 { margin: 0; font-family: var(--pt-f-display); font-weight: 800; font-size: 44px; letter-spacing: -.02em; line-height: 1.05; color: var(--pt-ink); }
.pt-lead p { margin: 8px 0 0; font-size: 17px; color: var(--pt-muted); max-width: 56ch; }
.pt-hint { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--pt-muted); }

.pt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }

/* ---------- card ---------- */
.pt-card { position: relative; display: flex; flex-direction: column; height: 100%; background: var(--pt-surface); border: 1px solid var(--pt-line); border-radius: var(--pt-r); overflow: hidden; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.pt-card:hover { transform: translateY(-3px); box-shadow: 0 14px 28px -16px rgba(27, 31, 36, .45); border-color: var(--pt-line-2); }
.pt-media { position: relative; z-index: 2; cursor: pointer; aspect-ratio: 4 / 3; max-width: 100%; background: var(--pt-ph); }
.pt-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.pt-track::-webkit-scrollbar { display: none; }
.pt-track__rep { display: contents; }
.pt-photo { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; display: block; }
.pt-photo:not([src]), .pt-photo[src=""], .pt-photo.is-broken { display: none; }
.pt-count { position: absolute; z-index: 2; top: 10px; right: 10px; display: flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 4px; background: rgba(27, 31, 36, .72); color: #fff; font: 500 12px var(--pt-f-mono); pointer-events: none; }
.pt-nav { position: absolute; z-index: 2; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: var(--pt-dark); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .15s; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.pt-nav--prev { left: 10px; }
.pt-nav--next { right: 10px; }
.pt-card:hover .pt-nav, .pt-nav:focus-visible { opacity: 1; }
.pt-nav:hover { background: #fff; }
.pt-dots { position: absolute; z-index: 2; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 2px; }
.pt-dots button { width: 22px; height: 22px; border: 0; padding: 0; background: transparent; display: grid; place-items: center; cursor: pointer; }
.pt-dots button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .6); box-shadow: 0 0 0 1px rgba(27, 31, 36, .25); transition: width .2s, background .2s; }
.pt-dots button.is-on::before { width: 18px; border-radius: 4px; background: #fff; }
/* Controles só com 2+ fotos; placeholder só sem foto válida (classes setadas pelo product_types.js) */
.pt-media:not(.is-multi) :is(.pt-count, .pt-nav, .pt-dots) { display: none; }
.pt-ph { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--pt-muted); background-color: var(--pt-ph); background-image: repeating-linear-gradient(135deg, transparent 0 10px, rgba(91, 99, 106, .06) 10px 11px); }
.pt-ph span { font: 500 12px var(--pt-f-mono); letter-spacing: .06em; text-transform: uppercase; }
.pt-media.is-empty .pt-ph { display: flex; }
.pt-body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 14px; border-top: 3px solid var(--pt-orange); flex: 1; }
.pt-name { margin: 0; font-family: var(--pt-f-display); font-weight: 700; font-size: 22px; line-height: 1.2; color: var(--pt-ink); }
.pt-link { color: inherit; text-decoration: none; }
.pt-link:hover { color: inherit; }
.pt-link::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* o card inteiro é o link */
.pt-desc { margin: 0; color: var(--pt-muted); font-size: 14px; }
.pt-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; padding-top: 8px; min-height: 44px; }
.pt-cta { display: flex; align-items: center; gap: 8px; color: var(--pt-orange-ink); font-weight: 600; font-size: 15px; }
.pt-cta i { transition: transform .18s; }
.pt-card:hover .pt-cta i { transform: translateX(3px); }
.pt-photos { position: relative; z-index: 2; display: none; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border: 1px solid var(--pt-line-2); border-radius: var(--pt-r); background: var(--pt-surface); color: var(--pt-ink); font: 500 13px var(--pt-f-body); cursor: pointer; }
.pt-photos:hover { border-color: var(--pt-ink); }
.pt-card.is-multi .pt-photos { display: flex; }

.pt-resume { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border: 1px dashed #BDB6AB; border-radius: var(--pt-r); font-size: 15px; color: #4A5157; }
.pt-resume a { display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--pt-orange-ink); font-weight: 600; text-decoration: none; }
.pt-resume a:hover { text-decoration: underline; }

/* ---------- skeleton ---------- */
.pt-sk { background: var(--pt-surface); border: 1px solid var(--pt-line); border-radius: var(--pt-r); overflow: hidden; }
.pt-sk__m { aspect-ratio: 4 / 3; }
.pt-sk__b { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; border-top: 3px solid var(--pt-line); }
.pt-sk__l { height: 14px; width: 40%; border-radius: 3px; }
.pt-sk__l--title { height: 20px; width: 70%; }
.pt-shim { background: linear-gradient(90deg, #EEEAE3 25%, #F6F3EE 50%, #EEEAE3 75%); background-size: 200% 100%; animation: pt-shim 1.2s linear infinite; }
@keyframes pt-shim { to { background-position: -200% 0; } }

/* ---------- tablet / mobile ---------- */
@media (min-width: 601px) and (max-width: 900px) {
  .pt-step:not(.is-on) span { display: none; }
  .pt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .pt-stepper { display: none; }
  .pt-stepbar { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; background: var(--pt-surface); border-bottom: 1px solid var(--pt-line); }
  .pt-stepbar__t { display: flex; justify-content: space-between; font-size: 13px; }
  .pt-stepbar__t span { font-family: var(--pt-f-mono); color: var(--pt-muted); }
  .pt-stepbar__bars { display: flex; gap: 4px; }
  .pt-stepbar__bars i { flex: 1; height: 4px; border-radius: 2px; background: var(--pt-line); }
  .pt-stepbar__bars i.is-on { background: var(--pt-orange); }
  .pt-main { padding: 24px 16px 32px; gap: 20px; }
  .pt-lead h1 { font-size: 30px; }
  .pt-lead p { font-size: 15px; }
  .pt-hint { display: none; }
  .pt-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .pt-card:hover { transform: none; }
  .pt-name { font-size: 20px; }
  .pt-body { padding: 14px 16px 10px; }
}
@media (hover: none) { .pt-nav { display: none; } } /* touch: swipe + dots */

/* ---------- quick view (modal + partials/shop/image_viewer) ---------- */
.pt-qv .modal-content { position: relative; border: 0; border-radius: 10px; overflow: hidden; background: var(--pt-surface); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); }
.pt-qv__in { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.pt-qv__gal { position: relative; background: var(--pt-dark); padding: 16px; min-width: 0; }
.pt-qv__count { position: absolute; z-index: 2; top: 26px; left: 26px; padding: 3px 8px; border-radius: 4px; background: rgba(27, 31, 36, .72); color: #fff; font: 500 12px var(--pt-f-mono); pointer-events: none; }
.pt-qv__x { position: absolute; top: 10px; right: 10px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .95); color: var(--pt-dark); display: grid; place-items: center; cursor: pointer; }
.pt-qv__info { padding: 28px 28px 24px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pt-qv__eyebrow { font: 500 12px var(--pt-f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--pt-muted); }
.pt-qv__info h2 { margin: 0; font-family: var(--pt-f-display); font-weight: 800; font-size: 30px; letter-spacing: -.01em; line-height: 1.1; color: var(--pt-ink); padding-right: 36px; }
.pt-qv__info p { margin: 0; color: var(--pt-muted); }
.pt-qv__next { margin: 4px 0 0; padding: 14px 16px; background: var(--pt-chip); border-radius: var(--pt-r); font-size: 14px; color: #3F454B; }
.pt-qv__next ol { margin: 6px 0 0; padding-left: 18px; }
.pt-qv__act { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 12px; }
.pt-btn-go { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; border: 0; border-radius: var(--pt-r); background: var(--pt-orange); color: var(--pt-dark); font: 600 16px var(--pt-f-body); text-decoration: none; }
.pt-btn-go:hover { background: #F4692F; color: var(--pt-dark); }
.pt-btn-ghost { min-height: 44px; border: 1px solid var(--pt-line-2); border-radius: var(--pt-r); background: var(--pt-surface); color: var(--pt-ink); font: 500 15px var(--pt-f-body); cursor: pointer; }
.pt-btn-ghost:hover { border-color: var(--pt-ink); }

/* Viewer: mesma base do bloco .img-viewer / .img-thumbs do order.css (copiado aqui pra não carregar o order.css),
   adaptado pro painel escuro do quick view. */
.pt-qv .img-viewer { display: flex; flex-direction: column; gap: 10px; max-width: 100%; }
.pt-qv .img-viewer__main { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 4px; overflow: hidden; background: #111; }
.pt-qv .img-viewer__open { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.pt-qv .pt-qv__img { display: block; width: 100%; height: 100%; object-fit: contain; }
.pt-qv .img-viewer__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; color: var(--pt-dark); background: rgba(255, 255, 255, .92); box-shadow: 0 2px 8px rgba(0, 0, 0, .18); cursor: pointer; }
.pt-qv .img-viewer__nav:hover { background: #fff; }
.pt-qv .img-viewer__nav--prev { left: 10px; }
.pt-qv .img-viewer__nav--next { right: 10px; }
.pt-qv .img-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 2px; margin: 0; }
.pt-qv .img-thumbs__rep { display: contents; }
.pt-qv .img-thumbs__item { flex: 0 0 72px; width: 72px; height: 54px; padding: 0; border: 2px solid transparent; border-radius: 4px; overflow: hidden; background: none; cursor: pointer; opacity: .55; transition: opacity .15s; }
.pt-qv .img-thumbs__item:hover { opacity: .9; }
.pt-qv .img-thumbs__item.is-active { opacity: 1; border-color: var(--pt-orange); }
.pt-qv .img-thumbs__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 767.98px) {
  .pt-qv .modal-content { border-radius: 0; }
  .pt-qv__in { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 100%; }
  .pt-qv__gal { padding: 0 0 10px; }
  .pt-qv__count { top: 10px; left: 10px; }
  .pt-qv .img-viewer__main { border-radius: 0; }
  .pt-qv .img-thumbs { padding: 2px 12px; }
  .pt-qv__info { padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px)); }
  .pt-qv__info h2 { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .pt-page *, .pt-page *::before, .pt-qv * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
