/* Página de produto: fotografias primeiro; nome, configuração, ficha confirmada, nota curta e contato. */
.breadcrumb { display: flex; align-items: center; gap: 10px; padding-block: 20px; font-size: 12px; color: var(--text-secondary); }
.breadcrumb a { text-decoration: none; padding-block: 12px; }
.breadcrumb a:hover { color: var(--text); }
.product { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }

/* Galeria */
.gallery { min-width: 0; }
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; background: var(--surface-photo); }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide { flex: 0 0 100%; min-width: 0; aspect-ratio: 4 / 5; scroll-snap-align: start; scroll-snap-stop: always; position: relative; }
.gallery-open { display: block; width: 100%; height: 100%; position: relative; }
.gallery-slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery-open:focus-visible { outline-offset: -6px; }
.expand-mark { position: absolute; right: 12px; bottom: 12px; display: grid; place-items: center; width: 44px; height: 44px; background: rgb(23 22 21 / .72); color: var(--text); }
.gallery-caption { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; font: 11px/1.5 var(--mono); color: var(--text-technical); }
.gallery-controls { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.icon-button { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; background: transparent; color: var(--text); border: 0; padding: 8px; touch-action: manipulation; }
.icon-button:disabled { opacity: .3; cursor: default; }
.reverse { rotate: 180deg; }
.gallery-thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumbs a { flex: 0 0 64px; padding-bottom: 6px; border-bottom: 1px solid transparent; }
.gallery-thumbs a[aria-current="true"] { border-color: var(--text); }
.gallery-thumbs img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; opacity: .72; transition: opacity var(--motion-ui) var(--ease-out); }
.gallery-thumbs a[aria-current="true"] img { opacity: 1; }
.asset-note { margin-top: 16px; font-size: 12px; line-height: 1.6; color: var(--text-technical); }
.gallery-empty { aspect-ratio: 4 / 5; background: var(--packshot); display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; padding: 24px; }
.gallery-empty__brand { font: italic 400 clamp(36px, 4vw, 52px)/1.05 var(--display); color: var(--text-secondary); }
.gallery-empty__note { font: var(--text-xs)/1.5 var(--mono); letter-spacing: .02em; color: var(--text-technical); }

/* Informações */
.product-info { padding-top: 8px; }
.product-info h1 { font-size: clamp(2.75rem, 4.6vw, 4.5rem); line-height: 1; letter-spacing: -.025em; }
.product-config { margin-top: 16px; font: var(--text-sm)/1.6 var(--mono); color: var(--text-technical); }
.facts { margin-top: 36px; border-top: var(--line); }
.facts > div { display: flex; justify-content: space-between; gap: 24px; padding-block: 14px; border-bottom: var(--line); font-size: var(--text-sm); }
.facts dt { color: var(--text-technical); }
.facts dd { margin: 0; text-align: right; }
.facts-pending { margin-top: 12px; font-size: 12px; line-height: 1.6; color: var(--text-technical); }
.product-note { margin-top: 32px; color: var(--text-secondary); line-height: 1.7; max-width: 44ch; }
.product-cta { margin-top: 36px; width: 100%; justify-content: space-between; min-height: 56px; padding-inline: 20px; }

/* Diálogos nativos: foco contido, Esc e fundo inerte. */
.product-page dialog { color: var(--text); background: var(--background); border: var(--line); padding: 0; }
.product-page dialog::backdrop { background: rgb(0 0 0 / .85); }
body:has(dialog[open]) { overflow: hidden; }
.photo-dialog { width: min(1280px, calc(100% - 48px)); height: calc(100dvh - 48px); max-height: none; max-width: none; }
.photo-dialog[open] { display: flex; flex-direction: column; }
.photo-toolbar, .photo-bottom { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; gap: 12px; flex: 0 0 auto; font: 12px/1.5 var(--mono); }
.photo-toolbar > div { display: flex; gap: 12px; }
.photo-toolbar { border-bottom: var(--line); }
.photo-canvas { flex: 1; min-height: 0; overflow: auto; background: var(--surface-photo); overscroll-behavior: contain; }
.photo-canvas img { width: 100%; height: 100%; object-fit: contain; }
.photo-canvas.is-zoomed img { width: max(100%, 1289px); height: auto; max-width: none; }
.photo-bottom { border-top: var(--line); text-align: center; }
.contact-dialog { width: min(520px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 48px 32px 28px !important; }
.dialog-close { position: absolute; right: 8px; top: 8px; }
.contact-dialog h2 { font-size: 36px; margin-bottom: 12px; }
.contact-dialog > p { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }
.contact-dialog label { display: block; font-size: 12px; margin-block: 24px 8px; color: var(--text-technical); }
.contact-dialog textarea { width: 100%; resize: vertical; color: var(--text); background: var(--surface); border: 1px solid var(--control-border); padding: 16px; font: 16px/1.5 var(--body); }
.contact-dialog .button { margin-top: 16px; }
.field-status { min-height: 24px; margin-top: 8px; font-size: var(--text-sm); color: var(--success); }
@media (hover: hover) and (pointer: fine) {
  .icon-button:not(:disabled):hover { background: var(--surface-warm); }
  .gallery-thumbs a:hover img { opacity: 1; }
}
@media (max-width: 860px) {
  .product { grid-template-columns: 1fr; gap: 32px; }
  .product-info { padding-top: 0; }
  .product-info h1 { font-size: clamp(2.5rem, 11vw, 3.5rem); }
  .facts { margin-top: 28px; }
}
@media (max-width: 700px) {
  .breadcrumb { padding-block: 8px; }
  .gallery-thumbs a { flex-basis: 56px; }
  .photo-dialog { width: 100%; height: 100dvh; margin: 0; }
  .photo-toolbar { padding-top: max(8px, env(safe-area-inset-top)); }
  .photo-bottom { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .contact-dialog { padding: 44px 20px 24px !important; }
}
