/* TM TRADING - wholesale site styles
   Palette is pulled off the product labels: deep green, lime accent, cream. */

:root {
  --ink: #16211b;
  --ink-soft: #4d5b53;
  --ink-faint: #7d8a82;

  --green-900: #0f2a1c;
  --green-800: #16412a;
  --green-700: #1e5b3a;
  --green-600: #2a7a4c;
  --lime: #a8c62f;
  --lime-dark: #7d9613;

  --cream: #f7f3ea;
  --cream-deep: #efe8d9;
  --paper: #ffffff;
  --line: #e2dcce;
  --line-strong: #cfc7b4;

  --amber: #b3730c;
  --amber-bg: #fdf3e0;

  --radius: 4px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 42, 28, .06), 0 2px 8px rgba(15, 42, 28, .05);
  --shadow-md: 0 4px 16px rgba(15, 42, 28, .09), 0 12px 32px rgba(15, 42, 28, .07);
  --shadow-lg: 0 24px 60px rgba(15, 42, 28, .18);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  --wrap: 1200px;
  --header-h: 68px;
}

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

html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }
a { color: var(--green-700); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

.wrap { width: min(100% - 3rem, var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 3rem, 820px); margin-inline: auto; }

.eyebrow {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--green-600);
  margin: 0 0 .9rem;
}
.eyebrow-light { color: var(--lime); }

.lede { font-size: 1.12rem; color: var(--ink-soft); max-width: 62ch; }

/* ---------- header ---------- */

.topbar {
  background: var(--green-900);
  color: #cfe0d3;
  font-size: .8rem;
  letter-spacing: .02em;
}
.topbar .wrap {
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: center;
  min-height: 38px;
  flex-wrap: wrap;
}
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { color: var(--lime); }
.topbar-links { display: flex; gap: 1.4rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .93);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: var(--header-h);
}

.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; }
.brand-mark {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--green-800);
  color: #fff;
  display: grid; place-items: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .02em;
  border: 2px solid var(--lime);
  flex: none;
}
.brand-name { font-family: var(--serif); font-size: 1.22rem; font-weight: 700; letter-spacing: .04em; line-height: 1.1; white-space: nowrap; }
.brand-sub { font-size: .66rem; letter-spacing: .19em; text-transform: uppercase; color: var(--ink-faint); }

.nav { display: flex; gap: 1.9rem; margin-left: auto; }
.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: .93rem;
  font-weight: 500;
  padding: .35rem 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav a:hover { color: var(--green-700); }
.nav a[aria-current="page"] { color: var(--green-800); border-bottom-color: var(--lime); }

.header-actions { display: flex; align-items: center; gap: .7rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: .45rem .6rem;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .72rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--sans);
  font-size: .92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green-700); color: #fff; }
.btn-primary:hover { background: var(--green-800); }
.btn-lime { background: var(--lime); color: var(--green-900); }
.btn-lime:hover { background: var(--lime-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--green-800); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--green-700); background: #fff; }
.btn-light { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-light:hover { background: #fff; color: var(--green-900); }
.btn-sm { padding: .5rem .9rem; font-size: .84rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.quote-btn { position: relative; }
.quote-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--lime);
  color: var(--green-900);
  font-size: .72rem;
  font-weight: 700;
}
.btn-primary .quote-count { background: var(--lime); }

/* ---------- hero ---------- */

.hero {
  background:
    radial-gradient(1100px 520px at 88% -10%, rgba(168, 198, 47, .22), transparent 60%),
    linear-gradient(158deg, var(--green-900), var(--green-800) 62%, #1b4d31);
  color: #fff;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 0;
  overflow: hidden;
}
.hero h1 { color: #fff; max-width: 15ch; }
.hero p { color: #cfe0d3; font-size: 1.13rem; max-width: 52ch; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 3rem;
  align-items: end;
}
.hero-copy { padding-bottom: clamp(3rem, 6vw, 5rem); }
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 2rem; }

.hero-stack { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; align-items: end; }
.hero-shot {
  background: rgba(255, 255, 255, .96);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 1.1rem 1.1rem .6rem;
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}
.hero-shot img { height: 190px; object-fit: contain; margin-inline: auto; }
.hero-shot span {
  display: block;
  margin-top: .6rem;
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: center;
}
.hero-shot:nth-child(2) { transform: translateY(-1.6rem); }

.hero-bar {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  border-top: 1px solid rgba(255, 255, 255, .16);
  background: rgba(0, 0, 0, .18);
}
.hero-bar .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding: 1.6rem 0;
}
.hero-bar b { display: block; font-family: var(--serif); font-size: 1.55rem; color: var(--lime); }
.hero-bar span { font-size: .82rem; color: #b9cfc0; }

/* ---------- sections ---------- */

section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-bottom: 2.5rem; flex-wrap: wrap; }
.section-head h2 { margin-bottom: .35rem; }
.section-head p { margin: 0; color: var(--ink-soft); }
.band-paper { background: var(--paper); }
.band-cream { background: var(--cream-deep); }
.band-dark { background: var(--green-900); color: #d6e4da; }
.band-dark h2, .band-dark h3 { color: #fff; }

/* ---------- value cards ---------- */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.2rem; }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
}
.card-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius);
  background: var(--cream);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}
