/* ==========================================================================
   IndianCrafts Global — base stylesheet
   --------------------------------------------------------------------------
   Tokens, type, layout primitives and every shared component.
   Page-specific layout lives in css/<page>.css and builds on what is here:
   use the tokens, reuse the components, add only what a page needs.

   Contents
     01 Tokens            07 Forms              13 Cart lines + totals
     02 Reset             08 Header             14 Accordion, crumbs, spec table
     03 Type              09 Footer             15 Notes, tags, empty states
     04 Layout            10 Product card       16 Toast
     05 Links + buttons   11 Price, stars, swatches, qty
     06 Ornament          12 Dialogs: drawer, modal, sheet
                                                17 Motion, print
   ========================================================================== */

/* 01 Tokens --------------------------------------------------------------- */
:root {
  /* paper + ink */
  --paper: #f7f4ed;
  --paper-2: #f1ede3;
  --tile: #ece7db;          /* backdrop behind every product image */
  --tile-2: #e3dccd;
  --white: #fffefb;
  --ink: #16211e;
  --ink-2: #3a4541;
  --ink-3: #606a65;         /* muted text: 4.5:1 or better on paper, the tinted bands and the tile */
  --line: #d8d0bf;
  --line-2: #bdb4a0;
  --field-line: #8e8672;    /* edges of inputs and option tiles: 3:1 against white */

  /* verdigris (the patina on old brass) */
  --deep: #11312c;
  --deep-2: #18413a;
  --verdigris: #2c6359;
  --verdigris-2: #23524a;
  --verdigris-tint: #dce6e1;

  /* brass */
  --brass: #a8823a;         /* decorative only */
  --brass-ink: #7a5c1f;     /* brass as text on paper */
  --brass-pale: #e4d2a1;    /* brass on dark */

  /* signals */
  --clay: #9a4a30;
  --clay-tint: #f3e2da;
  --ok: #2f6b4f;
  --ok-tint: #e2ede6;

  /* type */
  --font-display: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-ui: "Libre Franklin", "Franklin Gothic Medium", "Helvetica Neue", Arial, sans-serif;

  /* space */
  --gutter: clamp(1rem, 4vw, 3rem);
  --maxw: 1320px;
  --header-h: 76px;

  /* motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 720px) {
  :root { --header-h: 64px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
  scrollbar-gutter: stable;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd, ul, ol, fieldset { margin: 0; }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
table { border-collapse: collapse; width: 100%; }
address { font-style: normal; }
summary { cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--verdigris); outline-offset: 2px; }
::selection { background: var(--brass-pale); color: var(--ink); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: 0.75rem 1rem; background: var(--ink); color: var(--paper);
  font-size: 0.875rem; font-weight: 600;
}
.skip:focus { top: 1rem; }

/* 03 Type ----------------------------------------------------------------- */
h1, h2, h3, .serif {
  font-family: var(--font-display);
  font-weight: 400;
  font-optical-sizing: auto;
  letter-spacing: -0.015em;
  line-height: 1.1;
  text-wrap: balance;
}
h4, h5 { font: 600 0.9375rem/1.3 var(--font-ui); }
p { text-wrap: pretty; }

.h-xl { font-size: clamp(2.75rem, 1.3rem + 5.2vw, 5.25rem); line-height: 0.98; letter-spacing: -0.03em; }
.h-lg { font-size: clamp(2rem, 1.25rem + 2.6vw, 3.25rem); line-height: 1.04; letter-spacing: -0.024em; }
.h-md { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.12; letter-spacing: -0.018em; }
.h-sm { font-size: 1.25rem; line-height: 1.22; }

h1 em, h2 em, h3 em, .serif em { font-style: italic; font-weight: 300; }

.lede {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  line-height: 1.45;
  color: var(--ink-2);
}

.eyebrow {
  font: 600 0.6875rem/1.2 var(--font-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass-ink);
}

.small { font-size: 0.875rem; }
.xsmall { font-size: 0.8125rem; line-height: 1.5; }
.muted { color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums lining-nums; }
.nowrap { white-space: nowrap; }

.prose { max-width: 68ch; color: var(--ink-2); }
.prose > * + * { margin-top: 1em; }
.prose h2, .prose h3 { color: var(--ink); margin-top: 1.6em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose ul { padding-left: 1.1em; }
.prose li + li { margin-top: 0.35em; }

/* 04 Layout --------------------------------------------------------------- */
.container {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
}
.container--narrow { --maxw: 880px; }
.container--mid { --maxw: 1080px; }

.section { padding-block: clamp(3.5rem, 2rem + 6vw, 7rem); }
.section--tight { padding-block: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }

.band-tint { background: var(--paper-2); }
.band-deep { background: var(--deep); color: var(--paper); }
.band-deep .eyebrow { color: var(--brass-pale); }
.band-deep .muted { color: #a9bab3; }
.band-deep :focus-visible { outline-color: var(--brass-pale); }

.stack > * + * { margin-top: var(--stack, 1rem); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, 1rem); }
.spread { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }

.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* Section heading: eyebrow + title on the left, an optional link on the right, a hairline under. */
.sec-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 1rem 2rem;
  padding-bottom: 1.25rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--line-2);
}
.sec-head .eyebrow { display: block; margin-bottom: 0.75rem; }
.band-deep .sec-head { border-color: rgba(255, 255, 255, 0.18); }

