/* Max Elite — Signature Hoodie
   The page wears whichever colour is selected: Black or Ash.
   Photos sit in white "patches" with a stitched edge, like the patch on the hoodie's back. */

:root {
  --white: #ffffff;
  --black: #000000;
  --ash: #c3c4c7;
  --ash-deep: #a9aaae;
  --grey: #8d8d90;

  --font-display: "Pirata One", "Anek Bangla", serif;
  --font-body: "Anek Bangla", system-ui, sans-serif;

  --pad: clamp(1.1rem, 4vw, 3.5rem);
  --max: 76rem;
}

html[data-theme="black"] {
  --bg: var(--black);
  --fg: var(--white);
  --muted: #a5a5a8;
  --line: #3a3a3c;
  --btn-bg: var(--white);
  --btn-fg: var(--black);
}
html[data-theme="ash"] {
  --bg: var(--ash);
  --fg: var(--black);
  --muted: #45464a;
  --line: #8f9094;
  --btn-bg: var(--black);
  --btn-fg: var(--white);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a, button, label, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  transition: background-color .45s ease, color .45s ease;
  -webkit-font-smoothing: antialiased;
}
img { display: block; width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--fg); outline-offset: 3px; }

.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: .92;
  letter-spacing: .005em;
  margin: 0;
}
h1.display { font-size: clamp(4.2rem, 13vw, 10rem); }
h2.display { font-size: clamp(2.8rem, 8vw, 5.5rem); }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem var(--pad);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: background-color .45s ease;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1;
  text-decoration: none;
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  font-stretch: 90%;
  text-decoration: none;
  text-align: center;
  padding: .7rem 1.4rem;
  border: 2px solid var(--btn-bg);
  transition: background-color .2s, color .2s;
}
.btn:hover { background: transparent; color: var(--fg); }
.btn-small { padding: .55rem 1rem; font-size: .95rem; min-height: 2.75rem; display: inline-flex; align-items: center; }
.btn-big { font-size: 1.3rem; padding: .95rem 2.6rem; }
.btn-block { display: block; width: 100%; }

/* The stitched patch frame */
.patch {
  display: block;
  margin: 0;
  background: var(--white);
  outline: 2px dashed var(--fg);
  outline-offset: 5px;
  overflow: hidden;
}

/* Hero */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 4rem) var(--pad) clamp(3rem, 8vw, 6rem);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.lede {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  max-width: 30ch;
  margin: 1.4rem 0 1.6rem;
  color: var(--muted);
}
.price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: .4rem .9rem; margin-bottom: 1.4rem; }
.price { font-size: clamp(2.6rem, 6vw, 3.6rem); font-weight: 800; font-stretch: 80%; line-height: 1; }
.was { color: var(--muted); font-size: 1.3rem; }
.save { border: 1.5px dashed var(--fg); padding: .1rem .6rem; font-weight: 600; font-size: .95rem; }

.color-pick { display: flex; gap: .7rem; margin-bottom: 1.6rem; }
.swatch {
  display: inline-flex; align-items: center; gap: .55rem;
  background: none;
  border: 1.5px solid var(--line);
  padding: .5rem 1rem .5rem .6rem;
  min-height: 3rem;
  font-weight: 600;
}
.swatch[aria-checked="true"] { border-color: var(--fg); border-width: 2px; }
.dot { width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 1.5px solid var(--grey); }
.dot-black { background: var(--black); }
.dot-ash { background: var(--ash-deep); }

.assure { color: var(--muted); font-size: .95rem; margin: .9rem 0 0; max-width: 34ch; }

.hero-art { position: relative; padding: 0 0 12% 0; }
.patch-main { width: 88%; margin-left: auto; }
.patch-side {
  position: absolute; left: 0; bottom: 0;
  width: 40%;
  box-shadow: 0 0 0 5px var(--bg);
}
.hero-art img { transition: opacity .25s ease; }
.hero-art img.swap { opacity: 0; }

/* Sections */
.details, .colors, .order, .faq {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) var(--pad);
  border-top: 1px solid var(--line);
}
.section-note { color: var(--muted); max-width: 44ch; margin: 1rem 0 0; }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.2rem clamp(2rem, 6vw, 5rem);
  margin-top: 2.5rem;
}
.detail-grid h3 { font-size: 1.45rem; font-weight: 700; font-stretch: 85%; line-height: 1.25; margin: 0 0 .4rem; }
.detail-grid p { margin: 0; color: var(--muted); max-width: 38ch; }

