/* ═══════════════════════════════════════════════════════════════════
   LOUVION — STYLESHEET
   One file, custom-property driven, in the same order as the sections
   of the pages. Reuse the tokens in :root rather than hardcoding values.

   Note: the site runs under a CSP with style-src 'self' — there is no
   'unsafe-inline'. So there are no style="" attributes and no inline
   <style> blocks anywhere. Anything dynamic is a class, or a custom
   property set from JS via el.style.setProperty().
   ═══════════════════════════════════════════════════════════════════ */

/* ═══ TOKENS ═══ */
:root {
  /* Surfaces — warm paper, not white */
  --cream:      #faf7f2;
  --cream-deep: #f3ece1;
  --paper:      #ffffff;
  --ink:        #2a1a11;

  /* Cocoa scale */
  --cocoa-900: #2e1c12;
  --cocoa-700: #4a2d1c;
  --cocoa-500: #6b4226;
  --cocoa-300: #a07a5c;
  --cocoa-100: #d9c7b4;

  /* Accent */
  --gold:      #b8893b;
  --gold-soft: #e8d5ae;

  /* Text */
  --text:      #2a1a11;
  --text-soft: #6f5c4e;
  --text-mute: #9b8878;

  /* Lines & shadow */
  --line:      #e6ddd0;
  --line-firm: #d5c8b7;
  --shadow-sm: 0 1px 2px rgba(46, 28, 18, .05);
  --shadow-md: 0 8px 28px rgba(46, 28, 18, .09);
  --shadow-lg: 0 24px 60px rgba(46, 28, 18, .16);

  /* Status */
  --ok:      #4a7c52;
  --ok-bg:   #eaf2ea;
  --warn:    #b07d2a;
  --warn-bg: #faf1de;
  --info:    #40607f;
  --info-bg: #e9eff5;
  --bad:     #a4403f;
  --bad-bg:  #f8ebea;

  /* Shape */
  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --transition: 180ms cubic-bezier(.4, 0, .2, 1);

  /* Type — self-hosted-free stacks, nothing loads from a third party */
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --container: 1180px;
  --header-h: 72px;
}

/* ═══ RESET & BASE ═══ */
*, *::before, *::after { box-sizing: border-box; }

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

/* Beats the display: values below, so hidden="true" from JS always wins. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--header-h);
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--cocoa-900);
  letter-spacing: -.01em;
  margin: 0;
  line-height: 1.15;
}

p { margin: 0; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

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

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding-block: clamp(56px, 8vw, 104px); }
.section--tight { padding-block: clamp(40px, 5vw, 64px); }
.section--paper { background: var(--paper); border-block: 1px solid var(--line); }
.section--deep  { background: var(--cocoa-900); color: var(--cream); }
.section--deep h2, .section--deep h3 { color: var(--cream); }

/* ═══ SECTION FURNITURE ═══ */
.eyebrow {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 14px;
}
.section--deep .eyebrow { color: var(--gold-soft); }

.section-head { max-width: 620px; margin-bottom: clamp(32px, 4vw, 52px); }
.section-head--center { margin-inline: auto; text-align: center; }

.section-title { font-size: clamp(28px, 4vw, 42px); }

.section-lead {
  margin-top: 14px;
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.7;
}
.section--deep .section-lead { color: var(--cocoa-100); }

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

/* ═══ BUTTONS ═══ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  background: var(--cocoa-900);
  color: var(--cream);
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition);
  text-align: center;
}
.btn:hover { background: var(--cocoa-700); }
.btn:active { transform: translateY(1px); }

.btn--ghost {
  background: transparent;
  color: var(--cocoa-900);
  border-color: var(--line-firm);
}
.btn--ghost:hover { background: var(--cream-deep); border-color: var(--cocoa-300); }

.btn--gold { background: var(--gold); color: #fff; }
.btn--gold:hover { background: #a2762f; }

.btn--light { background: var(--cream); color: var(--cocoa-900); }
.btn--light:hover { background: #fff; }

.btn--full { width: 100%; }
.btn--sm { padding: 9px 16px; font-size: 11px; }

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}

.link-quiet {
  color: var(--cocoa-500);
  border-bottom: 1px solid var(--line-firm);
  padding-bottom: 1px;
  transition: color var(--transition), border-color var(--transition);
}
.link-quiet:hover { color: var(--cocoa-900); border-color: var(--gold); }

/* ═══ HEADER ═══ */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  background: rgba(250, 247, 242, .92);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
  z-index: 60;
}

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: flex; align-items: baseline; gap: 9px; }