.card h3 { font-size: 1.06rem; margin-bottom: .4rem; }
.card p { margin: 0; font-size: .93rem; color: var(--ink-soft); }
.band-dark .card { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .13); }
.band-dark .card p { color: #b9cfc0; }
.band-dark .card-icon { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); }

/* ---------- product grid ---------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 1.4rem;
}

.product-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}
.product-card:hover { box-shadow: var(--shadow-md); border-color: var(--line-strong); transform: translateY(-2px); }

.product-media {
  position: relative;
  display: block;
  padding: 1.4rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.product-media img { height: 210px; width: 100%; object-fit: contain; }
.product-flag {
  position: absolute;
  top: .8rem; left: .8rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: .28rem .55rem;
  border-radius: 3px;
  background: var(--cream);
  color: var(--green-800);
  border: 1px solid var(--line-strong);
}

.product-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.product-brand {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .6rem;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: .3rem;
}
.product-sku { letter-spacing: .04em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.product-name { font-family: var(--serif); font-size: 1.14rem; font-weight: 600; margin: 0 0 .15rem; }
.product-name a { color: inherit; text-decoration: none; }
.product-name a:hover { color: var(--green-700); }
.product-size { font-size: .88rem; color: var(--ink-soft); margin-bottom: .85rem; }

.spec-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .4rem;
  padding: .7rem 0;
  margin-bottom: 1rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.spec-row div { min-width: 0; }
.spec-row dt { font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: .15rem; }
.spec-row dd { margin: 0; font-size: .9rem; font-weight: 600; font-variant-numeric: tabular-nums; }

.product-actions { margin-top: auto; display: flex; gap: .5rem; }
.product-actions .btn { flex: 1; }

/* ---------- filter bar ---------- */

.toolbar {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.2rem;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: .9rem;
  align-items: end;
  margin-bottom: 1.6rem;
}
.field label {
  display: block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: .35rem;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: .62rem .7rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  font-family: inherit;
  font-size: .93rem;
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid rgba(30, 91, 58, .35);
  outline-offset: 1px;
  border-color: var(--green-700);
}
.field textarea { resize: vertical; min-height: 110px; }

.result-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
  font-size: .9rem;
  color: var(--ink-soft);
}
.link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--green-700);
  text-decoration: underline;
  cursor: pointer;
}

.empty {
  background: var(--paper);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
  text-align: center;
  color: var(--ink-soft);
}

/* ---------- page head ---------- */

.page-head {
  background: linear-gradient(150deg, var(--green-900), var(--green-800));
  color: #fff;
  padding: clamp(2.5rem, 5vw, 3.8rem) 0;
}
.page-head h1 { color: #fff; margin-bottom: .3rem; font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
.page-head p { color: #cfe0d3; margin: 0; max-width: 60ch; }

.crumbs { font-size: .84rem; color: var(--ink-faint); padding: 1.2rem 0 0; }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--green-700); text-decoration: underline; }

/* ---------- product detail ---------- */

.detail { display: grid; grid-template-columns: 1.05fr 1fr; gap: 3rem; padding: 2.2rem 0 clamp(3rem, 6vw, 5rem); }

