/*
 * Prime Clothing — design system and shared components.
 * Page-only styles live in assets/css/pages/<page>.css.
 *
 * Palette
 *   chalk     #F5F5F1  page background
 *   stone     #E0DFD8  photo backdrop + image tiles (matches the product photos)
 *   ink       #121417  text, primary buttons, footer
 *   graphite  #575A61  secondary text
 *   cobalt    #2B3BD1  the woven-label accent: labels, focus, selected states
 *   line      #D3D2CB  hairlines
 *
 * Type
 *   Archivo (variable width + weight): expanded 125% for display, normal width for text
 *   IBM Plex Mono: spec data — fabric weights, sizes, SKUs, order numbers
 */

@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-latin-var.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/ibm-plex-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/ibm-plex-mono-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  --chalk: #f5f5f1;
  --stone: #e0dfd8;
  --stone-deep: #cfcdc4;
  --ink: #121417;
  --ink-soft: #2a2d33;
  --graphite: #575a61;
  --cobalt: #2b3bd1;
  --cobalt-deep: #1f2ca8;
  --cobalt-tint: #e6e8fb;
  --line: #d3d2cb;
  --white: #ffffff;
  --error: #b42318;
  --error-tint: #fdecea;
  --success: #1f7a4d;
  --success-tint: #e6f4ec;
  --warning: #8a5a00;
  --warning-tint: #fdf3dc;

  --font-sans: 'Archivo', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.375rem;
  --fs-xl: clamp(1.625rem, 1.2rem + 1.6vw, 2.25rem);
  --fs-2xl: clamp(2rem, 1.3rem + 3vw, 3.5rem);
  --fs-hero: clamp(2.6rem, 0.9rem + 7.2vw, 7.25rem);

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  --radius: 3px;
  --container: 1320px;
  --gutter: clamp(16px, 4vw, 40px);
  --announce-h: 36px;
  --header-h: 64px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-fast: 140ms;
  --dur: 240ms;
  --shadow-panel: 0 24px 60px rgba(18, 20, 23, 0.18);
}

/* ------------------------------------------------------------------ reset */

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
body {
  margin: 0;
  background: var(--chalk);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-stretch: 100%;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main {
  flex: 1 0 auto;
}
main:focus {
  outline: none;
}
img,
svg,
picture {
  display: block;
  max-width: 100%;
}
img {
  height: auto;
}
h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
figure,
blockquote {
  margin: 0;
}
ul[role='list'],
ol[role='list'] {
  list-style: none;
  padding: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--cobalt);
}
:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 2px;
}
::selection {
  background: var(--cobalt);
  color: var(--white);
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--s-6) 0;
}
[hidden] {
  display: none !important;
}

/* ------------------------------------------------------------- typography */

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
h1 {
  font-size: var(--fs-2xl);
}
h2 {
  font-size: var(--fs-xl);
}
h3 {
  font-size: var(--fs-lg);
}
h4 {
  font-size: var(--fs-md);
}

/* Expanded uppercase display type — the voice of the woven label. Use sparingly. */
.display {
  font-stretch: 125%;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.015em;
  line-height: 0.95;
}
.page-title {
  font-stretch: 125%;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.015em;
  line-height: 1;
  font-size: var(--fs-2xl);
}
.section-title {
  font-stretch: 125%;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.05;
  font-size: var(--fs-xl);
}
/* Mono "spec" text: fabric weights, sizes, SKUs, order numbers, small labels. */
.mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
}
.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graphite);
}
.lede {
  font-size: var(--fs-md);
  color: var(--ink-soft);
  max-width: 60ch;
}
.muted {
  color: var(--graphite);
}
.small {
  font-size: var(--fs-sm);
}
.text-link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.text-link:hover {
  color: var(--cobalt);
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow {
  max-width: 820px;
}
.container--form {
  max-width: 560px;
}
.section {
  padding-block: clamp(48px, 7vw, 96px);
}
.section--tight {
  padding-block: clamp(32px, 4vw, 56px);
}
.stack > * + * {
  margin-top: var(--s-4);
}
.stack-lg > * + * {
  margin-top: var(--s-6);
}
.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
}

