/* ============================================================
   Faire-derived storefront system — Build and Equip catalogue
   Warm cream canvas · achromatic UI · serif display + thin sans
   Two radii only (4px / 40px) · zero shadows · zero gradients
   Butter #f1f29f = short decorative rule only, never a control
   ============================================================ */

:root {
  --c-cream: #fbf8f6;
  --c-white: #ffffff;
  --c-ink: #000000;
  --c-charcoal: #333333;
  --c-smoke: #6c6a6a;
  --c-ash: #dadada;
  --c-butter: #f1f29f;
  --c-forest: oklch(32% 0.03 165); /* inverted band — deep desaturated green */

  --r-md: 4px;
  --r-pill: 40px;
  --maxw: 1280px;

  --font-sans: 'Graphik', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Nantes', 'Source Serif 4', Georgia, 'Times New Roman', serif;

  --t-caption: 14px;
  --t-body: 16px;
  --t-sub: 18px;
  --t-heading-sm: 22px;
  --t-heading: 28px;
  --t-heading-lg: 30px;
  --t-display: 52px;

  --header-h: 124px;
}

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

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

body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: var(--t-body);
  line-height: 1.5;
  letter-spacing: 0.009em;
  color: var(--c-charcoal);
  background: var(--c-cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { overflow-x: clip; }

/* full-bleed breakout for sections living inside the centered wrap */
.bleed { width: 100vw; margin-left: calc(50% - 50vw); }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; }

h1, h2, h3 { color: var(--c-ink); font-weight: 400; }
.muted { color: var(--c-smoke); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: 48px; padding-right: 48px; }

/* Short decorative butter rule — the system's only accent gesture */
.rule::before {
  content: "";
  display: block;
  width: 64px; height: 3px;
  background: var(--c-butter);
  margin-bottom: 16px;
}

/* ---------------- Promo strip ---------------- */
.promo {
  background: var(--c-cream);
  border-bottom: 1px solid var(--c-ash);
  text-align: center;
  padding: 9px 16px;
  font-size: var(--t-caption);
  letter-spacing: 0.011em;
  color: var(--c-ink);
}
.promo a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------------- Header ---------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--c-cream);
  border-bottom: 1px solid var(--c-ash);
}
.nav-inner { max-width: var(--maxw); margin: 0 auto; display: flex; flex-direction: column; }

.nav-top {
  display: flex; align-items: center; gap: 32px;
  min-height: 76px; padding: 14px 48px;
  position: relative;
}

/* Wordmark — wide-tracked sans, no icon */
.brand { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.brand-name {
  font-size: 20px; font-weight: 400; line-height: 1;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--c-ink); white-space: nowrap;
}
.brand-name i { font-style: normal; }
.brand-name small {
  display: block; margin-top: 5px;
  font-size: 10px; font-weight: 400; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--c-smoke);
}

/* Pill search — the only pill-shaped control in the header */
.search {
  flex: 1 1 auto; min-width: 0; max-width: 560px;
  display: flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 20px;
  background: var(--c-white);
  border: 1px solid var(--c-ash);
  border-radius: var(--r-pill);
}
.search svg { width: 17px; height: 17px; color: var(--c-charcoal); flex-shrink: 0; }
.search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font-size: var(--t-body); letter-spacing: 0.009em; color: var(--c-ink);
}
.search input::placeholder { color: var(--c-charcoal); opacity: 0.75; }
.search:focus-within { border-color: var(--c-charcoal); }

.nav-actions { display: flex; align-items: center; gap: 24px; margin-left: auto; flex-shrink: 0; }
.ghost-link { font-size: var(--t-caption); letter-spacing: 0.009em; color: var(--c-ink); white-space: nowrap; }
.ghost-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Primary CTA — matte black, the page's single filled control */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--c-ink); color: var(--c-white);
  font-size: var(--t-caption); font-weight: 400; letter-spacing: 0.009em;
  border-radius: var(--r-md); padding: 12px 23px;
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { background: var(--c-charcoal); }
.btn-ghost {
  background: transparent; color: var(--c-ink);
  border: 1px solid var(--c-ink);
}
.btn-ghost:hover { background: var(--c-ink); color: var(--c-white); }

/* Category text nav */
.nav-cats-row { padding: 0 48px; }
.nav-cats {
  display: flex; justify-content: safe center;
  gap: 0 22px;
  overflow-x: auto; scrollbar-width: none;
}
.nav-cats::-webkit-scrollbar { display: none; }
.nav-cat { flex-shrink: 0; }
.nav-cat > a {
  font-size: var(--t-caption); line-height: 1; letter-spacing: 0.009em;
  padding: 16px 2px 15px; display: block; white-space: nowrap;
  color: var(--c-ink);
  border-bottom: 2px solid transparent;
}
.nav-cat > a:hover { border-bottom-color: var(--c-ink); }
.nav-cat.active > a { border-bottom-color: var(--c-ink); }

