/* Ventanas */
dialog { border: 0; padding: 0; margin: 0; background: transparent; max-width: none; max-height: none; width: 100vw; height: 100dvh; color: var(--ink); overflow: hidden; }
dialog[open] { display: flex; align-items: flex-end; justify-content: center; }
dialog::backdrop { background: rgba(4, 9, 24, 0.62); opacity: 0; transition: opacity 200ms ease-out; }
dialog.in::backdrop { opacity: 1; }
.sheet { position: relative; width: 100%; max-height: 94dvh; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); border-radius: 24px 24px 0 0; padding: 16px 16px calc(20px + env(safe-area-inset-bottom, 0px)); box-shadow: var(--sh-2); transform: translateY(28px); opacity: 0; transition-property: transform, opacity; transition-duration: 240ms; transition-timing-function: var(--ease-out); }
dialog.in .sheet { transform: none; opacity: 1; }
dialog.closing .sheet { transition-duration: 180ms; }
.x { position: absolute; top: 10px; right: 10px; width: 48px; height: 48px; border: 0; border-radius: 24px; background: var(--surface); box-shadow: var(--sh-1); display: grid; place-items: center; z-index: 3; transition-property: scale; transition-duration: 140ms; }
.x:active { scale: 0.95; }
.x svg { width: 20px; height: 20px; }
@media (min-width: 760px) {
  #detail[open] { align-items: center; }
  #detail .sheet { width: min(940px, 92vw); border-radius: 24px; padding: 24px; }
  #offer[open] { align-items: center; }
  #offer .sheet { width: min(460px, 92vw); border-radius: 24px; padding: 24px; }
  #orders[open] { align-items: center; }
  #orders .sheet { width: min(520px, 92vw); border-radius: 24px; padding: 24px; }
  #cart[open] { justify-content: flex-end; align-items: stretch; }
  #cart .sheet { width: min(460px, 100vw); max-height: none; height: 100dvh; border-radius: 24px 0 0 24px; transform: translateX(28px); }
  #cart.in .sheet { transform: none; }
}

/* Detalle */
.det { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@media (min-width: 760px) { .det { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; } }
.gal { position: relative; border-radius: 16px; overflow: hidden; background: var(--chip); }
.gal::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--outline); pointer-events: none; }
.track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.track::-webkit-scrollbar { display: none; }
.track img { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 3 / 4; object-fit: cover; width: 100%; height: auto; }
.gnav { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; align-items: center; justify-content: center; gap: 10px; z-index: 2; pointer-events: none; }
.gnav button, .gnav .gcount { pointer-events: auto; height: 44px; min-width: 44px; border: 0; border-radius: 22px; background: var(--surface); box-shadow: var(--sh-1); display: grid; place-items: center; padding: 0 14px; font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.gnav button { padding: 0; }
.gnav button:active { scale: 0.95; }
.gnav svg { width: 18px; height: 18px; }
.det h2 { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1; padding-right: 56px; text-wrap: balance; }
.det .pteam { font-size: 16px; margin-top: 6px; }
.det .price { font-size: 30px; margin-top: 14px; }
.facts { margin: 16px 0; display: grid; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; box-shadow: inset 0 -1px 0 var(--outline); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
.det .desc { color: var(--muted); text-wrap: pretty; margin-bottom: 18px; }
.det .stack { display: grid; gap: 10px; }

/* Aviso de cookies (solo aparece si la tienda tiene Google Analytics) */
.consent { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 40; max-width: 640px; margin: 0 auto; padding: 16px; border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 12px 32px rgba(0, 0, 0, 0.45); display: grid; gap: 12px; }
.consent p { font-size: 15px; line-height: 1.45; }
.consent-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.consent-more { display: inline-flex; align-items: center; min-height: 48px; padding: 0 4px; color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.consent-btns button { flex: 1 1 140px; min-height: 48px; border: 1.5px solid var(--btn); border-radius: 12px; background: transparent; color: var(--btn); font-weight: 700; }
