/* Palette and type follow rpmfitness.co.za */
:root {
  --bg: #080808;
  --panel: #121212;
  --raised: #161616;
  --line: #242424;
  --text: #fafafa;
  --muted: #c8c8c8;
  --dim: #8a8a8a;
  --accent: #f5e000;
  --accent-ink: #080808;
  --display: "Bebas Neue", Impact, sans-serif;
  --ui: "Chakra Petch", system-ui, sans-serif;
  --body: "Outfit", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-weight: 400; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
svg { width: 1em; height: 1em; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Hero ─────────────────────────────────────────── */
.hero { position: relative; min-height: min(92vh, 900px); display: flex; flex-direction: column; overflow: hidden; isolation: isolate; }
.strip { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; z-index: -2; }
.strip div {
  background: var(--raised) var(--img) center 25% / cover no-repeat;
  animation: drift 24s var(--ease) infinite alternate;
  opacity: 0; animation-fill-mode: both;
}
.strip div { animation-name: reveal, drift; animation-duration: 1.4s, 26s; animation-timing-function: var(--ease), ease-in-out; animation-iteration-count: 1, infinite; animation-direction: normal, alternate; }
.strip div:nth-child(1) { animation-delay: .05s, 1.4s; }
.strip div:nth-child(2) { animation-delay: .15s, 1.4s; }
.strip div:nth-child(3) { animation-delay: .25s, 1.4s; }
.strip div:nth-child(4) { animation-delay: .35s, 1.4s; }
.strip div:nth-child(5) { animation-delay: .45s, 1.4s; }
@keyframes reveal { from { opacity: 0; transform: translateY(24px) scale(1.04); } to { opacity: 1; transform: none; } }
@keyframes drift { from { background-position: center 22%; } to { background-position: center 34%; } }
.shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, var(--bg) 2%, rgba(8, 8, 8, .86) 30%, rgba(8, 8, 8, .35) 62%, rgba(8, 8, 8, .6) 100%),
    linear-gradient(to right, rgba(8, 8, 8, .7), rgba(8, 8, 8, 0) 60%);
}

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 22px var(--gutter); }
.brand { text-decoration: none; display: inline-flex; }
.rpm-link {
  display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none;
  font-family: var(--ui); font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  padding: 10px 14px; border: 1px solid rgba(250, 250, 250, .22); background: rgba(8, 8, 8, .45); backdrop-filter: blur(6px); transition: all .2s;
}
.rpm-link svg { font-size: 14px; }
.rpm-link:hover { border-color: var(--accent); color: var(--accent); }
.mark { background: var(--accent); color: var(--accent-ink); font-family: var(--display); font-size: 30px; line-height: 1; padding: 7px 11px 4px; letter-spacing: .02em; }