/* Inner-page heading block (everything except the home hero). */
.page-head {
  padding-block: clamp(32px, 5vw, 64px) clamp(24px, 3vw, 40px);
  border-bottom: 1px solid var(--line);
}
.page-head .eyebrow {
  margin-bottom: var(--s-3);
}
.page-head .lede {
  margin-top: var(--s-4);
}

.breadcrumbs {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--graphite);
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  list-style: none;
  padding: 0;
  margin: 0;
}
.breadcrumbs li + li::before {
  content: '/';
  margin-right: var(--s-2);
  color: var(--stone-deep);
}
.breadcrumbs a {
  text-decoration: none;
}
.breadcrumbs a:hover {
  text-decoration: underline;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: var(--s-3);
  top: -100px;
  z-index: 100;
  background: var(--ink);
  color: var(--white);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--radius);
  text-decoration: none;
}
.skip-link:focus {
  top: var(--s-3);
  color: var(--white);
}
.noscript {
  background: var(--warning-tint);
  color: var(--warning);
  padding: var(--s-3) var(--gutter);
  text-align: center;
  font-size: var(--fs-sm);
}

/* ------------------------------------------------------------ woven label */
/*
 * The signature: a cobalt woven label with a stitched inset border and a faint
 * weave. Used for the logo, product badges and the order "receipt".
 */
.woven {
  --woven-bg: var(--cobalt);
  --woven-fg: var(--white);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.5em 0.85em;
  background-color: var(--woven-bg);
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.06) 0 1px, transparent 1px 4px);
  color: var(--woven-fg);
  font-stretch: 125%;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
  border-radius: 2px;
}
.woven::after {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px dashed rgba(255, 255, 255, 0.55);
  border-radius: 1px;
  pointer-events: none;
}
.woven--ink {
  --woven-bg: var(--ink);
}
.woven--sm {
  font-size: 0.6875rem;
  padding: 0.55em 0.8em;
}

/* Logo: woven PRIME label + mono CLOTHING. */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.logo:hover {
  color: var(--ink);
}
.logo .woven {
  font-size: 0.9375rem;
  padding: 0.55em 0.8em;
}
.logo__word {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* Care label: a sewn-in white label for specs (fabric, weight, care). */
.care-label {
  position: relative;
  background: var(--white);
  padding: var(--s-5);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  letter-spacing: 0.01em;
}
.care-label::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px dashed var(--line);
  pointer-events: none;
}
.care-label__title {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--fs-xs);
  color: var(--graphite);
  margin-bottom: var(--s-2);
}

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

.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--white);
  --btn-border: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 48px;
  padding: 0 var(--s-5);
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover {
  --btn-bg: var(--cobalt);
  --btn-border: var(--cobalt);
  color: var(--btn-fg);
}
.btn:active {
  transform: translateY(1px);
}
.btn[disabled],
.btn[aria-disabled='true'] {
  --btn-bg: var(--stone);
  --btn-fg: var(--graphite);
  --btn-border: var(--stone);
  cursor: not-allowed;
  transform: none;
}
.btn--accent {
  --btn-bg: var(--cobalt);
  --btn-border: var(--cobalt);
}
.btn--accent:hover {
  --btn-bg: var(--cobalt-deep);
  --btn-border: var(--cobalt-deep);
}
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-border: var(--ink);
}
.btn--ghost:hover {
  --btn-bg: var(--ink);
  --btn-fg: var(--white);
  --btn-border: var(--ink);
}
.btn--light {
  --btn-bg: var(--white);
  --btn-fg: var(--ink);
  --btn-border: var(--white);
}
.btn--light:hover {
  --btn-bg: var(--cobalt);
  --btn-fg: var(--white);
  --btn-border: var(--cobalt);
}
.btn--block {
  width: 100%;
}
.btn--lg {
  min-height: 56px;
  font-size: 1rem;
  padding: 0 var(--s-6);
}
.btn--sm {
  min-height: 44px;
  padding: 0 var(--s-4);
  font-size: var(--fs-sm);
}
.btn .icon {
  width: 18px;
  height: 18px;
}
.btn.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.btn.is-loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid var(--btn-fg);
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Square icon-only buttons (header, drawers, steppers). Always give them an aria-label. */
.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover {
  background: var(--stone);
  color: var(--ink);
}
.icon-btn .icon {
  width: 22px;
  height: 22px;
}
.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--fill {
  fill: currentColor;
}
.count-badge {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--cobalt);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 18px;
  text-align: center;
}
.count-badge:empty,
.count-badge[data-count='0'] {
  display: none;
}

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

