/* ==========================================================================
   Public catalogue styles
   One file, no build step, no framework. Mobile first; the two breakpoints
   are 720px (grid widens, filters return to a sidebar) and 1040px.
   ========================================================================== */

/* Roboto is the brand typeface. Both files are the variable version, so one
   download covers every weight - asking for 400, 500 and 700 separately fetches
   the same 42 KB three times. Self-hosted rather than linked from Google so the
   catalogue has no third-party dependency at run time. */
@font-face {
  font-family: "Roboto Var";
  src: url("../fonts/roboto-var.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto Mono Var";
  src: url("../fonts/roboto-mono-var.woff2") format("woff2-variations");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---- Disruptive Sourcing brand standards -----------------------------
     Industrial Black #0E0E0E   authority        Performance Red #C8102E
     Carbon Gray     #2B2B2B   industry stealth  Steel Gray      #6A6A6A
     Engineering White #F5F5F5 clarity

     Two notes on how the reds are used, both from measuring rather than
     eyeballing. Performance Red on Industrial Black is 3.28:1 - under the 4.5:1
     bar - so it is a FILL colour only, carrying white text at 5.88:1. Anywhere
     red has to be the text itself, --red-hi is used instead: 5.11:1 on a card.
     Steel Gray is likewise 3.31:1 on a card, so it draws rules and marks but
     never sets type; --text-3 is the faint text colour.                     */
  --black:      #0E0E0E;
  --surface:    #171717;
  --surface-2:  #1F1F1F;
  --surface-3:  #242424;
  --carbon:     #2B2B2B;
  --steel:      #6A6A6A;

  --white:      #F5F5F5;
  --text-2:     #B5B5B5;
  --text-3:     #8A8A8A;

  --red:        #C8102E;
  --red-dk:     #A50C25;
  --red-hi:     #FF3B4E;
  --red-wash:   rgba(200, 16, 46, .14);

  --ink:        var(--white);
  --ink-soft:   var(--text-2);
  --ink-faint:  var(--text-3);
  --paper:      var(--black);
  --line:       var(--carbon);
  --line-soft:  #202020;
  --accent:     var(--red-hi);
  --accent-dk:  var(--red-dk);
  --accent-wash:var(--red-wash);

  --ok:         #4ADE80;
  --warn:       #FBBF24;
  --bad:        #F87171;
  --info:       #7DD3FC;

  /* Industrial, not soft: square corners and a hairline rule instead of the
     rounded, shadowed card the default web look reaches for. */
  --radius:     2px;
  --radius-sm:  2px;
  --shadow:     0 1px 0 rgba(0,0,0,.6);
  --shadow-lg:  0 10px 30px rgba(0,0,0,.65);

  --sans: "Roboto Var", Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI",
          "Helvetica Neue", Arial, sans-serif;
  --mono: "Roboto Mono Var", "Roboto Mono", ui-monospace, SFMono-Regular,
          Menlo, Consolas, monospace;
  --wrap: 1220px;
}

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

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

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

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Headline treatment straight off the brand board: Roboto Bold, upper case,
   tight. Product names are exempt - a 40-character item read in block capitals
   is slower, and there are a lot of them on a grid. */
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 700; }
h1 {
  font-size: clamp(1.5rem, 1.1rem + 1.7vw, 2.2rem);
  text-transform: uppercase; letter-spacing: .01em;
}
h2 { font-size: 1.25rem; letter-spacing: -.005em; }
p  { margin: 0 0 1em; }

::selection { background: var(--red); color: #fff; }

:focus-visible { outline: 2px solid var(--red-hi); outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.1rem; }

.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: -9999px; top: 0; z-index: 100;
  background: var(--red); color: #fff; padding: .6rem 1rem; font-weight: 700;
}
.skip-link:focus { left: .5rem; top: .5rem; }

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

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

.site-header {
  background: var(--black);
  border-bottom: 1px solid var(--carbon);
  position: sticky; top: 0; z-index: 40;
}
/* The red hairline under the masthead is the one piece of the brand board's
   layout language that carries across every page. */