.hero-body { margin-top: auto; padding: 0 var(--gutter) clamp(40px, 8vh, 88px); max-width: 1100px; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font-family: var(--ui); font-weight: 600; font-size: 14px; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.eyebrow span { width: 34px; height: 3px; background: var(--accent); }
h1 {
  margin: 0; font-family: var(--display); font-weight: 400; line-height: .86; letter-spacing: .01em;
  font-size: clamp(76px, 13vw, 184px); text-transform: uppercase;
  animation: rise .9s var(--ease) .2s both;
}
@keyframes rise { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
.finders { display: flex; gap: 10px; margin-top: clamp(24px, 4vh, 40px); flex-wrap: wrap; animation: rise .9s var(--ease) .35s both; }
.meta { margin: 18px 0 0; font-family: var(--ui); font-size: 13px; color: var(--muted); letter-spacing: .04em; animation: rise .9s var(--ease) .5s both; }

.btn-selfie {
  display: inline-flex; align-items: center; gap: 12px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); padding: 0 26px; height: 60px;
  font-family: var(--ui); font-weight: 600; font-size: 16px; text-transform: uppercase; letter-spacing: .08em;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn-selfie svg { font-size: 22px; }
.btn-selfie:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px rgba(245, 224, 0, .55); }
.btn-selfie:active { transform: none; }

.searchbox { display: flex; flex: 0 1 380px; max-width: 420px; height: 60px; background: rgba(18, 18, 18, .82); border: 1px solid rgba(250, 250, 250, .14); backdrop-filter: blur(10px); transition: border-color .2s; }
.searchbox:focus-within { border-color: var(--accent); }
.searchbox input[type=search] { flex: 1; min-width: 0; background: none; border: 0; outline: none; padding: 0 18px; font-size: 17px; }
.searchbox input::placeholder { color: var(--dim); }
.searchbox input::-webkit-search-cancel-button { display: none; }
.icon-btn { display: grid; place-items: center; width: 52px; background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 21px; transition: color .2s; }
.icon-btn:hover { color: var(--accent); }
.icon-btn.go { color: var(--text); border-left: 1px solid rgba(250, 250, 250, .12); }

/* ── Sticky dock ──────────────────────────────────── */
.dock {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30; display: flex; align-items: center; gap: 10px;
  padding: 10px var(--gutter); background: rgba(8, 8, 8, .9); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
  transform: translateY(-110%); transition: transform .35s var(--ease);
}
.dock.on { transform: none; }
.dock .mark { font-size: 24px; padding: 6px 9px 3px; }
.searchbox.compact { height: 44px; max-width: none; background: var(--panel); backdrop-filter: none; }
.searchbox.compact input[type=search] { font-size: 15px; padding: 0 14px; }
.searchbox.compact .icon-btn { width: 44px; font-size: 19px; }
.btn-selfie.compact { height: 44px; padding: 0 18px; font-size: 14px; }
.btn-selfie.compact svg { font-size: 19px; }

/* ── Results ──────────────────────────────────────── */
main { padding: clamp(28px, 5vw, 56px) var(--gutter) 64px; max-width: 1600px; margin: 0 auto; scroll-margin-top: 48px; }
.results-head { margin-bottom: 22px; }
.title-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.query:empty { display: none; }
.query img { width: 56px; height: 56px; object-fit: cover; border: 2px solid var(--accent); display: block; }
h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(38px, 5vw, 60px); line-height: 1; letter-spacing: .01em; text-transform: uppercase; }
.tally { font-family: var(--ui); font-size: 14px; color: var(--dim); letter-spacing: .06em; text-transform: uppercase; align-self: flex-end; padding-bottom: 8px; }
.clear { margin-left: auto; background: none; border: 1px solid var(--line); padding: 9px 16px; cursor: pointer; font-family: var(--ui); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); transition: all .2s; }
.clear:hover { border-color: var(--accent); color: var(--accent); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.chips:empty { display: none; }
.chips button {
  background: var(--panel); border: 1px solid var(--line); padding: 8px 14px; cursor: pointer;
  font-family: var(--ui); font-size: 13px; color: var(--muted); letter-spacing: .04em; transition: all .2s;
}
.chips button:hover { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

.masonry { display: flex; gap: 8px; align-items: flex-start; }
.masonry .col { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tile {
  position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in; overflow: hidden;
  background: var(--raised); animation: fade .5s var(--ease) both;
}
@keyframes fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease), filter .3s; }
.tile::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 0 var(--accent); transition: box-shadow .2s; pointer-events: none; }
.tile:hover img { transform: scale(1.035); }
.tile:hover::after { box-shadow: inset 0 0 0 3px var(--accent); }
.tile .badge {
  position: absolute; left: 8px; bottom: 8px; background: var(--accent); color: var(--accent-ink);
  font-family: var(--ui); font-weight: 600; font-size: 11px; letter-spacing: .06em; padding: 3px 7px; text-transform: uppercase;
}
.sentinel { height: 1px; }
.empty { text-align: center; color: var(--muted); font-size: 17px; padding: 48px 16px; margin: 0; }