.form-grid {
  display: grid;
  gap: var(--s-4);
}
.form-row {
  display: grid;
  gap: var(--s-4);
}
@media (min-width: 560px) {
  .form-row--2 {
    grid-template-columns: 1fr 1fr;
  }
  .form-row--3 {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.field__label {
  font-size: var(--fs-sm);
  font-weight: 600;
}
.field__label .optional {
  font-weight: 400;
  color: var(--graphite);
}
.field__hint {
  font-size: var(--fs-sm);
  color: var(--graphite);
}
.field__error {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  font-size: var(--fs-sm);
  color: var(--error);
}
.field__error:empty {
  display: none;
}
.input,
.select,
.textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #a9a8a1;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font-size: 1rem; /* 16px keeps iOS from zooming on focus */
  line-height: 1.3;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.input::placeholder,
.textarea::placeholder {
  color: #85878d;
}
.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--ink);
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--cobalt);
  box-shadow: 0 0 0 3px var(--cobalt-tint);
}
.input[aria-invalid='true'],
.select[aria-invalid='true'],
.textarea[aria-invalid='true'] {
  border-color: var(--error);
}
.input[aria-invalid='true']:focus,
.select[aria-invalid='true']:focus,
.textarea[aria-invalid='true']:focus {
  box-shadow: 0 0 0 3px var(--error-tint);
}
.input[readonly] {
  background: var(--chalk);
}
.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23121417' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.textarea {
  min-height: 140px;
  resize: vertical;
}
.input-group {
  display: flex;
  gap: var(--s-2);
}
.input-group .input {
  flex: 1;
  min-width: 0;
}
.password-field {
  position: relative;
}
.password-field .input {
  padding-right: 72px;
}
.password-field__toggle {
  position: absolute;
  right: 4px;
  top: 2px;
  height: 44px;
  min-width: 60px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.check {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  min-height: 44px;
  padding-block: 10px;
  cursor: pointer;
  font-size: var(--fs-sm);
  line-height: 1.45;
}
.check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--cobalt);
}

/* Selectable cards for shipping methods, saved addresses, etc. */
.choice {
  position: relative;
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  padding: var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.choice:hover {
  border-color: var(--ink);
}
.choice input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--cobalt);
}
.choice:has(input:checked) {
  border-color: var(--cobalt);
  box-shadow: inset 0 0 0 1px var(--cobalt);
}
.choice:has(input:focus-visible) {
  outline: 2px solid var(--cobalt);
  outline-offset: 2px;
}
.choice__body {
  flex: 1;
  min-width: 0;
}
.choice__aside {
  margin-left: auto;
  font-weight: 600;
  white-space: nowrap;
}
.choice-list {
  display: grid;
  gap: var(--s-2);
}

/* Error summary shown at the top of a form after a failed submit. */
.form-alert {
  padding: var(--s-4);
  border-left: 3px solid var(--error);
  background: var(--error-tint);
  color: var(--error);
  font-size: var(--fs-sm);
}
.form-alert:empty {
  display: none;
}

/* ------------------------------------------------------- chips & swatches */

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}
.chip {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-width: 56px;
  min-height: 48px;
  padding: 0 var(--s-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
.chip:hover {
  border-color: var(--ink);
}
.chip[aria-pressed='true'],
.chip[aria-checked='true'],
.chip.is-selected {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}
.chip[aria-disabled='true'],
.chip:disabled {
  color: #9a9ba0;
  background: var(--chalk);
  cursor: not-allowed;
  background-image: linear-gradient(to top right, transparent calc(50% - 0.5px), var(--line) 50%, transparent calc(50% + 0.5px));
}
/* Filter pills on the shop page. */
.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  padding: 0 var(--s-4);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.pill:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.pill[aria-pressed='true'],
.pill[aria-current='page'],
.pill.is-selected {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}
.pill .mono {
  font-size: 0.75rem;
  opacity: 0.75;
}
.swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--swatch, var(--ink));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}
.swatch-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.swatch-btn .swatch {
  width: 28px;
  height: 28px;
}
.swatch-btn[aria-pressed='true'],
.swatch-btn[aria-checked='true'] {
  border-color: var(--ink);
}