/* 05 Links + buttons ------------------------------------------------------- */
.link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 0.15s;
}
.link:hover { color: var(--verdigris); }
.band-deep .link:hover { color: var(--brass-pale); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; font-weight: 600;
  border-bottom: 1px solid currentColor; padding-bottom: 2px;
}
.link-arrow::after { content: "\2192"; transition: transform 0.25s var(--ease-out); }
.link-arrow:hover::after { transform: translateX(4px); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.625rem;
  min-height: 48px; padding: 0.5rem 1.5rem;
  border: 1px solid transparent; border-radius: 2px;
  font: 600 0.8125rem/1.2 var(--font-ui);
  letter-spacing: 0.09em; text-transform: uppercase; text-align: center;
  transition: background-color 0.18s, color 0.18s, border-color 0.18s;
  cursor: pointer; user-select: none;
}
.btn--primary { background: var(--verdigris); color: #fff; }
.btn--primary:hover { background: var(--deep); }
.btn--dark { background: var(--ink); color: var(--paper); }
.btn--dark:hover { background: var(--verdigris-2); }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--brass { background: var(--brass-pale); color: var(--deep); }
.btn--brass:hover { background: #fff; }
.btn--ghost-light { border-color: rgba(255, 255, 255, 0.45); color: var(--paper); }
.btn--ghost-light:hover { background: var(--paper); color: var(--deep); border-color: var(--paper); }
.btn--sm { min-height: 40px; padding: 0.375rem 1rem; font-size: 0.75rem; }
.btn--lg { min-height: 56px; padding: 0.5rem 2rem; }
.btn--block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.btn.is-busy { pointer-events: none; opacity: 0.8; }

.text-btn {
  font-size: 0.8125rem; color: var(--ink-3);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.text-btn:hover { color: var(--ink); }

.icon-btn {
  position: relative;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 2px;
  transition: background-color 0.15s;
}
.icon-btn:hover { background: var(--tile); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* 06 Ornament -------------------------------------------------------------
   A row of lotus petals, the same motif that is engraved around the shoulder
   of the Shanti urn. Use sparingly: under the header band, above the footer. */
.petal-rule {
  height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12' viewBox='0 0 24 12'%3E%3Cpath d='M.5 12C.5 6.2 6.8 3.6 12 .8c5.2 2.8 11.5 5.4 11.5 11.2' fill='none' stroke='%23a8823a' stroke-width='1'/%3E%3Cpath d='M12 5.2V12' stroke='%23a8823a' stroke-width='1' opacity='.5'/%3E%3C/svg%3E") repeat-x left bottom / 24px 12px;
  border-bottom: 1px solid var(--brass);
  opacity: 0.85;
}
.band-deep .petal-rule, .petal-rule--pale {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12' viewBox='0 0 24 12'%3E%3Cpath d='M.5 12C.5 6.2 6.8 3.6 12 .8c5.2 2.8 11.5 5.4 11.5 11.2' fill='none' stroke='%23e4d2a1' stroke-width='1'/%3E%3Cpath d='M12 5.2V12' stroke='%23e4d2a1' stroke-width='1' opacity='.5'/%3E%3C/svg%3E");
  border-color: var(--brass-pale);
  opacity: 0.55;
}

/* 07 Forms ---------------------------------------------------------------- */
.field { display: grid; gap: 0.375rem; align-content: start; }
.field > label, .label { font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); }
.field .optional { font-weight: 400; color: var(--ink-3); }
.hint { font-size: 0.75rem; line-height: 1.45; color: var(--ink-3); }
.error { display: none; font-size: 0.8125rem; color: var(--clay); }
.field.is-invalid .error { display: block; }

.input, .select, .textarea {
  width: 100%; min-height: 48px;
  padding: 0.625rem 0.875rem;
  background: var(--white);
  border: 1px solid var(--field-line); border-radius: 2px;
  font-size: 1rem; line-height: 1.4;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.textarea { min-height: 96px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #6f7873; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-2); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--verdigris);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--verdigris) 22%, transparent);
}
.field.is-invalid .input, .field.is-invalid .select, .field.is-invalid .textarea { border-color: var(--clay); }
.field.is-invalid .input:focus, .field.is-invalid .select:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--clay) 20%, transparent); }

.select {
  appearance: none; -webkit-appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2316211e' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.875rem center;
}

.check { display: flex; align-items: flex-start; gap: 0.625rem; font-size: 0.9375rem; line-height: 1.45; cursor: pointer; }
.check input {
  appearance: none; -webkit-appearance: none;
  flex: none; width: 18px; height: 18px; margin: 2px 0 0;
  display: grid; place-items: center;
  background: var(--white); border: 1px solid var(--field-line); border-radius: 2px;
  cursor: pointer; transition: background-color 0.15s, border-color 0.15s;
}
.check input:hover { border-color: var(--ink-2); }
.check input:checked { background: var(--verdigris); border-color: var(--verdigris); }
.check input:checked::after {
  content: ""; width: 10px; height: 6px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: translateY(-1px) rotate(-45deg);
}
.check input[type="radio"] { border-radius: 50%; }
.check input[type="radio"]:checked::after { width: 8px; height: 8px; border: 0; border-radius: 50%; background: #fff; transform: none; }

/* Option tiles: a radio or checkbox drawn as a selectable box (sizes, delivery methods, add-ons). */
.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.opt__box {
  display: grid; gap: 0.125rem; height: 100%;
  padding: 0.75rem 0.875rem;
  background: var(--white);
  border: 1px solid var(--field-line); border-radius: 2px;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
.opt:hover .opt__box { border-color: var(--ink-2); }
.opt input:checked + .opt__box { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.opt input:focus-visible + .opt__box { outline: 2px solid var(--verdigris); outline-offset: 2px; }
.opt input:disabled + .opt__box { opacity: 0.5; cursor: not-allowed; }
.opt__title { font-size: 0.9375rem; font-weight: 600; }
.opt__meta { font-size: 0.8125rem; color: var(--ink-3); }

/* 08 Header --------------------------------------------------------------- */
.utility { background: var(--deep); color: #d5dfda; font-size: 0.75rem; letter-spacing: 0.03em; }
.utility__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 36px; }
.utility a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, 0.4); }
.utility a:hover { color: #fff; text-decoration-color: currentColor; }
.utility__aside { display: flex; gap: 1.5rem; white-space: nowrap; }
.utility__preview { font-weight: 600; color: var(--brass-pale); }
@media (max-width: 760px) {
  .utility__inner { justify-content: center; text-align: center; }
  .utility__aside { display: none; }
  .utility__preview + .utility__msg { display: none; }
}

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.3) blur(12px);
  backdrop-filter: saturate(1.3) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.5rem;
  height: var(--header-h);
}

.wordmark { display: inline-flex; align-items: center; gap: 0.625rem; color: var(--ink); }
.wordmark__mark { width: 26px; height: auto; flex: none; }
.wordmark__text { display: grid; line-height: 1; }
.wordmark__name { font: 500 1.375rem/1 var(--font-display); letter-spacing: -0.02em; }
.wordmark__sub { margin-top: 3px; font: 600 0.5625rem/1 var(--font-ui); letter-spacing: 0.42em; text-transform: uppercase; color: var(--brass-ink); }
.wordmark--light { color: var(--paper); }
.wordmark--light .wordmark__sub { color: var(--brass-pale); }

.site-nav { display: flex; justify-content: center; gap: clamp(1rem, 2.4vw, 2.5rem); font-size: 0.875rem; font-weight: 500; }
.site-nav a { position: relative; padding: 0.5rem 0; white-space: nowrap; }
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 0.125rem; }
.nav-toggle { display: none; margin-left: -10px; }