/* Mobile menu button */
.menu-btn {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  color: var(--c-ink);
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
}
.menu-btn svg { width: 24px; height: 24px; }

.mobile-menu {
  display: none; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--c-white); border-bottom: 1px solid var(--c-ash);
  max-height: calc(100vh - 64px); overflow-y: auto;
}
.mobile-menu.open { display: block; }
.mm-cat > button {
  width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center;
  padding: 14px 24px; font-size: 16px; color: var(--c-ink);
  border-bottom: 1px solid var(--c-ash);
}
.mm-sub { display: none; background: var(--c-cream); }
.mm-cat.open .mm-sub { display: block; }
.mm-sub a { display: block; padding: 10px 24px 10px 40px; font-size: 15px; border-bottom: 1px solid var(--c-ash); color: var(--c-charcoal); }

/* ---------------- Hero (home) ---------------- */
.hero {
  position: relative;
  min-height: 460px;
  display: flex; align-items: flex-end;
  overflow: hidden;
}
.hero img.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* flat translucent scrim (not a gradient) for headline legibility */
.hero::after { content: ""; position: absolute; inset: 0; background: rgb(0 0 0 / 0.28); }
.hero-copy {
  position: relative; z-index: 2;
  max-width: var(--maxw); width: 100%; margin: 0 auto;
  padding: 56px 48px;
  color: var(--c-white);
}
.hero-copy .kicker { font-size: var(--t-caption); letter-spacing: 0.011em; margin-bottom: 12px; }
.hero-copy h1 {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(34px, 4vw, var(--t-display)); line-height: 1.23;
  color: var(--c-white); max-width: 18ch;
}
.hero-copy h1::after {
  content: ""; display: block;
  width: 72px; height: 3px; background: var(--c-butter);
  margin-top: 18px;
}
.hero-copy p { font-size: var(--t-sub); line-height: 1.44; margin-top: 16px; max-width: 46ch; }
.hero-copy .hero-actions { display: flex; gap: 16px; align-items: center; margin-top: 28px; flex-wrap: wrap; }
.hero-copy .btn-ghost { color: var(--c-white); border-color: var(--c-white); }
.hero-copy .btn-ghost:hover { background: var(--c-white); color: var(--c-ink); }
.hero-copy .btn { background: var(--c-white); color: var(--c-ink); }
.hero-copy .btn:hover { background: var(--c-cream); }

/* ---------------- Sections ---------------- */
.section { padding: 72px 0 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.section-head h2 {
  font-family: var(--font-serif); font-weight: 400;
  font-size: var(--t-heading-lg); line-height: 1.27;
}
.section-head .count { color: var(--c-smoke); font-size: var(--t-caption); white-space: nowrap; padding-bottom: 4px; }

/* ---------------- Category tiles (home) ---------------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.cat-card { display: block; }
.cat-card .cc-img {
  aspect-ratio: 1 / 1;
  background: var(--c-white);
  border: 1px solid var(--c-ash);
  border-radius: var(--r-md);
  padding: 20px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.cat-card .cc-img img { width: 100%; height: 100%; object-fit: contain; }
.cat-card:hover .cc-img { border-color: var(--c-charcoal); }
.cat-card .cc { margin-top: 12px; }
.cat-card .cc-t { font-size: var(--t-body); color: var(--c-ink); line-height: 1.35; }
.cat-card:hover .cc-t { text-decoration: underline; text-underline-offset: 3px; }
.cat-card .cc-n { font-size: var(--t-caption); color: var(--c-smoke); margin-top: 2px; }

/* ---------------- Inverted value-prop band ---------------- */
.band {
  background: var(--c-forest);
  color: var(--c-white);
  margin-top: 72px;
}
.band-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 64px 48px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 48px;
}
.band h2 {
  font-family: var(--font-serif); font-weight: 400;
  font-size: 38px; line-height: 1.27; color: var(--c-white);
  max-width: 24ch;
}
.band p { font-size: var(--t-sub); line-height: 1.44; margin-top: 16px; max-width: 52ch; color: rgb(255 255 255 / 0.85); }
.band-link {
  font-size: var(--t-sub); color: var(--c-white); white-space: nowrap;
  border-bottom: 2px solid var(--c-butter);
  padding-bottom: 4px;
}
.band-link:hover { border-bottom-color: var(--c-white); }

