/* ==========================================================================
   Fijnmaarklein — huisstijl
   Warm papier, steen en kraft; zwarte inkt; serif koppen en ruime kapitalen.
   ========================================================================== */

:root {
  --bg: #f7f4ef;
  --surface: #fffdf9;
  --stone: #eee8df;
  --stone-2: #e3dbcf;
  --line: #e1d9cc;
  --line-strong: #cfc5b6;
  --ink: #1f1d1a;
  --text: #2d2a26;
  --muted: #655f56;
  --taupe: #7c766c;
  --kraft: #b8956a;
  --kraft-dark: #7f5f3a;
  --kraft-soft: #f1e7d8;
  --sage: #5f6e52;
  --sage-soft: #e7ebe0;
  --danger: #973a2b;
  --danger-soft: #f7e4df;
  --warn: #7a5a1e;
  --warn-soft: #f6eedb;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;

  --radius: 3px;
  --radius-lg: 10px;
  --shadow: 0 1px 2px rgba(31, 29, 26, 0.04), 0 10px 30px rgba(31, 29, 26, 0.06);
  --container: 1220px;
  --gutter: clamp(16px, 4vw, 40px);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--ink);
  text-decoration-color: var(--kraft);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--kraft-dark);
}

:focus-visible {
  outline: 2px solid var(--kraft-dark);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

h3 {
  font-size: 1.35rem;
}

p {
  margin: 0 0 1em;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container--narrow {
  max-width: 760px;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 8px 14px;
}

.skip-link:focus {
  left: 8px;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.6em;
}

.lead {
  font-size: 1.12rem;
  color: var(--muted);
  font-weight: 300;
  max-width: 38em;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.86rem;
}

.text-right {
  text-align: right;
}

.mt-0 {
  margin-top: 0;
}

.mt-8 {
  margin-top: 8px;
}

.mt-16 {
  margin-top: 16px;
}

.mt-24 {
  margin-top: 24px;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-16 {
  margin-bottom: 16px;
}

.mb-24 {
  margin-bottom: 24px;
}

.mb-80 {
  margin-bottom: 80px;
}

.lead.centered {
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 28px;
}

.nowrap {
  white-space: nowrap;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 46px;
  padding: 0.7em 1.5em;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}

.btn:hover {
  background: var(--ink);
  color: var(--bg);
}

.btn--primary {
  background: var(--ink);
  color: var(--bg);
}

.btn--primary:hover {
  background: #3a3631;
  border-color: #3a3631;
  color: var(--bg);
}

.btn--kraft {
  background: var(--kraft);
  border-color: var(--kraft);
  color: #fff;
}

.btn--kraft:hover {
  background: var(--kraft-dark);
  border-color: var(--kraft-dark);
  color: #fff;
}

.btn--ghost {
  border-color: transparent;
  padding-left: 0.6em;
  padding-right: 0.6em;
}

.btn--ghost:hover {
  background: var(--stone);
  color: var(--ink);
}

.btn--small {
  min-height: 38px;
  padding: 0.5em 1em;
  font-size: 0.7rem;
}

.btn--block {
  width: 100%;
}

.btn[disabled],
.btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.link-button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
  cursor: pointer;
}

.link-button:hover {
  color: var(--danger);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button-row--center {
  justify-content: center;
}

/* ---------- Header ---------- */

.announcement {
  background: var(--ink);
  color: #efe9df;
  text-align: center;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 8px var(--gutter);
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 76px;
}

.brand img {
  width: 146px;
  height: auto;
}

.header-search {
  flex: 1;
  max-width: 440px;
  margin-left: auto;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  padding: 0 6px 0 16px;
}

.header-search input {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.88rem;
  padding: 9px 0;
  width: 100%;
  color: var(--text);
  min-width: 0;
}

.header-search input:focus {
  outline: none;
}

.header-search:focus-within {
  border-color: var(--kraft);
}

.header-search button {
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.85rem;
  position: relative;
}

.cart-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--kraft);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  margin-left: -8px;
  color: var(--ink);
  cursor: pointer;
}

.nav-bar {
  border-top: 1px solid var(--line);
}

.nav-bar__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 46px;
}

