/* Classical — design-system tokens and component classes. This file is the source of truth for the system's look; retune it here and see readme.md. */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600&family=Lora:wght@400;600&display=swap');

:root {
  --color-bg: #f3f2f2;
  --color-surface: #eae9e9;
  --color-text: #201f1d;
  --color-accent: #b68235;
  --color-accent-2: #ac803e;
  --color-divider: color-mix(in srgb, #201f1d 16%, transparent);

  /* Tonal ramps — generated in OKLCH on one shared lightness scale, so the
     same step of any role matches the others in visual value. */
  --color-neutral-100: #f8f4f4;
  --color-neutral-200: #eae7e7;
  --color-neutral-300: #d7d3d3;
  --color-neutral-400: #bab6b6;
  --color-neutral-500: #9b9797;
  --color-neutral-600: #7d7979;
  --color-neutral-700: #605d5d;
  --color-neutral-800: #444141;
  --color-neutral-900: #2d2b2b;

  --color-accent-100: #fff3e4;
  --color-accent-200: #ffe3bf;
  --color-accent-300: #facb8d;
  --color-accent-400: #e1ad66;
  --color-accent-500: #c28d41;
  --color-accent-600: #a06f24;
  --color-accent-700: #7d5411;
  --color-accent-800: #5a3b0a;
  --color-accent-900: #3a270d;

  --color-accent-2-100: #fff3e4;
  --color-accent-2-200: #ffe3be;
  --color-accent-2-300: #f5cd96;
  --color-accent-2-400: #dbaf70;
  --color-accent-2-500: #bc8f4e;
  --color-accent-2-600: #9b7232;
  --color-accent-2-700: #79561f;
  --color-accent-2-800: #573d14;
  --color-accent-2-900: #382810;

  --font-heading: "Cormorant Garamond", system-ui, sans-serif;
  --font-heading-weight: 600; /* review round 3: bold retired — semibold is the
     interface headings' ceiling (they need the weight at small sizes); display
     text goes lighter still, to the normal cut (see the deck) */
  --font-body: "Lora", system-ui, sans-serif;

  --space-1: 4.6px;
  --space-2: 9.2px;
  --space-3: 13.8px;
  --space-4: 18.4px;
  --space-6: 27.6px;
  --space-8: 36.8px;

  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 7px;

  /* Elevation — derived from the ground: soft ink-tinted shadows on a
     light theme, a hairline edge + ambient darkness on a dark one. */
  --shadow-sm: 0 1px 2px color-mix(in srgb, #2d2b2b 14%, transparent);
  --shadow-md: 0 3px 10px color-mix(in srgb, #2d2b2b 16%, transparent);
  --shadow-lg: 0 12px 32px color-mix(in srgb, #2d2b2b 22%, transparent);
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
}
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: var(--font-heading-weight); }

.plate{filter:sepia(0.22) saturate(0.82) contrast(1.05);box-sizing:border-box;
  border:6px solid var(--color-surface);outline:1px solid var(--color-divider)}

/* ══════════════════════════════════════════════════════════════════════════
   Components — built with the tokens above. Plain CSS
   on plain HTML: no JavaScript, no build step. Each class is documented in
   readme.md and demonstrated in foundations/ and components/.
   ══════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-size: 15px; line-height: 1.55; font-weight: 400; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 var(--space-2);
}
h1 { font-size: 42px; }
h2 { font-size: 32px; }
h3 { font-size: 25px; }
h4 { font-size: 20px; }
h5 { font-size: 16px; }
h6 { font-size: 13px; }
h6 { letter-spacing: 0.08em; text-transform: uppercase; }
p { margin: 0 0 var(--space-3); }
a { color: var(--color-accent); text-underline-offset: 3px; }
img { display: block; max-width: 100%; }
figure { margin: 0; }
figcaption {
  font-size: 11px; margin-top: var(--space-1);
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
.text-muted { color: color-mix(in srgb, var(--color-text) 55%, transparent); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

/* — rules — */
.hr {
  height: 1px; border: 0; margin: var(--space-4) 0;
  background: var(--color-divider);
}

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 14px; line-height: 1.2; color: var(--color-text); /* matches the .input's 14px —
     the pair sits side by side in sign-up rows */
  background: transparent; border: 1px solid transparent;
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  border-radius: var(--radius-md);
}
.btn svg { display: block; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { color: var(--color-accent); border-color: var(--color-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--color-accent) 12%, transparent); }
.btn-primary:active { background: color-mix(in srgb, var(--color-accent) 22%, transparent); }
.btn-secondary { border-color: var(--color-divider); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }
/* Solid-fill CTA reserved for "Add to cart" actions — deliberately higher
   contrast than .btn-primary's outline style so the conversion action stands
   out from every other button on the page. */
.btn-add-cart { background: var(--color-accent-700); color: #fff; border-color: var(--color-accent-700); }
.btn-add-cart:hover { background: var(--color-accent-800); border-color: var(--color-accent-800); }
.btn-add-cart:active { background: var(--color-accent-900); border-color: var(--color-accent-900); }
.btn-add-cart:disabled { background: var(--color-accent-700); border-color: var(--color-accent-700); }
.btn-ghost { color: var(--color-accent); padding-inline: var(--space-1); }
.btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.btn-ghost:active { background: color-mix(in srgb, var(--color-accent) 18%, transparent); }
.btn-icon { width: 36px; height: 36px; padding: 0; }
.btn-block { width: 100%; margin-top: var(--space-2); }

/* — forms — */
.field > label {
  display: block; font-size: 12px; margin-bottom: 5px;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}
.input {
  width: 100%; min-height: 36px; padding: 6px 10px; font: inherit;
  font-size: 14px; color: var(--color-text); caret-color: var(--color-accent);
  background: transparent;
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
}
.input:hover { border-color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
textarea.input { min-height: 90px; resize: vertical; }
.radio { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.radio input, .seg-opt input {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.radio .dot {
  width: 16px; height: 16px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--color-divider);
}
.radio:hover .dot { border-color: var(--color-accent); }
.radio input:checked + .dot {
  border-color: var(--color-accent); background: var(--color-accent);
  box-shadow: inset 0 0 0 4px var(--color-bg);
}
.radio input:focus-visible + .dot { outline: 2px solid var(--color-accent); outline-offset: 2px; }
/* .check-box is the square equivalent of .dot, for the checkbox variant of
   .radio — .radio's own CSS hides the native <input> and expects this
   sibling to actually render the checked/unchecked state. */
.check-box {
  width: 16px; height: 16px; flex: none; border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-divider); position: relative; margin-top: 2px;
}
.radio:hover .check-box { border-color: var(--color-accent); }
.radio input:checked + .check-box { border-color: var(--color-accent); background: var(--color-accent); }
.radio input:checked + .check-box::after {
  content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px;
  border: solid var(--color-bg); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.radio input:focus-visible + .check-box { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.seg {
  display: inline-flex; flex-wrap: wrap; overflow: hidden;
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
  max-width: 100%;
}
.seg-opt {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; font-size: 13px; cursor: pointer;
}
.seg-opt + .seg-opt { border-left: 1px solid var(--color-divider); }
.seg-opt:has(input:checked) { color: var(--color-accent-700); box-shadow: inset 0 0 0 1px var(--color-accent-700); }
.seg-opt:not(:has(input:checked)):hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.seg-opt:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: -2px; }

/* — cards — */
.card {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-3); border-radius: var(--radius-md); background: transparent; border: 1px solid var(--color-divider);
}
.card-kicker { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent); }
.card-title {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 17px; line-height: 1.2;
}
.card-body { margin: 0; font-size: 13px; opacity: 0.8; flex: 1; }
.card-meta {
  display: flex; align-items: center; gap: 6px; font-size: 11px;
  color: color-mix(in srgb, var(--color-text) 50%, transparent);
}
.elev-sm { box-shadow: var(--shadow-sm); }
.elev-md { box-shadow: var(--shadow-md); }
.elev-lg { box-shadow: var(--shadow-lg); }

/* — tags — */
.tag {
  display: inline-flex; align-items: center; font-size: 11px;
  letter-spacing: 0.02em; padding: 3px 10px;
  border-radius: calc(var(--radius-md) * 0.75);
}
.tag-accent { background: var(--color-accent-100); color: var(--color-accent-800); }
.tag-accent-2 { background: var(--color-accent-2-100); color: var(--color-accent-2-800); }
.tag-neutral { background: var(--color-neutral-100); color: var(--color-neutral-800); }
.tag-outline { border: 1px solid var(--color-accent); color: var(--color-accent); }

/* — navigation — */
.nav {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-divider);
}
.nav-brand {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 18px; margin-right: auto;
}
.nav a { color: inherit; text-decoration: none; font-size: 14px; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--color-accent); }

/* — tables — */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
  padding: var(--space-2); border-bottom: 1px solid var(--color-divider);
}
.table td {
  padding: var(--space-2);
  border-bottom: 1px solid var(--color-divider);
}
.table tbody tr:hover { background: color-mix(in srgb, var(--color-text) 4%, transparent); }