.brand__mark {
  font-family: var(--serif);
  font-size: 23px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--cocoa-900);
}

.brand__sub {
  font-size: 9px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.nav { display: flex; align-items: center; gap: 30px; }

.nav__link {
  font-size: 12px;
  letter-spacing: .13em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--text-soft);
  padding-block: 6px;
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.nav__link:hover { color: var(--cocoa-900); }
.nav__link.is-active { color: var(--cocoa-900); border-color: var(--gold); }

.header__actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  background: transparent;
  border: 1px solid var(--line-firm);
  border-radius: var(--radius-sm);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 600;
  transition: background var(--transition), border-color var(--transition);
}
.icon-btn:hover { background: var(--cream-deep); border-color: var(--cocoa-300); }

.cart-count {
  min-width: 19px;
  height: 19px;
  padding-inline: 5px;
  border-radius: 10px;
  background: var(--cocoa-900);
  color: var(--cream);
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
}
.cart-count.is-empty { background: var(--cocoa-100); color: var(--cocoa-500); }

.nav-toggle { display: none; }

/* ═══ HERO ═══ */
.hero {
  background: linear-gradient(178deg, var(--cream) 0%, var(--cream-deep) 100%);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(48px, 7vw, 92px);
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero__title {
  font-size: clamp(38px, 6.2vw, 68px);
  line-height: 1.05;
  letter-spacing: -.02em;
}
.hero__title em { font-style: italic; color: var(--cocoa-500); }

.hero__lead {
  margin-top: 22px;
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--text-soft);
  max-width: 46ch;
  line-height: 1.7;
}

.hero__actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }

.hero__meta {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line-firm);
  display: flex;
  flex-wrap: wrap;
  gap: 34px;
}

.hero__stat-num {
  font-family: var(--serif);
  font-size: 27px;
  color: var(--cocoa-900);
  line-height: 1.1;
}

.hero__stat-label {
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-top: 5px;
}

.hero__art {
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}

.hero__art-plate {
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #fff 0%, var(--cream-deep) 55%, #e5d9c8 100%);
  box-shadow: var(--shadow-md);
}

.hero__art-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--line-firm);
}

.hero__art-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(8px, 1.6vw, 18px);
  width: 62%;
}

/* ═══ BOX CARDS ═══ */
.box-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.box-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 26px 22px 22px;
  text-align: left;
  transition: border-color var(--transition), box-shadow var(--transition),
              transform var(--transition);
}
.box-card:hover { border-color: var(--cocoa-300); box-shadow: var(--shadow-md); transform: translateY(-2px); }

.box-card.is-selected {
  border-color: var(--cocoa-900);
  box-shadow: 0 0 0 1px var(--cocoa-900), var(--shadow-md);
}

.box-card__tag {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gold);
  background: var(--cream-deep);
  border-radius: 999px;
  padding: 4px 10px;
}

.box-card__art { width: 100%; margin-bottom: 18px; }

.box-card__pieces {
  font-family: var(--serif);
  font-size: 34px;
  color: var(--cocoa-900);
  line-height: 1;
}
.box-card__pieces span {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-left: 7px;
}

.box-card__name { font-size: 20px; margin-top: 10px; }

.box-card__desc {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.6;
  flex: 1;
}

.box-card__foot {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.box-card__price { font-family: var(--serif); font-size: 22px; color: var(--cocoa-900); }

.box-card__each { font-size: 11px; color: var(--text-mute); letter-spacing: .04em; }

.box-card__cta {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold);
}

/* ═══ CHOCOLATE ART & CARDS ═══ */
.choc-art { width: 100%; height: auto; display: block; }

.choc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 18px;
}

.choc-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.choc-card:hover { border-color: var(--cocoa-300); box-shadow: var(--shadow-sm); }

.choc-card__art {
  width: 92px;
  height: 92px;
  margin: 0 auto 12px;
  background: radial-gradient(circle at 42% 34%, #fff, var(--cream-deep));
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 9px;
}

.choc-card__name {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--cocoa-900);
}

/* Arabic product name. No letter-spacing or uppercase — both break
   Arabic letterforms, which join. */
.choc-card__family {
  font-size: 15px;
  color: var(--gold);
  margin-top: 5px;
  font-weight: 500;
  line-height: 1.6;
}

.picker-card__ar {
  font-size: 13px;
  color: var(--gold);
  line-height: 1.7;
  margin-top: 2px;
}

.choc-card__desc {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.55;
  margin-top: 9px;
  flex: 1;
}

