/* Layout: phone first. The photo slider is the page; everything else stays quiet. Look = Pack Estadio covers. */
:root {
  --bg: #0a0b0e; --panel: #14161b; --line: #2a2d35; --text: #f5f3ec; --muted: #a9abb3; --yellow: #ffd20a; --ink: #101010; --bad: #ff8a7a;
  --display: "Archivo", "Arial Black", sans-serif; --body: "Inter", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--text); font: 16px/1.5 var(--body); -webkit-text-size-adjust: 100%; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.wrap { max-width: 1080px; margin: 0 auto; padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right)); }
.top { display: flex; justify-content: space-between; align-items: center; padding-block: 16px; }
.brand { font: 900 18px/1 var(--display); font-stretch: 125%; text-decoration: none; }
.top a:last-child:not(.brand) { color: var(--muted); font-size: 14px; }
h1, h2 { font-family: var(--display); font-stretch: 118%; font-weight: 900; line-height: 1.04; text-wrap: balance; }
h1 { font-size: clamp(32px, 8vw, 52px); }
h2 { font-size: 22px; }
.muted { color: var(--muted); }
.btn { display: inline-flex; justify-content: center; align-items: center; min-height: 52px; padding: 12px 22px; border: 0; border-radius: 10px; background: var(--yellow); color: var(--ink); font: 700 17px/1.2 var(--body); text-decoration: none; cursor: pointer; }
.btn:disabled { background: var(--line); color: var(--muted); cursor: default; }
.btn.quiet { background: none; border: 1px solid var(--line); color: var(--text); }
.price { font: 900 30px/1 var(--display); font-variant-numeric: tabular-nums; }
.price small { font: 500 14px/1 var(--body); color: var(--muted); }

/* home */
.intro { padding-block: 20px 28px; display: grid; gap: 10px; max-width: 34em; }
.products { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); padding-bottom: 56px; }
.product { text-decoration: none; display: grid; gap: 14px; align-content: start; }
.product img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 14px; }
.product .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.product .price { font-size: 22px; white-space: nowrap; }

/* product */
.detail { display: grid; gap: 28px; padding-bottom: 120px; }
.detail > * { min-width: 0; }
.compare { position: relative; aspect-ratio: 4/5; border-radius: 14px; overflow: hidden; --x: 60%; touch-action: pan-y; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare .after { clip-path: inset(0 calc(100% - var(--x)) 0 0); }
.compare .bar { position: absolute; inset: 0 auto 0 var(--x); width: 3px; margin-left: -1px; background: #fff; pointer-events: none; }
.compare .bar::after { content: "‹ ›"; position: absolute; top: 72%; left: 50%; translate: -50% -50%; width: 44px; height: 44px; border-radius: 50%; background: #fff; color: #111; font: 700 18px/42px var(--body); text-align: center; }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.compare:focus-within { outline: 3px solid var(--yellow); outline-offset: 3px; }
.tag { position: absolute; bottom: 14px; padding: 5px 12px; border-radius: 99px; font: 700 13px/1.3 var(--body); pointer-events: none; }
.tag.a { left: 14px; background: var(--yellow); color: var(--ink); }
.tag.b { right: 14px; background: #0c0c0e; color: var(--text); }
.thumbs { display: flex; gap: 8px; margin-top: 10px; }
.thumbs button { flex: 1; max-width: 84px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: none; cursor: pointer; opacity: .6; }
.thumbs button[aria-pressed=true] { border-color: var(--yellow); opacity: 1; }
.thumbs img { width: 100%; }
.info { display: grid; gap: 26px; align-content: start; }
.info section { display: grid; gap: 10px; }
.buy { display: grid; gap: 14px; }
.buy .btn { width: 100%; }
.looks { list-style: none; padding: 0; }
.looks li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.looks span { color: var(--muted); text-align: right; }
.plain { padding-left: 1.1em; display: grid; gap: 6px; }
.sticky { position: fixed; inset: auto 0 0; background: var(--panel); border-top: 1px solid var(--line); padding: 12px max(16px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.sticky .price { font-size: 24px; white-space: nowrap; }
@media (min-width: 860px) {
  .detail { grid-template-columns: 1fr 1fr; gap: 48px; padding-bottom: 64px; }
  .gallery { position: sticky; top: 20px; align-self: start; }
  .sticky { display: none; }
}

/* admin */
.admin { max-width: 640px; padding-bottom: 64px; display: grid; gap: 24px; }
.admin form { display: grid; gap: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.admin label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.admin input:not([type=checkbox]), .admin textarea { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: 400 16px/1.4 var(--body); }
.admin label.check { display: flex; align-items: center; gap: 10px; }
.admin input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--yellow); }
code { overflow-wrap: anywhere; }
.msg.bad { color: var(--bad); }

/* checkout + after purchase */
.checkout { scroll-margin-top: 16px; }
.small { font-size: 13px; }
.msg:empty { display: none; }
.msg.bad, #pay-msg { color: var(--bad); font-weight: 600; }
.page { max-width: 560px; display: grid; gap: 18px; padding-block: 24px 64px; }
.page ol { padding-left: 1.2em; display: grid; gap: 8px; }
.page input { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); font: 400 16px/1.4 var(--body); }
.page form { display: grid; gap: 12px; }
.items { list-style: none; padding: 0; display: grid; gap: 10px; }
.items li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.items .btn { min-height: 44px; padding: 8px 16px; font-size: 15px; }
.testmode { padding: 10px 14px; border-radius: 10px; border: 1px dashed var(--yellow); color: var(--yellow); font-weight: 700; font-size: 14px; }
.compare.single .bar, .compare.single .tag, .compare.single input { display: none; }
.compare.single .after { clip-path: none; }
.admin .card { display: grid; gap: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.admin .card form { padding: 0; border: 0; background: none; }
.admin .sub { display: grid; gap: 12px; border-top: 1px solid var(--line); padding-top: 16px; }
.admin h3 { font-size: 16px; }
.admin input[type=file] { padding: 10px; }
.admin progress { width: 100%; accent-color: var(--yellow); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.pgrid figure { margin: 0; display: grid; gap: 6px; }
.pgrid img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 8px; }
.pgrid figcaption { font-size: 12px; color: var(--muted); }
.pgrid .btn { min-height: 36px; padding: 6px; font-size: 13px; }