.main-nav {
  display: flex;
  gap: 22px;
  flex: none;
}

.main-nav a,
.category-links a {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  color: var(--ink);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}

.main-nav a {
  font-weight: 500;
}

.main-nav a:hover,
.main-nav a[aria-current="page"],
.category-links a:hover,
.category-links a[aria-current="page"] {
  border-bottom-color: var(--kraft);
  color: var(--ink);
}

.main-nav__mobile-only {
  display: none;
}

.category-links {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-left: 28px;
  padding-right: 32px;
  /* Fades the last item when the list scrolls; only covers padding when it fits. */
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
  border-left: 1px solid var(--line);
  min-width: 0;
}

.category-links::-webkit-scrollbar {
  display: none;
}

.category-links a {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
}

.status-bar {
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 0.9rem;
  padding: 10px 0;
  border-bottom: 1px solid #ecdcb8;
}

/* ---------- Messages ---------- */

.messages {
  margin-top: 20px;
  display: grid;
  gap: 8px;
}

.message {
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.93rem;
  border-left: 3px solid var(--taupe);
}

.message--success {
  border-left-color: var(--sage);
  background: var(--sage-soft);
}

.message--warning {
  border-left-color: #c49a3d;
  background: var(--warn-soft);
}

.message--error {
  border-left-color: var(--danger);
  background: var(--danger-soft);
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(48px, 8vw, 96px) 0;
}

.section--tight {
  padding: clamp(32px, 5vw, 56px) 0;
}

.section--stone {
  background: var(--stone);
}

.section--surface {
  background: var(--surface);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.section-head h2 {
  margin: 0;
}

.page-head {
  padding: clamp(32px, 5vw, 56px) 0 24px;
}

.page-head--compact {
  padding-bottom: 20px;
}

.related {
  padding-bottom: 80px;
}

.page-head h1 {
  margin-bottom: 0.25em;
}

.breadcrumbs {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 14px;
}

.breadcrumbs a {
  color: var(--muted);
}

/* ---------- Home: hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--stone);
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "FMK";
  position: absolute;
  left: -0.04em;
  bottom: -0.2em;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(12rem, 30vw, 26rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  padding-top: clamp(40px, 7vw, 88px);
  padding-bottom: clamp(40px, 7vw, 88px);
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  margin-bottom: 0.35em;
}

.hero h1 em {
  font-style: italic;
  color: var(--kraft-dark);
}

.hero .lead {
  margin-bottom: 1.8em;
}

.hero-media {
  position: relative;
}

.hero-media img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero-note {
  position: absolute;
  left: -24px;
  bottom: 28px;
  background: var(--surface);
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  font-size: 0.85rem;
  max-width: 230px;
}

.hero-note strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  color: var(--muted);
}

.hero-points li::before {
  content: "✓";
  color: var(--kraft-dark);
  margin-right: 8px;
}

/* Welcome panel for approved customers */
.welcome {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.welcome-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding-top: 36px;
  padding-bottom: 36px;
}

.welcome h1 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin-bottom: 0.2em;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.quick-actions--welcome {
  margin-top: 0;
  padding-bottom: 36px;
}

.welcome-orders {
  margin-bottom: 40px;
}

.quick-action {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.quick-action:hover {
  border-color: var(--kraft);
  transform: translateY(-2px);
  color: var(--text);
}

.quick-action strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
}

.quick-action span {
  font-size: 0.88rem;
  color: var(--muted);
}

.icon-circle {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--kraft-soft);
  color: var(--kraft-dark);
  display: grid;
  place-items: center;
}

/* USP strip */
.usps-wrap {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.usps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

.usp {
  padding: 26px 22px;
  border-right: 1px solid var(--line);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.usp:first-child {
  padding-left: 0;
}

.usp:last-child {
  border-right: 0;
}

.usp h3 {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 2px 0 4px;
}

.usp p {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}

/* Category tiles */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
}

.category-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  aspect-ratio: 4 / 5;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--stone-2);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  isolation: isolate;
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 0.5s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(247, 244, 239, 0) 45%, rgba(247, 244, 239, 0.92) 100%);
}