/* ═══ PICKER (shop) ═══ */
.picker-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 14px 14px;
  text-align: center;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.picker-card.is-picked { border-color: var(--cocoa-900); box-shadow: 0 0 0 1px var(--cocoa-900); }

.picker-card__art {
  width: 74px;
  height: 74px;
  margin: 0 auto 10px;
  background: radial-gradient(circle at 42% 34%, #fff, var(--cream-deep));
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 7px;
}

.picker-card__name {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.3;
  color: var(--cocoa-900);
  min-height: 2.6em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.picker-card__desc {
  font-size: 12px;
  color: var(--text-mute);
  line-height: 1.5;
  margin-top: 4px;
  min-height: 3em;
}

.stepper {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line-firm);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.stepper__btn {
  height: 34px;
  background: var(--cream);
  border: 0;
  font-size: 17px;
  line-height: 1;
  color: var(--cocoa-700);
  transition: background var(--transition);
}
.stepper__btn:hover:not(:disabled) { background: var(--cream-deep); }
.stepper__btn:disabled { color: var(--cocoa-100); cursor: not-allowed; }

.stepper__value {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--cocoa-900);
  text-align: center;
}

/* ═══ BUILDER BAR ═══ */
.builder {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 34px;
  align-items: start;
}

.builder__panel {
  position: sticky;
  top: calc(var(--header-h) + 22px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.builder__panel-title {
  font-size: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.progress {
  height: 6px;
  border-radius: 3px;
  background: var(--cream-deep);
  overflow: hidden;
  margin-block: 12px 8px;
}

.progress__fill {
  height: 100%;
  width: var(--fill, 0%);
  background: linear-gradient(90deg, var(--cocoa-500), var(--gold));
  border-radius: 3px;
  transition: width var(--transition);
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-soft);
}
.progress-label strong { font-family: var(--serif); font-size: 17px; color: var(--cocoa-900); font-weight: 400; }

.tray {
  display: grid;
  gap: 6px;
  margin-block: 16px;
  max-height: 210px;
  overflow-y: auto;
}

.tray__row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--text-soft);
  padding: 5px 0;
  border-bottom: 1px dotted var(--line);
}
.tray__row:last-child { border-bottom: 0; }
.tray__swatch { width: 15px; height: 15px; border-radius: 50%; flex: none; box-shadow: inset 0 -2px 3px rgba(0,0,0,.2); }
.tray__name { flex: 1; color: var(--text); }
.tray__qty { font-family: var(--serif); color: var(--cocoa-900); }

.tray__empty {
  font-size: 13px;
  color: var(--text-mute);
  font-style: italic;
  padding-block: 14px;
  text-align: center;
}

.panel-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
  color: var(--text-soft);
  padding-block: 5px;
}
.panel-row--total {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 14px;
  font-size: 15px;
  color: var(--text);
}
.panel-row--total strong { font-family: var(--serif); font-size: 24px; font-weight: 400; color: var(--cocoa-900); }

.panel-actions { display: grid; gap: 9px; margin-top: 18px; }

.hint {
  font-size: 12px;
  color: var(--text-mute);
  line-height: 1.55;
  margin-top: 12px;
  text-align: center;
}

/* ═══ STEP HEADINGS ═══ */
.step-head { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; }

.step-num {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--cocoa-300);
  color: var(--cocoa-500);
  font-family: var(--serif);
  font-size: 15px;
  display: grid;
  place-items: center;
}

.step-title { font-size: 22px; }

.step-note { font-size: 13px; color: var(--text-mute); margin-left: auto; text-align: right; }

/* ═══ GALLERY ═══ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.gallery-item {
  position: relative;
  margin: 0;              /* <figure> ships with 40px side margins */
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--cream-deep);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms cubic-bezier(.4, 0, .2, 1);
}
.gallery-item:hover img { transform: scale(1.04); }

.gallery-item__cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 20px 14px 12px;
  background: linear-gradient(to top, rgba(46, 28, 18, .72), transparent);
  color: #fff;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* ═══ STORY ═══ */
.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.story-card__num {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--gold);
  letter-spacing: .1em;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(232, 213, 174, .3);
  margin-bottom: 16px;
}

.story-card__title { font-size: 21px; margin-bottom: 9px; }

.story-card__text { color: var(--cocoa-100); font-size: 15px; line-height: 1.7; }

/* ═══ FOOTER ═══ */
.footer {
  background: var(--cocoa-900);
  color: var(--cocoa-100);
  padding-block: 56px 28px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(217, 199, 180, .16);
}

