/* ==========================================================================
   Twaka Co — design system
   Brand: crimson #990000 · black #1a0a00 · cream #fff8ee · League Spartan
   ========================================================================== */

:root {
  /* Brand */
  --crimson: #990000;
  --crimson-deep: #6d0000;
  --ink: #1a0a00;
  --cream: #fff8ee;

  /* Supporting tones derived from the product photography */
  --plum: #3f0a16;
  --sand: #f2e6d5;
  --sand-deep: #e6d4bd;
  --muted: #7a6555;

  /* Surfaces */
  --bg: var(--cream);
  --surface: #fffdf9;
  --line: rgba(26, 10, 0, 0.12);
  --line-soft: rgba(26, 10, 0, 0.07);

  /* Type */
  --font: "League Spartan", "Helvetica Neue", Arial, sans-serif;
  --display: clamp(3.25rem, 12.5vw, 11.25rem); /* tops out at 180px */
  --h1: clamp(2.25rem, 6vw, 4rem);
  --h2: clamp(1.75rem, 4vw, 2.75rem);
  --h3: clamp(1.15rem, 2vw, 1.5rem);

  /* Space */
  --gap: clamp(1rem, 2.5vw, 2rem);
  --pad-x: clamp(1.15rem, 5vw, 4.5rem);
  --section: clamp(3.5rem, 9vw, 8rem);
  --radius: 14px;
  --radius-sm: 8px;

  --shadow: 0 18px 44px -22px rgba(26, 10, 0, 0.45);
  --shadow-lift: 0 26px 60px -26px rgba(26, 10, 0, 0.55);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.075rem);
  line-height: 1.6;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Warm paper grain, keeps the cream from reading as flat white */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Layout classes set display, which would otherwise beat the UA [hidden] rule. */
[hidden] { display: none !important; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
}
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

:focus-visible {
  outline: 2px solid var(--crimson);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --------------------------------------------------------------- layout -- */

.wrap {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--pad-x);
}
.wrap--narrow { max-width: 880px; }

.section { padding-block: var(--section); }
.section--tight { padding-block: clamp(2.5rem, 6vw, 4.5rem); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10000;
  background: var(--crimson);
  color: var(--cream);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------------------------------------------------------------- type --- */

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--crimson);
  margin-bottom: 1.15rem;
}
.eyebrow--muted { color: var(--muted); }

.display {
  font-size: var(--display);
  font-weight: 800;
  line-height: 0.82;
  letter-spacing: -0.045em;
}
.h1 { font-size: var(--h1); }
.h2 { font-size: var(--h2); }
.h3 { font-size: var(--h3); letter-spacing: -0.02em; }

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  color: rgba(26, 10, 0, 0.78);
  max-width: 52ch;
}
.muted { color: var(--muted); }
.crimson { color: var(--crimson); }
.spaced { letter-spacing: 0.28em; text-transform: uppercase; }
.tnum { font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------- buttons -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.9rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--crimson);
  color: var(--cream);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.28s var(--ease), background 0.28s var(--ease),
    box-shadow 0.28s var(--ease), color 0.28s var(--ease);
}
.btn:hover { background: var(--crimson-deep); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn[disabled], .btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
/* Secondary CTA that has to hold its own next to the crimson primary — a full
   ink border, not the faint hairline .btn--ghost uses for tertiary actions. */
.btn--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.btn__arrow { display: inline-block; transition: transform 0.3s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn--ink { background: var(--ink); }
.btn--ink:hover { background: #2d1305; }
.btn--block { width: 100%; }
.btn--sm { padding: 0.62rem 1.15rem; font-size: 0.76rem; }

.link-underline {
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  font-weight: 600;
  transition: opacity 0.25s var(--ease);
}
.link-underline:hover { opacity: 0.6; }

/* --------------------------------------------------------------- header -- */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 248, 238, 0.86);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  min-height: 72px;
}
/* Wordmark, matched to the pouch: heavy League Spartan in crimson, with the
   chilli floating above the "k" rather than sitting between the letters. */
.logo {
  display: inline-block;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.035em;
  color: var(--crimson);
  line-height: 1;
  white-space: nowrap;
}
.logo__k { position: relative; }
.logo__chilli {
  position: absolute;
  left: 50%;
  bottom: 0.90em;          /* tip rests just on the top of the "k" */
  height: 0.46em;          /* ~60% of cap height, as on the pouch */
  width: auto;
  transform: translateX(-38%) rotate(24deg);
  transform-origin: 50% 100%;
  pointer-events: none;
  overflow: visible;
}

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2.1rem); }
.nav a {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.72;
  transition: opacity 0.25s var(--ease), color 0.25s var(--ease);
}
.nav a:hover { opacity: 1; }
.nav a[aria-current="page"] { opacity: 1; color: var(--crimson); }