.category-tile:hover img {
  transform: scale(1.04);
}

.category-tile__monogram {
  position: absolute;
  top: 12%;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 8rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.65);
  z-index: -1;
}

.category-tile h3 {
  margin: 0;
  font-size: 1.6rem;
}

.category-tile span {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  counter-reset: step;
}

.step {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: block;
  font-family: var(--serif);
  font-size: 3rem;
  line-height: 1;
  color: var(--kraft);
  margin-bottom: 12px;
}

.step p {
  color: var(--muted);
  margin: 0;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: grid;
  gap: 12px;
}

.checklist li {
  display: flex;
  gap: 12px;
}

.checklist li::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--kraft-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12 4 4 8-8' stroke='%237f5f3a' stroke-width='2.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.cta-band {
  background: var(--ink);
  color: #e9e3d8;
  text-align: center;
}

.cta-band h2 {
  color: #fff;
}

.cta-band .lead {
  color: #cfc7ba;
  margin: 0 auto 28px;
}

.cta-band .btn {
  border-color: #e9e3d8;
  color: #e9e3d8;
}

.cta-band .btn--kraft {
  border-color: var(--kraft);
  color: #fff;
}

.cta-band .btn:hover {
  background: #e9e3d8;
  color: var(--ink);
}

/* ---------- Product grid & cards ---------- */

.catalog-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  padding-bottom: 80px;
}

.sidebar-nav h2 {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 12px;
}

.sidebar-nav ul {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
}

.sidebar-nav li a {
  display: block;
  padding: 7px 0;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.sidebar-nav li a[aria-current="page"] {
  color: var(--kraft-dark);
  font-weight: 500;
}

.sidebar-nav li ul {
  margin: 0 0 0 14px;
}

.sidebar-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--stone);
  font-size: 0.9rem;
}

.sidebar-card h3 {
  font-size: 1.2rem;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}

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

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 28px 22px;
}

.product-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.product-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.product-card__media {
  position: relative;
  display: block;
  text-decoration: none;
  aspect-ratio: 1;
  background: var(--stone);
  overflow: hidden;
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 3.6rem;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.85);
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.5), transparent 60%),
    linear-gradient(160deg, var(--stone) 0%, var(--stone-2) 100%);
  text-shadow: 0 1px 0 rgba(31, 29, 26, 0.05);
}

.placeholder--small {
  font-size: 1.1rem;
}

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}

.product-card__media .badge {
  position: absolute;
  top: 12px;
  left: 12px;
}

.badge--kraft {
  background: var(--kraft-soft);
  border-color: #e3d1b6;
  color: var(--kraft-dark);
}

.badge--sage {
  background: var(--sage-soft);
  border-color: #d3dac8;
  color: var(--sage);
}

.badge--warn {
  background: var(--warn-soft);
  border-color: #ecdcb8;
  color: var(--warn);
}

.badge--danger {
  background: var(--danger-soft);
  border-color: #ecc8c0;
  color: var(--danger);
}

.product-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px 18px;
  flex: 1;
}

.product-card__body .eyebrow {
  margin: 0;
  font-size: 0.64rem;
}

.product-card h3 {
  font-size: 1.3rem;
  margin: 0;
}

.product-card h3 a {
  text-decoration: none;
}

.product-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
}

.price {
  font-weight: 500;
  color: var(--ink);
  font-size: 1.05rem;
  margin: 6px 0 0;
}

.price small {
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--muted);
}

.price-from {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--muted);
}

.price-locked {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
  margin: 6px 0 0;
}

