:root {
  --ink: #243028;
  --muted: #5c6a60;
  --paper: #fbf9f2;
  --cream: #f3f0e6;
  --line: #dde3d6;
  --green: #6f9b45;
  --green-dark: #4f7030;
  --green-soft: #eef5e6;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(36, 48, 40, 0.12);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: Manrope, system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Reserved scrollbar gutter so page width doesn't jump when body toggles
     position: fixed (modal open/close). */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-tap-highlight-color: transparent;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.serif {
  font-family: var(--font-display);
  font-weight: 600;
}

.eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
}

.muted {
  color: var(--muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 52px;
  padding: 0.85rem 1.55rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.btn-primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.24);
}

.btn-outline {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}

.btn-outline:hover {
  background: var(--green-soft);
}

.btn[disabled],
.btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* ========== LANDING ========== */
.landing {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--white);
}

.landing-bg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  z-index: 0;
}

.landing-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: fadeIn 1.2s ease both;
}

.landing-bg::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 22, 14, 0.35) 0%, rgba(12, 22, 14, 0.22) 40%, rgba(12, 22, 14, 0.58) 100%);
}

.landing-inner {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100% - 40px));
  text-align: center;
  padding: 36px 28px 40px;
  border-radius: 28px;
  background: rgba(16, 24, 18, 0.52);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.landing-logo {
  width: min(280px, 70vw);
  margin: 0 auto 28px;
  background: rgba(251, 249, 242, 0.92);
  padding: 14px 22px;
  border-radius: 14px;
  animation: rise 0.7s ease both;
}

.landing-kicker {
  color: #dce9cf;
  animation: rise 0.7s ease 0.08s both;
}

.landing h1 {
  margin: 12px 0 14px;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  line-height: 0.95;
  font-weight: 600;
  letter-spacing: -0.02em;
  animation: rise 0.7s ease 0.16s both;
}

.landing-lead {
  margin: 0 auto 34px;
  max-width: 540px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
  line-height: 1.7;
  animation: rise 0.7s ease 0.24s both;
}

.gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  animation: rise 0.7s ease 0.32s both;
}

.gate-actions .btn {
  min-width: 200px;
}

.landing-note {
  margin-top: 22px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.72);
  animation: rise 0.7s ease 0.4s both;
}

.landing-footer {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 18px;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(24, 34, 28, 0.94);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s ease;
  z-index: 100;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ========== BUYER SHELL ========== */
.buyer-body {
  min-height: 100vh;
  min-height: 100dvh;
}

.site-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 249, 242, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(221, 227, 214, 0.9);
}

.nav {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-logo {
  width: 170px;
}

.nav-logo img {
  width: 100%;
}

.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links a {
  font-size: 0.9rem;
  color: #314038;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--green);
}

.nav-cta {
  margin-left: 4px;
}

.menu-btn {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
  /* WCAG tap-target: at least 44×44px */
  min-width: 44px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 10px;
}

.menu-btn:hover,
.menu-btn:focus-visible {
  background: rgba(0, 0, 0, 0.05);
}

.buyer-switch {
  font-size: 0.75rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
}

.buyer-switch:hover {
  color: var(--green);
  border-color: var(--green);
}

/* Sections */
.section {
  padding: 72px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
}

.page-hero {
  padding: 48px 0 20px;
}

.page-hero h1 {
  margin: 10px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 0.98;
}

.page-hero p {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
}

/* Buyer home intro */
.buyer-hero {
  padding: 56px 0 28px;
}

.buyer-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: center;
}

.buyer-hero h1 {
  margin: 10px 0 14px;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  line-height: 0.96;
}

.buyer-hero .lead {
  margin: 0 0 24px;
  max-width: 520px;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.buyer-hero-panel {
  border-radius: 24px;
  overflow: hidden;
  min-height: 360px;
  position: relative;
  background: #1c261e;
}

.buyer-hero-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 360px;
}

.buyer-hero-panel .caption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(251, 249, 242, 0.94);
}

.buyer-hero-panel .caption strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

/* ── Hero banner ─────────────────────────────────────────────── */
.home-hero-banner {
  position: relative;
  min-height: min(680px, 94vh);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

.home-hero-bg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  z-index: 0;
}

