/* ============================================================================
   Discount Equipment — Design System (source of truth)
   ----------------------------------------------------------------------------
   Extracted from the /v2 home concept and rebuilt MOBILE-FIRST with
   accessibility defaults. Every page/component on the new site should pull
   from these tokens + classes rather than re-inventing styles.

   Conventions:
   - Base styles target small screens; `min-width` media queries scale up.
   - Tokens live in :root. Never hardcode a brand hex in a component — use a var.
   - Components are class-based and composable (.btn + .btn--primary).
   - Accessibility is not optional: visible focus, motion-safe, real labels.
   ========================================================================== */

/* ---- TOKENS --------------------------------------------------------------- */
:root {
  /* Brand */
  --de-blue:          #1B3FB0;
  --de-blue-dark:     #122879;
  --de-blue-deep:     #0A1A52;
  --de-yellow:        #FFD400;
  --de-yellow-dark:   #E6BD00;
  --de-yellow-soft:   #FFF4B8;
  --de-orange:        #E8560A;

  /* Neutrals */
  --de-white:         #FFFFFF;
  --de-bg:            #F7F8FB;
  --de-card:          #FFFFFF;
  --de-ink:           #0E1530;
  --de-ink-soft:      #4A5468;
  --de-muted:         #7A8499;
  --de-border:        #E2E6EE;
  --de-border-strong: #C9D0DE;

  /* Status */
  --de-success:       #10804A;
  --de-warning:       #92400E;
  --de-warning-bg:    #FEF3C7;
  --de-danger:        #B91C1C;
  --de-danger-bg:     #FEE2E2;

  /* Type */
  --font-display: 'Barlow Condensed', system-ui, sans-serif;
  --font-body:    'Barlow', system-ui, sans-serif;
  --fs-xs: 11px; --fs-sm: 13px; --fs-base: 15px; --fs-md: 17px;
  --fs-lg: 22px; --fs-xl: 28px; --fs-2xl: 36px; --fs-3xl: 48px;

  /* Space scale (4px base) */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;

  /* Radius + shadow */
  --r-sm: 4px; --r-md: 8px; --r-lg: 12px; --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(14,21,48,0.06);
  --shadow-md: 0 4px 12px rgba(14,21,48,0.08);
  --shadow-lg: 0 12px 32px rgba(14,21,48,0.12);

  --focus-ring: 0 0 0 3px rgba(27,63,176,0.45);
}

/* Mobile type bump — the small end of the scale reads too small on a phone.
   Raise xs/sm/base/md on narrow screens (headlines already large, left as-is).
   --fs-base hits 16px so form inputs clear mobile Safari's <16px focus-zoom.
   Tokens only, so every component using --fs-* scales up automatically. */
@media (max-width: 640px) {
  :root {
    --fs-xs: 12.5px; --fs-sm: 14.5px; --fs-base: 16px; --fs-md: 18px;
  }
}

/* Mobile safety: catalog names and part numbers contain long unbreakable tokens
   (model strings, PNs). With large display headings and a 2-col grid on phones,
   those would force horizontal page scroll. Let them wrap. */
h1, h2, h3, h4,
.store-hero__title, .section-head__title, .product-title, .pg-title,
.prod-card__name, .prod-card__brand, .subcat-tile__name, .breadcrumb,
.product-specs dd, .product-specs dd.mono, .cat-empty__head, .cr-card__head {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ---- RESET + BASE --------------------------------------------------------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--de-bg);
  color: var(--de-ink);
  font-size: var(--fs-base);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--de-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.05; }

/* ---- GOOGLE TRANSLATE BANNER SUPPRESSION ---------------------------------- */
/* Hide the bar Google injects at the top of the page after a language pick.  */
.skiptranslate, #goog-te-banner-frame { display: none !important; }
body { top: 0 !important; }

/* ---- ACCESSIBILITY DEFAULTS ---------------------------------------------- */
/* Visible focus for keyboard users (never remove outlines wholesale). */
:focus-visible { outline: 2px solid var(--de-blue); outline-offset: 2px; border-radius: 2px; }
/* Screen-reader-only text (labels for icon buttons, section context). */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
/* Skip link — first focusable element on every page. */
.skip-link {
  position: absolute; left: var(--sp-2); top: -48px; z-index: 1000;
  background: var(--de-blue-deep); color: #fff; padding: 10px 16px;
  border-radius: var(--r-sm); font-weight: 700; transition: top 0.15s;
}
.skip-link:focus { top: var(--sp-2); text-decoration: none; }
/* Respect users who ask for less motion. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---- BUTTONS -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-family: var(--font-display); font-weight: 800; letter-spacing: 0.6px;
  text-transform: uppercase; font-size: var(--fs-sm);
  padding: 12px 22px; border: 2px solid transparent; border-radius: var(--r-sm);
  cursor: pointer; transition: background 0.18s, transform 0.18s, border-color 0.18s;
  min-height: 44px; /* touch target */
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn--primary { background: var(--de-yellow); color: var(--de-blue-deep); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--de-yellow-dark); transform: translateY(-1px); }
.btn--blue { background: var(--de-blue); color: #fff; }
.btn--blue:hover { background: var(--de-blue-dark); }
.btn--secondary { background: transparent; color: var(--de-blue); border-color: var(--de-border-strong); }
.btn--secondary:hover { border-color: var(--de-blue); background: var(--de-bg); }
.btn--ghost { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.45); }
.btn--ghost:hover { background: var(--de-yellow); border-color: var(--de-yellow); color: var(--de-blue-deep); }
.btn--lg { font-size: var(--fs-md); padding: 15px 32px; }
.btn--sm { font-size: var(--fs-xs); padding: 8px 14px; min-height: 36px; }

