/* ==========================================================================
   Crysmancy Collective — design system
   Minimal, warm, editorial. All colours/spacing are tokens on :root.
   ========================================================================== */

:root {
  --bg: #f7f4ef;
  --bg-alt: #efeae2;
  --surface: #fffdf9;
  --ink: #1d1c1a;
  --ink-soft: #57534c;
  --ink-mute: #8e877c;
  --line: #e2dcd2;
  --accent: #8a7357;          /* warm bronze */
  --accent-soft: #e9e0d2;
  --ok: #5d7a5a;
  --danger: #9b4a3c;

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --w: 1320px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 2px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.7 var(--sans);
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }

/* ---------- Typography ---------- */
.serif, h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(2.6rem, 6vw, 5.2rem); }
h2 { font-size: clamp(2rem, 3.6vw, 3.2rem); }
h3 { font-size: clamp(1.4rem, 2vw, 1.75rem); }
em, .italic { font-style: italic; }
p { margin: 0 0 1em; }
.eyebrow {
  font: 500 11px/1 var(--sans);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: inline-block;
}
.lead { font-size: 1.08rem; color: var(--ink-soft); max-width: 52ch; }
.muted { color: var(--ink-mute); }
.small { font-size: 13px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--w); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(72px, 10vw, 140px) 0; }
.section--tight { padding: clamp(48px, 6vw, 80px) 0; }
.section--alt { background: var(--bg-alt); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: clamp(32px, 4vw, 56px); flex-wrap: wrap; }
.section-head h2 { max-width: 16ch; }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  height: 52px; padding: 0 32px;
  font: 500 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase;
  border: 1px solid var(--ink); border-radius: var(--radius);
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
  white-space: nowrap;
}
.btn--dark { background: var(--ink); color: var(--bg); }
.btn--dark:hover { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--bg); }
.btn--light { border-color: #fff; color: #fff; }
.btn--light:hover { background: #fff; color: var(--ink); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .35; pointer-events: none; }
.link {
  font: 500 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase;
  padding-bottom: 6px; border-bottom: 1px solid currentColor;
  transition: opacity .3s;
}
.link:hover { opacity: .55; }

/* ---------- Announcement + Header ---------- */
.announce {
  background: var(--ink); color: var(--bg);
  text-align: center; font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  padding: 10px var(--gutter);
}
.header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .4s;
}
.header.is-scrolled { border-bottom-color: var(--line); }
.header__inner { height: var(--header-h); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.nav { display: flex; gap: clamp(18px, 2.4vw, 34px); white-space: nowrap; }
.nav a, .header__actions a, .header__actions button {
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 500;
  position: relative;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.brand { font-family: var(--serif); font-size: 26px; letter-spacing: .32em; text-transform: uppercase; text-align: center; line-height: 1; padding-left: .32em; }
.brand small { display: block; font: 500 8.5px/1 var(--sans); letter-spacing: .5em; margin-top: 6px; color: var(--ink-mute); }
.header__actions { display: flex; justify-content: flex-end; align-items: center; gap: 26px; }
.icon { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.3; }
.cart-btn { display: inline-flex; align-items: center; gap: 8px; }
.cart-count {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--ink); color: var(--bg); font-size: 10px; letter-spacing: 0;
}
.menu-btn { display: none; }

/* Mobile menu */
.mobile-nav {
  position: fixed; inset: 0; z-index: 90; background: var(--bg);
  padding: calc(var(--header-h) + 24px) var(--gutter) 40px;
  display: flex; flex-direction: column; gap: 6px;
  transform: translateY(-100%); transition: transform .6s var(--ease);
}
.mobile-nav.is-open { transform: none; }
.mobile-nav a { font-family: var(--serif); font-size: 2.4rem; line-height: 1.3; }
.mobile-nav .mobile-nav__foot { margin-top: auto; display: flex; gap: 24px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
.mobile-nav__close { position: absolute; top: 24px; right: var(--gutter); }

/* ---------- Cart drawer ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 95; background: rgba(29, 28, 26, .35);
  opacity: 0; pointer-events: none; transition: opacity .45s var(--ease);
}
.overlay.is-open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100;
  width: min(440px, 100%); background: var(--surface);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .6s var(--ease);
}
.drawer.is-open { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 26px 28px; border-bottom: 1px solid var(--line); }
.drawer__head h3 { font-size: 1.6rem; }
.drawer__body { flex: 1; overflow-y: auto; padding: 8px 28px; }
.drawer__foot { padding: 24px 28px 28px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.drawer__empty { text-align: center; padding: 72px 0; color: var(--ink-soft); }
.drawer__empty .serif { font-size: 1.6rem; color: var(--ink); margin-bottom: 8px; }

.line-item { display: grid; grid-template-columns: 84px 1fr auto; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.line-item:last-child { border-bottom: 0; }
.line-item img { aspect-ratio: 4/5; object-fit: cover; background: var(--bg-alt); width: 84px; }
.line-item__title { font-family: var(--serif); font-size: 1.15rem; line-height: 1.25; margin-bottom: 4px; }
.line-item__meta { font-size: 12px; color: var(--ink-mute); }
.line-item__price { text-align: right; font-size: 14px; }
.line-item__remove { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); margin-top: 10px; border-bottom: 1px solid; }

/* ---------- Money ---------- */
.money { display: inline-flex; flex-direction: column; line-height: 1.3; }
.money__main { font-weight: 500; }
.money__alt { font-size: 11px; color: var(--ink-mute); letter-spacing: .02em; }

/* ---------- Quantity stepper ---------- */
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); height: 44px; }
.qty button { width: 40px; height: 100%; font-size: 16px; color: var(--ink-soft); }
.qty button:hover { color: var(--ink); }
.qty input { width: 40px; height: 100%; border: 0; background: transparent; text-align: center; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty--sm { height: 34px; }
.qty--sm button { width: 30px; }
.qty--sm input { width: 30px; font-size: 13px; }

/* ---------- Hero ---------- */
.hero { position: relative; height: calc(100svh - var(--header-h) - 37px); min-height: 560px; max-height: 920px; overflow: hidden; color: #fff; background: #2b2925; }
.hero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s var(--ease); }
.hero__slide.is-active { opacity: 1; }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 7s linear; }
.hero__slide.is-active img { transform: scale(1); }
.hero__slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 30%, rgba(0,0,0,.5)); }
.hero__content { position: absolute; left: 0; right: 0; bottom: clamp(48px, 9vh, 96px); z-index: 2; }
.hero__content .eyebrow { color: rgba(255,255,255,.8); margin-bottom: 20px; }
.hero__content h1 { max-width: 13ch; margin-bottom: 32px; }
.hero__ui { position: absolute; right: var(--gutter); bottom: clamp(48px, 9vh, 96px); z-index: 3; display: flex; align-items: center; gap: 18px; font-size: 12px; letter-spacing: .14em; }
.hero__ui button { width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; display: grid; place-items: center; transition: background .3s, color .3s; }
.hero__ui button:hover { background: #fff; color: var(--ink); }
.hero__progress { width: 80px; height: 1px; background: rgba(255,255,255,.3); position: relative; overflow: hidden; }
.hero__progress span { position: absolute; inset: 0; background: #fff; transform-origin: left; transform: scaleX(0); }
.hero__progress span.run { animation: progress 6s linear forwards; }
@keyframes progress { to { transform: scaleX(1); } }

/* ---------- Marquee / value strip ---------- */
.values { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.values__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.values__item { padding: 28px 24px; display: flex; gap: 14px; align-items: center; font-size: 13px; color: var(--ink-soft); border-left: 1px solid var(--line); }
.values__item:first-child { border-left: 0; padding-left: 0; }
.values__item strong { display: block; color: var(--ink); font-weight: 500; letter-spacing: .06em; }

/* ---------- Product cards ---------- */
.grid { display: grid; gap: clamp(28px, 3vw, 44px) clamp(16px, 2vw, 28px); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.card { position: relative; display: block; }
.card__media { display: block; position: relative; aspect-ratio: 4/5; overflow: hidden; background: var(--bg-alt); margin-bottom: 18px; }
.card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), opacity .7s var(--ease); }
.card__media img + img { opacity: 0; }
.card:hover .card__media img { transform: scale(1.04); }
.card:hover .card__media img + img { opacity: 1; }
.card__tag { position: absolute; top: 14px; left: 14px; z-index: 2; background: var(--surface); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; padding: 6px 10px; }
.card__quick {
  position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 2;
  height: 44px; background: var(--surface); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; font-weight: 500;
  opacity: 0; transform: translateY(10px); transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.card:hover .card__quick { opacity: 1; transform: none; }
.card__quick:hover { background: var(--ink); color: var(--bg); }
.card__cat { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 6px; }
.card__title { font-family: var(--serif); font-size: 1.3rem; line-height: 1.25; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Editorial split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 120px); align-items: center; }
.split__media { aspect-ratio: 4/5; overflow: hidden; background: var(--bg-alt); }
.split__media img { width: 100%; height: 100%; object-fit: cover; }
.split__body h2 { margin: 18px 0 24px; }
.split__body .lead { margin-bottom: 36px; }

/* Category tiles */
.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 1.6vw, 24px); }
.cat { position: relative; aspect-ratio: 3/4; overflow: hidden; color: #fff; background: #3a3631; }
.cat img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.cat::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.55)); }
.cat:hover img { transform: scale(1.05); }
.cat__label { position: absolute; left: 28px; right: 28px; bottom: 28px; z-index: 2; }
.cat__label h3 { font-size: clamp(1.6rem, 2.4vw, 2.2rem); margin: 8px 0 14px; }
.cat__label .eyebrow { color: rgba(255,255,255,.75); }
.cat__label .link { color: #fff; }

/* Principles */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(32px, 5vw, 80px); }
.principle__num { font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--accent); margin-bottom: 18px; }
.principle h3 { margin-bottom: 14px; }
.principle p { color: var(--ink-soft); }

