/* Xolanza Music merch shop
   Dark brand: #050607 ground, #ff7a00 accent (site orange from xolanzamusic.co.za). Mobile first.
   Headings never hyphenate mid-word. */
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Oswald";
  src: url("../fonts/Oswald.woff2") format("woff2");
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #050607;
  --bg-elev: #0c0d0f;
  --bg-card: #111214;
  --bg-hover: #18191c;
  --line: #242528;
  --line-strong: #3a3b40;
  --text: #f4f5f0;
  --muted: #9b9c94;
  --accent: #ff7a00;
  --accent-ink: #111200; /* dark ink: 7.24:1 on #ff7a00 (AAA). White on this orange is only 2.61:1. */
  --danger: #ff6b6b;
  --ok: #5dff9f;
  --radius: 16px;
  --font-d: "Oswald", "Arial Narrow", Impact, sans-serif;
  --font-b: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1180px;
  --pad: 20px;
  --top-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body {
  font-family: var(--font-b);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Never break mid-word in headings or product names */
h1, h2, h3, h4, .hero-title, .product-title, .card-name, .brand-word, .brand-kicker {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  -webkit-hyphens: none;
  -ms-hyphens: none;
  text-wrap: balance;
  font-family: var(--font-d);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.12;
  margin: 0;
}
.brand-word, .hero-title, .brand-kicker { white-space: nowrap; }

.skip {
  position: absolute; left: -999px; top: 0;
}
.skip:focus { left: 12px; top: 12px; z-index: 80; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; }

.mode-banner {
  background: var(--accent);
  color: var(--accent-ink);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 8px 16px;
}

/* ----- Top bar ----- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px var(--pad);
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: 50%; background: #fff; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-kicker { font-size: 10px; letter-spacing: 0.16em; color: var(--muted); font-family: var(--font-d); text-transform: uppercase; }
.brand-word { font-size: 22px; letter-spacing: 0.12em; color: var(--accent); }
.top-nav { display: flex; gap: 18px; align-items: center; font-weight: 600; font-size: 14px; }
.top-nav a { color: var(--text); text-decoration: none; letter-spacing: 0.04em; text-transform: uppercase; font-family: var(--font-d); }
.top-nav a:hover { color: var(--accent); }
.bag-link { position: relative; }
.bag-count {
  display: inline-block;
  min-width: 1.4em;
  padding: 0 6px;
  margin-left: 4px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 99px;
  font-size: 11px;
  font-family: var(--font-b);
  font-weight: 800;
  text-align: center;
}

/* ----- Hero ----- */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px var(--pad) 28px;
  text-align: center;
}
.hero-kicker {
  font-family: var(--font-d);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 13px;
  color: var(--accent);
  margin: 0 0 8px;
}
.hero-title {
  font-size: clamp(72px, 18vw, 160px);
  letter-spacing: 0.08em;
  color: var(--text);
  line-height: 0.9;
  margin: 0;
}
.hero-tag {
  font-size: clamp(16px, 3vw, 22px);
  color: var(--muted);
  margin: 16px 0 0;
  font-weight: 500;
}
.hero-del {
  margin: 22px auto 0;
  max-width: 640px;
  color: var(--text);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 12px;
  color: var(--muted);
}
.hero-del .dot { color: var(--accent); }

/* ----- Sections / grid ----- */
.section { max-width: var(--max); margin: 0 auto; padding: 12px var(--pad) 48px; }
.section-head { margin-bottom: 22px; }
.section-head h2 {
  font-size: clamp(32px, 7vw, 56px);
  letter-spacing: 0.1em;
  color: var(--accent);
}
.section-head p { margin: 8px 0 0; color: var(--muted); max-width: 40em; }