.header__actions { display: flex; align-items: center; gap: 0.75rem; }

.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 42px;
  padding: 0 1.1rem 0 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
    border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.cart-btn:hover {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
  transform: translateY(-1px);
}
.cart-btn__icon { width: 17px; height: 17px; flex: none; }

/* Badge is absolutely positioned so the pill never changes width — the header
   would otherwise shift sideways every time the count ticks over. */
.cart-count {
  position: absolute;
  top: -4px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--crimson);
  color: var(--cream);
  border: 2px solid var(--bg);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* Small kick when something lands in the cart. */
.cart-btn.is-bump { animation: bump 0.45s var(--ease); }
@keyframes bump {
  30% { transform: scale(1.09); }
  60% { transform: scale(0.97); }
  100% { transform: scale(1); }
}

.burger {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  place-items: center;
}
.burger span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
  position: relative;
  transition: transform 0.3s var(--ease), background 0.2s;
}
.burger span::before,
.burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s var(--ease);
}
.burger span::before { top: -5px; }
.burger span::after { top: 5px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: translateY(5px) rotate(45deg); }
.burger[aria-expanded="true"] span::after { transform: translateY(-5px) rotate(-45deg); }

/* Announcement ticker */
.ticker {
  background: var(--crimson);
  color: var(--cream);
  overflow: hidden;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.ticker__track {
  display: flex;
  gap: 3rem;
  width: max-content;
  padding: 0.6rem 0;
  animation: ticker 34s linear infinite;
}
.ticker__track span { white-space: nowrap; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ----------------------------------------------------------------- hero -- */

.hero { position: relative; padding-block: clamp(2.5rem, 6vw, 5rem) 0; overflow: hidden; }
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
}
.hero__word {
  font-size: var(--display);
  font-weight: 800;
  line-height: 0.78;
  letter-spacing: -0.05em;
  color: var(--ink);
  margin-bottom: 1.5rem;
}
.hero__word em { font-style: normal; color: var(--crimson); }
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  margin-top: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}
.hero__meta div { min-width: 88px; }
.hero__meta dt {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.hero__meta dd { margin: 0; font-weight: 700; font-size: 1.05rem; }

.hero__cta { display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: center; }

/* ---------------------------------------------------------------- media -- */

.shot {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 30% 10%, #fdf2e2 0%, var(--sand) 45%, var(--sand-deep) 100%);
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
}
/* Real photography sits above the fallback artwork; ui.js strips the <img>
   if the file isn't there yet, revealing the drawn pouch underneath. */
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.shot--square { aspect-ratio: 1 / 1; }
.shot--wide { aspect-ratio: 16 / 10; }

/* Fallback artwork shown until real photography is dropped into /assets */
.shot__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem;
  gap: 0.5rem;
}
.shot__ph .pouch {
  width: min(58%, 260px);
  aspect-ratio: 3 / 4.4;
  border-radius: 10px 10px 16px 16px;
  background: linear-gradient(160deg, #f6ede0 0%, #e8d8c2 40%, #dcc7ab 100%);
  border: 1px solid rgba(26, 10, 0, 0.14);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 12% 10% 10%;
  gap: 8%;
}
.shot__ph .pouch > span {
  display: block;
  background: var(--cream);
  border-radius: 3px;
  padding: 9% 6%;
  text-align: center;
  box-shadow: 0 2px 8px rgba(26, 10, 0, 0.08);
}
.shot__ph .pouch b {
  font-size: clamp(0.9rem, 2.2vw, 1.5rem);
  color: var(--crimson);
  letter-spacing: -0.03em;
  line-height: 1;
}
.shot__ph .pouch i {
  display: block;
  font-style: normal;
  font-size: 0.55rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink);
  margin-top: 0.4rem;
}
.shot__ph .pouch u {
  text-decoration: none;
  border-radius: 6px;
  background: linear-gradient(150deg, var(--plum), #24050d 60%, #5a0f1e 100%);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.badge-float {
  position: absolute;
  right: clamp(0.75rem, 2vw, 1.5rem);
  top: clamp(0.75rem, 2vw, 1.5rem);
  display: grid;
  place-items: center;
  width: clamp(76px, 9vw, 104px);
  aspect-ratio: 1;
  border-radius: 999px;
  background: var(--crimson);
  color: var(--cream);
  text-align: center;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.25;
  box-shadow: var(--shadow);
  z-index: 2;
}

/* ---------------------------------------------------------------- cards -- */

.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 2.5vw, 2rem);
}
.card--flat { background: transparent; }