.product-card__actions {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.product-card__actions .qty {
  flex: 1;
}

.product-card__actions .btn {
  min-height: 40px;
  padding: 0 14px;
}

/* Quantity stepper */
.qty {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  height: 40px;
  min-width: 112px;
}

.qty button {
  border: 0;
  background: none;
  width: 34px;
  font-size: 1.1rem;
  color: var(--muted);
  cursor: pointer;
  flex: none;
}

.qty button:hover {
  color: var(--ink);
  background: var(--stone);
}

.qty input {
  width: 100%;
  min-width: 40px;
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: center;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: transparent;
  -moz-appearance: textfield;
  appearance: textfield;
}

.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty input:focus {
  outline: none;
  background: var(--kraft-soft);
}

.qty--large {
  height: 50px;
  min-width: 150px;
}

.qty--large button {
  width: 44px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 40px;
}

.pagination a,
.pagination span {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.9rem;
  background: var(--surface);
}

.pagination .is-current {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  color: var(--muted);
}

.empty-state h2,
.empty-state h3 {
  color: var(--ink);
}

/* ---------- Product detail ---------- */

.product-detail {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  padding-bottom: 72px;
}

.gallery-main {
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--stone);
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-main .placeholder {
  font-size: 7rem;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.gallery-thumbs button {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  background: var(--stone);
}

.gallery-thumbs button[aria-pressed="true"] {
  border-color: var(--ink);
}

.gallery-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info h1 {
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  margin-bottom: 0.2em;
}

.product-codes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 18px;
}

.buy-box {
  margin: 24px 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.buy-box .price {
  font-size: 1.8rem;
  font-family: var(--serif);
  font-weight: 600;
  margin: 0;
}

.buy-box .price small {
  font-family: var(--sans);
  font-weight: 400;
}

.buy-box__row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

.buy-box__row .btn {
  flex: 1;
  min-height: 50px;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
  margin: 16px 0 0;
  font-size: 0.88rem;
}

.facts dt {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.facts dd {
  margin: 0;
  color: var(--ink);
}

.tier-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
  font-size: 0.92rem;
}

.tier-table caption {
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 8px;
}

.tier-table th,
.tier-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.tier-table th {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.8rem;
}

.tier-table td:last-child,
.tier-table th:last-child {
  text-align: right;
}

.tier-table tr.is-active td {
  background: var(--kraft-soft);
  font-weight: 500;
}

.prose {
  color: var(--text);
}

.prose ul {
  padding-left: 1.2em;
}

.spec-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}

.spec-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.93rem;
}

.locked-box {
  margin: 24px 0;
  padding: 24px;
  background: var(--stone);
  border-radius: var(--radius-lg);
}

.locked-box h2 {
  font-size: 1.5rem;
}

/* ---------- Tables (quick order, cart, orders) ---------- */

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

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}

.table th {
  text-align: left;
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  white-space: nowrap;
}

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table .num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.table-group th {
  background: var(--stone);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  padding: 10px 16px;
}

.cell-product {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 220px;
}

.thumb {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--stone);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cell-product a {
  text-decoration: none;
  font-weight: 500;
  color: var(--ink);
}

.cell-product small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.tier-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tier-chip {
  font-size: 0.74rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--kraft-soft);
  color: var(--kraft-dark);
  white-space: nowrap;
}

.row-active td {
  background: #fbf7f0;
}

.hint {
  display: block;
  font-size: 0.78rem;
  color: var(--kraft-dark);
  margin-top: 4px;
}

/* Quick order */
.quick-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 18px;
}

.quick-filters .input {
  max-width: 280px;
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs a {
  white-space: nowrap;
  padding: 12px 18px;
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tabs a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.order-bar {
  position: sticky;
  bottom: 0;
  z-index: 10;
  margin-top: 20px;
  background: var(--ink);
  color: #efe9df;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -10px 30px rgba(31, 29, 26, 0.12);
}

.order-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  flex-wrap: wrap;
}

.order-bar strong {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
}

.order-bar small {
  color: #bdb4a6;
}

.order-bar .btn {
  border-color: #efe9df;
  color: #efe9df;
}

.order-bar .btn:hover {
  background: #efe9df;
  color: var(--ink);
}

.order-bar .btn--kraft {
  border-color: var(--kraft);
  color: #fff;
}

/* ---------- Cart & checkout ---------- */

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 36px;
  align-items: start;
  padding-bottom: 80px;
}