.footer .brand__mark { color: var(--cream); }
.footer .brand__sub { color: var(--cocoa-300); }

.footer__blurb { margin-top: 16px; font-size: 14px; line-height: 1.7; max-width: 38ch; }

.footer__title {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-soft);
  font-weight: 600;
  margin-bottom: 14px;
}

.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 14px; }
.footer__list a:hover { color: var(--cream); }

.footer__bottom {
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 12px;
  color: var(--cocoa-300);
}

/* ═══ CART DRAWER ═══ */
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(46, 28, 18, .42);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
  z-index: 80;
}
.scrim.is-open { opacity: 1; visibility: visible; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(440px, 100vw);
  background: var(--cream);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform 260ms cubic-bezier(.4, 0, .2, 1);
  z-index: 90;
  display: flex;
  flex-direction: column;
}
.drawer.is-open { transform: translateX(0); }

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.drawer__title { font-size: 21px; }

.drawer__close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-firm);
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: 17px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background var(--transition);
}
.drawer__close:hover { background: var(--cream-deep); }

.drawer__body { flex: 1; overflow-y: auto; padding: 20px 24px; }

.drawer__foot {
  border-top: 1px solid var(--line);
  padding: 20px 24px;
  background: var(--paper);
}

.cart-line {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 13px;
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
}
.cart-line:first-child { padding-top: 0; }

.cart-line__art {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  padding: 6px;
}

.cart-line__name { font-family: var(--serif); font-size: 17px; color: var(--cocoa-900); }

.cart-line__meta { font-size: 12px; color: var(--text-mute); margin-top: 2px; }

.cart-line__contents {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 7px;
  line-height: 1.55;
}

.cart-line__right { text-align: right; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }

.cart-line__price { font-family: var(--serif); font-size: 17px; color: var(--cocoa-900); }

.text-btn {
  background: none;
  border: 0;
  padding: 0;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-mute);
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.text-btn:hover { color: var(--bad); border-color: var(--bad); }

.empty-state { text-align: center; padding-block: 52px; }
.empty-state__art { width: 86px; margin: 0 auto 18px; opacity: .5; }
.empty-state__title { font-family: var(--serif); font-size: 19px; color: var(--cocoa-900); }
.empty-state__text { font-size: 14px; color: var(--text-mute); margin-top: 7px; }

/* ═══ FORMS ═══ */
.field { display: grid; gap: 6px; margin-bottom: 15px; }

.label {
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-soft);
}

.input,
.textarea,
.select {
  width: 100%;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--line-firm);
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-size: 15px;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--cocoa-500);
  box-shadow: 0 0 0 3px rgba(107, 66, 38, .1);
}
.textarea { resize: vertical; min-height: 84px; line-height: 1.6; }

.field-hint { font-size: 12px; color: var(--text-mute); }

.form-error {
  background: var(--bad-bg);
  border: 1px solid rgba(164, 64, 63, .25);
  color: var(--bad);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 13px;
  margin-bottom: 15px;
}

.form-note {
  background: var(--ok-bg);
  border: 1px solid rgba(74, 124, 82, .25);
  color: var(--ok);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 13px;
  margin-bottom: 15px;
}

/* ═══ AUTH ═══ */
.auth-wrap {
  max-width: 460px;
  margin-inline: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: clamp(26px, 4vw, 38px);
  box-shadow: var(--shadow-sm);
}

.auth-head { text-align: center; margin-bottom: 24px; }
.auth-head h1 { font-size: 27px; }
.auth-head p { font-size: 14px; color: var(--text-soft); margin-top: 7px; }

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line-firm);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 24px;
}

.tab {
  padding: 11px;
  background: var(--cream);
  border: 0;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-soft);
  transition: background var(--transition), color var(--transition);
}
.tab:hover { background: var(--cream-deep); }
.tab.is-active { background: var(--cocoa-900); color: var(--cream); }

.auth-foot { text-align: center; font-size: 13px; color: var(--text-mute); margin-top: 18px; }

/* ═══ ACCOUNT ═══ */
.account-head {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}

.account-head__name { font-size: 30px; }
.account-head__mail { font-size: 14px; color: var(--text-mute); margin-top: 5px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
}
.badge--pending   { background: var(--warn-bg); color: var(--warn); }
.badge--confirmed { background: var(--info-bg); color: var(--info); }
.badge--making    { background: var(--info-bg); color: var(--info); }
.badge--shipped   { background: var(--info-bg); color: var(--info); }
.badge--completed { background: var(--ok-bg);   color: var(--ok); }
.badge--cancelled { background: var(--bad-bg);  color: var(--bad); }
.badge--admin     { background: var(--cocoa-900); color: var(--gold-soft); }