.grid { display: grid; gap: 22px; }
.grid-merch { grid-template-columns: 1fr; }
.grid-featured { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid-merch { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .grid-merch { grid-template-columns: 1fr 1fr 1fr; gap: 28px; }
  .grid-featured { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.card-featured { }
.card-media { position: relative; display: block; background: #0a0a0c; aspect-ratio: 4 / 5; overflow: hidden; text-decoration: none; }
.card-featured .card-media { aspect-ratio: 16 / 10; }
.card-img, .card-media img, .card-media picture, .card-media picture img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
}
.card-media picture { width: 100%; height: 100%; }
.badge {
  position: absolute;
  left: 12px; bottom: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border-radius: 99px;
  max-width: calc(100% - 24px);
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
.badge.sold, .badge.sold.big { background: #3a1212; color: #ffd0d0; position: absolute; }
.badge.big { position: static; display: inline-block; font-size: 14px; margin: 8px 0; }
.card-body { padding: 16px 16px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-name { font-size: 20px; letter-spacing: 0.04em; }
.card-name a { color: var(--text); text-decoration: none; }
.card-name a:hover { color: var(--accent); }
.card-short { margin: 0; color: var(--muted); font-size: 13px; }
.card-price { margin: 4px 0 8px; font-family: var(--font-d); font-size: 26px; letter-spacing: 0.04em; color: var(--accent); }
.card-badge2 { margin: 0; font-size: 12px; color: var(--muted); }
.card.is-sold { opacity: 0.72; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--font-d);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  min-height: 48px;
}
.btn:hover { filter: brightness(1.05); text-decoration: none; }
.btn:disabled, .btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.btn-sm { width: auto; align-self: flex-start; padding: 10px 18px; font-size: 14px; min-height: 42px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); font-size: 18px; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-text {
  background: transparent;
  color: var(--muted);
  width: auto;
  padding: 8px 0;
  min-height: 0;
  font-family: var(--font-b);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}
.btn-text:hover { color: var(--accent); }

.cta-stack { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }

/* ----- Delivery band ----- */
.delivery-band { padding-bottom: 72px; }
.delivery-band h2 { font-size: 36px; color: var(--accent); margin-bottom: 18px; text-align: center; }
.del-cards { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .del-cards { grid-template-columns: 1fr 1fr; } }
.del-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.del-card h3 { font-size: 22px; margin-bottom: 6px; }
.del-price { font-family: var(--font-d); font-size: 32px; color: var(--accent); margin: 0 0 6px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ----- Footer ----- */
.site-foot {
  border-top: 1px solid var(--line);
  padding: 40px var(--pad) 64px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.foot-brand { font-family: var(--font-d); letter-spacing: 0.16em; text-transform: uppercase; color: var(--text); font-size: 16px; }
.foot-copy { margin-top: 18px; font-size: 12px; }

/* ----- Product page ----- */
.crumb { max-width: var(--max); margin: 0 auto; padding: 18px var(--pad) 0; font-size: 13px; color: var(--muted); }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--accent); }
.product-page { padding-bottom: 80px; }
.product-layout {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px var(--pad) 40px;
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .product-layout { grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: start; }
  .product-buy { position: sticky; top: 84px; }
}
.gallery-main {
  background: #0a0a0c;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 4 / 5;
}
.gallery-main img, .gallery-main picture, .gallery-main picture img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
}
.gallery-main picture { width: 100%; height: 100%; display: block; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.thumb {
  flex: 0 0 72px;
  width: 72px; height: 90px;
  padding: 0; border: 2px solid transparent;
  border-radius: 8px; overflow: hidden;
  background: var(--bg-card); cursor: pointer;
}
.thumb.is-on, .thumb:focus-visible { border-color: var(--accent); }
.thumb img, .thumb picture, .thumb picture img { width: 100%; height: 100%; object-fit: cover; }

.product-title {
  font-size: clamp(28px, 5vw, 44px);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.product-price, .unit-price {
  font-family: var(--font-d);
  font-size: 36px;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin: 0 0 10px;
}
.product-desc { color: var(--muted); margin: 0 0 16px; }
.badges { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.badges li {
  background: #1a1c10;
  border: 1px solid #3a3d16;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 99px;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
.one-size { font-weight: 600; margin: 0 0 12px; }

/* ----- Form / options ----- */
.buy-form { display: flex; flex-direction: column; gap: 16px; }
.opt, fieldset.opt {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 14px 16px;
  margin: 0;
  background: var(--bg-elev);
}
.opt legend, .opt > label:first-child {
  font-family: var(--font-d);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 13px;
  padding: 0 6px;
  color: var(--muted);
}
.opt-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  background: var(--bg-card);
  font-weight: 600;
  font-size: 14px;
  min-height: 44px;
  user-select: none;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked), .chip.is-on {
  border-color: var(--accent);
  background: #1a1c08;
  color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.chip:hover { border-color: var(--accent); }
.chip.is-disabled { opacity: 0.4; cursor: not-allowed; }
.swatch {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid #666;
  display: inline-block;
}
.opt-cards { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 520px) { .opt-cards { grid-template-columns: 1fr 1fr 1fr; } }
.chip.has-img {
  flex-direction: column;
  border-radius: 14px;
  padding: 8px;
  text-align: center;
  width: 100%;
}
.chip-img, .chip.has-img img, .chip.has-img picture, .chip.has-img picture img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px;
}
.chip-label { line-height: 1.3; }

.qty-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.qty-step { display: flex; align-items: center; gap: 0; }
.qty-btn {
  width: 44px; height: 44px;
  border: 1px solid var(--line-strong);
  background: var(--bg-card);
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}
.qty-step input[type=number] {
  width: 72px; height: 44px; text-align: center;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  border-radius: 8px;
  margin: 0 6px;
  -moz-appearance: textfield;
}
.qty-step input[type=number]::-webkit-outer-spin-button,
.qty-step input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }

.del-options { display: flex; flex-direction: column; gap: 8px; }
.del-choice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  background: var(--bg-card);
}
.del-choice:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.del-choice input { margin-top: 4px; accent-color: var(--accent); }
.del-choice span { display: flex; flex-direction: column; flex: 1; }
.del-meta { font-size: 13px; color: var(--muted); }
.del-fee { font-family: var(--font-d); font-size: 20px; color: var(--accent); letter-spacing: 0.04em; }
.del-fields { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.del-fields[hidden], .opt[hidden], .is-conditional[hidden] { display: none !important; }

.buyer, .del-fields, .opt {
  /* labels stack */
}
.buy-form label, .del-fields label, .buyer label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.buy-form input[type=text],
.buy-form input[type=email],
.buy-form input[type=tel],
.buy-form input[type=number] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--text);
  font-size: 16px; /* prevent iOS zoom */
}
.buy-form input:focus { border-color: var(--accent); outline: none; }

.totals {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.totals > div { display: flex; justify-content: space-between; color: var(--muted); }
.totals .total-row { color: var(--text); font-family: var(--font-d); font-size: 26px; letter-spacing: 0.04em; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.totals .total-row span:last-child { color: var(--accent); }

/* ----- Checkout ----- */
.checkout-page, .narrow { max-width: 880px; margin: 0 auto; padding: 24px var(--pad) 80px; }
.checkout-page h1, .narrow h1 { font-size: clamp(32px, 7vw, 52px); color: var(--accent); margin-bottom: 18px; }
.checkout-layout { display: grid; gap: 28px; }
@media (min-width: 800px) { .checkout-layout { grid-template-columns: 1fr 1fr; align-items: start; } }
.bag-row { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.bag-img { display: block; background: #0a0a0c; border-radius: 10px; overflow: hidden; }
.bag-img img, .bag-img picture, .bag-img picture img { width: 100%; height: 120px; object-fit: cover; }
.bag-name { font-size: 18px; margin: 0 0 4px; }
.empty { font-size: 18px; }
.card-panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.order-ref { font-family: var(--font-d); letter-spacing: 0.08em; color: var(--accent); }
.plain { padding-left: 1.1em; }
.inline { display: inline; }

.flash { border-radius: 12px; padding: 12px 16px; margin: 0 0 16px; }
.flash.bad { background: #3a1212; color: #ffd0d0; }
.flash.ok { background: #102818; color: #c8ffd8; }
.flash ul { margin: 0; padding-left: 1.2em; }

/* sticky mobile CTA is the form itself — padding already accounts for it */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
}

/* Featured Music card: side-by-side on desktop so it is not a giant square */
@media (min-width: 860px) {
  .card-featured {
    display: grid;
    grid-template-columns: 1.25fr 0.85fr;
    align-items: stretch;
  }
  .card-featured .card-media {
    aspect-ratio: 16 / 10;
    min-height: 100%;
  }
  .card-featured .card-body {
    justify-content: center;
    padding: 36px 32px;
  }
  .card-featured .card-name { font-size: 36px; }
  .card-featured .card-price { font-size: 48px; }
  .card-featured .badge { left: 16px; top: 16px; bottom: auto; }
}

/* Ensure <picture> fills the media box so photos actually show */
.card-media picture,
.gallery-main picture {
  display: block;
  width: 100%;
  height: 100%;
}
.card-media img,
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Album covers are square — don't crop titles off */
[data-product-id="usb-bundle"] .gallery-main {
  background: #050607;
  aspect-ratio: 1 / 1;
}
[data-product-id="usb-bundle"] .gallery-main img {
  object-fit: contain;
  object-position: center;
}

/* Gallery captions (e.g. reversible hat: Black side / White side) */
.gallery-caption { margin: 8px 0 0; font-family: var(--font-d); text-transform: uppercase; letter-spacing: 0.08em; font-size: 13px; color: var(--accent); }
.gallery-caption:empty { display: none; }
.thumb.has-cap { position: relative; }
@media (max-width: 479px) {
  .top-nav { gap: 12px; font-size: 13px; }
  .brand-word { font-size: 18px; letter-spacing: 0.08em; }
  .brand-kicker { font-size: 9px; }
  .brand img { width: 40px; height: 40px; }
}