/* — dialog — */
.dialog-backdrop {
  position: fixed; inset: 0; display: grid; place-items: center; z-index: 1000;
  padding: var(--space-4);
  background: color-mix(in srgb, var(--color-neutral-900) 50%, transparent);
}
.dialog {
  width: min(440px, 100%); display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-4); border-radius: var(--radius-lg);
  background: var(--color-surface); box-shadow: var(--shadow-lg); border: 1px solid var(--color-divider);
}
.dialog-title {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 20px;
}
.dialog-body { font-size: 14px; opacity: 0.85; }
.dialog-actions { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-2); }

/* — site header — */
/* Shared page header: centered brand flanked by a search/account/cart icon
   row. minmax(0,1fr) lets the outer grid tracks shrink instead of forcing
   the whole grid (and page) wider than the viewport when the icon row's
   min-content doesn't fit — that mismatch is what pushed the cart icon
   off-screen on narrow phones. Below 640px the row switches to a single
   centered column so the icons always have the full viewport to lay out in. */
.site-header { border-bottom: 1px solid var(--color-divider); padding: var(--space-6) var(--space-8) var(--space-3); }
.site-header-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center; gap: var(--space-4);
}
.site-header-brand {
  font-family: var(--font-heading); font-weight: 400; font-size: clamp(30px, 3.2vw, 44px);
  letter-spacing: .24em; text-transform: uppercase; color: var(--color-text);
  text-align: center; padding-left: .24em;
}
.site-header-tools { display: flex; justify-content: flex-end; align-items: center; gap: var(--space-4); min-width: 0; }
.site-header-nav {
  display: flex; justify-content: center; flex-wrap: wrap; gap: var(--space-6);
  margin-top: var(--space-4); font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
}
@media (max-width: 640px) {
  .site-header { padding: var(--space-3) var(--space-4) var(--space-2); }
  .site-header-row { grid-template-columns: 1fr; justify-items: center; gap: var(--space-2); }
  .site-header-spacer { display: none; }
  .site-header-brand { font-size: clamp(13px, 4.2vw, 19px); font-weight: 700; letter-spacing: .04em; padding-left: 0; white-space: nowrap; }
  .site-header-tools { justify-content: center; gap: var(--space-4); }
  /* One swipeable row instead of links wrapping to 3 rows. A soft fade on
     the right edge hints there's more to scroll to. */
  .site-header-nav {
    flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start;
    gap: var(--space-3); font-size: 11px; letter-spacing: .1em; margin-top: var(--space-3);
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    margin-inline: calc(-1 * var(--space-4)); padding: 2px var(--space-4) 0;
    -webkit-mask-image: linear-gradient(to right, #000 88%, transparent 100%);
    mask-image: linear-gradient(to right, #000 88%, transparent 100%);
  }
  .site-header-nav::-webkit-scrollbar { display: none; }
  .site-header-nav > a { flex: 0 0 auto; white-space: nowrap; }
}
@media (min-width: 641px) and (max-width: 900px) {
  .site-header { padding: var(--space-6) var(--space-6) var(--space-3); }
  .site-header-brand { font-size: clamp(24px, 4vw, 34px); }
  .site-header-tools { gap: var(--space-3); }
}

/* — shop split layout — */
/* Main content + sticky order-summary aside, used by Cart and Checkout.
   minmax(0, …) lets each column shrink with its content (a long product
   name or price can't force the page wider); below 900px it collapses to
   a single stacked column and the aside stops being sticky. */
.shop-split {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr); gap: 64px;
  max-width: 1280px; margin: 0 auto; padding: var(--space-8) clamp(32px, 6vw, 80px) 96px;
  align-items: start;
}
.shop-split-aside { position: sticky; top: var(--space-4); }
.checkout-confirm { max-width: 720px; margin: 0 auto; padding: var(--space-8) clamp(32px, 6vw, 80px) 96px; }
@media (max-width: 900px) {
  .shop-split { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); padding: var(--space-6) clamp(20px, 5vw, 40px) 64px; }
  .shop-split-aside { position: static; }
  .checkout-confirm { padding: var(--space-6) clamp(20px, 5vw, 40px) 64px; }
}