/* -------------------------------------------------------------- price */

.price {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.price__compare {
  margin-left: var(--s-2);
  color: var(--graphite);
  font-weight: 400;
  text-decoration: line-through;
}
.price--sale .price__now {
  color: var(--cobalt);
}

/* ------------------------------------------------------- quantity stepper */

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.qty button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.qty button:hover {
  background: var(--stone);
}
.qty button:disabled {
  color: #b4b5b9;
  cursor: not-allowed;
  background: transparent;
}
.qty button .icon {
  width: 16px;
  height: 16px;
}
.qty__value {
  min-width: 32px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------------------- product card */

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-6) var(--s-3);
}
@media (min-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--s-7) var(--s-5);
  }
}
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  min-width: 0;
}
.product-card__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--stone);
  border-radius: 2px;
}
.product-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity var(--dur) var(--ease), transform 600ms var(--ease);
}
.product-card__media img + img {
  opacity: 0;
}
@media (hover: hover) {
  .product-card:hover .product-card__media img:first-child {
    transform: scale(1.02);
  }
  .product-card:hover .product-card__media img + img {
    opacity: 1;
  }
}
.product-card__badge {
  position: absolute;
  left: var(--s-3);
  top: var(--s-3);
  z-index: 1;
}
.product-card__wish {
  position: absolute;
  right: 6px;
  top: 6px;
  z-index: 2;
}
.product-card__body {
  display: grid;
  gap: 4px;
}
.product-card__row {
  display: flex;
  justify-content: space-between;
  gap: var(--s-3);
  align-items: baseline;
}
.product-card__name {
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1.3;
}
.product-card__name a {
  text-decoration: none;
}
/* The whole card is clickable through the name link. */
.product-card__name a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}
.product-card__spec {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--graphite);
}
.product-card__swatches {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}
.product-card__soldout {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--error);
}

/* Wishlist heart toggle */
.wish-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(245, 245, 241, 0.86);
  color: var(--ink);
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.wish-btn:hover {
  background: var(--white);
  color: var(--cobalt);
}
.wish-btn .icon {
  width: 20px;
  height: 20px;
}
.wish-btn[aria-pressed='true'] {
  color: var(--cobalt);
}
.wish-btn[aria-pressed='true'] .icon {
  fill: currentColor;
}

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