/* Quote */
.quote { text-align: center; max-width: 900px; margin: 0 auto; }
.quote blockquote { font-family: var(--serif); font-size: clamp(1.8rem, 3.4vw, 2.9rem); line-height: 1.25; margin: 24px 0 28px; font-style: italic; }

/* ---------- Page header ---------- */
.page-head { padding: clamp(56px, 8vw, 110px) 0 clamp(36px, 4vw, 56px); text-align: center; }
.page-head h1 { margin: 16px auto 18px; max-width: 16ch; }
.page-head .lead { margin: 0 auto; }
.crumbs { font-size: 12px; color: var(--ink-mute); letter-spacing: .06em; }
.crumbs a:hover { color: var(--ink); }
.crumbs span { margin: 0 8px; }

/* ---------- Collection ---------- */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 44px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border: 1px solid var(--line); border-radius: 18px;
  font-size: 12px; letter-spacing: .04em; transition: border-color .3s, background .3s, color .3s; cursor: pointer;
}
.chip:hover { border-color: var(--ink); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip.is-active, .chip:has(input:checked) { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.select { position: relative; display: inline-flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); }
.select select { appearance: none; border: 0; background: transparent; font-size: 13px; letter-spacing: .02em; text-transform: none; color: var(--ink); padding-right: 18px; cursor: pointer; }
.select::after { content: ""; position: absolute; right: 2px; top: 50%; width: 6px; height: 6px; border-right: 1px solid; border-bottom: 1px solid; transform: translateY(-70%) rotate(45deg); pointer-events: none; color: var(--ink); }
.result-count { font-size: 12px; color: var(--ink-mute); letter-spacing: .06em; }
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 72px; }
.pagination a, .pagination span { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid transparent; font-size: 13px; }
.pagination .is-current { border-color: var(--ink); }
.pagination a:hover { border-color: var(--line); }