/* — two-column split (auth pages, misc content) — */
.split-2 {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px;
  max-width: 1060px; margin: 0 auto; padding: var(--space-8) clamp(32px, 6vw, 64px) 96px;
  align-items: start;
}
.auth-confirm { max-width: 620px; margin: 0 auto; padding: var(--space-8) clamp(32px, 6vw, 64px) 96px; text-align: center; }
.grid-2-equal { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
@media (max-width: 700px) {
  .split-2 { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); padding: var(--space-6) clamp(20px, 5vw, 40px) 64px; }
  .auth-confirm { padding: var(--space-6) clamp(20px, 5vw, 40px) 64px; }
  .grid-2-equal { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
}

/* product line item (image + details + price) */
.line-item {
  display: grid; grid-template-columns: 116px minmax(0, 1fr) auto; gap: var(--space-4);
  padding: var(--space-6) 0; border-bottom: 1px solid var(--color-divider); align-items: start;
}
.line-item-mini {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: var(--space-3);
  align-items: center; padding: var(--space-3) 0; border-top: 1px solid var(--color-divider);
}
@media (max-width: 480px) {
  .line-item { grid-template-columns: 72px minmax(0, 1fr) auto; gap: var(--space-3); padding: var(--space-4) 0; }
  .line-item-mini { grid-template-columns: 44px minmax(0, 1fr) auto; }
}

/* responsive 3/4-up content grids (testimonials, thumbnails, feature lists) */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 640px) {
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* responsive form field rows */
.form-row-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-4); margin-bottom: var(--space-4); }
.form-row-3 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr) minmax(0, .8fr); gap: var(--space-4); margin-bottom: var(--space-4); }
@media (max-width: 560px) {
  .form-row-2, .form-row-3 { grid-template-columns: minmax(0, 1fr); }
}