#site-header {
  position: sticky;
  top: calc(var(--announce-h) * -1);
  z-index: 40;
  min-height: calc(var(--announce-h) + var(--header-h));
}
.announce {
  height: var(--announce-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: var(--gutter);
  background: var(--ink);
  color: var(--chalk);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-header {
  height: var(--header-h);
  background: rgba(245, 245, 241, 0.94);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--s-3);
}
.site-header__start {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  min-width: 0;
}
.site-header__end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}
.main-nav {
  display: none;
}
.main-nav ul {
  display: flex;
  gap: var(--s-1);
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--s-3);
  white-space: nowrap;
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
}
.main-nav a:hover {
  background: var(--stone);
  color: var(--ink);
}
.main-nav a[aria-current='page'] {
  text-decoration: underline;
  text-decoration-color: var(--cobalt);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.menu-btn {
  display: inline-grid;
}
@media (min-width: 1000px) {
  .main-nav {
    display: block;
  }
  .menu-btn {
    display: none;
  }
}
@media (min-width: 1000px) and (max-width: 1199.98px) {
  .main-nav ul {
    gap: 0;
  }
  .main-nav a {
    padding: 0 var(--s-2);
  }
}
@media (max-width: 380px) {
  .logo__word {
    display: none;
  }
}
/* Hide the wishlist shortcut on very small screens; it stays in the menu. */
@media (max-width: 359px) {
  .header-wish {
    display: none;
  }
}

/* ---------------------------------------------------------------- drawers */

.drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  visibility: hidden;
  pointer-events: none;
}
.drawer.is-open {
  visibility: visible;
  pointer-events: auto;
}
.drawer__scrim {
  position: absolute;
  inset: 0;
  background: rgba(18, 20, 23, 0.45);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.drawer.is-open .drawer__scrim {
  opacity: 1;
}
.drawer__panel {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: min(440px, 100%);
  display: flex;
  flex-direction: column;
  background: var(--chalk);
  box-shadow: var(--shadow-panel);
  transform: translateX(100%);
  transition: transform var(--dur) var(--ease);
}
.drawer--left .drawer__panel {
  right: auto;
  left: 0;
  width: min(360px, 88%);
  transform: translateX(-100%);
}
.drawer.is-open .drawer__panel {
  transform: none;
}
.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  min-height: var(--header-h);
  padding: 0 var(--s-3) 0 var(--s-5);
  border-bottom: 1px solid var(--line);
}
.drawer__title {
  font-stretch: 125%;
  font-weight: 800;
  text-transform: uppercase;
  font-size: var(--fs-md);
  letter-spacing: -0.005em;
}
.drawer__body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--s-5);
}
.drawer__foot {
  padding: var(--s-5);
  border-top: 1px solid var(--line);
  background: var(--white);
  display: grid;
  gap: var(--s-3);
}
.mobile-nav {
  display: grid;
  gap: var(--s-1);
}
.mobile-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  font-size: var(--fs-md);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.mobile-nav__secondary a {
  font-size: var(--fs-base);
  font-weight: 400;
  min-height: 44px;
  border: 0;
}
body.has-overlay {
  overflow: hidden;
}

/* Cart lines (drawer + bag page + checkout summary) */
.cart-lines {
  display: grid;
  gap: var(--s-5);
  list-style: none;
  margin: 0;
  padding: 0;
}
.cart-line {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: var(--s-4);
  align-items: start;
}
.cart-line__media {
  display: block;
  aspect-ratio: 4 / 5;
  background: var(--stone);
  border-radius: 2px;
  overflow: hidden;
}
.cart-line__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cart-line__body {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.cart-line__top {
  display: flex;
  justify-content: space-between;
  gap: var(--s-3);
  align-items: baseline;
}
.cart-line__name {
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}
.cart-line__meta {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--graphite);
}
.cart-line__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-top: var(--s-1);
}
.cart-line__remove {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  font-size: var(--fs-sm);
  color: var(--graphite);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.cart-line__remove:hover {
  color: var(--error);
}

/* Free-shipping meter */
.ship-meter {
  display: grid;
  gap: var(--s-2);
  font-size: var(--fs-sm);
}
.ship-meter__text {
  display: flex;
  gap: 6px;
  align-items: flex-start;
}
.ship-meter__text .icon {
  margin-top: 2px;
  color: var(--success);
}
.ship-meter__track {
  height: 4px;
  border-radius: 2px;
  background: var(--stone);
  overflow: hidden;
}
.ship-meter__fill {
  height: 100%;
  width: var(--progress, 0%);
  background: var(--cobalt);
  transition: width var(--dur) var(--ease);
}

/* Totals table (drawer, bag page, checkout, confirmation) */
.totals {
  display: grid;
  gap: var(--s-2);
  margin: 0;
}
.totals__row {
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  font-variant-numeric: tabular-nums;
}
.totals__row dt {
  color: var(--ink-soft);
}
.totals__row dd {
  margin: 0;
  text-align: right;
}
.totals__row--discount dd {
  color: var(--success);
}
.totals__row--total {
  padding-top: var(--s-3);
  margin-top: var(--s-1);
  border-top: 1px solid var(--line);
  font-size: var(--fs-md);
  font-weight: 700;
}
.totals__row--total dt {
  color: var(--ink);
}

/* -------------------------------------------------------- notices & toast */

.notice {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  padding: var(--s-4);
  border-radius: var(--radius);
  background: var(--cobalt-tint);
  color: var(--ink);
  font-size: var(--fs-sm);
  line-height: 1.5;
}
.notice .icon {
  margin-top: 1px;
  color: var(--cobalt);
}
.notice--warning {
  background: var(--warning-tint);
}
.notice--warning .icon {
  color: var(--warning);
}
.notice--error {
  background: var(--error-tint);
  color: var(--error);
}
.notice--error .icon {
  color: var(--error);
}
.notice--success {
  background: var(--success-tint);
}
.notice--success .icon {
  color: var(--success);
}
.notice strong {
  font-weight: 700;
}

.toast-region {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: grid;
  gap: var(--s-2);
  width: min(440px, calc(100% - 32px));
  pointer-events: none;
}
.toast {
  display: flex;
  gap: var(--s-3);
  align-items: center;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--white);
  font-size: var(--fs-sm);
  box-shadow: var(--shadow-panel);
  pointer-events: auto;
  animation: toast-in var(--dur) var(--ease);
}
.toast .icon {
  color: #9aa5ff;
}
.toast--error {
  background: var(--error);
}
.toast--error .icon {
  color: var(--white);
}
.toast a {
  color: var(--white);
  margin-left: auto;
  font-weight: 600;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ---------------------------------------------------------------- dialog */

.modal {
  width: min(640px, calc(100% - 32px));
  max-height: calc(100% - 48px);
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: var(--chalk);
  color: var(--ink);
  box-shadow: var(--shadow-panel);
}
.modal::backdrop {
  background: rgba(18, 20, 23, 0.5);
}
.modal__head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-3) var(--s-3) var(--s-5);
  background: var(--chalk);
  border-bottom: 1px solid var(--line);
}
.modal__title {
  font-stretch: 125%;
  font-weight: 800;
  text-transform: uppercase;
  font-size: var(--fs-md);
}
.modal__body {
  padding: var(--s-5);
  display: grid;
  gap: var(--s-4);
}

