/* Storefront base — reset, layout shell, and the components listed in
 * README.md > "Design tokens — Storefront > Components". Page-specific
 * layouts live in styles alongside each page (or get added here as
 * pages are built) — this file is the shared foundation. */

@import url('tokens.css');

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-body);
  background: var(--color-surface);
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; margin: 0; color: var(--color-ink); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Full width: every section stretches edge-to-edge. Product grid content
 * still reads at a max 1440px via .container so it doesn't stretch
 * absurdly wide on huge monitors. */
.page-frame {
  background: var(--color-surface);
}

/* Type roles */
.hero-display { font-family: var(--font-display); font-weight: 300; font-size: 62px; line-height: 1.05; }
.page-title { font-family: var(--font-display); font-weight: 300; font-size: 44px; line-height: 1.1; }
.section-heading { font-family: var(--font-display); font-weight: 400; font-size: 40px; line-height: 1.1; }
.card-heading { font-family: var(--font-display); font-weight: 500; font-size: 22px; }
.price-large { font-family: var(--font-display); font-weight: 500; font-size: 32px; color: var(--color-accent-deep); }
.price-card { font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--color-accent-deep); }
.body-large { font-family: var(--font-body); font-size: 16px; line-height: 1.8; }
.product-name { font-family: var(--font-body); font-weight: 500; font-size: 15px; line-height: 1.4; color: var(--color-ink); }
.nav-link { font-family: var(--font-body); font-weight: 600; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow { font-family: var(--font-body); font-weight: 600; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--color-accent); }
.caption { font-size: 12px; color: var(--color-faint); }
.field-label { font-family: var(--font-body); font-weight: 500; font-size: 12px; color: #5B4A43; }

/* ---------------------------------------------------------------------
 * Header
 * ------------------------------------------------------------------- */
.site-header {
  height: 82px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
}
.site-header .header-bar {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.site-header .logo img { height: 52px; }
.site-nav { display: flex; gap: var(--space-4); }
.site-nav a.is-active { color: var(--color-accent); border-bottom: 1px solid var(--color-accent); padding-bottom: 4px; }
.header-actions { display: flex; align-items: center; gap: var(--space-4); }

.header-search {
  display: flex; align-items: center; gap: 8px;
  height: 36px; width: 180px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  color: var(--color-placeholder);
}
.header-search:focus-within {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(169, 107, 82, .15);
}
.header-search input {
  border: none; outline: none; background: none;
  font-family: var(--font-body); font-size: 12px;
  color: var(--color-ink);
  width: 100%;
}
.header-search input::placeholder { color: var(--color-placeholder); }

.cart-badge {
  position: relative;
  display: flex; align-items: center;
  color: var(--color-ink);
}
.cart-badge .count {
  position: absolute; top: -6px; right: -8px;
  width: 18px; height: 18px; border-radius: var(--radius-round);
  background: var(--color-accent); color: #fff;
  font: 600 11px var(--font-body);
  display: flex; align-items: center; justify-content: center;
}

/* ---------------------------------------------------------------------
 * Footer — full (home/about) and slim (every other page)
 * ------------------------------------------------------------------- */
.site-footer-full {
  background: var(--color-ink);
  color: var(--color-footer-text);
  padding: var(--space-7) var(--gutter) 28px;
}
.site-footer-full .footer-logo {
  height: 64px; width: 64px; object-fit: contain;
  background: #fff; border-radius: var(--radius-control); padding: 6px;
}
.site-footer-full h4 { color: var(--color-footer-heading); font-family: var(--font-body); font-weight: 600; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 var(--space-3); }
.site-footer-full .grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: var(--space-6); }
.site-footer-full p { margin: 0 0 4px; line-height: 2; font-size: 13px; }
.site-footer-full a:hover { color: #fff; }
.site-footer-full .rule { border: none; border-top: 1px solid var(--color-footer-rule); margin: var(--space-5) 0 20px; }
.social-circle {
  width: 30px; height: 30px; border-radius: var(--radius-round);
  border: 1px solid var(--color-footer-rule);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--color-footer-text);
}

.site-footer-slim {
  padding: 22px var(--gutter);
  display: flex; justify-content: space-between;
  border-top: 1px solid var(--color-border);
  color: var(--color-faint);
  font-size: 12px;
}

/* ---------------------------------------------------------------------
 * Buttons
 * ------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-control);
  font-family: var(--font-body); font-weight: 600; font-size: 12px;
  letter-spacing: .14em; text-transform: uppercase;
  padding: 14px 32px;
  border: 1px solid transparent;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn-primary {
  background: var(--color-accent); color: #fff;
  box-shadow: var(--shadow-button);
}
.btn-primary:hover { background: var(--color-accent-deep); }
.btn-secondary {
  background: transparent; color: var(--color-accent-deep);
  border-color: var(--color-border-warm);
}
.btn-secondary:hover { background: var(--color-surface-soft); }
.btn-tall { padding-top: 0; padding-bottom: 0; height: 52px; }
.btn-full { width: 100%; }

/* ---------------------------------------------------------------------
 * Inputs
 * ------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.input, select.input, textarea.input {
  height: 44px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-control);
  padding: 0 12px;
  font-family: var(--font-body); font-size: 14px;
  color: var(--color-ink);
  background: var(--color-surface);
}
textarea.input { height: auto; padding: 12px; }
.input::placeholder { color: var(--color-placeholder); }
.input:focus {
  outline: none;
  border: 2px solid var(--color-accent);
  box-shadow: var(--shadow-focus-ring);
}
.input.is-error {
  border: 2px solid var(--color-error);
  box-shadow: 0 0 0 3px rgba(179, 38, 30, .12);
}
.error-text { font-size: 12px; color: var(--color-error); }

/* ---------------------------------------------------------------------
 * Filter chip
 * ------------------------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center;
  padding: 7px 16px;
  border-radius: var(--radius-chip);
  font-family: var(--font-body); font-weight: 600; font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase;
  background: #fff; border: 1px solid var(--color-border-strong); color: var(--color-body);
}
.chip.is-active { background: var(--color-accent); color: #fff; border-color: transparent; }

/* ---------------------------------------------------------------------
 * Color swatch
 * ------------------------------------------------------------------- */
.swatch {
  display: inline-block;
  border-radius: var(--radius-round);
  border: 1px solid var(--color-border-strong);
  width: 15px; height: 15px;
}
.swatch--product { width: 44px; height: 44px; }
.swatch--cart { width: 13px; height: 13px; }
.swatch.is-selected { box-shadow: var(--shadow-swatch-selected); }
.swatch.is-soldout { opacity: .35; }

/* ---------------------------------------------------------------------
 * Quantity stepper
 * ------------------------------------------------------------------- */
.stepper {
  display: grid; grid-template-columns: 44px 34px 44px;
  align-items: stretch;
  height: 52px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-control);
  overflow: hidden;
}
.stepper button { border: none; background: none; font-size: 16px; }
.stepper .value { display: flex; align-items: center; justify-content: center; font-family: var(--font-body); }