.summary {
  position: sticky;
  top: 140px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.summary h2 {
  font-size: 1.6rem;
}

.summary--static {
  position: static;
}

.summary-items {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}

.summary-items li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.order-totals {
  padding-bottom: 0;
  margin-top: 24px;
}

.summary-lines {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  font-size: 0.93rem;
}

.summary-lines div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.summary-lines dt {
  color: var(--muted);
}

.summary-lines dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.summary-lines .total {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 6px;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
}

.summary-lines .total dt {
  color: var(--ink);
}

.progress {
  margin: 0 0 18px;
  font-size: 0.85rem;
  color: var(--muted);
}

.progress-bar {
  height: 6px;
  background: var(--stone);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: var(--kraft);
  border-radius: 999px;
}

.notice {
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 0.88rem;
  margin-bottom: 16px;
}

.notice--info {
  background: var(--stone);
  color: var(--text);
}

.cart-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* ---------- Forms ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 32px);
}

.card + .card {
  margin-top: 20px;
}

.card h2 {
  font-size: 1.6rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}

.form-grid .span-2 {
  grid-column: 1 / -1;
}

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
}

.field .required::after {
  content: " *";
  color: var(--kraft-dark);
}

.input,
select.input,
textarea.input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input--compact {
  min-height: 38px;
  padding: 6px 10px;
  width: auto;
}

.subcategory-row {
  margin-bottom: 20px;
}

textarea.input {
  min-height: 120px;
  resize: vertical;
}

.input--mono {
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

.steps-list {
  padding-left: 1.2em;
}

.input:focus {
  outline: none;
  border-color: var(--kraft);
  box-shadow: 0 0 0 3px rgba(184, 149, 106, 0.2);
}

.field--error .input {
  border-color: var(--danger);
}

.field-help {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 5px;
}

.field-error {
  display: block;
  font-size: 0.82rem;
  color: var(--danger);
  margin-top: 5px;
}

.field--checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.field--checkbox label {
  margin: 0;
  font-weight: 400;
  font-size: 0.92rem;
}

.checkbox {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--ink);
  flex: none;
}

.form-errors {
  padding: 12px 16px;
  background: var(--danger-soft);
  color: var(--danger);
  border-radius: var(--radius);
  margin-bottom: 18px;
  font-size: 0.92rem;
}

.form-errors ul {
  margin: 0;
  padding-left: 1.2em;
}

.fieldset-title {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 28px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.fieldset-title:first-child {
  margin-top: 0;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(24px, 5vw, 64px);
  padding: clamp(32px, 6vw, 72px) 0 80px;
  align-items: start;
}

.auth-aside {
  padding: clamp(24px, 4vw, 40px);
  background: var(--stone);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.auth-aside::after {
  content: "FMK";
  position: absolute;
  right: -10px;
  bottom: -40px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 9rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1;
  pointer-events: none;
}

.auth-aside > * {
  position: relative;
  z-index: 1;
}

/* ---------- Account ---------- */

.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 24px;
  padding-bottom: 80px;
  align-items: start;
}

.status-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}

.status-card--approved {
  background: var(--sage-soft);
}

.status-card--pending {
  background: var(--warn-soft);
}

.status-card--rejected {
  background: var(--danger-soft);
}

.status-card h2 {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.status-card p {
  margin: 0;
}

.address {
  font-style: normal;
  line-height: 1.6;
}

.definition-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 18px;
  font-size: 0.92rem;
  margin: 0;
}

.definition-list dt {
  color: var(--muted);
}

.definition-list dd {
  margin: 0;
}

.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.link-list li {
  border-bottom: 1px solid var(--line);
}

.link-list a {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  text-decoration: none;
}

.link-list a::after {
  content: "→";
  color: var(--kraft-dark);
}

.status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 500;
  background: var(--stone);
  white-space: nowrap;
}

.status-pill--new {
  background: var(--kraft-soft);
  color: var(--kraft-dark);
}