footer a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); }
footer a:hover { color: var(--accent); border-color: var(--accent); }
footer { text-align: center; padding: 28px; font-family: var(--ui); font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .18em; border-top: 1px solid var(--line); }

/* ── Toast, drop zone, loading ───────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 140%);
  background: var(--raised); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  padding: 13px 18px; font-size: 15px; max-width: calc(100vw - 32px); visibility: hidden;
  transition: transform .35s var(--ease), visibility 0s linear .35s;
}
.toast.on { transform: translate(-50%, 0); visibility: visible; transition: transform .35s var(--ease); }
/* Desktop: toasts slide in top-right, under the sticky search bar. Phones keep bottom-centre. */
@media (min-width: 901px) {
  .toast { left: auto; right: var(--gutter); top: 84px; bottom: auto; max-width: 380px; transform: translateX(calc(100% + 60px)); }
  .toast.on { transform: none; }
  body.viewing .toast { top: 24px; right: calc(360px + 24px); }
}
.drop {
  position: fixed; inset: 0; z-index: 70; display: none; place-items: center; background: rgba(8, 8, 8, .9);
  border: 3px dashed var(--accent); font-family: var(--display); font-size: clamp(32px, 6vw, 72px); color: var(--accent); text-align: center; padding: 24px;
}
.drop.on { display: grid; }
.busy { position: relative; pointer-events: none; }
.busy::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); background-size: 50% 100%; background-repeat: no-repeat;
  animation: sweep 1s linear infinite;
}
@keyframes sweep { from { background-position: -50% 0; } to { background-position: 150% 0; } }
.skeleton { background: linear-gradient(100deg, var(--raised) 30%, #1d1d1d 50%, var(--raised) 70%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ── Viewer ───────────────────────────────────────── */
.viewer { position: fixed; inset: 0; z-index: 50; display: grid; grid-template-columns: 1fr 360px; background: var(--bg); animation: fadein .25s ease both; }
.viewer[hidden], .selfie[hidden] { display: none; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.viewer-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 24px 72px; }
.frame { position: relative; margin: 0; max-width: 100%; max-height: 100%; }
.frame img { display: block; max-width: 100%; max-height: calc(100vh - 48px); object-fit: contain; animation: fadein .3s ease both; }
.frame .face { position: absolute; border: 2px solid var(--accent); background: none; padding: 0; cursor: pointer; opacity: 0; transition: opacity .2s, background .2s; }
.frame:hover .face, .frame .face:focus-visible { opacity: 1; }
.frame .face:hover { background: rgba(245, 224, 0, .14); }
.nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; display: grid; place-items: center; background: rgba(18, 18, 18, .7); border: 1px solid var(--line); cursor: pointer; font-size: 22px; transition: all .2s; }
.nav:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.nav.prev { left: 12px; } .nav.next { right: 12px; }
.viewer-side { position: relative; border-left: 1px solid var(--line); background: var(--bg); padding: 30px 28px; overflow-y: auto; }
.close { position: absolute; top: 22px; right: 22px; width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 1px solid var(--line); cursor: pointer; font-size: 18px; transition: all .2s; z-index: 2; }
.close:hover { border-color: var(--accent); color: var(--accent); }
.vname { margin: 12px 64px 30px 0; font-family: var(--ui); font-size: 13px; letter-spacing: .1em; color: var(--dim); text-transform: uppercase; }
.btn-download {
  display: flex; align-items: center; gap: 16px; margin: 0 0 12px; padding: 18px 22px; text-decoration: none;
  background: var(--accent); color: var(--accent-ink); transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn-download:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -12px rgba(245, 224, 0, .6); }
.btn-download:active { transform: none; }
.btn-download svg { font-size: 24px; flex: none; }
.btn-download span { display: flex; flex-direction: column; line-height: 1.15; }
.btn-download strong { font-family: var(--ui); font-weight: 600; font-size: 16px; letter-spacing: .1em; text-transform: uppercase; }
.btn-download small { font-size: 13px; opacity: .72; }
.btn-share {
  display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; margin: 0 0 40px; padding: 16px 22px; cursor: pointer;
  background: none; border: 1px solid var(--line); color: var(--text);
  font-family: var(--ui); font-weight: 600; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; transition: all .2s;
}
.btn-share svg { font-size: 19px; }
.btn-share:hover { border-color: var(--accent); color: var(--accent); }
.btn-download.done::after { content: "✓"; margin-left: auto; font-weight: 600; font-size: 18px; }
.viewer-side h3 { margin: 0 0 16px; font-family: var(--display); font-weight: 400; font-size: 26px; letter-spacing: .02em; }
.people { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 30px; }
.people button { position: relative; padding: 0; border: 0; background: var(--raised); cursor: pointer; aspect-ratio: 1; overflow: hidden; }
.people img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--ease); }
.people button:hover img { transform: scale(1.08); }
.people button::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 0 var(--accent); transition: box-shadow .2s; }
.people button:hover::after { box-shadow: inset 0 0 0 3px var(--accent); }
.people .none { grid-column: 1 / -1; color: var(--dim); font-size: 14px; margin: 0; }
.similar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.similar button { padding: 0; border: 0; background: var(--raised); cursor: pointer; aspect-ratio: 3 / 4; overflow: hidden; }
.similar img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--ease), opacity .2s; }
.similar button:hover img { transform: scale(1.06); }