/* -------------------------------------------------------------- accordion */

.accordion {
  border-top: 1px solid var(--line);
}
.accordion:last-of-type {
  border-bottom: 1px solid var(--line);
}
.accordion > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  min-height: 56px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.accordion > summary::-webkit-details-marker {
  display: none;
}
.accordion > summary::after {
  content: '';
  flex: none;
  width: 12px;
  height: 12px;
  background: linear-gradient(currentColor, currentColor) center / 12px 1.6px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.6px 12px no-repeat;
  transition: transform var(--dur) var(--ease);
}
.accordion[open] > summary::after {
  transform: rotate(45deg);
}
.accordion__body {
  padding-bottom: var(--s-5);
  color: var(--ink-soft);
}
.accordion__body ul {
  padding-left: 1.2em;
}
.accordion__body li + li {
  margin-top: 4px;
}

/* ----------------------------------------------------------------- tables */

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}
.table th,
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
.table thead th {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--graphite);
  background: var(--white);
}
.table tbody th {
  font-weight: 600;
}
/* Shipping rates (site.js): on phones each rate becomes a two-line card so the
   price never scrolls out of view — method · price, then destination · delivery. */
@media (max-width: 559.98px) {
  .table--rates caption,
  .table--rates thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .table--rates,
  .table--rates tbody,
  .table--rates tr,
  .table--rates th,
  .table--rates td {
    display: block;
  }
  .table--rates tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px var(--s-3);
    padding: var(--s-3) 14px;
    border-bottom: 1px solid var(--line);
  }
  .table--rates tbody tr:last-child {
    border-bottom: 0;
  }
  .table--rates tbody th,
  .table--rates tbody td {
    padding: 0;
    border: 0;
    white-space: normal;
  }
  .table--rates tbody th {
    grid-area: 1 / 1;
  }
  .table--rates tbody td:nth-of-type(3) {
    grid-area: 1 / 2;
    text-align: right;
    font-weight: 600;
    color: var(--ink);
  }
  .table--rates tbody td:nth-of-type(1) {
    grid-area: 2 / 1;
    color: var(--graphite);
  }
  .table--rates tbody td:nth-of-type(2) {
    grid-area: 2 / 2;
    text-align: right;
    color: var(--graphite);
  }
}

/* ------------------------------------------------------------------ prose */
/* Long-form text: legal pages, FAQ answers, about. */