.home-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  display: block;
  transform: scale(1.04);
  transition: transform 8s ease;
}

.home-hero-banner:hover .home-hero-bg img {
  transform: scale(1.0);
}

.home-hero-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  background:
    linear-gradient(105deg,
      rgba(8, 18, 10, 0.82) 0%,
      rgba(8, 18, 10, 0.55) 48%,
      rgba(8, 18, 10, 0.22) 100%),
    linear-gradient(to top,
      rgba(8, 18, 10, 0.88) 0%,
      transparent 45%);
}

.home-hero-content {
  position: relative;
  z-index: 2;
  padding: 80px 0 0;
  display: flex;
  align-items: flex-end;
  flex: 1;
}

.home-hero-text {
  max-width: 660px;
  padding-bottom: 60px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9ec76d;
  margin: 0 0 16px;
}

.hero-eyebrow-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9ec76d;
  flex-shrink: 0;
}

.home-hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 7vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0 0 22px;
}

.home-hero-title span {
  color: #b8d98a;
}

.home-hero-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.72);
  max-width: 480px;
  margin: 0 0 32px;
  line-height: 1.7;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn-ghost-white {
  color: rgba(255,255,255,0.88);
  background: transparent;
  border: 0;
  /* Tap target ≥44px tall */
  padding: 12px 6px;
  min-height: 44px;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s, gap 0.2s;
}

.btn-ghost-white:hover {
  color: #fff;
  gap: 8px;
}

/* Stats bar — white strip at the bottom of the hero */
.hero-stats-bar {
  position: relative;
  z-index: 2;
  background: rgba(255,255,255,0.96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.3);
}

.hero-stats-row {
  display: flex;
  align-items: stretch;
  padding: 18px 0;
  gap: 0;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
  padding: 4px 12px;
}

.hero-stat b {
  font-size: 1.65rem;
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1;
}

.hero-stat span {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.hero-stat-sep {
  width: 1px;
  background: var(--line);
  align-self: stretch;
  margin: 4px 0;
}

/* Legacy btn-white kept for safety */
.btn-white {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.btn-white:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.8);
  color: #fff;
}

.home-top {
  padding: 48px 0 28px;
  background:
    radial-gradient(circle at 12% 18%, rgba(111, 155, 69, 0.12), transparent 42%),
    linear-gradient(180deg, #f7f5ec 0%, var(--paper) 100%);
}

.home-top-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 34px;
  align-items: center;
}

.home-top-copy h1 {
  margin: 10px 0 14px;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.4vw, 4.2rem);
  line-height: 1;
  color: var(--ink);
}

.home-top-copy .lead {
  margin: 0 0 22px;
  max-width: 520px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.home-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.home-pills span {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 0.75rem;
  font-weight: 700;
  color: #405447;
}

.home-top-visual {
  display: grid;
  grid-template-columns: 1.35fr 0.75fr;
  gap: 12px;
  min-height: 430px;
}

.visual-main,
.visual-stack img {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #1c261e;
  box-shadow: var(--shadow);
}

.visual-main {
  position: relative;
  min-height: 430px;
}

.visual-main img,
.visual-stack img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s ease;
}

.visual-main:hover img,
.visual-stack img:hover {
  transform: scale(1.04);
}

.visual-caption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(251, 249, 242, 0.95);
}

.visual-caption strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem;
}

.visual-stack {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
}

.visual-stack img {
  min-height: 0;
  height: 100%;
}

/* Quality & Compliances */
.cert-section {
  padding-top: 36px;
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.cert-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cert-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.cert-logo {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f6f1;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 4px;
}

.cert-logo img {
  max-height: 54px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}

.cert-logo-text span {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--green-dark);
  letter-spacing: 0.08em;
}

.cert-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.15;
}

.cert-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.cert-note {
  margin: 18px 0 0;
  font-size: 0.86rem;
}

.home-hero {
  position: relative;
  min-height: min(78vh, 720px);
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
  padding: 72px 0 56px;
}

.home-hero-bg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  z-index: 0;
}

.home-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: fadeIn 1.2s ease both;
}