/* — deal ribbon — */
/* Admin-controlled "limited time deal" badge on product cards. Flush
   against the left edge of the image (like a ribbon tucked into the
   corner) rather than a floating pill, so it reads as a ribbon rather
   than just another stock-style chip. */
.deal-badge {
  position: absolute; bottom: 10px; left: 0; z-index: 2;
  background: #c0392b; color: #fff; line-height: 1.25;
  padding: 6px 12px 6px 10px; border-radius: 0 4px 4px 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .28);
}
.deal-badge-percent { display: block; font-size: 13px; font-weight: 700; letter-spacing: .01em; }
.deal-badge-label { display: block; font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; opacity: .95; margin-top: 1px; }

/* — product card badges (stock / favorite / like) — */
/* Shared corner-overlay chips for product images: stock top-left, favorite
   top-right, like bottom-right, deal-ribbon bottom-left (above). Each
   page's per-product style binding only needs to carry the variable part
   (background color, or display:none) — the positioning/shape lives here
   once instead of being re-declared as a JS string on every page. */
.stock-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2; padding: 4px 10px; border-radius: 999px;
  font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600;
}
.fav-heart-btn {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .88);
  border: none; cursor: pointer; padding: 0; box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}
.like-btn {
  position: absolute; bottom: 10px; right: 10px; z-index: 2; display: flex; align-items: center; gap: 5px;
  padding: 5px 10px 5px 8px; border-radius: 999px; background: rgba(255, 255, 255, .92); border: none;
  cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); font-size: 12px; font-weight: 600;
  color: #201f1d; font-feature-settings: 'tnum';
}

/* — product detail page split — */
.pdp-split {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px;
  max-width: 1280px; margin: 0 auto; padding: var(--space-6) clamp(32px, 6vw, 80px) 96px;
}
.pdp-gallery { position: sticky; top: var(--space-4); }
.pdp-spec-row { display: grid; grid-template-columns: 140px 1fr; gap: var(--space-3); padding: 10px 0; border-top: 1px solid var(--color-divider); }
@media (max-width: 860px) {
  .pdp-split { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); padding: var(--space-6) clamp(20px, 5vw, 40px) 64px; }
  .pdp-gallery { position: static; }
}