/* ---------------------------------------------------------------------
 * Status chip
 * ------------------------------------------------------------------- */
.status-chip {
  display: inline-flex; align-items: center;
  padding: 4px 10px;
  border-radius: 3px;
  font-family: var(--font-body); font-weight: 600; font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase;
}
.status-chip--success { color: var(--color-success); background: var(--color-success-bg); }
.status-chip--warning { color: var(--color-warning); background: var(--color-warning-bg); }
.status-chip--error { color: var(--color-error); background: var(--color-error-bg); }

/* ---------------------------------------------------------------------
 * Accent card (order summary, contact form, FAQ callout)
 * ------------------------------------------------------------------- */
.accent-card {
  border: 1px solid var(--color-border);
  border-top: 2px solid var(--color-accent);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  padding: var(--space-4);
}

/* ---------------------------------------------------------------------
 * Placeholder image tile
 * ------------------------------------------------------------------- */
.placeholder-tile {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background-image: var(--placeholder-fill-small);
  color: var(--placeholder-label-color);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: var(--space-3);
}
.placeholder-tile--large { background-image: var(--placeholder-fill-large); font-size: 12px; }

/* ---------------------------------------------------------------------
 * Hero split (home)
 * ------------------------------------------------------------------- */
.hero-split { display: grid; grid-template-columns: 1fr 1fr; min-height: 520px; }
.hero-split__panel {
  padding: 88px 64px 88px var(--gutter);
  display: flex; flex-direction: column; justify-content: center; gap: 26px;
  background: var(--color-surface-soft);
}
.hero-split__headline { max-width: 520px; text-wrap: pretty; }
.hero-split__body { max-width: 400px; }
.hero-split__actions { display: flex; gap: 12px; margin-top: 6px; }
.hero-split__meta {
  display: flex; gap: 28px; margin-top: 14px;
  font-family: var(--font-body); font-size: 12px; color: var(--color-faint);
}
.hero-split__image { min-height: 100%; }