.home-hero-bg::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(12, 20, 14, 0.88) 0%, rgba(12, 20, 14, 0.72) 42%, rgba(12, 20, 14, 0.45) 100%);
}

.home-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: center;
}

.home-hero-copy h1 {
  margin: 10px 0 14px;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 4.6rem);
  line-height: 0.96;
  color: #fff;
}

.home-hero-copy .lead {
  margin: 0 0 22px;
  max-width: 520px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.05rem;
  line-height: 1.7;
}

.home-hero-copy .eyebrow {
  color: #d7e6c8;
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
  max-width: 460px;
}

.home-stats div {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.home-stats b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1;
  margin-bottom: 4px;
}

.home-stats span {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.home-hero-mosaic {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr;
  gap: 12px;
  min-height: 420px;
}

.mosaic-main,
.mosaic-tile {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.mosaic-main img,
.mosaic-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.mosaic-main:hover img,
.mosaic-tile:hover img {
  transform: scale(1.05);
}

.mosaic-main {
  min-height: 420px;
}

.mosaic-side {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
}

.mosaic-label {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(251, 249, 242, 0.94);
  color: var(--ink);
}

.mosaic-label .eyebrow {
  color: var(--green);
}

.mosaic-label strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.trust-strip {
  background: #243028;
  color: #fff;
  padding: 22px 0;
}

.trust-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px;
}

.trust-item span {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: #d7e6c8;
  min-width: 28px;
}

.trust-item p {
  margin: 0;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.86);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.step-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.step-card b {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 0.85rem;
}

.step-card h3 {
  margin: 14px 0 8px;
  font-family: var(--font-display);
  font-size: 1.55rem;
}

.step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.section-soft {
  background: var(--cream);
}

.cat-card img {
  transition: transform 0.45s ease;
}

.cat-card:hover img {
  transform: scale(1.06);
}

/* Category grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.cat-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--white);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.cat-card img {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  background: var(--cream);
}

.cat-card .body {
  padding: 14px;
}

.cat-card h3 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.cat-card span {
  font-size: 0.78rem;
  color: var(--green);
  font-weight: 700;
}

/* Product grid */
.search-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.search-bar input {
  flex: 1;
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: var(--white);
  outline: none;
}

.search-bar input:focus {
  border-color: var(--green);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.chip {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  /* Tap target ≥44px tall */
  padding: 12px 18px;
  min-height: 44px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.chip.active,
.chip:hover {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.product-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--white);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.product-card img {
  aspect-ratio: 16 / 10;
  width: 100%;
  object-fit: cover;
  background: var(--cream);
}

.product-card .body {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.product-card .meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.product-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1.1;
}

.product-card .tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  min-height: 2.6em;
}

.product-card .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
}

.product-card .actions .btn {
  min-height: 44px;
  padding: 0.7rem 1rem;
  font-size: 0.82rem;
  line-height: 1.1;
}

/* Product detail */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.gallery {
  border-radius: 22px;
  overflow: hidden;
  background: var(--cream);
  border: 1px solid var(--line);
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.detail-copy h1 {
  margin: 8px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 1;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.spec-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}

.spec-table-wrap .spec-table {
  margin-top: 0;
}

.spec-table th,
.spec-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 0.92rem;
}

.spec-table tbody tr:last-child th,
.spec-table tbody tr:last-child td {
  border-bottom: none;
}

.spec-table th {
  width: 34%;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.spec-table thead th {
  width: auto;
  color: var(--ink);
  background: var(--cream);
  font-weight: 700;
  white-space: nowrap;
}

.spec-table-wide {
  min-width: 640px;
}

.spec-table-wide th:first-child,
.spec-table-wide td:first-child {
  position: -webkit-sticky;
  position: sticky;
  left: 0;
  background: var(--white);
  z-index: 1;
}

.spec-table-wide thead th:first-child {
  background: var(--cream);
  z-index: 2;
}

.panel {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
}

.panel.dark {
  background: #243028;
  color: #fff;
  border-color: #243028;
}

.panel.dark .eyebrow {
  color: #d7e6c8;
}

.panel.dark p {
  color: rgba(255, 255, 255, 0.78);
}

.quote-band {
  background: #243028;
  color: #fff;
  border-radius: 24px;
  padding: 36px;
}

.quote-band .eyebrow {
  color: #d7e6c8;
}

.quote-band h2 {
  margin: 8px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.quote-band p {
  color: rgba(255, 255, 255, 0.78);
  max-width: 620px;
}

/* Forms */
.form-card {
  max-width: 820px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field textarea,
.field select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--paper);
  outline: none;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--green);
  background: #fff;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
}

.contact-card h3 {
  margin: 8px 0 10px;
  font-family: var(--font-display);
  font-size: 1.8rem;
  overflow-wrap: break-word;
  word-break: break-word;
}

.breadcrumb {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 14px;
}

.breadcrumb a {
  color: var(--green);
  font-weight: 700;
}

/* ── Quote basket bar ────────────────────────────────────────── */
.basket-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  /* Must sit BELOW #modalHost (z-index:80) so modals cover it. JS also toggles
     .visible off whenever a modal / non-home route is active. */
  z-index: 70;
  background: #1c2e20;
  color: #fff;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  border-top: 2px solid #4a7c3a;
  box-shadow: 0 -6px 24px rgba(0,0,0,0.25);
}