/* ---------- Product ---------- */
.pdp { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(36px, 6vw, 96px); padding-top: 28px; }
.gallery { display: grid; grid-template-columns: 72px 1fr; gap: 16px; align-self: start; position: sticky; top: calc(var(--header-h) + 24px); }
.gallery__thumbs { display: flex; flex-direction: column; gap: 10px; }
.gallery__thumbs button { aspect-ratio: 4/5; overflow: hidden; opacity: .5; transition: opacity .3s; border: 1px solid transparent; }
.gallery__thumbs button[aria-pressed="true"] { opacity: 1; border-color: var(--ink); }
.gallery__thumbs button:hover { opacity: 1; }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.gallery__main { aspect-ratio: 4/5; overflow: hidden; background: var(--bg-alt); position: relative; cursor: zoom-in; }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; transition: opacity .4s var(--ease), transform .3s var(--ease); }
.gallery__main.is-zoom img { transform: scale(1.8); cursor: zoom-out; }
.pdp__info { padding-bottom: 40px; }
.pdp__info h1 { font-size: clamp(2rem, 3.4vw, 3rem); margin: 14px 0 20px; }
.pdp__price { font-size: 1.15rem; margin-bottom: 28px; }
.pdp__price .money__alt { font-size: 12px; }
.pdp__short { color: var(--ink-soft); margin-bottom: 32px; }
.option { margin-bottom: 26px; }
.option__label { display: flex; justify-content: space-between; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 12px; }
.option__label span:last-child { color: var(--ink-mute); text-transform: none; letter-spacing: .02em; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch {
  min-width: 52px; height: 44px; padding: 0 18px; border: 1px solid var(--line); font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: border-color .25s;
}
.swatch:hover { border-color: var(--ink-mute); }
.swatch[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.swatch i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.pdp__buy { display: grid; grid-template-columns: auto 1fr; gap: 12px; margin: 34px 0 20px; }
.pdp__buy .qty { height: 52px; }
.pdp__assure { display: grid; gap: 12px; padding: 24px 0; border-top: 1px solid var(--line); margin-top: 28px; font-size: 13px; color: var(--ink-soft); }
.pdp__assure div { display: flex; gap: 12px; align-items: center; }
.accordion { border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary {
  list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 22px 0; cursor: pointer;
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 500;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-size: 20px; font-weight: 300; transition: transform .35s var(--ease); }
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion .acc-body { padding: 0 0 26px; color: var(--ink-soft); }
.accordion .acc-body ul { padding-left: 18px; margin: 0 0 1em; }
.accordion .acc-body h4 { font: 500 12px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); margin: 1.6em 0 .6em; }
.accordion .acc-body h4:first-child { margin-top: 0; }
.accordion--lg summary { font-family: var(--serif); font-size: 1.45rem; letter-spacing: 0; text-transform: none; font-weight: 400; padding: 28px 0; }

/* ---------- Cart page ---------- */
.cart { display: grid; grid-template-columns: 1fr 400px; gap: clamp(32px, 5vw, 80px); align-items: start; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; font-weight: 500; color: var(--ink-mute); padding: 0 0 16px; border-bottom: 1px solid var(--line); }
.cart-table td { padding: 28px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.cart-table .ci { display: grid; grid-template-columns: 110px 1fr; gap: 22px; }
.cart-table .ci img { aspect-ratio: 4/5; object-fit: cover; width: 110px; }
.cart-table th:last-child, .cart-table td:last-child { text-align: right; }
.summary { background: var(--surface); padding: 36px; position: sticky; top: calc(var(--header-h) + 24px); }
.summary h3 { margin-bottom: 26px; }
.summary__row { display: flex; justify-content: space-between; padding: 10px 0; font-size: 14px; }
.summary__row--total { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 22px; font-size: 16px; }
.summary__note { font-size: 12px; color: var(--ink-mute); margin: 18px 0 22px; }
.promo { display: flex; border-bottom: 1px solid var(--ink); margin: 16px 0 6px; }
.promo input { flex: 1; border: 0; background: transparent; padding: 12px 0; outline: none; }
.promo button { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 8px; margin-bottom: 22px; }
.field label { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; height: 52px; padding: 0 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .3s; outline: none;
}
.field textarea { height: auto; min-height: 120px; padding: 14px 16px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); }
.field__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field__error { font-size: 12px; color: var(--danger); }
.check { display: inline-flex; gap: 10px; align-items: center; font-size: 13px; color: var(--ink-soft); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--ink); }
.alert { padding: 14px 18px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; margin-bottom: 24px; }
.alert--error { border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }

/* Auth */
.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100svh - var(--header-h) - 37px); }
.auth__media { position: relative; overflow: hidden; background: #2b2925; }
.auth__media img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.auth__media .auth__caption { position: absolute; left: 48px; right: 48px; bottom: 48px; color: #fff; }
.auth__media .auth__caption p { font-family: var(--serif); font-size: 2rem; line-height: 1.2; font-style: italic; margin: 0; }
.auth__panel { display: grid; place-items: center; padding: 64px var(--gutter); }
.auth__box { width: 100%; max-width: 420px; }
.auth__box h1 { font-size: clamp(2.4rem, 4vw, 3.4rem); margin: 14px 0 12px; }
.auth__box .lead { margin-bottom: 40px; }
.auth__alt { margin-top: 28px; text-align: center; font-size: 13px; color: var(--ink-soft); }
.auth__alt a { color: var(--ink); border-bottom: 1px solid; }
.auth__between { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 28px; font-size: 13px; }
.auth__between a { border-bottom: 1px solid; }

/* Account */
.account { display: grid; grid-template-columns: 240px 1fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.account__nav { display: grid; gap: 4px; position: sticky; top: calc(var(--header-h) + 24px); }
.account__nav a { padding: 12px 0; font-size: 13px; letter-spacing: .06em; color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.account__nav a[aria-current="page"], .account__nav a:hover { color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 48px; }
.stat { background: var(--surface); padding: 26px; }
.stat .serif { font-size: 2.4rem; display: block; margin-top: 8px; }
.orders { width: 100%; border-collapse: collapse; font-size: 14px; }
.orders th { text-align: left; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; font-weight: 500; color: var(--ink-mute); padding: 0 12px 14px 0; border-bottom: 1px solid var(--line); }
.orders td { padding: 20px 12px 20px 0; border-bottom: 1px solid var(--line); }
.badge { display: inline-block; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; padding: 5px 10px; background: var(--accent-soft); }
.badge--ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }

/* Empty / coming soon */
.empty { text-align: center; padding: clamp(80px, 12vw, 160px) 0; }
.empty h2 { margin: 16px 0 18px; }
.empty .lead { margin: 0 auto 36px; }

/* Long-form prose */
.prose { max-width: 720px; margin: 0 auto; font-size: 1.02rem; color: var(--ink-soft); }
.prose h2 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); color: var(--ink); margin: 2.2em 0 .7em; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: .4em; }
.prose strong { color: var(--ink); font-weight: 500; }

/* ---------- Newsletter + Footer ---------- */
.newsletter { text-align: center; }
.newsletter h2 { margin: 16px 0 14px; }
.newsletter .lead { margin: 0 auto 36px; }
.newsletter form { display: flex; max-width: 480px; margin: 0 auto; border-bottom: 1px solid var(--ink); }
.newsletter input { flex: 1; border: 0; background: transparent; height: 54px; outline: none; font-size: 15px; }
.newsletter button { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; font-weight: 500; padding-left: 18px; }

.footer { background: var(--ink); color: #cfc8bc; padding: clamp(64px, 8vw, 110px) 0 32px; font-size: 14px; }
.footer a:hover { color: #fff; }
.footer__top { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; padding-bottom: 64px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer .brand { text-align: left; color: #fff; padding-left: 0; }
.footer .brand small { color: #8e877c; }
.footer__about { margin-top: 24px; max-width: 34ch; color: #a39b8f; }
.footer h4 { font: 500 11px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: #fff; margin: 0 0 22px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.footer__tags { display: flex; gap: 10px; flex-wrap: wrap; padding: 32px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer__tags a { font-size: 12px; padding: 7px 14px; border: 1px solid rgba(255,255,255,.16); border-radius: 16px; }
.footer__tags a:hover { border-color: #fff; }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; padding-top: 28px; font-size: 12px; color: #8e877c; letter-spacing: .06em; flex-wrap: wrap; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 120; transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: var(--bg); padding: 14px 22px; font-size: 13px; letter-spacing: .04em;
  transition: opacity .4s var(--ease), transform .4s var(--ease); pointer-events: none;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .grid--4 { grid-template-columns: repeat(3, 1fr); }
  .values__grid { grid-template-columns: repeat(2, 1fr); }
  .values__item:nth-child(3) { border-left: 0; padding-left: 0; }
  .values__item { border-top: 1px solid var(--line); }
  .values__item:nth-child(-n+2) { border-top: 0; }
  .cart { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1000px) {
  .nav, .header__actions .hide-sm { display: none; }
  .menu-btn { display: inline-flex; }
}
@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .brand { font-size: 20px; }
  .grid--4, .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .split, .pdp, .auth, .account { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: -1; }
  .cats { grid-template-columns: 1fr; }
  .cat { aspect-ratio: 4/3; }
  .principles { grid-template-columns: 1fr; }
  .gallery { position: static; grid-template-columns: 1fr; }
  .gallery__thumbs { flex-direction: row; order: 2; overflow-x: auto; }
  .gallery__thumbs button { width: 64px; flex: none; }
  .auth__media { display: none; }
  .account__nav { position: static; grid-auto-flow: column; overflow-x: auto; gap: 24px; }
  .account__nav a { border-bottom: 0; white-space: nowrap; }
  .stats { grid-template-columns: 1fr; }
  .card__quick { display: none; }
  .hero__ui { left: var(--gutter); right: auto; bottom: 24px; }
  .hero__content { bottom: 96px; }
  .cart-table thead { display: none; }
  .cart-table tr { display: grid; grid-template-columns: 1fr auto; border-bottom: 1px solid var(--line); padding: 20px 0; }
  .cart-table td { border: 0; padding: 0; }
  .cart-table td:first-child { grid-column: 1 / -1; margin-bottom: 14px; }
  .cart-table td.hide-sm { display: none; }
  .cart-table .ci { grid-template-columns: 84px 1fr; }
  .cart-table .ci img { width: 84px; }
  .orders .hide-sm { display: none; }
}
@media (max-width: 520px) {
  body { font-size: 14px; }
  .grid--4, .grid--3 { grid-template-columns: 1fr 1fr; gap: 28px 12px; }
  .card__title { font-size: 1.1rem; }
  .values__grid { grid-template-columns: 1fr; }
  .values__item { border-left: 0 !important; padding-left: 0; border-top: 1px solid var(--line) !important; }
  .values__item:first-child { border-top: 0 !important; }
  .footer__top { grid-template-columns: 1fr; }
  .field__row { grid-template-columns: 1fr; }
  .summary { padding: 26px 20px; }
  .header__actions { gap: 18px; }
}
/* Backend integration: preserve the supplied design across real data and error states. */
[hidden] { display:none !important; }
.product-description { white-space:pre-line; }
.money { display:inline-block; }
.money__main, .money__alt { white-space:nowrap; }
.money__alt { display:block; }
.card__quick { text-align:center; }
.cms-content { max-width:900px; overflow-wrap:anywhere; }
.cms-content img { max-width:100%; height:auto; }
.alert { margin:24px 0; }
.alert--error ul { margin:0; padding-left:20px; }
.reveal { opacity:1; transform:none; }
.js-enhanced .reveal:not(.is-in) { opacity:0; transform:translateY(18px); }
.pagination { margin-top:40px; }
.pagination svg { width:20px; height:20px; }
.pagination nav > div { display:flex; gap:16px; justify-content:space-between; flex-wrap:wrap; }
.pagination nav span, .pagination nav a { display:inline-block; padding:4px 8px; }
.search-field { min-width:160px; max-width:260px; border:1px solid var(--line); padding:10px; background:transparent; }
.form-actions { display:flex; gap:12px; flex-wrap:wrap; }
.line-item__remove { background:none; border:0; cursor:pointer; }
.form-button { font:inherit; border:0; background:none; padding:0; cursor:pointer; text-align:left; }
.account__nav .form-button { padding:12px 0; }
@media(max-width:600px) { .toolbar { align-items:stretch; } .cart-table td, .cart-table th { padding-left:4px; padding-right:4px; } .ci { gap:8px; } .ci img { width:52px; height:64px; } .cart-table .money__main { font-size:.85rem; } .cart-table .money__alt { font-size:.65rem; } .qty--sm input { width:30px; } .qty--sm button { width:24px; } .account { display:block; } .account__nav { display:flex; gap:18px; flex-wrap:wrap; margin-bottom:32px; } }
@media(prefers-reduced-motion:reduce) { *, *::before, *::after { animation-duration:.01ms !important; transition-duration:.01ms !important; scroll-behavior:auto !important; } .js-enhanced .reveal:not(.is-in) { opacity:1; transform:none; } }
/* Keep page content within the design's gutters when section spacing is combined. */
.container.section { padding-left:var(--gutter); padding-right:var(--gutter); padding-top:0; }
.cart > *, .account > *, .line-item > * { min-width:0; }
.line-item__title, .orders td { overflow-wrap:anywhere; }