/* ── Selfie camera ────────────────────────────────── */
.selfie { position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; background: rgba(8, 8, 8, .92); backdrop-filter: blur(8px); padding: 16px; animation: fadein .25s ease both; }
.selfie-card { position: relative; width: min(440px, 100%); background: var(--panel); border: 1px solid var(--line); padding: 28px 24px 22px; text-align: center; }
.selfie-card h2 { font-size: 46px; }
.hint { margin: 6px 0 18px; color: var(--muted); font-size: 15px; min-height: 1.4em; }
.cam { position: relative; aspect-ratio: 3 / 4; background: #000; overflow: hidden; }
.cam video, .cam canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam video { transform: scaleX(-1); }
.guide { position: absolute; left: 50%; top: 45%; width: 58%; aspect-ratio: 3 / 4; transform: translate(-50%, -50%); border: 2px dashed rgba(245, 224, 0, .75); border-radius: 50%; box-shadow: 0 0 0 999px rgba(0, 0, 0, .35); pointer-events: none; transition: opacity .3s; }
.scan { position: absolute; left: 0; right: 0; height: 30%; top: -30%; background: linear-gradient(to bottom, transparent, rgba(245, 224, 0, .35), transparent); border-bottom: 2px solid var(--accent); opacity: 0; pointer-events: none; }
.cam.scanning .scan { opacity: 1; animation: scan 1.3s ease-in-out infinite; }
.cam.scanning .guide { opacity: 0; }
@keyframes scan { from { top: -30%; } to { top: 100%; } }
.selfie-actions { display: flex; justify-content: center; margin: 20px 0 10px; }
.shutter { width: 74px; height: 74px; border-radius: 50%; border: 4px solid var(--text); background: var(--accent); cursor: pointer; box-shadow: inset 0 0 0 4px var(--panel); transition: transform .15s; }
.shutter:hover { transform: scale(1.06); }
.shutter:active { transform: scale(.94); }
.shutter:disabled { opacity: .4; cursor: default; transform: none; }
.alt { display: inline-block; font-family: var(--ui); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); cursor: pointer; padding: 6px; border-bottom: 1px solid var(--line); }
.alt:hover { color: var(--accent); border-color: var(--accent); }
.cam.nocam video, .cam.nocam .guide { display: none; }
.cam.nocam::before { content: "Camera unavailable — use a photo instead"; position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; color: var(--dim); font-size: 15px; }