/* ---------------------------------------------------------------------
 * Section header (Bestsellers, etc.)
 * ------------------------------------------------------------------- */
.section-header {
  padding: 72px 48px 24px;
  display: flex; align-items: flex-end; justify-content: space-between;
}
.section-header__heading { display: flex; flex-direction: column; gap: 8px; }
.section-header__link {
  font-family: var(--font-body); font-weight: 600; font-size: 12px;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--color-accent-deep);
  border-bottom: 1px solid var(--color-border-warm);
  padding-bottom: 4px;
}

/* ---------------------------------------------------------------------
 * Marquee strip
 * ------------------------------------------------------------------- */
.marquee {
  background: var(--color-ink);
  color: #EFE3DC;
  padding: 18px 0;
  overflow: hidden;
  white-space: nowrap;
}
.marquee__track {
  display: inline-block;
  font-family: var(--font-body); font-weight: 600; font-size: 12px;
  letter-spacing: .14em; text-transform: uppercase;
  animation: marquee-scroll 60s linear infinite;
}
.marquee__track span { color: var(--color-accent); margin: 0 var(--space-3); }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

/* ---------------------------------------------------------------------
 * Product card / grid
 * ------------------------------------------------------------------- */
.product-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(5, 1fr);
}
.product-grid--4up { grid-template-columns: repeat(4, 1fr); gap: 28px 32px; }
.product-card { position: relative; display: flex; flex-direction: column; gap: 12px; color: inherit; }
.product-card__image {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  overflow: hidden;
}
.product-card__badge {
  position: absolute; top: 10px; left: 10px;
}
.product-card__swatches { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.product-card.is-soldout { opacity: .55; }
.product-card__soldout-badge {
  position: absolute; top: 10px; left: 10px;
  padding: 4px 10px; background: #fff; color: var(--color-body);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-chip);
  font-family: var(--font-body); font-weight: 600; font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
}
.product-card__quick-add {
  position: absolute; left: 12px; right: 12px; bottom: -44px;
  padding: 11px 0; text-align: center;
  background: var(--color-ink); color: #fff;
  border: none; border-radius: 3px;
  font-family: var(--font-body); font-weight: 600; font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  cursor: pointer;
  transition: bottom .2s ease;
}
.product-card:hover .product-card__quick-add { bottom: 12px; }

/* ---------------------------------------------------------------------
 * Shop page header band + filter/sort row
 * ------------------------------------------------------------------- */
.page-header-band {
  padding: 44px 48px 28px;
  display: flex; flex-direction: column; gap: 10px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-soft);
}
.breadcrumb { font-family: var(--font-body); font-size: 12px; color: var(--color-faint); }
.breadcrumb a:hover { color: var(--color-accent-deep); }
.shop-toolbar {
  padding: 24px 48px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap; gap: 16px;
}
.sort-select {
  height: 38px; padding: 0 14px;
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-control);
  font-family: var(--font-body); font-weight: 500; font-size: 13px; color: var(--color-ink);
  background: #fff;
}