.gallery-main {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  margin-bottom: .9rem;
}
.gallery-main img { height: min(60vh, 460px); width: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: .6rem; flex-wrap: wrap; }
.gallery-thumbs button {
  width: 84px; height: 84px;
  padding: .35rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.gallery-thumbs button img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs button[aria-pressed="true"] { border-color: var(--green-700); box-shadow: 0 0 0 1px var(--green-700); }
.gallery-caption { font-size: .8rem; color: var(--ink-faint); text-align: center; margin-top: .7rem; }

.detail h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: .25rem; }
.detail-sub { font-size: 1.05rem; color: var(--ink-soft); margin-bottom: 1.4rem; }

.spec-table { width: 100%; border-collapse: collapse; margin: 1.4rem 0; font-size: .94rem; }
.spec-table th, .spec-table td { text-align: left; padding: .7rem .2rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { width: 42%; font-weight: 500; color: var(--ink-soft); }
.spec-table td { font-weight: 600; font-variant-numeric: tabular-nums; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: .3rem .6rem;
  border-radius: 3px;
}
.pill-ok { background: #e7f3ea; color: var(--green-700); }
.pill-warn { background: var(--amber-bg); color: var(--amber); }

.note {
  background: var(--amber-bg);
  border-left: 3px solid var(--amber);
  padding: .9rem 1.1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .9rem;
  color: #6b4708;
}

.order-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  margin: 1.6rem 0;
}
.order-box .order-row { display: flex; gap: .8rem; align-items: flex-end; }
.order-box .field { flex: 0 0 130px; }
.order-note { font-size: .82rem; color: var(--ink-faint); margin: .8rem 0 0; }

.tag-list { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.tag-list li {
  font-size: .84rem;
  padding: .3rem .65rem;
  background: var(--cream-deep);
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink-soft);
}

/* ---------- quote drawer ---------- */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 42, 28, .45);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s;
  z-index: 60;
}
.drawer-backdrop.open { opacity: 1; visibility: visible; }

.drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100%;
  width: min(430px, 100%);
  background: var(--cream);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform .26s cubic-bezier(.4, 0, .2, 1);
  z-index: 61;
  display: flex;
  flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.15rem 1.3rem;
  background: var(--green-900);
  color: #fff;
}
.drawer-head h2 { margin: 0; font-size: 1.15rem; color: #fff; }
.drawer-close { background: none; border: none; color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0 .2rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 1.2rem 1.3rem; }
.drawer-foot { border-top: 1px solid var(--line-strong); padding: 1.2rem 1.3rem; background: var(--paper); }
.drawer-foot .btn + .btn { margin-top: .6rem; }
.drawer-empty { text-align: center; color: var(--ink-faint); padding: 3rem 1rem; }

.quote-line { display: flex; gap: .8rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.quote-line img { width: 56px; height: 56px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .2rem; flex: none; }
.quote-line-main { flex: 1; min-width: 0; }
.quote-line b { display: block; font-size: .93rem; font-weight: 600; }
.quote-line small { color: var(--ink-faint); font-size: .78rem; }
.quote-line-ctl { display: flex; align-items: center; gap: .5rem; margin-top: .45rem; }
.quote-line-ctl input {
  width: 62px;
  padding: .3rem .4rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font: inherit;
  font-size: .85rem;
  text-align: center;
}
.quote-line-ctl span { font-size: .8rem; color: var(--ink-faint); }
.quote-remove { margin-left: auto; background: none; border: none; color: #a33; cursor: pointer; font-size: .8rem; text-decoration: underline; padding: 0; }

.quote-totals { display: flex; justify-content: space-between; font-size: .9rem; padding: .3rem 0; }
.quote-totals b { font-variant-numeric: tabular-nums; }

/* ---------- forms / contact ---------- */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid .full { grid-column: 1 / -1; }
.form-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
}
.contact-layout { display: grid; grid-template-columns: 1.25fr .75fr; gap: 2.5rem; align-items: start; }
.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li { padding: .85rem 0; border-bottom: 1px solid var(--line); }
.info-list dt { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: .2rem; }
.info-list dd { margin: 0; font-weight: 600; }
.info-list a { color: inherit; text-decoration: none; }
.info-list a:hover { color: var(--green-700); }

.form-status {
  margin-top: 1rem;
  padding: .9rem 1.1rem;
  border-radius: var(--radius);
  background: #e7f3ea;
  border-left: 3px solid var(--green-600);
  font-size: .9rem;
  display: none;
}
.form-status.show { display: block; }

/* ---------- line sheet ---------- */

/* min-width keeps the columns readable; .sheet-scroll takes over below that. */
.sheet-table { width: 100%; min-width: 900px; border-collapse: collapse; background: var(--paper); font-size: .88rem; }
.sheet-table th, .sheet-table td { padding: .7rem .8rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.sheet-table thead th {
  background: var(--green-900);
  color: #fff;
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
}
.sheet-table td:nth-child(3) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sheet-table tbody tr:hover { background: var(--cream); }
.sheet-table td.num { font-variant-numeric: tabular-nums; text-align: right; }
.sheet-table img { width: 46px; height: 46px; object-fit: contain; }
.sheet-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); }

/* ---------- footer ---------- */

.site-footer { background: var(--green-900); color: #a9c2b2; padding: 3.5rem 0 0; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2.5rem; padding-bottom: 2.5rem; }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .55rem; }
.site-footer a { color: #a9c2b2; text-decoration: none; }
.site-footer a:hover { color: var(--lime); }
.footer-brand .brand-mark { background: rgba(255, 255, 255, .08); }
.footer-brand .brand-name { color: #fff; }
.footer-brand p { margin-top: 1rem; max-width: 34ch; color: #8fa998; }
.footer-bar {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding: 1.3rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .82rem;
  color: #7f9a89;
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stack { max-width: 480px; }
  .hero-bar .wrap { grid-template-columns: repeat(2, 1fr); }
  .detail { grid-template-columns: 1fr; gap: 2rem; }
  .contact-layout { grid-template-columns: 1fr; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

/* The horizontal nav stops fitting alongside the brand and quote button
   well before phone widths, so it collapses into a menu at tablet size. */
@media (max-width: 900px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: .5rem 1rem 1rem;
    box-shadow: var(--shadow-md);
  }
  .nav.open { display: flex; }
  .nav a { padding: .7rem 0; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; order: 3; }
  .site-header .wrap { position: relative; gap: .75rem; }
  .header-actions { margin-left: auto; }
}

@media (max-width: 720px) {
  .wrap, .wrap-narrow { width: min(100% - 2rem, var(--wrap)); }
  /* Phone and email beat the marketing line when there is only one row. */
  .topbar .wrap { justify-content: center; }
  .topbar-note { display: none; }
  .topbar-links { gap: 1.1rem; }
  .toolbar { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; }
  .sheet-table { min-width: 780px; font-size: .8rem; }
}

/* Phone: the header has to fit brand + quote button + menu on one row. */
@media (max-width: 560px) {
  .brand-sub { display: none; }
  .brand-name { font-size: 1.05rem; }
  .brand-mark { width: 34px; height: 34px; font-size: .85rem; }
  .hide-sm { display: none; }
  .site-header .wrap { gap: .5rem; }
  .btn-sm { padding: .5rem .7rem; }
  .hero-cta .btn, .order-box .btn { flex: 1 1 auto; }
  .order-box .order-row { flex-wrap: wrap; }
  .spec-row { grid-template-columns: repeat(2, 1fr); row-gap: .6rem; }
  .section-head { gap: 1rem; }
}

/* ---------- print (line sheet) ---------- */

.print-head { display: none; }

@media print {
  .print-head { display: block; margin-bottom: 1rem; }
  .site-header, .topbar, .site-footer, .drawer, .drawer-backdrop, .no-print { display: none !important; }
  body { background: #fff; font-size: 11px; }
  section { padding: 0; }
  .sheet-table { min-width: 0; }
  .sheet-table thead th { background: #eee; color: #000; }
  .sheet-scroll { border: none; overflow: visible; }
  a { color: #000; text-decoration: none; }
}

/* Discreet way in to the admin console from the public site. */
.staff-link { color: inherit; text-decoration: none; opacity: .75; }
.staff-link:hover { color: var(--lime); opacity: 1; text-decoration: underline; }