/* ── Small screens ────────────────────────────────── */
@media (max-width: 900px) {
  .strip { grid-template-columns: repeat(3, 1fr); }
  .strip div:nth-child(1), .strip div:nth-child(5) { display: none; }
  .viewer { display: block; overflow-y: auto; }
  .viewer-stage { padding: 60px 8px 8px; min-height: auto; }
  .frame img { max-height: 62vh; }
  .frame .face { opacity: 1; }
  .nav { width: 42px; height: 42px; top: calc(50% + 24px); }
  .viewer-side { border-left: 0; border-top: 1px solid var(--line); overflow: visible; padding-top: 18px; }
  .viewer-side .close { position: fixed; top: 10px; right: 10px; background: rgba(8, 8, 8, .8); }
}
@media (max-width: 600px) {
  .hero { min-height: 88svh; }
  .finders { flex-direction: column; }
  .btn-selfie { justify-content: center; height: 58px; }
  .searchbox { flex: none; max-width: none; height: 56px; }
  .dock .brand { display: none; }
  .btn-selfie.compact span { display: none; }
  .btn-selfie.compact { padding: 0 13px; }
  .masonry { gap: 5px; }
  .masonry .col { gap: 5px; }
  .clear { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}


/* ── Shop (payments mode) ─────────────────────────── */
.testbar { position: relative; z-index: 40; background: var(--accent); color: var(--accent-ink); text-align: center; padding: 9px 16px; font-family: var(--ui); font-size: 13px; letter-spacing: .02em; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.cart-btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); border: 0; font-family: var(--ui); font-weight: 600; font-size: 15px;
}
.cart-btn svg { font-size: 20px; }
.cart-btn.compact { height: 44px; }
.cart-btn.bump { animation: bump .35s var(--ease); }
@keyframes bump { 50% { transform: scale(1.12); } }

.btn-buy {
  display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; margin: 0 0 12px; padding: 18px 22px; cursor: pointer; border: 0;
  background: var(--accent); color: var(--accent-ink); font-family: var(--ui); font-weight: 600; font-size: 16px; letter-spacing: .08em; text-transform: uppercase;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn-buy:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -12px rgba(245, 224, 0, .6); }
.btn-buy svg { font-size: 20px; }
.btn-buy.in { background: none; color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }



.cart { position: fixed; inset: 0; z-index: 58; background: rgba(8, 8, 8, .7); backdrop-filter: blur(4px); display: flex; justify-content: flex-end; animation: fadein .2s ease both; }
.cart[hidden] { display: none; }
.cart-panel { position: relative; width: min(440px, 100%); height: 100%; overflow-y: auto; background: var(--panel); border-left: 1px solid var(--line); padding: 34px 28px 28px; display: flex; flex-direction: column; animation: slidein .3s var(--ease) both; }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.cart-panel h2 { margin-bottom: 22px; }
.cart-items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; align-content: start; }
.cart-items .item { position: relative; aspect-ratio: 2 / 3; background: var(--raised); overflow: hidden; }
.cart-items img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cart-items .rm { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; display: grid; place-items: center; border: 0; cursor: pointer; background: rgba(8, 8, 8, .78); color: var(--text); font-size: 13px; }
.cart-items .rm:hover { background: var(--accent); color: var(--accent-ink); }
.cart-items .none { grid-column: 1 / -1; color: var(--dim); margin: 8px 0; }
.checkout { margin-top: auto; padding-top: 26px; display: grid; gap: 16px; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 18px; color: var(--muted); }
.cart-total strong { font-family: var(--display); font-weight: 400; font-size: 40px; color: var(--text); letter-spacing: .02em; }
.field { display: grid; gap: 8px; font-family: var(--ui); font-size: 13px; color: var(--muted); letter-spacing: .04em; }
.field input { background: var(--bg); border: 1px solid var(--line); padding: 14px 16px; font-size: 16px; outline: none; }
.field input:focus { border-color: var(--accent); }
.btn-pay {
  height: 60px; border: 0; cursor: pointer; background: var(--accent); color: var(--accent-ink);
  font-family: var(--ui); font-weight: 600; font-size: 17px; letter-spacing: .08em; text-transform: uppercase; transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn-pay:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -12px rgba(245, 224, 0, .6); }