.cart-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  height: 44px; padding: 0 0.25rem 0 0.75rem;
  font-size: 0.875rem; font-weight: 500;
}
.cart-btn__count {
  min-width: 26px; height: 26px; padding: 0 6px;
  display: grid; place-items: center;
  border: 1px solid var(--ink); border-radius: 2px;
  font: 600 0.75rem/1 var(--font-ui); font-variant-numeric: tabular-nums;
  transition: background-color 0.2s, color 0.2s;
}
.cart-btn:hover .cart-btn__count, .cart-btn.has-items .cart-btn__count { background: var(--ink); color: var(--paper); }

.count-dot {
  position: absolute; top: 5px; right: 3px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--verdigris); color: #fff;
  font: 600 0.625rem/16px var(--font-ui); text-align: center;
}
.count-dot[data-count="0"] { display: none; }

@media (max-width: 980px) {
  .site-header__inner { grid-template-columns: auto 1fr auto; gap: 0.5rem; }
  .site-nav { display: none; }
  .nav-toggle { display: grid; }
  .wordmark__name { font-size: 1.1875rem; }
  .wordmark__mark { width: 22px; }
}
@media (max-width: 420px) {
  .header-actions .icon-btn--wish { display: none; }
  .cart-btn__label { display: none; }
}

/* Mobile menu (a left drawer) */
.menu-list { display: grid; }
.menu-list a {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 1rem 0; border-bottom: 1px solid var(--line);
  font: 400 1.5rem/1.2 var(--font-display); letter-spacing: -0.015em;
}
.menu-list a span { font: 400 0.8125rem/1 var(--font-ui); color: var(--ink-3); letter-spacing: 0; }
.menu-sub { margin-top: 1.5rem; display: grid; gap: 0.75rem; font-size: 0.9375rem; color: var(--ink-2); }