/* Push page content up while the basket bar is visible so the footer's
   copyright row and last section aren't hidden behind it. */
body.has-basket-bar {
  padding-bottom: 84px;
}
@media (max-width: 640px) {
  body.has-basket-bar {
    padding-bottom: 110px;
  }
}

.basket-bar.visible {
  transform: translateY(0);
}

.basket-bar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.basket-bar-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.basket-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #9ec76d;
  color: #1c2e20;
  font-weight: 800;
  font-size: 0.82rem;
  flex-shrink: 0;
}

.basket-label {
  font-weight: 600;
  font-size: 0.92rem;
}

.basket-names {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.basket-names span {
  background: rgba(255,255,255,0.1);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.8);
}

.basket-bar-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.basket-clear-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.7);
  font-size: 0.82rem;
  padding: 0.45rem 0.9rem;
}

.basket-clear-btn:hover {
  border-color: rgba(255,255,255,0.6);
  color: #fff;
}

/* ── Site toast notification ─────────────────────────────────── */
.site-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: #1c2e20;
  color: #fff;
  padding: 10px 20px;
  border-radius: 22px;
  font-size: 0.88rem;
  font-weight: 600;
  /* Wrap long messages instead of overflowing the screen edge. */
  white-space: normal;
  max-width: calc(100vw - 32px);
  width: max-content;
  text-align: center;
  line-height: 1.35;
  box-shadow: 0 6px 24px rgba(0,0,0,0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
}

.site-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Quote form product rows ─────────────────────────────────── */
.quote-products-section {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 18px 14px;
  margin-bottom: 4px;
}

.quote-products-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.quote-products-header b {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}

.quote-products-hint {
  font-size: 0.78rem;
  color: var(--muted);
}