/* ---------------- Product cards ---------------- */
.p-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.p-card { display: block; }
.p-card .p-img {
  position: relative; aspect-ratio: 1 / 1;
  border-radius: var(--r-md); overflow: hidden;
  background: var(--c-white); border: 1px solid var(--c-ash);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.p-card .p-img img { width: 100%; height: 100%; object-fit: contain; }
.p-card:hover .p-img { border-color: var(--c-charcoal); }
.p-card .p-body { margin-top: 12px; display: flex; flex-direction: column; gap: 2px; }
.p-card .p-title { font-size: var(--t-body); line-height: 1.35; color: var(--c-ink); }
.p-card:hover .p-title { text-decoration: underline; text-underline-offset: 3px; }
.p-card .p-meta { font-size: var(--t-caption); color: var(--c-smoke); }

.p-img.ph, .ph { background: var(--c-white); }
.ph .ph-txt, .p-img.ph .ph-txt { color: var(--c-smoke); font-size: 13px; text-align: center; padding: 12px; }

/* ---------------- Chips / subnav — 40px pills ---------------- */
.chips { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 48px; }
.chip {
  border: 1px solid var(--c-charcoal); border-radius: var(--r-pill);
  padding: 10px 23px;
  font-size: var(--t-caption); letter-spacing: 0.009em;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--c-white); color: var(--c-ink);
}
.chip .n { color: var(--c-smoke); font-size: 13px; }
.chip:hover { border-color: var(--c-ink); background: var(--c-cream); }
.chip.active { background: var(--c-ink); border-color: var(--c-ink); color: var(--c-white); }
.chip.active .n { color: rgb(255 255 255 / 0.7); }

.page-category .chips {
  position: sticky; top: var(--header-h); z-index: 40;
  background: var(--c-cream);
  padding: 16px 0; margin-bottom: 24px;
  border-bottom: 1px solid var(--c-ash);
}