/* ---- BADGES / PILLS ------------------------------------------------------- */
.badge {
  display: inline-block; font-family: var(--font-display); font-weight: 800;
  font-size: var(--fs-xs); letter-spacing: 0.6px; text-transform: uppercase;
  padding: 4px 9px; border-radius: var(--r-sm); background: var(--de-blue); color: #fff;
}
.badge--yellow  { background: var(--de-yellow); color: var(--de-blue-deep); }
.badge--orange  { background: var(--de-orange); color: #fff; }
.badge--success { background: var(--de-success); color: #fff; }
.badge--soft    { background: var(--de-bg); color: var(--de-blue); border: 1px solid var(--de-border); }
.badge--warn    { background: var(--de-warning-bg); color: var(--de-warning); }
.badge--danger  { background: var(--de-danger-bg); color: var(--de-danger); }

/* ---- FORM CONTROLS -------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: var(--sp-1); }
.field > label { font-size: var(--fs-sm); font-weight: 700; color: var(--de-ink-soft); }
.input, .select {
  width: 100%; background: var(--de-white); border: 1.5px solid var(--de-border);
  border-radius: var(--r-md); color: var(--de-ink); font-family: var(--font-body);
  font-size: var(--fs-base); padding: 12px 14px; outline: none; min-height: 44px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input::placeholder { color: var(--de-muted); }
.input:focus, .select:focus { border-color: var(--de-blue); box-shadow: var(--focus-ring); }

/* Themed dropdowns — reset the thin native control and draw a design-system
   chevron, so EVERY <select> across the site matches (search-band manufacturer
   picker, admin/workbench filters, forms, playground). Targets the bare element
   plus .select/.input so it applies regardless of class. */
select, select.input, .select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-color: var(--de-white);
  border: 1.5px solid var(--de-border); border-radius: var(--r-md);
  color: var(--de-ink); font-family: var(--font-body); font-size: var(--fs-base);
  min-height: 44px; padding: 10px 40px 10px 14px; cursor: pointer; outline: none;
  max-width: 100%; transition: border-color 0.2s, box-shadow 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234A5468' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
}
select:hover, .select:hover { border-color: var(--de-muted); }
select:focus { border-color: var(--de-blue); box-shadow: var(--focus-ring); }

/* Search band (homepage / catalog header) */
.searchbar { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: stretch; }
.searchbar__field { position: relative; flex: 1 1 100%; }
.searchbar__field input {
  width: 100%; background: var(--de-bg); border: 1.5px solid var(--de-border);
  border-radius: var(--r-md); font-size: var(--fs-base); padding: 13px 56px 13px 16px;
  outline: none; min-height: 48px;
}
.searchbar__field input:focus { border-color: var(--de-blue); background: #fff; box-shadow: var(--focus-ring); }
.searchbar__go {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: var(--de-yellow); border: none; color: var(--de-blue-deep);
  font-size: var(--fs-md); font-weight: 800; padding: 8px 14px; border-radius: var(--r-sm); min-height: 40px;
}
.searchbar__go:hover { background: var(--de-yellow-dark); }

/* ---- CARDS ---------------------------------------------------------------- */
.card { background: var(--de-card); border: 1px solid var(--de-border); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.card--pad { padding: var(--sp-5); }

/* Category card */
.cat-card {
  background: var(--de-card); border: 1px solid var(--de-border); border-radius: var(--r-md);
  padding: var(--sp-5) var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-3);
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden; transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.cat-card::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: var(--de-yellow); transform: scaleX(0); transform-origin: left; transition: transform 0.25s; }
.cat-card:hover { border-color: var(--de-blue); transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; }
.cat-card:hover::after { transform: scaleX(1); }
.cat-card__icon { width: 44px; height: 44px; background: var(--de-yellow-soft); border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; color: var(--de-blue); }
.cat-card__name { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 800; color: var(--de-blue-deep); text-transform: uppercase; line-height: 1.15; }

/* Product card */
/* White cards + 8px breathing room above the image (per Mark 2026-07-10). */
.prod-card { background: #fff; border: 1px solid var(--de-border); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s; }
.prod-card:hover { border-color: var(--de-blue); transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; }
.prod-card__img { height: 158px; padding-top: 8px; background: #fff; display: flex; align-items: flex-start; justify-content: center; border-bottom: 1px solid var(--de-border); color: var(--de-blue); overflow: hidden; }
.prod-card__img img { width: 150px; height: 150px; object-fit: fill; flex-shrink: 0; }
.prod-card__body { padding: var(--sp-4); flex: 1; }
.prod-card__brand { font-size: var(--fs-xs); color: var(--de-blue); font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.prod-card__name { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 700; color: var(--de-ink); line-height: 1.2; margin: var(--sp-1) 0 var(--sp-3); }
.prod-card__price { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 900; color: var(--de-blue-deep); }
.prod-card__price-orig { font-size: var(--fs-base); color: var(--de-ink-soft); text-decoration: line-through; margin-left: var(--sp-2); }
.prod-card__foot { padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--de-border); display: flex; justify-content: space-between; align-items: center; background: var(--de-bg); }

/* ---- TRUST ITEM ----------------------------------------------------------- */
.trust-item { display: flex; align-items: center; gap: var(--sp-4); background: var(--de-white); border: 1px solid var(--de-border); border-radius: var(--r-md); padding: var(--sp-4); box-shadow: var(--shadow-sm); }
.trust-item__ico { width: 44px; height: 44px; background: var(--de-yellow-soft); border-radius: var(--r-pill); display: flex; align-items: center; justify-content: center; color: var(--de-blue); flex-shrink: 0; }
.trust-item__head { font-family: var(--font-display); font-size: var(--fs-base); font-weight: 800; text-transform: uppercase; }
.trust-item__sub { font-size: var(--fs-sm); color: var(--de-ink-soft); }

/* ---- SECTION HEADER ------------------------------------------------------- */
.section-head { display: flex; align-items: baseline; gap: var(--sp-4); margin-bottom: var(--sp-5); }
.section-head__title { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 800; color: var(--de-blue-deep); text-transform: uppercase; }
.section-head__line { flex: 1; height: 2px; background: var(--de-border); }
.section-head__link { font-family: var(--font-display); font-size: var(--fs-sm); font-weight: 800; color: var(--de-blue); text-transform: uppercase; white-space: nowrap; }

/* ---- ALERTS --------------------------------------------------------------- */
.alert { padding: 12px 16px; border-radius: var(--r-md); font-size: var(--fs-sm); font-weight: 600; border: 1px solid transparent; }
.alert--ok   { background: #D1FAE5; color: var(--de-success); border-color: #6EE7B7; }
.alert--warn { background: var(--de-warning-bg); color: var(--de-warning); border-color: #FCD34D; }
.alert--err  { background: var(--de-danger-bg); color: var(--de-danger); border-color: #FCA5A5; }

/* ---- TABLE ---------------------------------------------------------------- */
.table-wrap { background: #fff; border: 1px solid var(--de-border); border-radius: var(--r-md); overflow: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
table.table thead th { background: #EEF2FF; text-align: left; padding: 10px 12px; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.4px; color: #3730A3; font-weight: 700; white-space: nowrap; }
table.table tbody td { padding: 10px 12px; border-bottom: 1px solid var(--de-border); }
table.table tbody tr:hover { background: #F8FAFC; }

/* ---- BRAND TAG / PROMO ---------------------------------------------------- */
.brand-tag { background: var(--de-card); border: 1px solid var(--de-border); border-radius: var(--r-sm); color: var(--de-blue); font-size: var(--fs-sm); font-weight: 700; padding: 7px 13px; font-family: var(--font-display); transition: background 0.15s, color 0.15s, border-color 0.15s; }
.brand-tag:hover { border-color: var(--de-blue); background: var(--de-blue); color: #fff; text-decoration: none; }
/* The trailing "All brands →" tag on the sales-ranked home list. */
.brand-tag--all { background: var(--de-blue-deep); border-color: var(--de-blue-deep); color: #fff; }
.brand-tag--all:hover { background: var(--de-blue); }

/* Quote-cart totals rows (legacy cart.inc parity) — shared by the cart's
   quote section and the quote-request page (views/partials/quote-totals). */
.qt-rows { margin-top: var(--sp-3); border-top: 1px solid var(--de-border); padding-top: var(--sp-2); max-width: 420px; margin-left: auto; }
.qt-row { display: flex; justify-content: space-between; gap: var(--sp-3); padding: 3px 0; font-size: var(--fs-sm); color: var(--de-ink-soft); }
.qt-row span[title] { cursor: help; text-decoration: underline dotted; text-underline-offset: 3px; }
.qt-row--total { border-top: 1px solid var(--de-border); margin-top: 4px; padding-top: 7px; font-weight: 800; color: var(--de-ink); }
.qt-note { font-size: var(--fs-xs); color: var(--de-muted); margin-top: var(--sp-2); line-height: 1.5; }
.promo { background: var(--de-blue-deep); color: #fff; padding: var(--sp-6) var(--sp-5); border-radius: var(--r-md); position: relative; overflow: hidden; }
.promo__headline { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 900; text-transform: uppercase; line-height: 1.1; }
.promo__headline em { color: var(--de-yellow); font-style: normal; }
.promo__sub { font-size: var(--fs-sm); color: rgba(255,255,255,0.8); margin-top: var(--sp-1); }

/* ---- SUBCATEGORY TILES (category landing pages + search's Categories row;
        the legacy blue-button list as design-system tiles) ------------------- */
.subcat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); margin-bottom: var(--sp-5); }
@media (max-width: 820px) { .subcat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .subcat-grid { grid-template-columns: 1fr; } }
.subcat-tile { display: flex; align-items: center; justify-content: center;
  height: 40px; text-decoration: none;
  background: linear-gradient(to bottom, #d0e4f7 0%, #278fe5 24%, #1508a5 50%, #1a24b2 79%, #1489e8 100%);
  border-radius: 8px; border: 1px solid rgba(0,0,0,0.35);
  box-shadow: 0 2px 5px rgba(0,0,0,0.45); transition: filter .12s, transform .12s; }
.subcat-tile:hover { filter: brightness(1.12); transform: translateY(-1px); text-decoration: none; }
.subcat-tile__name { color: #fff; font-size: 14px; font-weight: 700; text-align: center;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.85); font-family: inherit; padding: 0 12px; }
/* Search-term highlight inside a tile: yellow text, not the default <mark>
   background (unreadable on the blue gradient). */
.subcat-tile__name mark { background: none; color: #ffd700; text-shadow: inherit; }
.subcat-tile__arrow { display: none; }

/* ---- RESULTS VIEW TOGGLE + LIST MODE (search + category grids) ------------
   The ⊞ Grid / ☰ List switch (choice persists per browser via
   /js/de-view-toggle.js -> body.search-list). */
.cw-viewtoggle { display: flex; border: 1.5px solid var(--de-border-strong); border-radius: var(--r-sm); overflow: hidden; flex-shrink: 0; }
.cw-viewtoggle button { padding: 7px 14px; font-size: var(--fs-sm); font-weight: 700; font-family: var(--font-display); background: #fff; color: var(--de-blue-deep); border: none; cursor: pointer; }
.cw-viewtoggle button + button { border-left: 1.5px solid var(--de-border-strong); }
.cw-viewtoggle button.on { background: var(--de-blue-deep); color: #fff; }
body.search-list .grid.grid--4 { display: flex; flex-direction: column; gap: var(--sp-2); }
body.search-list .prod-card { display: flex; flex-direction: row; align-items: center; gap: var(--sp-4); }
body.search-list .prod-card__img { width: 110px; height: 92px; padding-top: 0; align-items: center; flex-shrink: 0; border-bottom: none; border-right: 1px solid var(--de-border); }
body.search-list .prod-card__img img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
body.search-list .prod-card__body { flex: 1; display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
body.search-list .prod-card__name { flex: 1; min-width: 240px; margin: 0; }
body.search-list .prod-card__price { margin-left: auto; }

/* ---- UNIFIED CHAT INPUT (the rounded pill used by Rex + Assistant) -------- */
.uinput { display: flex; align-items: flex-end; gap: var(--sp-2); background: #fff; border: 1.5px solid var(--de-border); border-radius: 24px; box-shadow: var(--shadow-md); padding: 6px 7px; transition: border-color 0.2s, box-shadow 0.2s; }
.uinput:focus-within { border-color: var(--de-blue); box-shadow: var(--shadow-md), var(--focus-ring); }
.uinput textarea { flex: 1; border: 0; outline: 0; resize: none; background: transparent; font-family: var(--font-body); font-size: var(--fs-base); line-height: 1.5; color: var(--de-ink); min-height: 24px; max-height: 160px; padding: 9px 6px; }
.uinput textarea::placeholder { color: var(--de-muted); }
.uinput__btn { width: 40px; height: 40px; border-radius: var(--r-pill); border: none; background: #EEF2FF; color: var(--de-blue); display: grid; place-items: center; flex-shrink: 0; }
.uinput__btn:hover { background: #E0E7FF; }
.uinput__btn--send { background: var(--de-blue); color: #fff; }
.uinput__btn--send:hover { background: var(--de-blue-dark); }
.uinput__btn--send:disabled { background: var(--de-border); color: var(--de-muted); cursor: not-allowed; }

/* ---- LAYOUT HELPERS ------------------------------------------------------- */
.grid { display: grid; gap: var(--sp-3); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: repeat(2, 1fr); }
.stack { display: flex; flex-direction: column; gap: var(--sp-3); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }

/* MOBILE-FIRST scale-ups */
@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================================
   STOREFRONT CHROME — shared shell for the customer-facing pages (home, search,
   category, product). Mobile-first: single column + hamburger nav by default;
   the desktop nav and layout grids unlock at min-widths.
   ========================================================================== */

.store-container { max-width: 1280px; margin: 0 auto; padding: 0 var(--sp-4); }

/* Top utility bar */
/* New-site announcement bar — slim brand-yellow nod to the redesign, dismissible. */
.store-newsite { background: var(--de-yellow); color: var(--de-blue-deep); font-size: 13px; font-weight: 600; }
.store-newsite__inner { position: relative; display: flex; align-items: center; justify-content: center; gap: var(--sp-2); padding: 7px 32px; text-align: center; line-height: 1.3; }
.store-newsite__x { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--de-blue-deep); font-size: 20px; line-height: 1; cursor: pointer; padding: 0 6px; opacity: 0.7; }
.store-newsite__x:hover { opacity: 1; }
.store-topbar { background: var(--de-blue-deep); color: rgba(255,255,255,0.85); font-size: 12px; padding: 6px 0; border-bottom: 2px solid var(--de-yellow); }
.store-topbar .store-container { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; min-height: 26px; }
.store-topbar a { color: var(--de-yellow); font-weight: 700; }
#de-lang-select {
  appearance: none; -webkit-appearance: none;
  background: rgba(255,255,255,0.1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='rgba(255,255,255,0.6)'/%3E%3C/svg%3E") no-repeat right 6px center;
  border: 1px solid rgba(255,255,255,0.25); border-radius: 3px;
  color: rgba(255,255,255,0.9); font-size: 11px;
  padding: 3px 22px 3px 7px; cursor: pointer; white-space: nowrap;
  max-width: 130px; line-height: 1.4;
}
#de-lang-select:focus { outline: none; border-color: var(--de-yellow); }
#de-lang-select option { background: #1a2a4a; color: #fff; }

/* Header: logo + hamburger (mobile) / inline nav (desktop) */
.store-header { background: var(--de-white); border-bottom: 1px solid var(--de-border); position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow-sm); }
.store-header__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: 8px 0; }
.store-logo img { height: 44px; width: auto; display: block; }
.store-nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1.5px solid var(--de-border-strong); border-radius: var(--r-sm); background: #fff; color: var(--de-blue-deep); }
.store-nav { display: none; }
.store-nav[data-open="true"] { display: block; }
.store-nav ul { list-style: none; display: flex; flex-direction: column; padding: var(--sp-2) 0 var(--sp-3); border-top: 1px solid var(--de-border); }
.store-nav a { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-base); text-transform: uppercase; letter-spacing: 0.4px; color: var(--de-blue-deep); padding: 12px var(--sp-2); display: block; border-radius: var(--r-sm); transition: background 0.15s, color 0.15s, box-shadow 0.15s; }
.store-nav a:hover { background: var(--de-bg); color: var(--de-blue); text-decoration: none; }
/* The CURRENT page's tab: distinct from hover — held highlight + yellow keel. */
.store-nav a[aria-current="page"] { background: var(--de-bg); color: var(--de-blue-deep); box-shadow: inset 0 -3px 0 var(--de-yellow); text-decoration: none; }

@media (min-width: 900px) {
  .store-nav-toggle { display: none; }
  .store-nav { display: block !important; }
  .store-nav ul { flex-direction: row; padding: 0; border-top: none; gap: 2px; }
  .store-nav a { padding: 10px 12px; font-size: var(--fs-base); }
}

/* Header utility cluster — account + cart sit right-aligned in the bar,
   distinct from the category tabs. margin-left:auto pushes them to the right of
   the logo; on mobile the hamburger follows them. */
.store-utility { display: flex; align-items: center; gap: var(--sp-2); margin-left: auto; }
.store-account, .store-utility .store-cart-link {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; position: relative;
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-sm);
  text-transform: uppercase; letter-spacing: 0.3px; color: var(--de-blue-deep);
  padding: 8px 12px; border-radius: var(--r-sm); transition: background-color .12s, color .12s;
}
.store-utility__icon { flex: 0 0 auto; }
.store-utility .store-cart-link:hover { background: var(--de-bg); color: var(--de-blue); text-decoration: none; }
/* Signed OUT — a clear "Sign in" CTA button so it stands out top-right. */
.store-account--out { background: var(--de-blue-deep); color: #fff; }
.store-account--out:hover { background: var(--de-blue); color: #fff; text-decoration: none; }
/* Signed IN — show the name in an outlined chip so it's obvious you're logged in. */
.store-account--in { border: 1.5px solid var(--de-border-strong); }
.store-account--in:hover { background: var(--de-bg); color: var(--de-blue); text-decoration: none; }
.store-account--in .store-utility__label { display: inline-block; max-width: 14ch; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
/* Log out button beside the signed-in chip — quieter than the name so the chip
   stays the primary action, but clearly clickable. */
.store-logout-form { display: inline-flex; margin: 0; }
.store-logout {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-sm);
  text-transform: uppercase; letter-spacing: 0.3px; color: var(--de-muted);
  padding: 8px 10px; border-radius: var(--r-sm); border: 1.5px solid transparent;
  background: none; transition: background-color .12s, color .12s;
}
.store-logout:hover { background: var(--de-bg); color: var(--de-blue); }
/* Narrow screens: collapse all utility labels to icons so the bar never crowds
   the logo + hamburger. Signed-out stays a filled (blue) icon button and
   signed-in an outlined one, so the state is still readable at a glance. */
@media (max-width: 560px) {
  .store-utility__label { display: none; }
  .store-account, .store-utility .store-cart-link { padding: 8px 9px; gap: 0; }
  .store-logout { padding: 8px 7px; gap: 0; }
  .store-logo img { height: 38px; }
  .store-header__bar { gap: var(--sp-2); }
}
/* Smallest phones (~320px): squeeze the logo + hamburger a touch more so the
   logo + account + cart + menu row can't overflow. */
@media (max-width: 380px) {
  .store-logo img { height: 34px; }
  .store-nav-toggle { width: 40px; height: 40px; }
  .store-account, .store-utility .store-cart-link { padding: 8px 7px; }
}

/* Search band */
.store-search { background: var(--de-white); border-bottom: 1px solid var(--de-border); padding: var(--sp-3) 0; }
.store-search .store-container { display: flex; flex-direction: column; gap: var(--sp-2); }
.store-search .searchbar { flex: 1; }
.store-search .searchbar__field { flex: 1 1 320px; }
@media (min-width: 720px) { .store-search .store-container { flex-direction: row; align-items: stretch; } .store-search .searchbar__field { flex: 1; } }

/* Hero — mobile-first, image bg with overlay */
.store-hero { position: relative; color: #fff; padding: var(--sp-6) 0; isolation: isolate; background: var(--de-blue-deep); overflow: hidden; }
.store-hero--img { background: url('/images/home-hero01.jpg') center / cover no-repeat; }
.store-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(120deg, rgba(5,12,40,0.92) 0%, rgba(10,26,82,0.80) 55%, rgba(10,26,82,0.55) 100%); }
.store-hero__badge { display: inline-flex; align-items: center; gap: var(--sp-2); background: var(--de-yellow); color: var(--de-blue-deep); border-radius: var(--r-sm); padding: 5px 12px; font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 800; letter-spacing: 1px; text-transform: uppercase; margin-bottom: var(--sp-4); }
.store-hero__title { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 900; line-height: 0.98; margin-bottom: var(--sp-3); }
.store-hero__title em { color: var(--de-yellow); font-style: normal; }
.store-hero__sub { font-size: var(--fs-md); color: rgba(255,255,255,0.92); max-width: 560px; margin-bottom: var(--sp-5); }
.store-hero__ctas { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.store-hero__stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid rgba(255,255,255,0.25); }
.store-hero__stat-val { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 900; color: var(--de-yellow); line-height: 1; }
.store-hero__stat-lbl { font-size: var(--fs-xs); color: rgba(255,255,255,0.85); text-transform: uppercase; letter-spacing: 0.6px; margin-top: 3px; font-weight: 600; }
/* Six stats since Countries served (2026-07-22) — the column count must match
   or the last stat wraps to its own row; gap tightened so all six fit. */
@media (min-width: 720px) { .store-hero { padding: var(--sp-7) 0; } .store-hero__title { font-size: var(--fs-3xl); } .store-hero__stats { grid-template-columns: repeat(6, auto); gap: var(--sp-5); } }

/* Section wrapper + moto */
.store-section { padding: var(--sp-6) 0; }
.store-moto { font-family: 'Yellowtail', cursive; font-size: var(--fs-xl); color: var(--de-blue-deep); }
.store-moto .accent { color: var(--de-orange); }

/* Parts-finder strip (legacy "Find the Right Parts Fast") */
.parts-finder { background: var(--de-blue-deep); color: #fff; border-radius: var(--r-lg); padding: var(--sp-5); }
.parts-finder__steps { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); margin-top: var(--sp-4); }
.parts-finder__step { display: flex; align-items: flex-start; gap: var(--sp-3); }
.parts-finder__num { flex-shrink: 0; width: 30px; height: 30px; border-radius: var(--r-pill); background: var(--de-yellow); color: var(--de-blue-deep); font-family: var(--font-display); font-weight: 900; display: grid; place-items: center; }
.parts-finder__step b { display: block; }
.parts-finder__step span { font-size: var(--fs-sm); color: rgba(255,255,255,0.75); }
@media (min-width: 720px) { .parts-finder__steps { grid-template-columns: repeat(4, 1fr); } }

/* Flyer grid */
.flyer-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); align-items: start; }
.flyer-card { display: block; border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-md); border: 1px solid var(--de-border); background: #fff; transition: transform 0.2s, box-shadow 0.2s; aspect-ratio: 16 / 10; }
.flyer-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
/* fill (not contain/cover): the flyer artwork comes in mixed aspect ratios, and
   per Mark stretching to the tile beats letterboxing or cropping. */
.flyer-card img { width: 100%; height: 100%; object-fit: fill; display: block; }
.flyer-card--dark { background: #0e1320; }
@media (min-width: 720px) { .flyer-grid { grid-template-columns: repeat(2, 1fr); } }

/* Rex panel (embedded, responsive — full width on mobile, framed card) */
.rex-embed { background: #0a1520; border: 1px solid #1e3048; border-radius: var(--r-lg); overflow: hidden; }
.rex-embed__hdr { background: linear-gradient(160deg, #0c1c2c, #0a1520); border-bottom: 2.5px solid var(--de-yellow); padding: var(--sp-3) var(--sp-4); display: flex; align-items: center; gap: var(--sp-3); }
.rex-embed__name { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 900; color: #fff; }
.rex-embed__sub { font-size: 10px; color: var(--de-yellow); font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
.rex-embed iframe { width: 100%; height: 440px; border: 0; display: block; background: #0a1520; }

/* Footer */
.store-footer { background: var(--de-blue-deep); color: rgba(255,255,255,0.85); border-top: 4px solid var(--de-yellow); padding: var(--sp-6) 0 var(--sp-4); }
.store-footer__grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-5); margin-bottom: var(--sp-5); }
.store-footer__col-title { font-family: var(--font-display); font-size: var(--fs-sm); font-weight: 800; color: var(--de-yellow); letter-spacing: 1px; text-transform: uppercase; margin-bottom: var(--sp-3); }
.store-footer a { color: rgba(255,255,255,0.78); display: block; margin-bottom: var(--sp-2); }
.store-footer a:hover { color: var(--de-yellow); }
.store-footer__bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: var(--sp-3); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-2); font-size: var(--fs-xs); color: rgba(255,255,255,0.6); }
/* The footer-wide `display:block` above is for the column link-lists; the bottom
   legal bar is an inline `Privacy · Terms · Cookies · Do-Not-Sell` row, so keep
   those anchors inline — otherwise they stack and strand the `·` separators
   on their own lines (the "weird period formatting" Matt flagged). */
.store-footer__bottom a { display: inline; margin-bottom: 0; }
@media (min-width: 720px) { .store-footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

/* ============================================================================
   PRODUCT PAGE — detail layout (gallery + buy box), breadcrumb, talk-to-Rex CTA
   ========================================================================== */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--de-muted); padding: var(--sp-4) 0 0; }
.breadcrumb a { color: var(--de-ink-soft); }
.breadcrumb a:hover { color: var(--de-blue); }
.breadcrumb__sep { color: var(--de-border-strong); }

/* Amazon-style split: image left (a fixed, modest column), details right. The
   gallery is capped so a small catalog photo (many are only ~250px) never
   balloons into a page-dominating white box. Splits early (760px) so laptops
   and larger-text setups still get side-by-side rather than a giant stack. */
.product-layout { display: grid; grid-template-columns: 1fr; gap: var(--sp-5); align-items: start; }
@media (min-width: 760px) { .product-layout { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); } }

.product-gallery { background: #fff; border: 1px solid var(--de-border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center; aspect-ratio: 1/1; width: 100%; max-width: 360px; margin-inline: auto; overflow: hidden; padding: var(--sp-4); }
@media (min-width: 760px) { .product-gallery { max-width: none; margin-inline: 0; } }
.product-gallery img { max-width: 100%; max-height: 100%; object-fit: contain; }
.product-gallery__empty { color: var(--de-muted); font-size: var(--fs-sm); }

.product-brand { font-size: var(--fs-sm); color: var(--de-blue); font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.product-title { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 900; color: var(--de-ink); line-height: 1.05; margin: var(--sp-1) 0 var(--sp-3); }
.product-specs { display: flex; flex-direction: column; gap: 2px; margin-bottom: var(--sp-4); }
.product-specs .row { display: flex; gap: var(--sp-2); font-size: var(--fs-sm); }
.product-specs .row dt { color: var(--de-muted); min-width: 96px; }
.product-specs .row dd { color: var(--de-ink); font-weight: 600; }
.product-specs .row dd.mono { font-family: ui-monospace, Menlo, monospace; }

.product-price { display: flex; align-items: baseline; gap: var(--sp-2); margin: var(--sp-4) 0; }
.product-price__now { font-family: var(--font-display); font-size: var(--fs-3xl); font-weight: 900; color: var(--de-blue-deep); line-height: 1; }
.product-price__list { font-size: var(--fs-md); color: var(--de-muted); text-decoration: line-through; }

.product-ctas { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: var(--sp-4) 0; }
.product-trust { display: flex; flex-wrap: wrap; gap: var(--sp-3); font-size: var(--fs-sm); color: var(--de-ink-soft); margin-top: var(--sp-3); }
.product-trust span { display: inline-flex; align-items: center; gap: 6px; }
.product-trust svg { color: var(--de-success); }

.product-section { margin-top: var(--sp-5); }
.product-section h2 { font-family: var(--font-display); font-size: var(--fs-lg); color: var(--de-blue-deep); text-transform: uppercase; margin-bottom: var(--sp-2); }
.product-section .body { color: var(--de-ink-soft); white-space: pre-line; }

/* ============================================================================
   REX — mascot visual identity. One reusable "zoomed into Rex's face" crop of
   rex-idle.png (his head is upper-right of the source image). Tune the crop ONCE
   via these vars and the CTA background, the floating pill, and every avatar
   inherit it — that's the Rex design system.
   ========================================================================== */
:root {
  --rex-face-img:  url('/rex/images/rex-idle.png');
  --rex-face-zoom: 300%;   /* how far to zoom into the face */
  --rex-face-x:    78%;    /* horizontal focus — toward his head (right) */
  --rex-face-y:    19%;    /* vertical focus — eyes/nose (upper) */
}
/* Circular avatar — slide-over header, message bubbles, anywhere a Rex face fits */
.rex-avatar {
  width: var(--rex-avatar-size, 40px); height: var(--rex-avatar-size, 40px);
  border-radius: 50%; flex-shrink: 0; border: 1.5px solid var(--de-yellow);
  background-color: #14283e; background-image: var(--rex-face-img);
  background-repeat: no-repeat; background-size: var(--rex-face-zoom);
  background-position: var(--rex-face-x) var(--rex-face-y);
}

/* Talk-to-Rex CTA — his big face fills the card behind the text. */
.rex-cta {
  position: relative; overflow: hidden; border-radius: var(--r-lg);
  border: 1px solid #1e3048; padding: var(--sp-6) var(--sp-5); color: #fff;
  display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; min-height: 150px;
  background-color: var(--de-blue-deep); background-image: var(--rex-face-img);
  /* Height-based zoom (the card is wide, not square) so the face scales to the
     card height and sits on the right behind the button. */
  background-repeat: no-repeat; background-size: auto 460%; background-position: 74% 23%;
}
/* Darken the left so the text stays legible over the face. */
.rex-cta::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,16,40,0.95) 0%, rgba(8,16,40,0.85) 38%, rgba(8,16,40,0.30) 100%); }
.rex-cta > * { position: relative; z-index: 1; }
.rex-cta__text { flex: 1; min-width: 220px; }
.rex-cta__title { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 900; }
.rex-cta__sub { font-size: var(--fs-sm); color: rgba(255,255,255,0.82); max-width: 480px; }

/* Highlighted search terms + a dependency-free spinner */
mark { background: var(--de-yellow-soft); color: inherit; padding: 0 2px; border-radius: 2px; }
.de-spinner { display: inline-block; width: 18px; height: 18px; border: 2.5px solid var(--de-border); border-top-color: var(--de-blue); border-radius: 50%; animation: de-spin 0.7s linear infinite; }
@keyframes de-spin { to { transform: rotate(360deg); } }

/* ===================================================================
   Master–detail — a list on the left, detail on the right. On wide
   screens both panes show side by side. On narrow screens (phone
   portrait) the list is full-width and tapping an item slides the
   detail in from the right like the "Ask Rex" panel, with a Back
   button to return. Behaviour is wired by /js/master-detail.js
   (auto-inits any [data-master-detail]).

   Markup:
     .md[data-master-detail]
       .md__list            ← the list/table of items
       .md__detail          ← the detail pane (gets the slide-over on mobile)
         .md__detail-bar     ← mobile-only header w/ a [data-md-back] button
   Open an item by giving its row/link  data-md-open  (or call the
   element's .__mdOpen()). --md-break sets the breakpoint (default 820px).
   =================================================================== */
.md { display: grid; grid-template-columns: var(--md-list-w, minmax(320px, 1fr)) var(--md-detail-w, 1.5fr); gap: var(--sp-3); align-items: start; }
.md__list { min-width: 0; }
.md__detail { min-width: 0; }
.md__detail-bar { display: none; }            /* desktop: no mobile header */
.md__backdrop { display: none; }

@media (max-width: 820px) {
  .md { grid-template-columns: 1fr; }
  /* Detail becomes a full-screen slide-over, same motion as the Rex panel. */
  .md__detail {
    position: fixed; inset: 0; z-index: 2147483200;
    background: #fff;
    transform: translateX(100%);
    transition: transform 240ms cubic-bezier(.2,.7,.2,1);
    display: flex; flex-direction: column;
    box-shadow: -12px 0 30px rgba(0,0,0,0.25);
    overflow: hidden;
  }
  .md.is-detail-open .md__detail { transform: translateX(0); }
  /* Sticky mobile header with the Back affordance. */
  .md__detail-bar {
    display: flex; align-items: center; gap: var(--sp-2);
    padding: 10px 12px; flex-shrink: 0;
    background: var(--de-blue-deep); color: #fff;
    border-bottom: 3px solid var(--de-yellow);
  }
  .md__detail-bar .md__back {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.12); color: #fff;
    border: 1px solid rgba(255,255,255,0.25); border-radius: var(--r-pill);
    font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.03em; font-size: var(--fs-sm); padding: 6px 12px; cursor: pointer;
  }
  .md__detail-bar .md__back:active { background: rgba(255,255,255,0.22); }
  .md__detail-bar .md__title { font-size: var(--fs-sm); color: rgba(255,255,255,0.9); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* The detail body scrolls under the sticky bar. */
  .md__detail > .md__detail-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
}

/* Nav cart link + count badge (storefront) */
.store-cart-link { display: inline-flex; align-items: center; gap: 4px; position: relative; }
.store-cart-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; background: var(--de-yellow); color: var(--de-blue-deep); border-radius: 999px; font-family: var(--font-display); font-weight: 800; font-size: 11px; line-height: 1; }
/* Product page add-to-cart row */
.product-addcart { display: inline-flex; align-items: stretch; gap: 8px; }
.product-addcart__qty { width: 64px; text-align: center; border: 1.5px solid var(--de-border); border-radius: var(--r-md); font-size: var(--fs-base); padding: 8px; }

/* Legal / content pages (privacy, terms) */
.legal { max-width: 820px; margin: 0 auto; padding: var(--sp-5) 0 var(--sp-8); }
.legal__title { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 900; color: var(--de-blue-deep); text-transform: uppercase; line-height: 1.05; margin: 0 0 var(--sp-2); }
.legal__updated { color: var(--de-muted); font-size: var(--fs-sm); margin: 0 0 var(--sp-5); }
.legal h2 { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 800; color: var(--de-blue-deep); text-transform: uppercase; margin: var(--sp-5) 0 var(--sp-2); }
.legal p, .legal li { color: var(--de-ink-soft); font-size: var(--fs-base); line-height: 1.65; }
.legal p { margin: 0 0 var(--sp-3); }
.legal ul { margin: 0 0 var(--sp-3) var(--sp-5); }
.legal li { margin-bottom: var(--sp-1); }
.legal strong { color: var(--de-ink); }
.legal a { color: var(--de-blue); text-decoration: underline; }
.legal__intro { background: #fff; border: 1px solid var(--de-border); border-left: 4px solid var(--de-blue); border-radius: var(--r-md); padding: var(--sp-4); margin-bottom: var(--sp-4); }