/* Search sheet */
.search-form { display: flex; align-items: center; gap: 0.75rem; border-bottom: 1px solid var(--ink); }
.search-form svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; }
.search-form input {
  flex: 1; min-width: 0; height: 64px; border: 0; background: none; outline: none;
  font: 400 clamp(1.25rem, 1rem + 1.4vw, 1.875rem)/1 var(--font-display); letter-spacing: -0.015em;
}
.search-form input::placeholder { color: #6f7873; }
.search-form input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search-form:focus-within { border-bottom-color: var(--verdigris); box-shadow: 0 2px 0 -1px var(--verdigris); }
.search-results { margin-top: 1.5rem; display: grid; gap: 0.25rem; }
.search-hit {
  display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 1rem;
  padding: 0.5rem; margin-inline: -0.5rem; border-radius: 2px;
}
.search-hit:hover, .search-hit:focus-visible { background: var(--tile); }
.search-hit__img { aspect-ratio: 4 / 5; background: var(--tile); }
.search-hit__img img { width: 100%; height: 100%; object-fit: contain; }
.search-hit__name { font: 400 1.0625rem/1.25 var(--font-display); }
.search-hit__meta { font-size: 0.8125rem; color: var(--ink-3); }

/* 09 Footer --------------------------------------------------------------- */
.site-footer { background: var(--deep); color: #cfdad5; font-size: 0.9375rem; }
.site-footer a:hover { color: #fff; }
.site-footer :focus-visible { outline-color: var(--brass-pale); }
.site-footer__top {
  display: grid; gap: 2.5rem 3rem;
  padding-block: clamp(3rem, 2rem + 4vw, 5rem);
}
@media (min-width: 900px) {
  .site-footer__top { grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 560px) and (max-width: 899px) {
  .site-footer__top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-footer__brand { grid-column: 1 / -1; }
}
.site-footer__brand p { max-width: 34ch; margin-top: 1.25rem; color: #a9bab3; }
.site-footer h2 { font: 600 0.6875rem/1.2 var(--font-ui); letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass-pale); margin-bottom: 1rem; }
.site-footer__links { display: grid; gap: 0.625rem; }
.site-footer__base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem;
  padding-block: 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.8125rem; color: #9fb1aa;
}
.site-footer__base ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; list-style: none; margin: 0; padding: 0; }
@media (hover: none) {
  /* comfortable tap targets for the footer lists */
  .site-footer__links { gap: 0; }
  .site-footer__links a, .site-footer__base a { display: inline-block; padding-block: 0.6875rem; }
}

/* 10 Product card --------------------------------------------------------- */
.pgrid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.75rem, 1rem + 2vw, 3rem) clamp(0.75rem, 0.4rem + 1.4vw, 1.75rem);
}
@media (min-width: 760px) { .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .pgrid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.pcard { position: relative; display: flex; flex-direction: column; min-width: 0; }
.pcard__frame { position: relative; }
.pcard__media { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--tile); }
.pcard__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  transition: opacity 0.4s var(--ease), transform 0.8s var(--ease-out);
}
.pcard__img--alt { opacity: 0; }
.pcard__media.is-missing::after {
  /* shown when an image file is absent */
  content: ""; position: absolute; inset: 28% 34%;
  background: var(--tile-2);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 40'%3E%3Ccircle cx='16' cy='3.5' r='2.3'/%3E%3Cpath d='M9 11c0-3.5 3.5-4.5 7-4.5s7 1 7 4.5z'/%3E%3Cpath d='M8.5 14.5c-4 2.5-5 7.5-3 12.5 1.5 4 4 6.5 5 9.5h11c1-3 3.5-5.500 5-9.500 2-5 1-10-3-12.5z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 40'%3E%3Ccircle cx='16' cy='3.5' r='2.3'/%3E%3Cpath d='M9 11c0-3.5 3.5-4.5 7-4.5s7 1 7 4.5z'/%3E%3Cpath d='M8.5 14.5c-4 2.5-5 7.5-3 12.5 1.5 4 4 6.5 5 9.5h11c1-3 3.5-5.500 5-9.500 2-5 1-10-3-12.5z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pcard__media.is-missing .pcard__img { visibility: hidden; }

.pcard__no {
  position: absolute; top: 0.75rem; left: 0.875rem; z-index: 1;
  font: italic 400 0.875rem/1 var(--font-display); color: var(--ink-2);
}
.pcard__tags { position: absolute; left: 0.75rem; bottom: 0.75rem; z-index: 1; display: flex; flex-wrap: wrap; gap: 0.375rem; transition: opacity 0.2s; }

.pcard__wish {
  position: absolute; top: 2px; right: 2px; z-index: 2;
  width: 44px; height: 44px; display: grid; place-items: center;
}
.pcard__wish svg { width: 19px; height: 19px; fill: none; stroke: var(--ink); stroke-width: 1.4; transition: fill 0.2s, stroke 0.2s, transform 0.3s var(--ease-out); }
.pcard__wish:hover svg { transform: scale(1.12); }
.pcard__wish[aria-pressed="true"] svg { fill: var(--clay); stroke: var(--clay); }

.pcard__add {
  position: absolute; left: 0.75rem; right: 0.75rem; bottom: 0.75rem; z-index: 2;
  min-height: 44px;
  background: var(--white); color: var(--ink);
  font: 600 0.75rem/1 var(--font-ui); letter-spacing: 0.1em; text-transform: uppercase;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.25s, transform 0.35s var(--ease-out), background-color 0.15s, color 0.15s;
}
.pcard__add:hover { background: var(--ink); color: var(--paper); }
.pcard__add:focus-visible { opacity: 1; transform: none; }

@media (hover: hover) {
  .pcard:hover .pcard__img { transform: scale(1.035); }
  .pcard:hover .pcard__img--main.has-alt { opacity: 0; }
  .pcard:hover .pcard__img--alt.is-ready { opacity: 1; }
  .pcard:hover .pcard__add { opacity: 1; transform: none; }
  .pcard:hover .pcard__tags { opacity: 0; }
}
@media (hover: none) {
  .pcard__add {
    position: static; opacity: 1; transform: none; width: 100%; margin-top: 0.75rem; order: 5;
    background: transparent; border: 1px solid var(--line-2);
  }
  /* the button now sits under the image inside the frame, so lift the tags back onto the image */
  .pcard__tags { bottom: calc(44px + 1.5rem); }
  /* 44px tap areas without changing how the controls look */
  .pcard__swatches { gap: 0.875rem; }
  .pcard__swatches .swatch::before { content: ""; position: absolute; inset: -13px; }
  .qty--sm { grid-template-columns: 44px 40px 44px; height: 44px; }
}

.pcard__body { display: grid; gap: 0.25rem; padding-top: 0.875rem; }
.pcard__swatches { display: flex; gap: 0.5rem; margin-bottom: 0.25rem; min-height: 18px; }
.pcard__name { font: 400 1.1875rem/1.2 var(--font-display); letter-spacing: -0.012em; }
.pcard__name a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.pcard__meta { font-size: 0.8125rem; color: var(--ink-3); }
.pcard__row { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; margin-top: 0.25rem; }
@media (max-width: 520px) {
  .pcard__name { font-size: 1.0625rem; }
  .pcard__no { font-size: 0.75rem; top: 0.5rem; left: 0.625rem; }
  /* two narrow columns: let the rating drop under the price instead of crowding it */
  .pcard__row { flex-wrap: wrap; row-gap: 0.25rem; }
}

/* 11 Price, stars, swatches, quantity ------------------------------------- */
.price { font-weight: 500; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.price__from { margin-right: 0.3em; font-size: 0.75rem; font-weight: 400; color: var(--ink-3); }
.price__was { margin-left: 0.45em; font-weight: 400; color: var(--ink-3); text-decoration: line-through; }
.price--sale .price__now { color: var(--clay); }
.price--lg { font: 400 2rem/1 var(--font-display); letter-spacing: -0.02em; }
.price--lg .price__was { font: 400 1.0625rem/1 var(--font-ui); }

/* <span class="stars" style="--rating:4.6" role="img" aria-label="Rated 4.6 out of 5"></span> */
.stars { position: relative; display: inline-block; font-size: 0.8125rem; line-height: 1; letter-spacing: 1px; color: var(--line-2); white-space: nowrap; }
.stars::before { content: "\2605\2605\2605\2605\2605"; }
.stars::after {
  content: "\2605\2605\2605\2605\2605";
  position: absolute; left: 0; top: 0;
  width: calc(var(--rating, 0) / 5 * 100%);
  overflow: hidden; color: var(--brass);
}
.stars--lg { font-size: 1.125rem; letter-spacing: 2px; }
.rating { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8125rem; color: var(--ink-3); }

.swatch {
  position: relative; flex: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--sw, #ccc);
  box-shadow: inset 0 0 0 1px rgba(22, 33, 30, 0.22);
  cursor: pointer;
}
.swatch::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid transparent; transition: border-color 0.15s;
}
.swatch:hover::after { border-color: var(--line-2); }
.swatch[aria-pressed="true"]::after, .swatch[aria-checked="true"]::after, input:checked + .swatch::after { border-color: var(--ink); }
.swatch--lg { width: 32px; height: 32px; }
.swatch--lg::after { inset: -5px; }

.qty {
  display: inline-grid; grid-template-columns: 40px 44px 40px; height: 44px;
  background: var(--white); border: 1px solid var(--field-line); border-radius: 2px;
}
.qty button { display: grid; place-items: center; font-size: 1.125rem; line-height: 1; color: var(--ink-2); }
.qty button:hover:not(:disabled) { background: var(--tile); color: var(--ink); }
.qty button:disabled { opacity: 0.35; cursor: not-allowed; }
.qty input {
  width: 100%; border: 0; padding: 0; background: none; text-align: center;
  font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty input:focus { outline: none; }
.qty input:focus-visible { outline: 2px solid var(--verdigris); outline-offset: -3px; }
.qty:focus-within { border-color: var(--verdigris); }
.qty--sm { grid-template-columns: 32px 36px 32px; height: 36px; }

/* 12 Dialogs: drawer, modal, sheet ----------------------------------------
   All three are native <dialog> elements opened with showModal() (see js/ui.js). */
html:has(dialog[open]) { overflow: hidden; }

dialog { padding: 0; border: 0; margin: 0; max-width: none; max-height: none; color: inherit; background: none; }
dialog::backdrop { background: rgba(17, 33, 30, 0.52); opacity: 0; transition: opacity 0.3s, display 0.3s allow-discrete, overlay 0.3s allow-discrete; }
dialog[open]::backdrop { opacity: 1; }
@starting-style { dialog[open]::backdrop { opacity: 0; } }

.drawer {
  position: fixed; inset: 0 0 0 auto;
  width: min(100vw, 460px); height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--paper);
  box-shadow: -30px 0 80px -40px rgba(17, 33, 30, 0.5);
  translate: 100% 0;
  transition: translate 0.36s var(--ease-out), display 0.36s allow-discrete, overlay 0.36s allow-discrete;
}
.drawer:not([open]) { display: none; }
.drawer[open] { translate: 0 0; }
@starting-style { .drawer[open] { translate: 100% 0; } }
.drawer--left { inset: 0 auto 0 0; translate: -100% 0; box-shadow: 30px 0 80px -40px rgba(17, 33, 30, 0.5); }
.drawer--left[open] { translate: 0 0; }
@starting-style { .drawer--left[open] { translate: -100% 0; } }

.drawer__head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0.75rem 1rem 1.5rem; border-bottom: 1px solid var(--line); }
.drawer__title { font: 400 1.5rem/1.1 var(--font-display); letter-spacing: -0.015em; }
.drawer__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0.25rem 1.5rem 1.5rem; }
.drawer__foot { flex: none; padding: 1.25rem 1.5rem 1.5rem; background: var(--white); border-top: 1px solid var(--line); }
@media (max-height: 560px) {
  /* a phone on its side: let the whole drawer scroll instead of squeezing the list */
  .drawer { overflow-y: auto; }
  .drawer__body { flex: none; overflow: visible; }
}