/* Colour cards */
.color-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: 2.5rem;
}
.color-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: clamp(1rem, 2.5vw, 1.75rem);
  text-align: left;
  border: 0;
}
.color-card[data-color="black"] { background: var(--black); color: var(--white); box-shadow: inset 0 0 0 1px #3a3a3c; }
.color-card[data-color="ash"] { background: var(--ash); color: var(--black); box-shadow: inset 0 0 0 1px #8f9094; }
.color-card .patch { outline-color: currentColor; outline-offset: 3px; outline-width: 1.5px; }
.color-name { grid-column: 1 / -1; font-size: clamp(2rem, 5vw, 3.2rem); margin-top: .6rem; }

/* Order */
.order-box {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4rem);
  margin-top: 2.5rem;
  align-items: start;
}
.order-img { position: sticky; top: 5.5rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; }
legend { font-weight: 700; padding: 0; margin-bottom: .5rem; }
.opts { display: flex; flex-wrap: wrap; gap: .6rem; }
.opts-stack { flex-direction: column; }
.opts label { position: relative; cursor: pointer; }
.opts input { position: absolute; opacity: 0; inset: 0; }
.opts span {
  display: flex; justify-content: space-between; gap: 1.5rem;
  min-width: 4rem;
  min-height: 3rem;
  align-items: center;
  padding: .6rem 1.1rem;
  border: 1.5px solid var(--line);
  font-weight: 600;
  text-align: center;
}
.opts:not(.opts-stack) span { justify-content: center; }
.opts input:checked + span { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.opts input:focus-visible + span { outline: 3px solid var(--fg); outline-offset: 3px; }
.hint { color: var(--muted); font-size: .92rem; margin: .5rem 0 0; }

.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); }
.qty button { background: none; border: 0; width: 3rem; height: 3rem; font-size: 1.4rem; }
.qty output { min-width: 2.5rem; text-align: center; font-weight: 700; font-size: 1.15rem; }

.bill { margin: 0 0 1.4rem; border-top: 2px dashed var(--fg); padding-top: 1rem; }
.bill div { display: flex; justify-content: space-between; gap: 1rem; padding: .2rem 0; }
.bill dd { margin: 0; font-weight: 600; white-space: nowrap; }
.bill-total { font-size: 1.5rem; font-weight: 800; margin-top: .5rem; }
.bill-total dd { font-weight: 800; }

/* Order form fields */
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; margin-bottom: .35rem; }
.opt { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  width: 100%;
  font: inherit;
  color: var(--fg);
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: 0;
  padding: .7rem .85rem;
}
.field textarea { resize: vertical; min-height: 5.5rem; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .75; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--fg); border-width: 2px; padding: calc(.7rem - .5px) calc(.85rem - .5px); }
.field [aria-invalid="true"] { border-style: dashed; border-color: var(--fg); border-width: 2px; }
.err { margin: .35rem 0 0; font-size: .95rem; font-weight: 600; }
.err::before { content: "! "; font-weight: 800; }
.err-form { border: 2px dashed var(--fg); padding: .7rem .9rem; margin: 0 0 1rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
button.btn { font-family: inherit; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Order confirmation */
.done { scroll-margin-top: 5.5rem; outline: 2px dashed var(--fg); outline-offset: 5px; padding: clamp(1.25rem, 4vw, 2.25rem); }
.done:focus { outline: 2px dashed var(--fg); }
.done h3 { font-size: clamp(2.4rem, 6vw, 3.6rem); }
.done-lead { font-size: 1.2rem; margin: 1rem 0 1.5rem; }
.done .assure { max-width: 40ch; }

/* FAQ */
.faq-list { margin-top: 2rem; max-width: 46rem; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 0;
  font-size: 1.2rem; font-weight: 700; font-stretch: 90%;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-weight: 400; font-size: 1.5rem; line-height: 1; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list p { margin: 0 0 1.2rem; color: var(--muted); max-width: 56ch; }

/* Footer */
.foot {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 2rem var(--pad) 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .95rem;
}
.foot .brand { color: var(--fg); }
.foot-brand { display: inline-flex; align-items: center; gap: .7rem; }
.foot-brand img { width: 3.5rem; height: 3.5rem; border-radius: 50%; }
.foot-links { display: inline-flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.foot-links a { color: var(--fg); font-weight: 600; min-height: 2.75rem; display: inline-flex; align-items: center; }

/* Sticky mobile bar */
.sticky {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  align-items: center; justify-content: space-between; gap: 1rem;
  padding: .65rem var(--pad) calc(.65rem + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform .3s ease, background-color .45s ease;
}
.sticky.show { transform: none; }
.sticky b { font-size: 1.35rem; font-weight: 800; }
.sticky s { color: var(--muted); font-size: .9rem; }
.sticky small { display: block; color: var(--muted); line-height: 1.1; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .patch-main { width: 84%; }
  .lede { max-width: 34ch; }
  .btn-big { display: block; }
  .detail-grid, .color-grid, .order-box { grid-template-columns: 1fr; }
  .order-img { position: static; max-width: 11rem; margin: 5px; }
  .order-box { gap: 1.75rem; }
  .sticky { display: flex; }
  .foot { padding-bottom: calc(6rem + env(safe-area-inset-bottom)); flex-wrap: wrap; }

  /* Bigger, full-width tap targets */
  .top { padding-left: max(var(--pad), env(safe-area-inset-left)); padding-right: max(var(--pad), env(safe-area-inset-right)); }
  .color-pick .swatch { flex: 1; justify-content: center; }
  .opts:not(.opts-stack) label { flex: 1; }
  .opts:not(.opts-stack) span { min-height: 3.25rem; font-size: 1.1rem; }
  .opts-stack span { min-height: 3.25rem; }
  .qty button { width: 3.5rem; height: 3.25rem; }
  .field input { min-height: 3.25rem; }
  .btn-big { padding: 1.05rem 1.5rem; }
  .hero { padding-top: 1.25rem; gap: 1.5rem; }
  .details, .colors, .order, .faq { padding-top: 2.75rem; padding-bottom: 2.75rem; }
  .color-card { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