.site-header::after {
  content: ""; display: block; height: 2px;
  background: linear-gradient(90deg, var(--red) 0%, var(--red) 42%, rgba(200,16,46,0) 100%);
}

.header-inner {
  display: flex; align-items: center; gap: 1rem;
  min-height: 66px; padding-block: .7rem;
}

.brand { display: flex; align-items: center; gap: .65rem; color: var(--white);
         flex: 0 1 auto; min-width: 0; }
.brand:hover { text-decoration: none; }
/* The wordmark was keyed off the brand board to a transparent PNG, so it sits
   on any surface. ds-logo-dark.png is the same lockup with black ink.
   It is a 17:1 lockup, so its height drives its width hard: at 22px tall it is
   384px wide, which on its own overflows a 390px phone once the menu button
   and the page gutter are counted. Hence the height steps below. */
.brand-logo { height: 15px; width: auto; max-width: 100%; }

.header-search { flex: 1 1 auto; max-width: 440px; margin-left: auto; position: relative; display: none; }
.header-search input {
  width: 100%; padding: .55rem 2.6rem .55rem .8rem;
  border: 1px solid var(--carbon); border-radius: var(--radius-sm);
  background: var(--surface-2); font: inherit; font-size: .92rem; color: var(--white);
}
.header-search input::placeholder { color: var(--text-3); }
.header-search input:focus { outline: 2px solid var(--red-hi); outline-offset: 0; background: var(--surface-3); }
.header-search button {
  position: absolute; right: 3px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 30px; border: 0; border-radius: var(--radius-sm);
  background: var(--red); color: #fff; cursor: pointer;
  display: grid; place-items: center;
}
.header-search button:hover { background: var(--red-dk); }

.nav-toggle {
  margin-left: auto; width: 40px; height: 36px; border: 1px solid var(--carbon);
  border-radius: var(--radius-sm); background: var(--surface-2); cursor: pointer;
  display: grid; align-content: center; justify-items: center; gap: 4px; padding: 0;
}
.nav-toggle span { width: 17px; height: 2px; background: var(--red-hi); }

.site-nav { display: none; background: var(--black); }
.site-nav.is-open { display: block; }
.nav-inner { display: flex; flex-direction: column; padding-block: .3rem; }
.site-nav a {
  color: var(--text-2); padding: .6rem .2rem; font-size: .88rem; font-weight: 500;
  letter-spacing: .04em; text-transform: uppercase;
  border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; gap: .5rem;
}
.site-nav a:last-child { border-bottom: 0; }
.site-nav a:hover { color: var(--white); text-decoration: none; }
.site-nav a.is-current { color: var(--white); font-weight: 700; }

.pill {
  font-size: .68rem; color: var(--text-3); background: transparent;
  border: 1px solid var(--carbon); border-radius: 2px; padding: 0 .35rem;
  line-height: 1.5; font-variant-numeric: tabular-nums;
}
.site-nav a:hover .pill, .site-nav a.is-current .pill { color: var(--red-hi); border-color: var(--red); }

/* --- Origin strip -------------------------------------------------------- */

.origin-bar { background: var(--surface); border-bottom: 1px solid var(--carbon); }
.origin-inner {
  display: flex; align-items: center; gap: .3rem 1.1rem; flex-wrap: wrap;
  padding-block: .5rem;
}
.origin-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-3); margin-right: .2rem;
}
.origin-bar a {
  color: var(--text-2); font-size: .82rem; display: inline-flex; align-items: center; gap: .4rem;
  padding-block: .15rem;
}
.origin-bar a:hover { color: var(--white); text-decoration: none; }
.origin-bar a.is-current { color: var(--white); font-weight: 700; }
.origin-bar a.is-current .pill { color: var(--red-hi); border-color: var(--red); }

/* --- Page head ---------------------------------------------------------- */