.qrow {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.qrow:last-of-type {
  border-bottom: none;
}

.qrow-name {
  min-width: 0;
}

.qrow-pill {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.qrow-qty,
.qrow-spec {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-family: var(--font-body);
  background: #fff;
  width: 110px;
}

.qrow-spec { width: 130px; }

.qrow-remove {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  padding: 0;
}

.qrow-remove:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.qrow-empty {
  padding: 10px 0 6px;
  font-size: 0.88rem;
}

.qrow-add-wrap {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.qrow-add-select {
  width: 100%;
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 0.88rem;
  font-family: var(--font-body);
  color: var(--green-dark);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s;
}

.qrow-add-select:disabled {
  opacity: 0.55;
  cursor: default;
}

.qrow-add-select:focus {
  outline: none;
  border-color: var(--green-dark);
}

@media (max-width: 640px) {
  .qrow-add-wrap {
    grid-template-columns: 1fr;
  }
}

/* PDF action buttons side by side */
.pdf-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.add-to-basket-btn.is-added {
  background: #2f4638;
  border-color: #2f4638;
  color: #d7e6c8;
  cursor: default;
}

.add-to-basket-btn.is-added:hover {
  background: #2f4638;
  border-color: #2f4638;
  transform: none;
}

/* Footer */
.site-footer {
  margin-top: 40px;
  padding: 42px 0 24px;
  background: #243028;
  color: rgba(255, 255, 255, 0.82);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 24px;
}

.site-footer img {
  width: 230px;
  max-width: 100%;
  height: auto;
  background: #fff;
  padding: 14px 18px;
  border-radius: 14px;
  margin-bottom: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

/* Compact category chips — all 10 fit without stretching footer height */
.footer-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.footer-categories a {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 5px 10px;
  min-height: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.footer-categories a:hover {
  color: #fff;
  background: rgba(158, 199, 109, 0.18);
  border-color: rgba(158, 199, 109, 0.45);
}

.site-footer b {
  color: #fff;
  display: block;
  margin-bottom: 10px;
}

.site-footer a {
  display: block;
  /* Comfortable tap target — ~44px pitch on mobile. */
  margin: 2px 0;
  padding: 10px 0;
  min-height: 44px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.78);
}

.site-footer a:hover {
  color: #fff;
}

.footer-bottom {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
}

.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}

.lead-text {
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--muted);
  max-width: 720px;
  margin: 0;
}

.btn-ghost-dark {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}

.btn-ghost-dark:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.reveal.delay-1 {
  transition-delay: 0.08s;
}
.reveal.delay-2 {
  transition-delay: 0.14s;
}
.reveal.delay-3 {
  transition-delay: 0.2s;
}
.reveal.delay-4 {
  transition-delay: 0.26s;
}

/* Modal system — fixed-body scroll lock preserves scrollY without collapsing
   layout (which is what caused the "modal open scrolls the page" jump).
   JS sets body.style.top = `-${savedScrollY}px` before adding this class. */
body.modal-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
}

/* ── Supplier band ──────────────────────────────────────────── */
.supplier-band {
  background: #1c2e20;
  color: #fff;
  padding: 64px 0 56px;
}

.supplier-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: start;
}

.supplier-copy h2 {
  margin: 8px 0 14px;
  font-size: clamp(2rem, 4vw, 3rem);
  color: #fff;
}

.supplier-copy p {
  color: rgba(255,255,255,0.72);
  max-width: 400px;
  line-height: 1.7;
}

.supplier-form .field label {
  color: rgba(255,255,255,0.75);
}

.supplier-form input,
.supplier-form textarea {
  width: 100%;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.92rem;
  color: #fff;
  font-family: var(--font-body);
  transition: border-color 0.2s;
}

.supplier-form input::placeholder,
.supplier-form textarea::placeholder {
  color: rgba(255,255,255,0.35);
}

.supplier-form input:focus,
.supplier-form textarea:focus {
  outline: none;
  border-color: rgba(111,155,69,0.8);
  background: rgba(255,255,255,0.12);
}

.supplier-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.supplier-fields .field.full {
  grid-column: 1 / -1;
}

.supplier-success {
  text-align: center;
  padding: 32px 16px;
}

.supplier-success p:first-child {
  font-size: 2.4rem;
}

.supplier-success h3 {
  margin: 10px 0 8px;
  font-size: 1.7rem;
  color: #fff;
}

#modalHost {
  position: relative;
  z-index: 80;
}

.modal-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(18, 26, 20, 0);
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
  opacity: 0;
  transition: background 0.28s ease, opacity 0.28s ease, backdrop-filter 0.28s ease, -webkit-backdrop-filter 0.28s ease;
}

.modal-backdrop.open {
  background: rgba(18, 26, 20, 0.52);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 1;
}

.modal-backdrop.closing {
  opacity: 0;
  background: rgba(18, 26, 20, 0);
}