.status-pill--processing {
  background: var(--warn-soft);
  color: var(--warn);
}

.status-pill--shipped,
.status-pill--completed {
  background: var(--sage-soft);
  color: var(--sage);
}

.status-pill--cancelled {
  background: var(--danger-soft);
  color: var(--danger);
}

.order-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.order-meta > div {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  font-size: 0.92rem;
}

.order-meta h3 {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 8px;
}

.thanks {
  text-align: center;
  padding: clamp(48px, 8vw, 96px) 0;
}

.thanks .icon-circle {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--stone);
  border-top: 1px solid var(--line);
  margin-top: 0;
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-top: 56px;
  padding-bottom: 40px;
}

.footer-brand img {
  width: 220px;
  margin-bottom: 16px;
}

.footer-brand p {
  color: var(--muted);
  max-width: 30em;
}

.footer-title {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.footer-links a {
  text-decoration: none;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-address {
  color: var(--muted);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-top: 18px;
  padding-bottom: 24px;
  border-top: 1px solid var(--line-strong);
  font-size: 0.78rem;
  color: var(--muted);
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .header-link__label {
    display: none;
  }

  .main-nav {
    gap: 18px;
  }

  .product-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .usps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .usp:nth-child(2) {
    border-right: 0;
  }

  .usp:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .order-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .header-inner {
    gap: 12px;
    min-height: 60px;
    flex-wrap: wrap;
  }

  .brand img {
    width: 120px;
  }

  .header-search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
    margin: 0 0 12px;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }

  .main-nav__mobile-only {
    display: block;
  }

  .category-links {
    padding-left: 0;
    border-left: 0;
  }

  .header-actions {
    margin-left: auto;
  }

  .header-cta {
    display: none;
  }

  .hero-inner,
  .split,
  .product-detail,
  .two-col,
  .auth-layout,
  .account-grid,
  .catalog-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-note {
    left: 12px;
  }

  .catalog-layout .sidebar {
    display: none;
  }

  .steps,
  .quick-actions {
    grid-template-columns: 1fr;
  }

  .welcome-inner {
    grid-template-columns: 1fr;
  }

  .summary {
    position: static;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .usps {
    grid-template-columns: 1fr;
  }

  .usp {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-left: 0;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .product-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-card__body {
    padding: 12px;
  }

  .product-card h3 {
    font-size: 1.1rem;
  }

  .product-card__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .product-card__actions .btn {
    width: 100%;
  }

  .qty {
    min-width: 0;
  }

  .order-meta {
    grid-template-columns: 1fr;
  }

  .hide-mobile {
    display: none;
  }

  .table th,
  .table td {
    padding: 12px 10px;
  }

  .order-bar__inner {
    padding: 12px 16px;
  }

  .order-bar .btn {
    flex: 1;
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .category-tile {
    padding: 14px;
  }

  .category-tile h3 {
    font-size: 1.25rem;
  }

  /* Wide tables become stacked rows: product on top, price / quantity / total below. */
  .table--stack thead {
    display: none;
  }

  .table--stack,
  .table--stack tbody {
    display: block;
  }

  .table--stack tr {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 10px 12px;
    padding: 14px;
    border-bottom: 1px solid var(--line);
  }

  .table--stack tr.table-group {
    display: block;
    padding: 0;
  }

  .table--stack tr.table-group th {
    display: block;
  }

  .table--stack td {
    padding: 0;
    border: 0;
  }

  .table--stack td:first-child {
    grid-column: 1 / -1;
  }

  .table--stack .cell-product {
    min-width: 0;
  }
}

/* ---------- Print (order details) ---------- */

@media print {
  .site-header,
  .site-footer,
  .announcement,
  .status-bar,
  .messages,
  .no-print {
    display: none !important;
  }

  body {
    background: #fff;
    font-size: 12px;
  }

  .table-wrap,
  .order-meta > div,
  .card {
    border-color: #ccc;
  }

  .print-only {
    display: block !important;
  }
}

.print-only {
  display: none;
}