.btn-pay:disabled { opacity: .5; cursor: default; transform: none; box-shadow: none; }
.secure { margin: 0; text-align: center; color: var(--dim); font-size: 13px; }

.order { min-height: 100vh; padding: 32px var(--gutter) 64px; }
.order[hidden] { display: none; }
.order-inner { max-width: 1100px; margin: 0 auto; }
.order .brand { margin-bottom: 48px; }
.order h1 { font-size: clamp(56px, 9vw, 120px); margin: 6px 0 14px; }
.order-sub { color: var(--muted); font-size: 17px; margin: 0 0 26px; max-width: 640px; }
.order #order-all { padding: 0 30px; margin-bottom: 30px; }
.order-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.order-card { background: var(--panel); border: 1px solid var(--line); }
.order-card img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; display: block; }
.order-card a {
  display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px; text-decoration: none; color: var(--accent-ink); background: var(--accent);
  font-family: var(--ui); font-weight: 600; font-size: 14px; letter-spacing: .08em; text-transform: uppercase;
}
.order-card a svg { font-size: 18px; }
.order-back { display: inline-block; margin-top: 36px; color: var(--muted); font-family: var(--ui); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.order-back:hover { color: var(--accent); border-color: var(--accent); }
body.order-mode > header, body.order-mode > main, body.order-mode > .dock, body.order-mode > footer { display: none; }

@media (max-width: 600px) {
  .rpm-link { padding: 9px 10px; font-size: 11px; }
  .cart-btn { height: 38px; padding: 0 11px; }
  .cart-panel { padding: 28px 18px 22px; }
}


/* ── Cart bar + checkout paths (Baymard: offer keep-browsing, view-cart and checkout) ── */
.cartbar {
  position: fixed; z-index: 45; right: var(--gutter); bottom: 24px; display: flex; align-items: center; gap: 16px;
  background: var(--raised); border: 1px solid var(--line); padding: 10px 10px 10px 18px; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .8);
  animation: rise .35s var(--ease) both;
}
.cartbar-text { display: inline-flex; align-items: center; gap: 10px; font-family: var(--ui); font-size: 15px; color: var(--text); white-space: nowrap; }
.cartbar-text svg { font-size: 20px; color: var(--accent); }
.cartbar button, .btn-checkout {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font-family: var(--ui); font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.cartbar button { height: 46px; padding: 0 20px; font-size: 15px; }
.cartbar button svg, .btn-checkout svg { font-size: 18px; }
.cartbar button:hover, .btn-checkout:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -12px rgba(245, 224, 0, .6); }
.btn-checkout { width: 100%; margin: 0 0 12px; padding: 18px 22px; font-size: 16px; }
.btn-buy.in { justify-content: center; }
body.viewing .cartbar, body.order-mode .cartbar { display: none; }
.keep { background: none; border: 0; color: var(--muted); cursor: pointer; font-family: var(--ui); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; padding: 6px; text-decoration: underline; text-underline-offset: 4px; }
.keep:hover { color: var(--accent); }
.toast { display: flex; align-items: center; gap: 16px; }
.toast button { background: none; border: 0; padding: 0; cursor: pointer; color: var(--accent); font-family: var(--ui); font-weight: 600; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
@media (max-width: 600px) {
  .cartbar { left: 0; right: 0; bottom: 0; justify-content: space-between; border-width: 1px 0 0; padding: 10px 12px 10px 16px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .toast { left: 12px; right: 12px; max-width: none; transform: translateY(160%); justify-content: space-between; }
  .toast.on { transform: none; }
  .toast span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body.has-cartbar .toast { bottom: 90px; }
  body.viewing .toast { top: 12px; bottom: auto; transform: translateY(-160%); }
  body.viewing .toast.on { transform: none; }
  body.has-cartbar main { padding-bottom: 110px; }
}