.grid { display: grid; gap: var(--gap); }

/* Two-column page layouts. Set the ratio inline with --cols (a custom property,
   so the collapse media query below still wins on narrow screens). */
.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  grid-template-columns: var(--cols, 1fr 1fr);
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.feature { padding: clamp(1.25rem, 2.4vw, 1.9rem) 0; border-top: 1px solid var(--line); }
.feature__no {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--crimson);
  display: block;
  margin-bottom: 0.85rem;
}
.feature h3 { margin-bottom: 0.5rem; }
.feature p { color: var(--muted); font-size: 0.95rem; }

/* ----------------------------------------------------------- split band -- */

.band {
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 4.5rem);
}
.band .muted { color: rgba(255, 248, 238, 0.62); }
.band .eyebrow { color: #ff6b6b; }

.stat { text-align: left; }
.stat b {
  display: block;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat span {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.66;
}

/* -------------------------------------------------------- product page --- */

.pdp { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.pdp__media { position: sticky; top: 96px; display: grid; gap: 0.75rem; }
.pdp__thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
.pdp__thumbs button {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--sand);
  aspect-ratio: 1;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.pdp__thumbs button[aria-selected="true"] { border-color: var(--crimson); transform: translateY(-2px); }

.price-row { display: flex; align-items: baseline; gap: 0.75rem; margin: 0.35rem 0 1.25rem; }
.price { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; }
.price-mrp { text-decoration: line-through; color: var(--muted); font-weight: 600; }
.price-off {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--crimson);
  background: rgba(153, 0, 0, 0.09);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.stars { color: var(--crimson); letter-spacing: 0.15em; font-size: 0.9rem; }

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
}
.qty button {
  width: 46px;
  height: 46px;
  border: 0;
  background: transparent;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.qty button:hover { background: var(--sand); }
.qty button[disabled] { opacity: 0.3; cursor: not-allowed; }
.qty input {
  width: 46px;
  height: 46px;
  border: 0;
  background: transparent;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Primary CTA block: qty + Add to cart on one row, Buy it now beneath.
   Everything is locked to one height so the three controls align. */
.buy-cta { margin: 1.5rem 0 1.25rem; display: grid; gap: 0.75rem; }
.buy-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: stretch; }
.buy-row .qty { flex: 0 0 auto; }
.buy-row .btn { flex: 1 1 190px; }
.buy-cta .btn { min-height: 54px; padding-block: 0; }
.buy-cta .qty { height: 54px; }
.buy-cta .qty button { width: 50px; height: 52px; }
.buy-cta .qty input { width: 46px; height: 52px; }

.pill-list { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.pill-list li {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}

/* Accordion */
.acc { border-top: 1px solid var(--line); }
.acc__item { border-bottom: 1px solid var(--line); }
.acc__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0;
  background: none;
  border: 0;
  text-align: left;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  cursor: pointer;
}
.acc__btn::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--crimson);
  transition: transform 0.3s var(--ease);
}
.acc__btn[aria-expanded="true"]::after { transform: rotate(45deg); }
.acc__panel { display: none; padding-bottom: 1.25rem; color: var(--muted); font-size: 0.95rem; }
.acc__panel[data-open] { display: block; }
.acc__panel table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.acc__panel td { padding: 0.45rem 0; border-bottom: 1px dashed var(--line-soft); }
.acc__panel td:last-child { text-align: right; font-weight: 700; color: var(--ink); }

/* ------------------------------------------------------------ cart/table -- */

.line {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 1.15rem;
  align-items: center;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}
.line__thumb {
  width: 96px;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: linear-gradient(160deg, var(--sand), var(--sand-deep));
  display: grid;
  place-items: center;
}
.line__thumb u {
  text-decoration: none;
  width: 62%;
  height: 62%;
  border-radius: 4px;
  background: linear-gradient(150deg, var(--plum), #24050d 70%);
}
.line__title { font-weight: 700; letter-spacing: -0.015em; }
.line__meta { font-size: 0.82rem; color: var(--muted); }
.line__end { text-align: right; display: grid; gap: 0.5rem; justify-items: end; }
.line-remove {
  background: none;
  border: 0;
  padding: 0;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.line-remove:hover { color: var(--crimson); }

.summary { display: grid; gap: 0.7rem; }
.summary__row { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.95rem; }
.summary__row span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; }
.summary__total {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.9rem;
  margin-top: 0.35rem;
  border-top: 1px solid var(--line);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.empty { text-align: center; padding: clamp(3rem, 8vw, 6rem) 1rem; }
.empty svg { margin: 0 auto 1.5rem; opacity: 0.35; }

/* ---------------------------------------------------------------- forms -- */

.field { display: grid; gap: 0.4rem; margin-bottom: 1.1rem; }
.field label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--crimson);
  box-shadow: 0 0 0 3px rgba(153, 0, 0, 0.1);
}
.field input:user-invalid { border-color: var(--crimson); }
.field .err { font-size: 0.75rem; color: var(--crimson); font-weight: 600; min-height: 1em; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.field-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

fieldset { border: 0; padding: 0; margin: 0 0 2rem; }
legend {
  padding: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--crimson);
  margin-bottom: 1.15rem;
}

/* ---------------------------------------------------------------- steps -- */

.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.steps li { display: flex; align-items: center; gap: 0.5rem; }
.steps li::before {
  content: counter(list-item);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.68rem;
}
.steps li[aria-current] { color: var(--crimson); }
.steps li[aria-current]::before { background: var(--crimson); color: var(--cream); border-color: var(--crimson); }
.steps li[data-done] { color: var(--ink); }
.steps li[data-done]::before { content: "✓"; background: var(--ink); color: var(--cream); border-color: var(--ink); }

/* -------------------------------------------------------------- tracker -- */

.track {
  display: grid;
  gap: 0;
  counter-reset: t;
  margin: 2rem 0;
}
.track__step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 1.1rem;
  padding-bottom: 1.75rem;
  position: relative;
}
.track__step:last-child { padding-bottom: 0; }
.track__step::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 34px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}
.track__step:last-child::before { display: none; }
.track__dot {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  position: relative;
  z-index: 1;
}
.track__step[data-state="done"] .track__dot { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.track__step[data-state="current"] .track__dot { background: var(--crimson); border-color: var(--crimson); color: var(--cream); }
.track__step[data-state="current"] .track__dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 999px;
  border: 1px solid var(--crimson);
  opacity: 0.35;
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(0.9); opacity: 0.5; } 100% { transform: scale(1.35); opacity: 0; } }
.track__label { font-weight: 700; letter-spacing: -0.015em; }
.track__time { font-size: 0.82rem; color: var(--muted); }
.track__step[data-state="todo"] .track__label { color: var(--muted); font-weight: 600; }