.order-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-bottom: 14px;
}

.order-card__head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.order-card__id {
  font-family: var(--serif);
  font-size: 19px;
  color: var(--cocoa-900);
  letter-spacing: .04em;
}

.order-card__date { font-size: 12px; color: var(--text-mute); margin-top: 2px; }

.order-card__body { padding-top: 14px; display: grid; gap: 9px; }

.order-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
  font-size: 14px;
}

.order-line__name { color: var(--text); font-weight: 500; }
.order-line__chocs { font-size: 12px; color: var(--text-mute); width: 100%; line-height: 1.55; }
.order-line__price { font-family: var(--serif); color: var(--cocoa-900); }

.order-card__foot {
  margin-top: 12px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
}
.order-card__total { font-family: var(--serif); font-size: 21px; color: var(--cocoa-900); }

/* ═══ ADMIN ═══ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 30px;
}

.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
}

.stat__label {
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 600;
}

.stat__value {
  font-family: var(--serif);
  font-size: 32px;
  color: var(--cocoa-900);
  line-height: 1.2;
  margin-top: 7px;
}

.stat__sub { font-size: 12px; color: var(--text-soft); margin-top: 3px; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}
.toolbar .input, .toolbar .select { width: auto; min-width: 190px; }
.toolbar__spacer { margin-left: auto; }

.table-wrap {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

.table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 860px; }

.table th {
  text-align: left;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 700;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-firm);
  background: var(--cream);
  white-space: nowrap;
}

.table td { padding: 15px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--cream); }

.table__id { font-family: var(--serif); font-size: 15px; color: var(--cocoa-900); letter-spacing: .04em; }
.table__sub { font-size: 12px; color: var(--text-mute); margin-top: 2px; }
.table__total { font-family: var(--serif); font-size: 17px; color: var(--cocoa-900); white-space: nowrap; }

.table__contents { font-size: 12px; color: var(--text-soft); line-height: 1.6; max-width: 300px; }
.table__contents b { color: var(--text); font-weight: 600; }

.select--status { padding: 7px 10px; font-size: 12px; min-width: 130px; }

.table-empty { padding: 52px 20px; text-align: center; color: var(--text-mute); font-size: 14px; }

/* ═══ TOAST ═══ */
.toasts {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  gap: 9px;
  z-index: 120;
  width: min(400px, calc(100vw - 32px));
}

.toast {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 17px;
  background: var(--cocoa-900);
  color: var(--cream);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  animation: toast-in 220ms cubic-bezier(.4, 0, .2, 1);
  transition: opacity 200ms ease;
}
.toast--bad { background: var(--bad); }
.toast--ok  { background: var(--ok); }

.toast__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex: none; }
.toast--bad .toast__dot, .toast--ok .toast__dot { background: rgba(255, 255, 255, .8); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══ REVEAL ═══
   Hiding only happens once app.js has added .js to <html>. If the script
   fails to load, every .reveal section stays plainly visible instead of
   being stuck at opacity 0. */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 520ms ease, transform 520ms ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1080px) {
  .box-grid { grid-template-columns: repeat(2, 1fr); }
  .builder { grid-template-columns: 1fr; }
  .builder__panel { position: static; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { max-width: 400px; margin-inline: auto; order: -1; }
  .story-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer__grid { grid-template-columns: 1fr; gap: 30px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

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

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 18px;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
    box-shadow: var(--shadow-md);
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__link { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
  .nav__link.is-active { border-color: var(--gold); }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 38px;
    height: 38px;
    padding: 0 9px;
    background: transparent;
    border: 1px solid var(--line-firm);
    border-radius: var(--radius-sm);
  }
  .nav-toggle span { display: block; height: 1px; background: var(--cocoa-900); transition: transform var(--transition), opacity var(--transition); }
  .nav-toggle.is-open span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
  .nav-toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav-toggle.is-open span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

  .brand__sub { display: none; }
  .box-grid { grid-template-columns: 1fr; }
  .choc-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .stat-grid { grid-template-columns: 1fr; }
  .step-note { width: 100%; margin-left: 0; text-align: left; }
  .toolbar .input, .toolbar .select { width: 100%; }
  .toolbar__spacer { margin-left: 0; }
}

@media (max-width: 360px) {
  .container { padding-inline: 18px; }
  /* Only at the very narrowest does the button drop to a bare count. */
  .icon-btn span:not(.cart-count) { display: none; }
}