.modal-panel {
  position: relative;
  width: min(920px, 100%);
  max-height: min(92vh, 920px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 30px 80px rgba(10, 16, 12, 0.35);
  transform: translateY(22px) scale(0.98);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.modal-backdrop.open .modal-panel {
  transform: none;
  opacity: 1;
}

.modal-backdrop.closing .modal-panel {
  transform: translateY(16px) scale(0.985);
  opacity: 0;
}

.modal-panel.size-lg {
  width: min(880px, 100%);
}

.modal-panel.size-xl {
  width: min(1040px, 100%);
}

.modal-panel.size-full {
  width: min(1180px, 100%);
  max-height: min(94vh, 960px);
}

.modal-panel.modal-flush {
  padding: 0;
}

.modal-panel.modal-flush > .product-modal {
  flex: 1;
  min-height: 0;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(36, 48, 40, 0.08);
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.modal-panel.modal-flush .modal-close {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.modal-close:hover {
  background: rgba(36, 48, 40, 0.14);
  transform: rotate(90deg);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  padding: 28px 28px 12px;
  padding-right: 64px;
  flex-shrink: 0;
}

.modal-title {
  margin: 6px 0 8px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  font-weight: 600;
}

h1.modal-title,
h1.product-detail-title {
  font-weight: 600;
}

.modal-sub {
  margin: 0;
  max-width: 560px;
}

.modal-body {
  padding: 8px 28px 28px;
  overflow: auto;
  overscroll-behavior: contain;
  min-height: 0;
  flex: 1;
}

.form-in-modal {
  max-width: none;
  margin: 0;
  border: 0;
  padding: 0;
  background: transparent;
}

/* Product detail modal: fixed image column + scroll details */
.product-modal {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) 1.15fr;
  height: min(88vh, 860px);
}

.product-modal-media {
  background: #1c261e;
  color: #fff;
  min-height: 0;
  overflow: hidden;
}

.product-media-sticky {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-media-sticky > img {
  flex: 1;
  width: 100%;
  min-height: 0;
  object-fit: cover;
}

.product-media-meta {
  padding: 20px 22px 24px;
  background: linear-gradient(180deg, rgba(28, 38, 30, 0) 0%, rgba(28, 38, 30, 0.92) 28%, #1c261e 100%);
  margin-top: -70px;
  position: relative;
}

.product-media-meta .eyebrow {
  color: #d7e6c8;
}

.product-media-meta h3 {
  margin: 6px 0 0;
  font-size: 1.85rem;
  line-height: 1.1;
}

.product-modal-scroll {
  overflow: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--paper);
  min-height: 0;
}

.product-scroll-inner {
  padding: 32px 32px 40px;
  padding-right: 56px;
}

.product-detail-title {
  margin: 8px 0 10px;
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  line-height: 1.05;
}

.sheet-block {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.sheet-block h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 1.55rem;
}

.sheet-block.quote-mini {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  margin-top: 28px;
}

.tech-pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-body);
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--muted);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  max-height: 320px;
  overflow: auto;
}

@media (max-width: 980px) {
  .buyer-hero-grid,
  .detail-grid,
  .contact-grid,
  .footer-grid,
  .home-hero-inner,
  .home-top-grid,
  .trust-row,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .home-top-visual {
    min-height: 320px;
  }

  .visual-main {
    min-height: 280px;
  }

  .cert-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-links.open {
    display: flex;
    position: fixed;
    inset: 76px 0 auto 0;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 20px 22px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    z-index: 39;
  }

  .menu-btn {
    display: block;
  }

  .section-head {
    display: block;
  }

  .product-modal {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    height: min(92vh, 960px);
  }

  .product-modal-media {
    flex-shrink: 0;
  }

  .product-media-sticky {
    height: auto;
  }

  .product-media-sticky > img {
    flex: none;
    height: min(22vh, 180px);
  }

  .product-media-meta {
    margin-top: 0;
    background: #1c261e;
    padding: 14px 16px 16px;
  }

  .product-media-meta h3 {
    font-size: 1.45rem;
  }

  .product-media-meta .hero-actions .btn {
    min-height: 44px;
    padding: 0.7rem 1rem;
    font-size: 0.82rem;
    line-height: 1.1;
  }

  .modal-backdrop {
    padding: 10px;
    align-items: flex-end;
  }

  .modal-panel.size-full,
  .modal-panel.size-lg,
  .modal-panel.size-xl {
    width: 100%;
    max-height: min(92vh, 960px);
    border-radius: 22px 22px 14px 14px;
  }

  /* On mobile the modal is a bottom-sheet; the close button is position:absolute
     on the panel so it naturally overlays the top of the product image.
     Ensure it stays in front and never scrolls by keeping panel overflow:hidden. */
  .modal-panel.modal-flush .modal-close {
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.90);
    box-shadow: 0 2px 12px rgba(0,0,0,0.22);
    z-index: 20;
  }

  .home-hero-banner {
    min-height: min(500px, 90vh);
  }

  .home-hero-text {
    padding-bottom: 40px;
    max-width: 100%;
  }

  .hero-stats-row {
    flex-wrap: wrap;
    gap: 4px;
    padding: 12px 0;
  }

  .hero-stat {
    flex: 1 1 calc(50% - 4px);
    min-width: 80px;
  }

  .hero-stat-sep {
    display: none;
  }

  .supplier-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 28px, 1120px);
  }

  .cat-grid,
  .product-grid,
  .form-grid,
  .home-hero-mosaic,
  .home-top-visual,
  .home-stats,
  .cert-grid {
    grid-template-columns: 1fr;
  }

  .visual-stack {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
    min-height: 140px;
  }

  .gate-actions .btn {
    width: 100%;
  }

  .landing h1 {
    font-size: 2.6rem;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .modal-head,
  .modal-body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .modal-head {
    padding-right: 54px;
    flex-direction: column;
    align-items: start;
  }

  .product-scroll-inner {
    padding: 20px 18px 28px;
  }

  .qrow {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
  }

  .qrow-name { grid-column: 1; }
  .qrow-remove { grid-column: 2; grid-row: 1; }
  .qrow-qty { grid-column: 1; width: 100%; }
  .qrow-spec { grid-column: 1 / -1; width: 100%; }

  .basket-bar-inner {
    padding: 12px 16px;
  }

  .basket-names {
    display: none;
  }

  .supplier-fields {
    grid-template-columns: 1fr;
  }

  .home-hero-title {
    font-size: clamp(2.4rem, 10vw, 3.4rem);
    line-height: 1;
  }

  .home-hero-content {
    padding-top: 52px;
  }

  .home-hero-text {
    padding-bottom: 32px;
  }

  .hero-stats-row {
    gap: 0;
  }

  /* Bug #16: keep dividers hidden when stats wrap 2-per-row on small screens */
  .hero-stat-sep {
    display: none;
  }

  .home-hero-inner {
    padding: 40px 0 52px;
  }

  /* Bug #10: emails don't overflow their card at ≤640px */
  .contact-card h3 {
    font-size: 1.35rem;
  }

  .buyer-hero-panel,
  .buyer-hero-panel img {
    min-height: 260px;
  }

  .section {
    padding: 52px 0;
  }

  .trust-item {
    padding: 4px 0;
  }

  /* Prevent iOS Safari auto-zoom on focus (inputs under 16px trigger it) */
  .field input,
  .field textarea,
  .field select,
  .qrow-qty,
  .qrow-spec,
  .qrow-add-select,
  .supplier-form input,
  .supplier-form textarea,
  .search-bar input {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .modal-backdrop,
  .modal-panel,
  .btn,
  .product-card,
  .cat-card {
    transition: none !important;
    animation: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ========== CROSS-BROWSER HARDENING ========== */

/* Use dynamic viewport units where supported so mobile browser chrome
   (Safari/Chrome address bars) doesn't clip fixed overlays and modals. */
@supports (height: 100dvh) {
  .modal-panel {
    max-height: min(92dvh, 920px);
  }

  .modal-panel.size-full {
    max-height: min(94dvh, 960px);
  }

  .product-modal {
    height: min(88dvh, 860px);
  }

  .home-hero-banner {
    min-height: min(680px, 94dvh);
  }
}

@supports (height: 100dvh) {
  @media (max-width: 980px) {
    .product-modal {
      height: min(92dvh, 960px);
    }

    .modal-panel.size-full,
    .modal-panel.size-lg,
    .modal-panel.size-xl {
      max-height: min(92dvh, 960px);
    }
  }
}

/* Fallback for browsers without aspect-ratio (Safari < 15): keep a sane height. */
@supports not (aspect-ratio: 1 / 1) {
  .gallery img,
  .product-card > img,
  .cat-card img {
    min-height: 220px;
  }
}