.modal {
  position: fixed; inset: 0; margin: auto;
  width: min(100vw - 2rem, var(--modal-w, 720px)); max-height: min(100dvh - 2rem, 860px);
  display: flex; flex-direction: column;
  background: var(--paper);
  box-shadow: 0 40px 100px -40px rgba(17, 33, 30, 0.6);
  opacity: 0; translate: 0 16px;
  transition: opacity 0.28s, translate 0.36s var(--ease-out), display 0.36s allow-discrete, overlay 0.36s allow-discrete;
}
.modal:not([open]) { display: none; }
.modal[open] { opacity: 1; translate: 0 0; }
@starting-style { .modal[open] { opacity: 0; translate: 0 16px; } }
.modal__head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0.75rem 1rem 1.5rem; border-bottom: 1px solid var(--line); }
.modal__body { overflow-y: auto; overscroll-behavior: contain; padding: 1.5rem; }
.modal--wide { --modal-w: 1040px; }

.sheet {
  position: fixed; inset: 0 0 auto 0;
  width: 100vw; max-height: 100dvh; overflow-y: auto;
  background: var(--paper);
  padding: 1rem 0 2rem;
  translate: 0 -100%;
  transition: translate 0.36s var(--ease-out), display 0.36s allow-discrete, overlay 0.36s allow-discrete;
}
.sheet:not([open]) { display: none; }
.sheet[open] { translate: 0 0; }
@starting-style { .sheet[open] { translate: 0 -100%; } }