/* ---------------------------------------------------------------- table -- */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.9rem;
}
table.data th {
  text-align: left;
  padding: 0.75rem 0.85rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data td {
  padding: 0.9rem 0.85rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
table.data tbody tr { transition: background 0.2s; }
table.data tbody tr:hover { background: rgba(153, 0, 0, 0.035); }
table.data td.tnum { font-variant-numeric: tabular-nums; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.tag--paid      { color: #1f6b3a; background: rgba(31, 107, 58, 0.1); }
.tag--pending   { color: #94631a; background: rgba(148, 99, 26, 0.12); }
.tag--packed    { color: #2c4c8c; background: rgba(44, 76, 140, 0.1); }
.tag--shipped   { color: #6b3fa0; background: rgba(107, 63, 160, 0.1); }
.tag--delivered { color: #1f6b3a; background: rgba(31, 107, 58, 0.1); }
.tag--cancelled { color: var(--crimson); background: rgba(153, 0, 0, 0.09); }
.tag--refunded  { color: var(--muted); background: rgba(122, 101, 85, 0.12); }

select.status-select {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

/* ------------------------------------------------------------ kpi cards -- */

.kpi { display: grid; gap: 0.35rem; }
.kpi b {
  font-size: clamp(1.6rem, 3.2vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.kpi span {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.kpi small { font-size: 0.78rem; color: var(--crimson); font-weight: 600; }

/* -------------------------------------------------------------- notices -- */

.notice {
  display: flex;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line);
  background: rgba(153, 0, 0, 0.04);
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.5;
}
.notice b { color: var(--crimson); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 140%);
  z-index: 500;
  background: var(--ink);
  color: var(--cream);
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-lift);
  transition: transform 0.45s var(--ease);
  max-width: calc(100vw - 2rem);
  text-align: center;
}
.toast[data-show] { transform: translate(-50%, 0); }

/* --------------------------------------------------------------- footer -- */

.footer { background: var(--ink); color: var(--cream); padding-block: clamp(3rem, 7vw, 5.5rem) 2rem; margin-top: var(--section); }
.footer a { opacity: 0.66; transition: opacity 0.25s var(--ease); }
.footer a:hover { opacity: 1; }
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: clamp(2rem, 4vw, 3rem);
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
  border-bottom: 1px solid rgba(255, 248, 238, 0.14);
}
.footer h4 {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 1.1rem;
  font-weight: 700;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; font-size: 0.92rem; }
.footer .logo { color: var(--cream); font-size: 1.9rem; }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  padding-top: 1.75rem;
  font-size: 0.78rem;
  opacity: 0.55;
}
.footer__note { max-width: 40ch; font-size: 0.92rem; opacity: 0.66; margin-top: 1rem; }

/* --------------------------------------------------------------- motion -- */

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
[data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------ responsive -- */

@media (max-width: 1024px) {
  .pdp { grid-template-columns: 1fr; }
  .pdp__media { position: static; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split > aside { position: static !important; }
}

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .grid--3 { grid-template-columns: 1fr; }
  .grid--2 { grid-template-columns: 1fr; }

  .burger { display: grid; }
  .nav {
    position: fixed;
    inset: 0 0 auto;
    top: 0;
    padding: 96px var(--pad-x) 2.5rem;
    background: var(--cream);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    transform: translateY(-102%);
    transition: transform 0.45s var(--ease);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    z-index: 90;
  }
  .nav[data-open] { transform: translateY(0); }
  .nav a {
    width: 100%;
    padding: 1rem 0;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--line-soft);
    opacity: 1;
  }
  .nav .nav__cta { margin-top: 1.25rem; border: 0; }
}

@media (max-width: 640px) {
  .field-row, .field-row--3 { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .grid--4 { grid-template-columns: 1fr 1fr; }
  .line { grid-template-columns: 72px 1fr; }
  .line__thumb { width: 72px; }
  .line__end { grid-column: 1 / -1; justify-items: start; text-align: left; }

  /* Collapse to a round icon button rather than a pill holding a bare number. */
  .cart-btn__label { display: none; }
  .cart-btn { width: 42px; padding: 0; justify-content: center; gap: 0; }
}

@media print {
  .header, .footer, .ticker, .btn, .no-print { display: none !important; }
  body { background: #fff; }
}