/* ---------------- Category page ---------------- */
.cat-head { padding: 32px 0 8px; }
.crumbs { font-size: var(--t-caption); color: var(--c-smoke); display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .sep { opacity: 0.5; }
.cat-title {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(34px, 4vw, var(--t-display)); line-height: 1.23;
}
.cat-title::after {
  content: ""; display: block;
  width: 64px; height: 3px; background: var(--c-butter);
  margin-top: 14px;
}
.cat-desc { color: var(--c-smoke); margin-top: 14px; max-width: 60ch; }

.group-block { padding-top: 56px; }
.group-block > h3 {
  font-family: var(--font-serif); font-weight: 400;
  font-size: var(--t-heading-lg); line-height: 1.27;
  margin-bottom: 28px;
}
.sub-section { padding-top: 8px; }
.sub-head {
  font-family: var(--font-serif); font-weight: 400;
  font-size: var(--t-heading-sm); line-height: 1.45; color: var(--c-ink);
  margin: 24px 0; display: flex; align-items: baseline; gap: 12px;
}
.sub-head .n { font-family: var(--font-sans); color: var(--c-smoke); font-size: var(--t-caption); }

/* ---------------- Search results ---------------- */
.search-head { padding: 32px 0 8px; margin-bottom: 32px; }
.search-head h1 {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(30px, 3.4vw, 38px); line-height: 1.27;
}
.search-head .n { color: var(--c-smoke); margin-top: 10px; font-size: var(--t-caption); }

/* ---------------- Product detail ---------------- */
.pdp { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; padding: 32px 0 0; align-items: start; }
.pdp-media { position: sticky; top: calc(var(--header-h) + 24px); }
.pdp-media .frame {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--c-ash); border-radius: var(--r-md);
  overflow: hidden; background: var(--c-white);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.pdp-media .frame img { width: 100%; height: 100%; object-fit: contain; }
.pdp-info .label { font-size: var(--t-caption); color: var(--c-smoke); margin-bottom: 10px; }
.pdp-info h1 {
  font-family: var(--font-serif); font-weight: 400;
  font-size: var(--t-heading-lg); line-height: 1.27;
}
.pdp-info h1::after {
  content: ""; display: block;
  width: 48px; height: 3px; background: var(--c-butter);
  margin-top: 12px;
}
.pdp-info .lead { color: var(--c-smoke); margin-top: 14px; max-width: 52ch; }
.pdp-tags { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.tag {
  border: 1px solid var(--c-ash); border-radius: var(--r-pill);
  padding: 6px 16px; font-size: 13px; color: var(--c-charcoal);
  background: var(--c-white);
}

.spec-table { width: 100%; border-collapse: collapse; margin-top: 28px; font-size: var(--t-caption); }
.spec-table th {
  text-align: left; font-weight: 400; font-size: 13px;
  letter-spacing: 0.011em; text-transform: uppercase; color: var(--c-smoke);
  padding: 8px 12px; border-bottom: 1px solid var(--c-ink);
}
.spec-table td { padding: 10px 12px; border-bottom: 1px solid var(--c-ash); color: var(--c-charcoal); }
.spec-table td.c { color: var(--c-ink); }
.pdp-feat { margin-top: 16px; font-size: 15px; line-height: 1.6; color: var(--c-charcoal); max-width: 60ch; }

.pdp-cta { display: flex; align-items: center; gap: 20px; margin-top: 32px; flex-wrap: wrap; }
.pdp-cta .btn { font-size: var(--t-body); padding: 14px 28px; }

.acc { border-top: 1px solid var(--c-ink); margin-top: 36px; }
.acc-row { border-bottom: 1px solid var(--c-ash); }
.acc-row > button {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 18px 0; font-size: var(--t-body); color: var(--c-ink);
}
.acc-row .plus { font-size: 20px; color: var(--c-smoke); transition: transform .2s ease; }
.acc-row.open .plus { transform: rotate(45deg); }
.acc-body { display: none; padding: 0 0 20px; font-size: 15px; color: var(--c-charcoal); max-width: 60ch; }
.acc-row.open .acc-body { display: block; }
@media (prefers-reduced-motion: reduce) { .acc-row .plus { transition: none; } }

/* ---------------- Footer ---------------- */
.footer { margin-top: 88px; border-top: 1px solid var(--c-ash); background: var(--c-cream); }
.store-strip { border-bottom: 1px solid var(--c-ash); }
.store-strip .wrap {
  display: flex; justify-content: flex-end; align-items: center; gap: 8px;
  padding-top: 12px; padding-bottom: 12px; font-size: var(--t-caption); color: var(--c-charcoal);
}
.store-strip svg { width: 12px; height: 12px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding: 56px 0 72px; }
.foot-brand .brand { margin-bottom: 16px; }
.foot-col h4 {
  font-size: 13px; font-weight: 400; text-transform: uppercase;
  letter-spacing: 0.11em; color: var(--c-smoke); margin-bottom: 16px;
}
.foot-col a { display: block; font-size: 15px; padding: 4px 0; color: var(--c-charcoal); }
.foot-col a:hover { text-decoration: underline; text-underline-offset: 3px; color: var(--c-ink); }
.foot-copy { border-top: 1px solid var(--c-ash); padding: 20px 0; font-size: 13px; color: var(--c-smoke); }
.foot-copy .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-left: 0; padding-right: 0; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1280px) {
  .wrap { padding-left: 24px; padding-right: 24px; }
  .nav-top { padding: 14px 24px; }
  .nav-cats-row { padding: 0 24px; }
  .hero-copy { padding: 48px 24px; }
  .band-inner { padding: 56px 24px; }
}

@media (max-width: 1100px) {
  .nav-cats-row, .nav-actions .ghost-link { display: none; }
  .nav-top { min-height: 64px; padding: 10px 72px 10px 24px; }
  .menu-btn { display: inline-flex; }
  :root { --header-h: 64px; }
  .nav-actions { display: none; }
  .search { max-width: none; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .p-grid { grid-template-columns: repeat(3, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .nav-top { gap: 12px; padding: 10px 64px 10px 16px; }
  .brand-name { font-size: 16px; letter-spacing: 0.18em; }
  .brand-name small { font-size: 9px; }
  .search { height: 40px; padding: 0 16px; }
  .hero { min-height: 380px; }
  .hero-copy { padding: 32px 16px; }
  .hero-copy p { font-size: var(--t-body); }
  .section { padding-top: 48px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .p-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .p-card .p-img { padding: 12px; }
  .band { margin-top: 48px; }
  .band-inner { flex-direction: column; align-items: flex-start; gap: 24px; padding: 48px 16px; }
  .band h2 { font-size: var(--t-heading); }
  .chips { gap: 8px; }
  .chip { padding: 8px 16px; }
  .pdp { grid-template-columns: 1fr; gap: 32px; }
  .pdp-media { position: static; }
  .spec-table { display: block; overflow-x: auto; white-space: nowrap; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 24px; padding: 40px 0 48px; }
  .store-strip .wrap { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .foot-grid { grid-template-columns: 1fr; gap: 32px; }
}