/* 13 Cart lines + totals -------------------------------------------------- */
.cline { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 1rem; padding-block: 1.125rem; border-bottom: 1px solid var(--line); }
.cline__img { display: block; aspect-ratio: 4 / 5; background: var(--tile); }
.cline__img img { width: 100%; height: 100%; object-fit: contain; }
.cline__name { font: 400 1.0625rem/1.25 var(--font-display); letter-spacing: -0.01em; }
.cline__name a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.cline__opts { display: grid; gap: 0.125rem; margin-top: 0.25rem; font-size: 0.8125rem; color: var(--ink-3); }
.cline__engr { color: var(--ink-2); }
.cline > div { min-width: 0; }
.cline__engr q { font: italic 400 0.9375rem/1.3 var(--font-display); quotes: none; overflow-wrap: anywhere; }
.cline__actions { display: flex; align-items: center; gap: 0.875rem; margin-top: 0.625rem; }
.cline__price { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.cline__price s { display: block; font-size: 0.8125rem; font-weight: 400; color: var(--ink-3); }
.cline--compact { grid-template-columns: 60px minmax(0, 1fr) auto; padding-block: 0.875rem; }
.cline--compact .cline__name { font-size: 1rem; }

.totals { display: grid; gap: 0.5rem; font-size: 0.9375rem; }
.totals__row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.totals__row dd { font-variant-numeric: tabular-nums lining-nums; text-align: right; }
.totals__row--discount dd { color: var(--ok); }
.totals__row--grand { margin-top: 0.375rem; padding-top: 0.875rem; border-top: 1px solid var(--line-2); font-weight: 600; }
.totals__row--grand dd { font: 400 1.625rem/1 var(--font-display); letter-spacing: -0.02em; }

.meter { height: 3px; background: var(--line); }
.meter > i { display: block; height: 100%; width: var(--p, 0%); max-width: 100%; background: var(--verdigris); transition: width 0.5s var(--ease-out); }

/* 14 Accordion, crumbs, spec table ----------------------------------------- */
.acc { border-top: 1px solid var(--line-2); }
.acc__item { border-bottom: 1px solid var(--line-2); }
.acc__item > summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.125rem 0;
  font: 400 1.1875rem/1.3 var(--font-display); letter-spacing: -0.012em;
}
.acc__item > summary::-webkit-details-marker { display: none; }
.acc__item > summary::after {
  content: ""; flex: none; width: 13px; height: 13px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1px 100% no-repeat;
  transition: transform 0.3s var(--ease-out);
}
.acc__item[open] > summary::after { transform: rotate(45deg); }
.acc__item > summary:hover { color: var(--verdigris); }
.acc__body { padding: 0 0 1.375rem; max-width: 68ch; color: var(--ink-2); }
.acc__body > * + * { margin-top: 0.75em; }
.acc__body a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.band-deep .acc, .band-deep .acc__item { border-color: rgba(255, 255, 255, 0.2); }
.band-deep .acc__body { color: #c3d0ca; }
.band-deep .acc__item > summary:hover { color: var(--brass-pale); }

.crumbs { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; font-size: 0.8125rem; color: var(--ink-3); }
.crumbs li + li::before { content: "/"; margin-right: 0.5rem; color: var(--line-2); }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.crumbs [aria-current] { color: var(--ink-2); }

.spec { font-size: 0.9375rem; }
.spec th, .spec td { padding: 0.75rem 0; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.spec th { width: 40%; padding-right: 1rem; font: 600 0.6875rem/1.9 var(--font-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.spec td { font-variant-numeric: lining-nums; }

/* 15 Notes, tags, empty states --------------------------------------------- */
.note { padding: 0.875rem 1rem; background: var(--paper-2); border-left: 2px solid var(--brass); font-size: 0.875rem; line-height: 1.5; color: var(--ink-2); }
.note strong { color: var(--ink); font-weight: 600; }
.note--warn { background: var(--clay-tint); border-color: var(--clay); }
.note--ok { background: var(--ok-tint); border-color: var(--ok); }
.note a { text-decoration: underline; text-underline-offset: 3px; }

.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 0.5rem;
  background: var(--white); color: var(--ink);
  font: 600 0.625rem/1 var(--font-ui); letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap;
}
.tag--sale { background: var(--clay); color: #fff; }
.tag--deep { background: var(--deep); color: var(--brass-pale); }
.tag--line { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); }

.chip {
  display: inline-flex; align-items: center; gap: 0.5rem; height: 32px; padding: 0 0.75rem;
  border: 1px solid var(--line-2); border-radius: 2px; background: var(--white);
  font-size: 0.8125rem;
}
.chip button { display: grid; place-items: center; width: 16px; height: 16px; font-size: 1rem; line-height: 1; color: var(--ink-3); }
.chip button:hover { color: var(--ink); }

.empty { display: grid; justify-items: center; gap: 1rem; padding: clamp(2.5rem, 6vw, 5rem) 1rem; text-align: center; }
.empty p { max-width: 44ch; color: var(--ink-3); }

.preview-flag { font-size: 0.75rem; color: var(--ink-3); }
.preview-flag::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 0.5rem; border-radius: 50%; background: var(--brass); vertical-align: 1px; }
.band-deep .preview-flag, .site-footer .preview-flag { color: #9fb1aa; }

/* 16 Toast ---------------------------------------------------------------- */
.toast-region { position: fixed; left: 50%; bottom: 1.25rem; z-index: 90; display: grid; gap: 0.5rem; width: min(100vw - 2rem, 440px); translate: -50% 0; pointer-events: none; }
.toast {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.875rem 1rem; background: var(--ink); color: var(--paper);
  font-size: 0.875rem; pointer-events: auto;
  box-shadow: 0 16px 40px -16px rgba(17, 33, 30, 0.6);
  animation: toast-in 0.4s var(--ease-out) both;
}
.toast.is-leaving { animation: toast-out 0.25s var(--ease) both; }
.toast a, .toast button { flex: none; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; color: var(--brass-pale); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* 17 Motion, print -------------------------------------------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* One orchestrated entrance per page: add .reveal and set --i for the order. */
.reveal { animation: rise 0.9s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 110ms); }

/* Scroll reveal: elements with [data-reveal] fade up once when they enter the viewport (js/ui.js). */
.js [data-reveal] { opacity: 0; translate: 0 18px; transition: opacity 0.8s var(--ease-out), translate 0.8s var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms); }
.js [data-reveal].is-in { opacity: 1; translate: 0 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; transition-delay: 0ms !important; }
  .js [data-reveal] { opacity: 1; translate: 0 0; }
}

.print-only { display: none; }

@media print {
  .utility, .site-header, .site-footer, .toast-region, dialog, .no-print { display: none !important; }
  .print-only { display: block; }
  body { background: #fff; }
  .section { padding-block: 1rem; }
}

/* 18 Wordmark colours + size calculator ------------------------------------- */
.wordmark__mark { color: var(--verdigris); }
.wordmark--light .wordmark__mark { color: var(--paper); }

.sizecalc { display: grid; gap: 1.25rem; }
.sizecalc__who { display: grid; gap: 0.375rem; }
.sizecalc__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.sizecalc__weight { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 0.5rem; }
.sizecalc__result {
  display: grid; gap: 0.5rem; align-content: start;
  min-height: 10.5rem; padding: 1.25rem;
  background: var(--white); border: 1px solid var(--line); color: var(--ink);
}
.sizecalc__figure { font-size: clamp(2.5rem, 2rem + 2vw, 3.5rem); line-height: 1; letter-spacing: -0.03em; }
.sizecalc__figure small { font: 400 1rem/1 var(--font-ui); letter-spacing: 0; color: var(--ink-3); }
.sizecalc__idle { align-self: center; }