.prose {
  max-width: 72ch;
  color: var(--ink-soft);
  line-height: 1.7;
}
.prose > * + * {
  margin-top: var(--s-4);
}
.prose h2 {
  margin-top: var(--s-7);
  color: var(--ink);
  font-size: var(--fs-lg);
  scroll-margin-top: 8px; /* html's scroll-padding-top already clears the sticky header */
}
.prose h3 {
  margin-top: var(--s-6);
  color: var(--ink);
  font-size: var(--fs-md);
}
.prose ul,
.prose ol {
  padding-left: 1.3em;
}
.prose li + li {
  margin-top: 6px;
}
.prose a {
  color: var(--ink);
}
.prose a:hover {
  color: var(--cobalt);
}
.prose strong {
  color: var(--ink);
}
.toc {
  padding: var(--s-5);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.toc ol {
  margin: var(--s-3) 0 0;
  padding-left: 1.3em;
  display: grid;
  gap: 6px;
  font-size: var(--fs-sm);
}

/* ------------------------------------------------------------ empty state */

.empty-state {
  display: grid;
  justify-items: center;
  gap: var(--s-4);
  padding: var(--s-8) var(--s-4);
  text-align: center;
}
.empty-state p {
  max-width: 42ch;
  color: var(--graphite);
}

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

.site-footer {
  margin-top: var(--s-9);
  background: var(--ink);
  color: #c9cacc;
  font-size: var(--fs-sm);
}
.site-footer a {
  color: #e9e9e6;
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--white);
  text-decoration: underline;
}
.site-footer__top {
  display: grid;
  gap: var(--s-7);
  padding-block: var(--s-8) var(--s-7);
}
@media (min-width: 900px) {
  .site-footer__top {
    grid-template-columns: 1.3fr repeat(3, 1fr);
  }
}
.site-footer__brand {
  display: grid;
  gap: var(--s-4);
  align-content: start;
  max-width: 36ch;
}
.site-footer__brand .logo {
  color: var(--white);
}
.site-footer__brand .logo:hover {
  text-decoration: none;
}
.footer-cols {
  display: contents;
}
@media (max-width: 899px) {
  .footer-cols {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s-6);
  }
}
.footer-col h2 {
  margin-bottom: var(--s-3);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8e9096;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}
.footer-col a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}
.newsletter {
  display: grid;
  gap: var(--s-3);
}
.newsletter .input {
  background: transparent;
  border-color: #4a4d54;
  color: var(--white);
}
.newsletter .input::placeholder {
  color: #8e9096;
}
.newsletter .input:focus {
  border-color: #9aa5ff;
  box-shadow: 0 0 0 3px rgba(154, 165, 255, 0.25);
}
.newsletter .field__error {
  color: #ffb4ab;
}
.newsletter__note {
  color: #8e9096;
  font-size: var(--fs-xs);
}
.social {
  display: flex;
  gap: var(--s-2);
}
.social a {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #3a3d44;
  border-radius: 50%;
}
.social a:hover {
  border-color: var(--white);
  text-decoration: none;
}
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-3) var(--s-6);
  padding-block: var(--s-5) max(var(--s-5), env(safe-area-inset-bottom));
  border-top: 1px solid #2c2f35;
  color: #8e9096;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
}
.site-footer__bottom ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  list-style: none;
  margin: 0;
  padding: 0;
}

/* -------------------------------------------------------------- utilities */

.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--line);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.skeleton {
  background: linear-gradient(90deg, var(--stone) 0%, #e9e8e2 50%, var(--stone) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 2px;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}
.divider {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--success-tint);
  color: var(--success);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.status--pending {
  background: var(--warning-tint);
  color: var(--warning);
}
.status--test {
  background: var(--cobalt-tint);
  color: var(--cobalt-deep);
}

/* Reveal-on-scroll, opt-in with [data-reveal]. site.js adds .is-visible. */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
.no-js [data-reveal] {
  opacity: 1;
  transform: none;
}

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

@media print {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
  #site-header,
  .site-footer,
  .toast-region,
  .drawer {
    display: none !important;
  }
  body {
    background: #fff;
  }
}