.page-head { background: var(--surface); border-bottom: 1px solid var(--carbon); padding-block: 1.6rem 1.4rem; }
.page-head.slim { padding-block: .9rem; }
.page-head h1 { margin-bottom: .25rem; }
.page-lede { color: var(--ink-soft); max-width: 62ch; margin: 0; }

.crumbs { font-size: .82rem; color: var(--ink-faint); margin-bottom: .55rem;
          display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.crumbs a { color: var(--ink-faint); }
.crumbs a:hover { color: var(--accent); }

/* --- Layout ------------------------------------------------------------- */

.layout-with-sidebar { display: block; padding-block: 1.4rem 3rem; }

.filter-toggle {
  width: 100%; margin-bottom: 1rem; padding: .7rem 1rem;
  border: 1px solid var(--carbon); border-radius: var(--radius);
  background: var(--surface); color: var(--white);
  font: inherit; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  font-size: .82rem; cursor: pointer;
}

.filters { display: none; }
.filters.is-open { display: block; }

.filter-block { padding: 1rem 0; border-bottom: 1px solid var(--carbon); }
.filter-block:first-child { padding-top: 0; }
.filter-title {
  display: block; font-size: .7rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: .6rem;
}
.filter-note { margin: .55rem 0 0; font-size: .74rem; color: var(--text-3); line-height: 1.4; }
.filters input[type="search"], .filters input[type="number"], .filters select {
  width: 100%; padding: .5rem .6rem; border: 1px solid var(--carbon);
  border-radius: var(--radius-sm); font: inherit; font-size: .9rem;
  background: var(--surface-2); color: var(--white);
}
.filters input::placeholder { color: var(--text-3); }
.filters input:focus, .filters select:focus { outline: 2px solid var(--red-hi); outline-offset: 0; }

.filter-list { list-style: none; margin: 0; padding: 0; }
.filter-list a {
  display: flex; justify-content: space-between; gap: .5rem;
  padding: .32rem 0; color: var(--ink-soft); font-size: .9rem;
}
.filter-list a:hover { color: var(--white); text-decoration: none; }
.filter-list a.is-active { color: var(--white); font-weight: 700; }
.filter-list a.is-active::before {
  content: ""; width: 3px; align-self: stretch; background: var(--red);
  margin-right: .5rem; margin-left: -.8rem;
}
.filter-list a.subtle { color: var(--text-3); font-style: italic; }
.filter-list a.subtle:hover { color: var(--text-2); }
.count { color: var(--text-3); font-size: .76rem; font-variant-numeric: tabular-nums; }

.check { display: flex; align-items: center; gap: .5rem; padding: .28rem 0; font-size: .92rem; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; flex: 0 0 auto; }
.check span:first-of-type { flex: 1 1 auto; }

.price-row { display: flex; align-items: center; gap: .45rem; }
.price-row span { color: var(--ink-faint); }

.filter-actions { padding-top: 1rem; display: grid; gap: .5rem; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .6rem 1.1rem; border-radius: var(--radius-sm);
  border: 1px solid var(--carbon); background: var(--surface-2); color: var(--white);
  font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer;
  letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none; transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { background: var(--surface-3); border-color: var(--steel); text-decoration: none; }
/* White on Performance Red measures 5.88:1, so the primary button carries the
   brand red as a fill and keeps its label readable. */
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dk); border-color: var(--red-dk); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { color: var(--white); }
.btn-block { width: 100%; }

/* --- Results ------------------------------------------------------------ */

.results-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.results-count { margin: 0; font-size: .9rem; color: var(--ink-soft); }
.results-count strong { color: var(--white); font-variant-numeric: tabular-nums; }
.sort-box { display: flex; align-items: center; gap: .45rem; font-size: .85rem; color: var(--ink-soft); }
.sort-box select {
  padding: .42rem 1.8rem .42rem .6rem; border: 1px solid var(--carbon);
  border-radius: var(--radius-sm); background: var(--surface-2); font: inherit; font-size: .85rem;
  color: var(--white);
}

.active-filters { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .22rem .6rem; border-radius: var(--radius-sm); font-size: .78rem; font-weight: 500;
  background: var(--red-wash); border: 1px solid var(--red); color: var(--red-hi);
}
.chip:hover { text-decoration: none; background: rgba(200,16,46,.26); color: #fff; }

/* Two columns on a phone: one giant card per screen makes browsing a
   catalogue slow. Wider screens fall back to an auto-filled track. */
.product-grid {
  display: grid; gap: .7rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  background: var(--surface); border: 1px solid var(--carbon);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow .16s ease, transform .16s ease, border-color .16s ease;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: var(--steel); }

.card-media { position: relative; display: block; background: var(--surface-3); aspect-ratio: 1 / 1; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }

.badge {
  position: absolute; top: .5rem; left: .5rem;
  font-size: .64rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: .18rem .4rem; border-radius: 2px; color: #fff;
}
.badge-featured { background: var(--red); }
/* Origin sits opposite the featured flag so the two never collide. */
.badge-origin {
  left: auto; right: .5rem;
  background: rgba(14,14,14,.82); color: var(--white);
  border: 1px solid var(--steel); font-weight: 500; letter-spacing: .05em;
}

.card-body { padding: .8rem .85rem .95rem; display: flex; flex-direction: column; flex: 1 1 auto; }
.card-cat {
  margin: 0 0 .25rem; font-size: .66rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-3); font-weight: 700;
}
.card-title { font-size: .98rem; margin: 0 0 .35rem; line-height: 1.3; font-weight: 700; }
.card-title a { color: var(--white); }
.card-title a:hover { color: var(--red-hi); text-decoration: none; }
/* The wrapper is the flex item; the clamp is applied one level in so it is
   not blockified. min-height reserves two lines so every card in a row lines
   its price up at the same height. */
.card-desc-wrap { margin: 0 0 .8rem; min-height: calc(2 * 1.45em * .85); }
.card-desc {
  font-size: .85rem; line-height: 1.45; color: var(--ink-soft); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-foot {
  margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between;
  gap: .5rem; flex-wrap: wrap;
}

/* "Price on request" is a label, not a figure, so it takes the uppercase
   micro-label treatment rather than the tabular monospace that a number would
   get. No price ever appears on a buyer-facing page - the catalogue does not
   read the pricing table at all. */
.poa {
  margin: 0; font-size: .78rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-3);
}
.poa-lg { font-size: .95rem; color: var(--text-2); margin-bottom: .6rem; }

.stock { margin: 0; font-size: .8rem; display: inline-flex; align-items: center; gap: .35rem; }
.stock .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.stock-ok    { color: var(--ok); }
.stock-warn  { color: var(--warn); }
.stock-bad   { color: var(--bad); }
.stock-info  { color: var(--info); }
.stock-muted { color: var(--ink-faint); }
.stock-lg { font-size: .95rem; font-weight: 600; }

.empty {
  background: var(--surface); border: 1px solid var(--carbon); border-radius: var(--radius);
  padding: 3rem 1.5rem; text-align: center;
}
.empty.tall { margin-block: 3rem; }
.empty h1, .empty h2 { margin-bottom: .4rem; }
.empty p { color: var(--ink-soft); }

/* --- Pagination --------------------------------------------------------- */

.pagination { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: center; margin-top: 2rem; }
.page-link {
  min-width: 38px; padding: .45rem .7rem; text-align: center;
  border: 1px solid var(--carbon); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink-soft); font-size: .85rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.page-link:hover { text-decoration: none; border-color: var(--red); color: var(--red-hi); }
.page-link.is-current { background: var(--red); border-color: var(--red); color: #fff; }
.page-link.is-disabled { opacity: .35; pointer-events: none; }
.page-gap { padding: .45rem .2rem; color: var(--text-3); }

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

.product-detail { display: grid; gap: 1.8rem; padding-block: 1.6rem 3rem; }

.gallery-main {
  background: var(--surface); border: 1px solid var(--carbon);
  border-radius: var(--radius); overflow: hidden; aspect-ratio: 1 / 1;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }

.gallery-thumbs {
  list-style: none; display: flex; gap: .5rem; padding: .6rem 0 0; margin: 0;
  overflow-x: auto; scrollbar-width: thin;
}
.thumb {
  padding: 0; border: 1px solid var(--carbon); border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer; overflow: hidden;
  width: 72px; height: 72px; flex: 0 0 auto;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-active { border-color: var(--red); box-shadow: 0 0 0 2px var(--red-wash); }

.eyebrow { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 .4rem; }
.eyebrow a { color: var(--red-hi); font-weight: 700; }

.meta-row { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; margin-bottom: .9rem; }
.meta-item { font-size: .82rem; color: var(--text-3); }
.meta-item strong { color: var(--text-2); font-weight: 600; font-family: var(--mono); }
.meta-link { color: var(--red-hi); font-weight: 600; }

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

.buy-box {
  background: var(--surface); border: 1px solid var(--carbon); border-radius: var(--radius);
  border-left: 3px solid var(--red);
  padding: 1.1rem 1.2rem; margin-block: 1.2rem;
  display: flex; flex-direction: column; gap: .5rem;
}
.enquire { margin: .3rem 0 0; font-size: .86rem; color: var(--ink-soft); }
.enquire strong { color: var(--white); font-family: var(--mono); font-weight: 500; }

.section { margin-top: 2rem; }
.section h2 {
  font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3);
  padding-bottom: .5rem; border-bottom: 1px solid var(--carbon); margin-bottom: .9rem;
  font-weight: 700;
}
.rich { color: var(--ink-soft); max-width: 68ch; }

.spec-group {
  font-size: .8rem; margin: 1.4rem 0 .4rem; color: var(--white);
  text-transform: uppercase; letter-spacing: .1em; font-weight: 700;
}
/* Roboto Mono on the values: the brand board reserves it for specifications
   and engineering data, and it keeps figures in a column. */
.spec-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.spec-table tr { border-bottom: 1px solid var(--line-soft); }
.spec-table tr:last-child { border-bottom: 0; }
.spec-table th {
  text-align: left; font-weight: 500; color: var(--text-3);
  padding: .55rem .8rem .55rem 0; width: 42%; vertical-align: top;
}
.spec-table td {
  padding: .55rem 0; color: var(--white); vertical-align: top;
  font-family: var(--mono); font-size: .84rem;
}

.related { border-top: 1px solid var(--carbon); background: var(--surface); padding-block: 2.2rem 3rem; }
.related h2 { margin-bottom: 1rem; }

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

.site-footer { background: var(--black); color: var(--text-2); margin-top: auto;
               border-top: 1px solid var(--carbon); }
.footer-inner {
  display: grid; gap: 1.2rem; padding-block: 2rem 1.4rem;
}
.footer-inner p { margin: 0; color: var(--text-3); font-size: .86rem; }
.footer-logo { height: 20px; width: auto; margin-bottom: .6rem; }
.footer-inner strong { color: var(--white); }
.footer-contact p { font-family: var(--mono); color: var(--text-2); }
.footer-links { display: flex; gap: 1rem; font-size: .84rem; text-transform: uppercase;
                letter-spacing: .06em; font-weight: 500; }
.site-footer a { color: var(--red-hi); }
.site-footer a:hover { color: #fff; }
.footer-legal { border-top: 1px solid var(--carbon); padding-block: .9rem; color: var(--text-3); }

/* --- Breakpoints -------------------------------------------------------- */

@media (max-width: 519px) {
  .card-body { padding: .6rem .65rem .75rem; }
  .card-title { font-size: .92rem; }
  .card-cat { font-size: .64rem; }
  .card-desc { font-size: .8rem; }
  /* Availability over the on-request label on a phone: side by side, the two
     wrap at different points across a row of cards and stop lining up. */
  .card-foot { flex-direction: column; align-items: flex-start; gap: .15rem; }
  .stock { font-size: .74rem; }
}

@media (min-width: 520px) {
  .product-grid { gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
  .brand-logo { height: 18px; }
}

@media (min-width: 720px) {
  .brand-logo { height: 22px; }
  .header-search { display: block; }
  .nav-toggle { display: none; }
  .site-nav { display: block; }
  /* Eight category names at this length overflow a single row. Wrapping keeps
     every label reachable; a horizontal scroller would hide the last two or
     three behind an edge with nothing to say they are there. */
  .nav-inner { flex-direction: row; flex-wrap: wrap; gap: 0 1.3rem; padding-block: 0; }
  .site-nav a { border-bottom: 2px solid transparent; padding: .55rem 0; white-space: nowrap; }
  .site-nav a.is-current { border-bottom-color: var(--red); }
  .site-nav a:hover { border-bottom-color: var(--carbon); }

  .filter-toggle { display: none; }
  .filters { display: block; }
  .layout-with-sidebar {
    display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 2rem;
    align-items: start; padding-block: 1.8rem 4rem;
  }
  .filters { position: sticky; top: 92px; }

  .product-detail { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
  .gallery { position: sticky; top: 92px; }

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

@media (min-width: 1040px) {
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .layout-with-sidebar { grid-template-columns: 250px minmax(0, 1fr); gap: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ===========================================================================
   Shortlist
   The buyer-facing half of "browse, shortlist, ask for a quote".
   =========================================================================== */

/* Header link. flex: 0 0 auto keeps it from being squeezed by the search box,
   and the wordmark's own min-width: 0 lets the logo shrink instead. */
.shortlist-link {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: .4rem;
  padding: .42rem .7rem; border: 1px solid var(--carbon); border-radius: var(--radius);
  color: var(--text-2); font-size: .82rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; text-decoration: none;
  background: var(--surface-2); position: relative;
}
.shortlist-link:hover { color: var(--white); border-color: var(--steel); text-decoration: none; }
.shortlist-count {
  min-width: 1.15rem; height: 1.15rem; padding: 0 .28rem;
  display: inline-flex; align-items: center; justify-content: center;
  /* White on Performance Red: 5.88:1, measured. Red as a fill, never as text. */
  background: var(--red); color: #fff; border-radius: 999px;
  font-size: .7rem; font-weight: 700; font-family: var(--mono);
}

/* Card button. Sits below the card foot as a full-width strip so a row of
   cards has its buttons on one line regardless of title length. */
.btn-shortlist {
  margin-top: .7rem; width: 100%; padding: .45rem .6rem;
  background: transparent; border: 1px solid var(--carbon); border-radius: var(--radius);
  color: var(--text-2); font: inherit; font-size: .76rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
}
.btn-shortlist:hover { border-color: var(--steel); color: var(--white); }
.btn-shortlist.is-on { background: var(--red-wash); border-color: var(--red); color: var(--red-hi); }

/* Only one of the two labels is ever shown. Both live in the markup so the
   button never has to be relabelled from script for the state to be readable. */
.btn-shortlist .sl-on,
.btn-shortlist-lg .sl-on { display: none; }
.btn-shortlist.is-on .sl-add,
.btn-shortlist-lg.is-on .sl-add { display: none; }
.btn-shortlist.is-on .sl-on,
.btn-shortlist-lg.is-on .sl-on { display: inline; }

.btn-shortlist-lg { margin: .3rem 0 .5rem; }
.btn-shortlist-lg.is-on {
  background: var(--surface-3); border-color: var(--red); color: var(--red-hi);
}
.buy-note { font-size: .82rem; color: var(--ink-faint); margin: 0 0 .8rem; line-height: 1.5; }

/* --- The shortlist page --------------------------------------------------- */
.sl-section {
  background: var(--surface); border: 1px solid var(--carbon);
  border-radius: var(--radius); padding: 1.2rem; margin-bottom: 1.2rem;
}
.sl-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.sl-head h2, .sl-section h2 { margin: 0 0 .2rem; font-size: 1.05rem; }
.sl-section h2 { margin-bottom: 1rem; }

.sl-list { list-style: none; margin: 0; padding: 0; }
.sl-row {
  display: grid; gap: .9rem; align-items: start;
  grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1.1fr) auto;
  padding: .9rem 0; border-top: 1px solid var(--line-soft);
}
.sl-row:first-child { border-top: 0; padding-top: 0; }
.sl-thumb {
  width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius);
  background: var(--surface-2);
}
/* min-width: 0 on the grid child, or a long product name refuses to wrap and
   pushes the whole row wider than the page. */
.sl-main { min-width: 0; }
.sl-cat {
  margin: 0 0 .15rem; font-size: .68rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-faint);
}
.sl-name { margin: 0 0 .3rem; font-weight: 600; line-height: 1.35; }
.sl-name a { color: var(--white); }
.sl-stock { font-size: .76rem; }

.sl-fields { display: grid; gap: .5rem; min-width: 0; }
.field-sm label {
  display: block; font-size: .7rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: .2rem;
}
.sl-input {
  width: 100%; padding: .4rem .5rem; background: var(--surface-2);
  border: 1px solid var(--carbon); border-radius: var(--radius);
  color: var(--white); font: inherit; font-size: .85rem;
}
.sl-input:focus { outline: 2px solid var(--red-hi); outline-offset: 1px; }

.sl-remove {
  background: none; border: 0; color: var(--ink-faint); cursor: pointer;
  font-size: 1.4rem; line-height: 1; padding: .2rem .4rem;
}
.sl-remove:hover { color: var(--red-hi); }
.sl-error { color: var(--red-hi); padding: 1rem 0; }

.sl-submit { margin-top: 1.2rem; }
.sl-submit .filter-note { margin-top: .7rem; max-width: 46rem; }
.btn-lg { padding: .7rem 1.6rem; font-size: .95rem; }

/* Honeypot: off-screen rather than display:none, because some bots skip
   anything that is not rendered at all. */
.hp {
  position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden;
}

.form-grid { display: grid; gap: .9rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .field { min-width: 0; }
.req { color: var(--red-hi); }

.alert {
  padding: .9rem 1.1rem; border-radius: var(--radius); margin-bottom: 1.2rem;
  border: 1px solid var(--carbon); background: var(--surface-2);
}
.alert p { margin: 0 0 .4rem; }
.alert ul { margin: 0; padding-left: 1.2rem; }
.alert-error { border-color: var(--red); background: var(--red-wash); }

.empty-state {
  background: var(--surface); border: 1px solid var(--carbon);
  border-radius: var(--radius); padding: 3rem 1.5rem; text-align: center;
}
.empty-state h1, .empty-state h2 { margin-top: 0; }
.empty-state p { max-width: 34rem; margin-left: auto; margin-right: auto; }
.sent-ref { font-family: var(--mono); font-size: 1.1rem; }

.page-head { margin-bottom: 1.4rem; }
.page-head h1 { margin-bottom: .3rem; }
.page-sub { color: var(--ink-soft); margin: 0; max-width: 46rem; }

@media (max-width: 720px) {
  /* The quantity and notes fields drop under the product rather than beside
     it - two text inputs in a 150px column are unusable on a phone. */
  .sl-row { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .sl-thumb { width: 56px; height: 56px; }
  .sl-fields { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: 1fr; }
  /* The word would push the header past the viewport; the icon and count
     carry the meaning on their own. */
  .shortlist-text { display: none; }
  .shortlist-link { padding: .42rem .5rem; }
}

@media (max-width: 460px) {
  .sl-fields { grid-template-columns: 1fr; }
}

/* Vertical breathing room for the two standalone pages, which have no sidebar
   or gallery to set their own rhythm. */
.shortlist-page, .sent-state { margin-top: 1.6rem; margin-bottom: 2.5rem; }