/* ---------------------------------------------------------------------
 * Product card badge (bestseller / new)
 * ------------------------------------------------------------------- */
.badge-pill {
  padding: 4px 10px;
  border-radius: var(--radius-chip);
  font-family: var(--font-body); font-weight: 600; font-size: 10px;
  letter-spacing: .1em; text-transform: uppercase;
  color: #fff;
}
.badge-pill--bestseller { background: var(--color-hot-pink); }
.badge-pill--new { background: var(--color-ink); }

/* ---------------------------------------------------------------------
 * Value band (home)
 * ------------------------------------------------------------------- */
.value-band {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--color-border);
  border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border);
}
.value-band__cell {
  background: var(--color-surface-soft);
  padding: 44px 40px;
  display: flex; flex-direction: column; gap: 10px;
}
.value-band__icon { width: 26px; height: 26px; border: 1.5px solid var(--color-accent); }
.value-band__icon--circle { border-radius: var(--radius-round); }
.value-band__icon--square { border-radius: var(--radius-control); }
.value-band__icon--diamond { transform: rotate(45deg); }
.value-band__heading { font-family: var(--font-display); font-weight: 500; font-size: 20px; color: var(--color-ink); }
.value-band__body { font-family: var(--font-body); font-size: 13px; line-height: 1.6; color: var(--color-muted); }

/* ---------------------------------------------------------------------
 * Color story split (home)
 * ------------------------------------------------------------------- */
.color-story {
  display: grid; grid-template-columns: 1.1fr 1fr; align-items: stretch;
}
.color-story__copy {
  padding: 64px 48px;
  display: flex; flex-direction: column; justify-content: center; gap: 18px;
  background: var(--color-surface);
}
.color-story__swatches { display: flex; gap: 10px; margin-top: 6px; }
.color-story__swatches .swatch { width: 34px; height: 34px; }

/* ---------------------------------------------------------------------
 * Accordion
 * ------------------------------------------------------------------- */
.accordion-row { border-bottom: 1px solid var(--color-border); padding: 22px 0; }
.accordion-row__question {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-display); font-weight: 500; font-size: 20px;
  cursor: pointer;
}
.accordion-row__answer {
  font-size: 15px; line-height: 1.8;
  overflow: hidden; max-height: 0;
  transition: max-height .3s ease;
}
.accordion-row.is-open .accordion-row__answer { max-height: 600px; margin-top: var(--space-3); }

@media (max-width: 1279px) {
  .container { padding-left: 32px; padding-right: 32px; }
}
@media (max-width: 1023px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .product-grid--4up { grid-template-columns: repeat(3, 1fr); }

  /* Any fixed 2/3-column split squashes into unusable slivers once the
   * viewport gets narrow (or just short-and-wide vs tall-and-narrow) —
   * stack these on one column instead of only ever assuming a 1440px
   * desktop-width, 16:9-ish window. */
  .hero-split { grid-template-columns: 1fr; min-height: 0; }
  .hero-split__panel { padding: 56px 32px; }
  .hero-split__image { min-height: 320px; }
  .color-story { grid-template-columns: 1fr; }
  .color-story__copy { padding: 48px 32px; }
  .value-band { grid-template-columns: 1fr; }
  .site-footer-full .grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 767px) {
  .product-grid, .product-grid--4up { grid-template-columns: repeat(2, 1fr); }
  .site-nav { display: none; }

  .hero-display { font-size: 44px; }
  .hero-split__meta { flex-wrap: wrap; row-gap: 8px; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .site-footer-full .grid { grid-template-columns: 1fr; }
}
