/* Farmers Trading Center storefront.
   Look: a hardware yard. Galvanized steel surfaces, ink-navy signage type, safety-yellow shelf labels for prices,
   logo red only for the one main action on screen. The memorable piece is the pegboard in the hero. */

@font-face{font-family:'Barlow Condensed';font-style:normal;font-weight:700;font-display:swap;src:url(/fonts/barlow-condensed-latin-700-normal.woff2) format('woff2')}
@font-face{font-family:'Barlow Condensed';font-style:normal;font-weight:800;font-display:swap;src:url(/fonts/barlow-condensed-latin-800-normal.woff2) format('woff2')}
@font-face{font-family:'Source Sans 3';font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/source-sans-3-latin-400-normal.woff2) format('woff2')}
@font-face{font-family:'Source Sans 3';font-style:normal;font-weight:600;font-display:swap;src:url(/fonts/source-sans-3-latin-600-normal.woff2) format('woff2')}
@font-face{font-family:'Source Sans 3';font-style:normal;font-weight:700;font-display:swap;src:url(/fonts/source-sans-3-latin-700-normal.woff2) format('woff2')}

:root {
  --galv: #e3e7ea;        /* page */
  --galv-deep: #cfd6db;   /* pegboard, image wells */
  --paper: #fbfbf9;       /* cards, dialogs */
  --ink: #12263f;         /* text, header */
  --ink-soft: #3e5068;
  --muted: #5b6878;
  --line: #c3cbd2;
  --yellow: #f2c230;      /* price labels */
  --yellow-deep: #d9a913;
  --red: #d7192d;         /* the main action */
  --red-deep: #b01223;
  --green: #2f6b3a;       /* in stock */
  --amber: #8a5a00;       /* low stock text */
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-card: 8px;
  --r-dialog: 14px;
  --focus: 0 0 0 3px var(--paper), 0 0 0 6px var(--ink);
  --shell: min(1240px, 100% - 2.5rem);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 9rem; }
body { margin: 0; background: var(--galv); color: var(--ink); font: 400 1rem/1.55 var(--body); }
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.02; margin: 0; letter-spacing: -0.005em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.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; }
.shell { width: var(--shell); margin-inline: auto; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: #fff; padding: .7rem 1rem; border-radius: 6px; text-decoration: none; }
.skip:focus { top: 1rem; }

/* ---------- buttons ---------- */
.primary-button, .secondary-button, .ghost-button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; padding: .65rem 1.2rem;
  border-radius: 6px; font-weight: 700; text-decoration: none; border: 2px solid transparent; transition: background-color .15s, border-color .15s, color .15s;
}
.primary-button { background: var(--red); color: #fff; }
.primary-button:hover { background: var(--red-deep); }
.primary-button:disabled { background: #9aa4ae; cursor: not-allowed; }
.secondary-button { background: var(--paper); border-color: var(--ink); color: var(--ink); }
.secondary-button:hover { background: var(--ink); color: #fff; }
.ghost-button { border-color: currentColor; color: var(--ink); background: transparent; }
.ghost-button:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.text-button { background: none; border: 0; padding: .25rem; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.icon-button { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--galv); font-size: 1.6rem; line-height: 1; }
.icon-button:hover { background: var(--galv-deep); }
.load-more { display: block; margin: 2rem auto 0; min-height: 46px; padding: .6rem 1.4rem; border: 2px solid var(--ink); border-radius: 6px; background: transparent; font-weight: 700; }
.load-more:hover { background: var(--ink); color: #fff; }
.count { display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.6rem; padding: 0 .4rem; border-radius: 999px; background: var(--yellow); color: var(--ink); font-size: .85rem; font-weight: 700; }

/* ---------- top line + header ---------- */
.topline { background: var(--ink); color: #dfe6ee; font-size: .88rem; }
.topline-inner { display: flex; align-items: center; gap: 1.25rem; min-height: 38px; flex-wrap: wrap; }
.topline-facts { display: flex; gap: 1.25rem; margin-inline-start: auto; }
.topline-phone a { color: #fff; }
.topline-links { display: flex; gap: .5rem; }
.topline-button { display: inline-flex; align-items: center; gap: .35rem; background: none; border: 1px solid #50627a; color: #fff; border-radius: 999px; padding: .15rem .7rem; font-size: .85rem; }
.topline-button svg { width: 14px; height: 14px; fill: currentColor; }
.topline-button:hover { background: #24406a; }

.site-header { position: sticky; top: 0; z-index: 30; background: var(--paper); border-block-end: 1px solid var(--line); }
.header-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.5rem; padding-block: .75rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand-logo { width: 56px; height: auto; }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 1.15rem; line-height: .95; }
.header-search { position: relative; display: flex; align-items: center; max-width: 640px; width: 100%; }
.header-search > svg, .big-search > svg { position: absolute; left: .9rem; width: 20px; height: 20px; fill: none; stroke: var(--ink-soft); stroke-width: 2; pointer-events: none; }
.header-search input { width: 100%; min-height: 48px; padding: .6rem 4.5rem .6rem 2.8rem; border: 2px solid var(--line); border-radius: 8px; background: #fff; }
.header-search input:focus { border-color: var(--ink); outline: none; box-shadow: var(--focus); }
.header-search kbd { position: absolute; right: .8rem; padding: 0 .45rem; border: 1px solid var(--line); border-radius: 4px; font-size: .8rem; color: var(--muted); background: var(--galv); }
.search-clear { position: absolute; right: 2.6rem; width: 32px; height: 32px; border: 0; background: none; font-size: 1.3rem; color: var(--muted); }
.search-suggestions { position: absolute; inset: calc(100% + 6px) 0 auto; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 18px 40px rgb(18 38 63 / .18); padding: .4rem; z-index: 40; }
.suggestion-heading { padding: .4rem .6rem; font-size: .85rem; color: var(--muted); }
.suggestion-product { display: grid; grid-template-columns: 44px 1fr; gap: .7rem; align-items: center; width: 100%; padding: .45rem .6rem; border: 0; border-radius: 6px; background: none; text-align: start; }
.suggestion-product:hover, .suggestion-product:focus-visible { background: var(--galv); }
.suggestion-image { width: 44px; height: 44px; border-radius: 6px; background: var(--galv); overflow: hidden; }
.suggestion-image img { width: 100%; height: 100%; object-fit: contain; }
.suggestion-copy { display: grid; }
.suggestion-copy small { color: var(--muted); }
.suggestion-view { width: 100%; margin-top: .25rem; padding: .6rem; border: 0; border-top: 1px solid var(--line); background: none; font-weight: 700; text-align: start; }
.cart-trigger { display: inline-flex; align-items: center; gap: .6rem; min-height: 48px; padding: .4rem 1rem; border: 0; border-radius: 8px; background: var(--ink); color: #fff; font-weight: 700; }
.cart-trigger svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.cart-trigger:hover { background: #24406a; }
@media (prefers-reduced-motion: no-preference) { .cart-trigger.basket-bump .count { animation: bump .4s ease-out; } }
@keyframes bump { 40% { scale: 1.35; } }

.views { border-block-start: 1px solid var(--line); }
.views-inner { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; }
.views a { position: relative; flex: none; padding: .7rem 1rem; text-decoration: none; font-weight: 700; color: var(--ink-soft); }
.views a:hover { color: var(--ink); }
.views a[aria-current="page"] { color: var(--ink); }
.views .external-view { display: inline-flex; align-items: center; gap: .35rem; margin-inline-start: auto; }
.views .external-view svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.views a[aria-current="page"]::after { content: ""; position: absolute; inset: auto .6rem 0; border-block-end: 4px solid var(--yellow-deep); }

/* ---------- view switching ---------- */
.view:focus { outline: none; }
main { view-transition-name: main-view; }
::view-transition-old(main-view), ::view-transition-new(main-view) { animation-duration: .28s; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------- the yard (hero) ---------- */
.yard { background: var(--paper); border-block-end: 1px solid var(--line); overflow: clip; }
.yard-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 2.5rem; align-items: center; padding-block: 2.5rem 2.75rem; }
.yard-copy h1 { font-size: clamp(2.6rem, 5.2vw, 4.6rem); max-width: 15ch; text-wrap: balance; }
.yard-copy h1:focus { outline: none; }
.yard-copy p { margin-top: 1rem; font-size: 1.2rem; max-width: 34ch; color: var(--ink-soft); }
.yard-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }

.pegboard {
  position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: .25rem 1rem; padding: 1.4rem 1.25rem 1rem;
  border-radius: 10px; background-color: var(--galv-deep);
  background-image: radial-gradient(circle at center, #9eabb6 0 2.6px, transparent 3px);
  background-size: 26px 26px; background-position: 13px 13px;
  box-shadow: inset 0 0 0 1px #b4bfc8, inset 0 -10px 24px rgb(18 38 63 / .08);
}
.tool { position: relative; display: grid; justify-items: center; gap: .4rem; padding: 1.4rem .25rem .6rem; border: 0; background: none; transform-origin: 50% 0; }
.tool::before { /* the peg hook */
  content: ""; position: absolute; top: .35rem; left: 50%; width: 22px; height: 12px; translate: -50% 0;
  border: 3px solid #4f5d6a; border-top: 0; border-radius: 0 0 12px 12px;
}
.tool svg { width: auto; height: clamp(96px, 11vw, 140px); }
.tool .ink { fill: var(--ink); }
.tool .accent { fill: var(--yellow); }
.tool .steel { fill: #8d9aa6; }
.tool .wood { fill: #a86f3c; }
.hero-product-label { font-family: var(--display); font-weight: 700; font-size: 1.05rem; line-height: 1.05; color: var(--ink); padding: .1rem .45rem; border-radius: 3px; background: var(--paper); box-shadow: 0 1px 0 #b4bfc8; text-align: center; }
.tool:hover .hero-product-label, .tool:focus-visible .hero-product-label { background: var(--yellow); }
.tool:disabled { cursor: default; opacity: .55; }

@media (prefers-reduced-motion: no-preference) {
  /* One orchestrated moment: the tools drop onto their hooks, one after another, and settle. */
  .tool { animation: hang .9s cubic-bezier(.2,.75,.25,1) both; animation-delay: calc(.12s + var(--i) * .09s); }
  .tool:hover, .tool:focus-visible { animation: sway 1.1s ease-in-out both; }
  .tool-bulb .glow { animation: glow 1.4s ease-out 1.1s both; }
  body.motion-paused .tool, body.motion-paused .tool .glow { animation: none; }
}
@keyframes hang {
  0% { translate: 0 -160px; rotate: -16deg; opacity: 0; }
  45% { opacity: 1; }
  60% { translate: 0 6px; rotate: 7deg; }
  78% { translate: 0 -2px; rotate: -3deg; }
  100% { translate: 0 0; rotate: 0deg; }
}
@keyframes sway {
  0% { rotate: 0deg; } 20% { rotate: 7deg; } 45% { rotate: -5deg; } 70% { rotate: 2.5deg; } 100% { rotate: 0deg; }
}
@keyframes glow { 0%, 100% { fill: var(--yellow); } 30% { fill: #fff4bf; } }

/* ---------- departments ---------- */
.aisle { padding-block: 1.25rem .25rem; }
.department-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: .75rem; overflow-x: auto; padding-block-end: .5rem; scroll-snap-type: inline proximity; }
.department-shortcut { scroll-snap-align: start; display: grid; grid-template-columns: 52px 1fr; grid-template-rows: auto auto; column-gap: .7rem; align-items: center; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--paper); text-align: start; }
.department-shortcut:hover { border-color: var(--ink); }
.department-shortcut[aria-current="true"] { border-color: var(--ink); box-shadow: inset 0 -4px 0 var(--yellow-deep); }
.department-photo { grid-row: span 2; width: 52px; height: 44px; border-radius: 6px; background: var(--galv); overflow: hidden; }
.department-photo img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.department-shortcut strong { font-family: var(--display); font-size: 1.1rem; line-height: 1; }
.department-shortcut small { color: var(--muted); }
.department-shortcut:disabled { opacity: .5; cursor: default; }

/* ---------- catalog layout ---------- */
.catalog { padding-block: 1.25rem 2.5rem; }
.layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 2rem; align-items: start; }
.sidebar { position: sticky; top: 9.5rem; display: grid; gap: 1rem; }
.filter-head { display: flex; align-items: center; justify-content: space-between; }
.filter-head h2 { font-size: 1.5rem; }
.filter-body { display: grid; gap: 1.25rem; }
.side-group { border: 0; padding: 0; margin: 0; display: grid; gap: .5rem; }
.side-group legend { font-weight: 700; margin-block-end: .35rem; }
.department-select { display: none; }
.department-list { display: grid; gap: 2px; }
.department-option { display: flex; justify-content: space-between; gap: .5rem; width: 100%; padding: .45rem .6rem; border: 0; border-radius: 6px; background: none; text-align: start; }
.department-option small { color: var(--muted); font-variant-numeric: tabular-nums; }
.department-option:hover { background: var(--paper); }
.department-option[aria-pressed="true"] { background: var(--ink); color: #fff; }
.department-option[aria-pressed="true"] small { color: #c9d4e0; }
.toggle { display: flex; align-items: center; gap: .6rem; font-weight: 600; cursor: pointer; }
.toggle input { width: 20px; height: 20px; accent-color: var(--ink); }
.side-note { padding: 1rem; border-radius: var(--r-card); background: var(--paper); border: 1px solid var(--line); display: grid; gap: .35rem; font-size: .95rem; }
.side-note a { font-weight: 700; word-break: break-all; }
.mobile-only, .mobile-sort { display: none; }

.results-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.results-head h2 { font-size: 2.2rem; }
.sync-label { color: var(--muted); font-size: .95rem; margin-top: .2rem; }
.sort { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
select { min-height: 44px; padding: .4rem 2rem .4rem .7rem; border: 2px solid var(--line); border-radius: 6px; background: #fff; }
select:focus { border-color: var(--ink); outline: none; box-shadow: var(--focus); }
.sync-warning { margin-top: 1rem; padding: .85rem 1rem; border-radius: var(--r-card); background: #fff3cd; border: 2px solid var(--yellow-deep); font-weight: 600; }
.results-bar { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; margin-block: 1rem; }
#resultCount { font-weight: 600; }
.active-filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.filter-chip { display: inline-flex; align-items: center; gap: .4rem; min-height: 34px; padding: .2rem .75rem; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; }
.notice { margin-block-end: 1rem; padding: .7rem 1rem; border-radius: var(--r-card); background: var(--paper); border-inline-start: 4px solid var(--green); }

/* ---------- product cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.product-card { display: flex; flex-direction: column; background: var(--paper); border-radius: var(--r-card); border: 1px solid var(--line); overflow: hidden; }
.product-card:hover { border-color: #9aa8b4; }
.product-picture { position: relative; display: grid; place-items: center; aspect-ratio: 1; width: 100%; padding: 0; border: 0; background: #fff; }
.product-picture img { width: 100%; height: 100%; object-fit: contain; padding: .75rem; }
.no-image { display: grid; place-items: center; width: 100%; height: 100%; background: var(--galv); }
.no-image svg { width: 40px; height: 40px; fill: none; stroke: #9aa8b4; stroke-width: 1.6; }
.product-body { display: flex; flex-direction: column; gap: .35rem; padding: .8rem .9rem 0; flex: 1; }
.product-category { font-size: .85rem; color: var(--muted); }
.product-title { padding: 0; border: 0; background: none; text-align: start; font-weight: 700; font-size: 1.02rem; line-height: 1.25; }
.product-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.product-code { display: flex; flex-wrap: wrap; gap: .15rem .8rem; font-size: .82rem; color: var(--muted); }
.product-meta { display: flex; flex-wrap: wrap; gap: .3rem .6rem; align-items: center; margin-top: auto; padding-block-start: .3rem; font-size: .88rem; }
.product-stock { color: var(--muted); }
.stock-badge { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; color: var(--green); }
.stock-badge::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.stock-badge.low { color: var(--amber); }
.stock-badge.ask { color: var(--muted); }
/* Shelf-edge label: the price sits on a yellow strip, like the label on a store shelf. */
.price-strip { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-inline: -.9rem; margin-top: .35rem; padding: .45rem .9rem; background: var(--yellow); border-block: 1px solid var(--yellow-deep); }
.price-strip.unpriced { background: var(--galv); border-color: var(--line); }
.product-price { font-family: var(--display); font-weight: 800; font-size: 1.55rem; line-height: 1; font-variant-numeric: tabular-nums; }
.product-price { white-space: nowrap; }
.product-price small { font-family: var(--body); font-size: .75rem; font-weight: 700; margin-inline-end: .25rem; }
.price-strip.unpriced .product-price { font-size: 1.1rem; }
.part-flag { font-size: .8rem; font-weight: 700; color: var(--ink); }
.add-button { margin: .75rem .9rem .9rem; min-height: 42px; border: 2px solid var(--ink); border-radius: 6px; background: transparent; font-weight: 700; }
.add-button:hover { background: var(--ink); color: #fff; }
.in-basket { margin: -.4rem .9rem .8rem; font-size: .85rem; font-weight: 600; color: var(--green); }
.skeleton { aspect-ratio: .68; border-radius: var(--r-card); background: linear-gradient(100deg, var(--paper) 30%, #f0f2f3 50%, var(--paper) 70%) 0 0 / 300% 100%; }
@media (prefers-reduced-motion: no-preference) { .skeleton { animation: shimmer 1.4s linear infinite; } }
@keyframes shimmer { to { background-position: -150% 0; } }
.empty-state { grid-column: 1 / -1; display: grid; justify-items: start; gap: .5rem; padding: 2rem; border-radius: var(--r-card); background: var(--paper); border: 1px dashed var(--line); }
.empty-state strong { font-family: var(--display); font-size: 1.5rem; }

/* ---------- promotions ---------- */
.promotions { display: grid; gap: 1rem; padding-block: 1rem; }
.promotion-card { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); background: var(--ink); color: #fff; border-radius: var(--r-card); overflow: hidden; }
.promotion-image { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 2 / 1; }
.promotion-copy { display: grid; align-content: center; gap: .5rem; padding: 1.5rem; }
.promotion-copy .overline { font-size: .85rem; color: var(--yellow); font-weight: 700; }
.promotion-copy h2 { font-size: 2rem; color: #fff; }
.promotion-link { justify-self: start; color: var(--ink); background: var(--yellow); padding: .5rem 1rem; border-radius: 6px; font-weight: 700; text-decoration: none; }
.sidebar-promotions .promotion-card { grid-template-columns: 1fr; }
.promo-viewport { overflow: hidden; border-radius: var(--r-card); }
.promo-container { display: flex; }
.promo-slide { flex: 0 0 100%; min-width: 0; }
.promo-controls { display: flex; gap: .5rem; justify-content: flex-end; margin-top: .5rem; }
.promo-controls button { min-width: 44px; min-height: 40px; border: 2px solid var(--ink); border-radius: 6px; background: var(--paper); font-weight: 700; }

/* ---------- how it works ---------- */
.how-it-works { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 2rem; padding-block: 3rem; border-block-start: 1px solid var(--line); }
.how-intro h2 { font-size: 2.2rem; }
.how-intro p { margin-top: .6rem; color: var(--ink-soft); max-width: 40ch; }
.how-it-works ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.how-it-works li { display: grid; grid-template-columns: 52px 1fr; gap: 1rem; align-items: start; }
.how-it-works li > span { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: var(--yellow); font-family: var(--display); font-weight: 800; font-size: 1.6rem; }
.how-it-works li strong { font-size: 1.1rem; }
.how-it-works li p { color: var(--ink-soft); }

/* ---------- view heads (spare parts) ---------- */
.view-head { padding-block: 2.25rem 1.25rem; display: grid; gap: .6rem; }
.view-head h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
.view-head h1:focus { outline: none; }
.view-head > p { font-size: 1.1rem; color: var(--ink-soft); max-width: 60ch; }
.big-search { position: relative; display: flex; align-items: center; max-width: 720px; margin-top: .5rem; }
.big-search input { width: 100%; min-height: 56px; padding: .7rem 1rem .7rem 2.9rem; border: 2px solid var(--ink); border-radius: 10px; background: #fff; font-size: 1.1rem; }
.big-search input:focus { outline: none; box-shadow: var(--focus); }

/* ---------- spare parts ---------- */
.parts-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 1.5rem; align-items: start; padding-block-end: 3rem; }
.part-list { display: grid; gap: .5rem; }
.part-row { display: grid; grid-template-columns: 64px 1fr auto; gap: .9rem; align-items: center; width: 100%; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--paper); text-align: start; }
.part-row:hover { border-color: var(--ink); }
.part-row[aria-current="true"] { border-color: var(--ink); box-shadow: inset 4px 0 0 var(--yellow-deep); }
.part-thumb { width: 64px; height: 64px; border-radius: 6px; background: #fff; overflow: hidden; display: grid; place-items: center; }
.part-thumb img { width: 100%; height: 100%; object-fit: contain; }
.part-row strong { display: block; line-height: 1.2; }
.part-row small { color: var(--muted); }
.part-row .row-price { font-family: var(--display); font-weight: 800; font-size: 1.25rem; white-space: nowrap; }
.part-detail { position: sticky; top: 9.5rem; padding: 1.5rem; border-radius: var(--r-card); background: var(--paper); border: 1px solid var(--line); min-height: 240px; }
.part-detail:focus { outline: none; }
.part-detail h2 { font-size: 2rem; }
.part-detail .price-strip { margin-inline: -1.5rem; padding-inline: 1.5rem; margin-block: 1rem; }
.fits-list { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .4rem; }
.fits-list button { display: grid; grid-template-columns: 44px 1fr; gap: .7rem; align-items: center; width: 100%; padding: .4rem .5rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; text-align: start; }
.fits-list button:hover { border-color: var(--ink); }
.fits-list img, .fits-list .no-image { width: 44px; height: 44px; object-fit: contain; border-radius: 4px; }
.detail-section-title { font-family: var(--display); font-size: 1.3rem; margin-top: 1.25rem; }

/* ---------- store info + footer ---------- */
.store-information { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; padding-block: 3rem; border-block-start: 1px solid var(--line); }
.store-photo { margin: 0; min-height: 260px; display: grid; place-items: center; border-radius: var(--r-card); background: var(--galv-deep); overflow: hidden; color: var(--muted); }
.store-photo img { width: 100%; height: 100%; object-fit: cover; }
.visit-copy h2 { font-size: 2.2rem; }
.visit-facts { display: grid; gap: .75rem; margin: 1.25rem 0; }
.visit-facts div { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; }
.visit-facts dt { font-weight: 700; }
.visit-facts dd { margin: 0; }
.map-link { display: inline-flex; min-height: 44px; align-items: center; font-weight: 700; }
#siteFaqs details { border-block-start: 1px solid var(--line); padding-block: .7rem; }
#siteFaqs summary { font-weight: 700; cursor: pointer; }
.footer { background: var(--ink); color: #dfe6ee; padding-block: 2.5rem 6rem; }
.footer-inner { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; }
.footer h3 { font-size: 1.3rem; color: #fff; margin-block-end: .5rem; }
.footer a { color: #fff; }
.footer-brand { display: grid; gap: .4rem; justify-items: start; }
.footer-logo { width: 70px; background: #fff; border-radius: 6px; padding: 4px; }
.footer-links { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }

/* ---------- dialogs ---------- */
.dialog { width: min(560px, calc(100% - 1.5rem)); max-height: calc(100dvh - 2rem); padding: 1.25rem 1.5rem 1.5rem; border: 0; border-radius: var(--r-dialog); background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px rgb(18 38 63 / .35); }
dialog:modal { overscroll-behavior: contain; }
.dialog::backdrop { background: rgb(18 38 63 / .55); overflow: hidden; overscroll-behavior: contain; }
@media (prefers-reduced-motion: no-preference) {
  .dialog { opacity: 0; translate: 0 18px; transition: opacity .2s ease-out, translate .25s cubic-bezier(.2,.8,.2,1), display .25s allow-discrete, overlay .25s allow-discrete; }
  .dialog[open] { opacity: 1; translate: 0 0; }
  @starting-style { .dialog[open] { opacity: 0; translate: 0 18px; } }
}
.dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-block-end: .75rem; }
.dialog-top h2 { font-size: 1.8rem; }
.dialog-kicker { font-weight: 700; color: var(--muted); }
.dialog-intro { color: var(--ink-soft); margin-block-end: 1rem; }
.product-dialog { width: min(1080px, calc(100% - 1.5rem)); }
.item-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.5rem; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1.25rem; align-items: start; }
.detail-image { aspect-ratio: 1; display: grid; place-items: center; background: #fff; border-radius: var(--r-card); border: 1px solid var(--line); overflow: hidden; }
.detail-image img { width: 100%; height: 100%; object-fit: contain; padding: 1rem; }
.detail { display: grid; gap: .55rem; align-content: start; }
.detail h1 { font-size: 2rem; }
.detail .price-strip { margin: .25rem 0; border-radius: 6px; border: 1px solid var(--yellow-deep); }
.detail-stock { display: grid; gap: .1rem; font-weight: 600; }
.detail-stock small { font-weight: 400; color: var(--muted); }
.detail-qty { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: .25rem; }
.detail-qty label { display: grid; gap: .25rem; font-weight: 600; font-size: .9rem; }
.detail-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .35rem; }
input[type="number"], .form-row input, .form-row textarea { width: 100%; min-height: 46px; padding: .55rem .7rem; border: 2px solid var(--line); border-radius: 6px; background: #fff; }
input[type="number"]:focus, .form-row input:focus, .form-row textarea:focus { border-color: var(--ink); outline: none; box-shadow: var(--focus); }
.parts-aside { border-inline-start: 1px solid var(--line); padding-inline-start: 1.5rem; display: grid; gap: .6rem; align-content: start; }
.parts-aside h2 { font-size: 1.5rem; }
.parts-aside .muted { font-size: .95rem; }
.mini-part { display: grid; grid-template-columns: 48px 1fr; gap: .7rem; padding: .6rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.mini-part .part-thumb { width: 48px; height: 48px; }
.mini-part strong { display: block; line-height: 1.2; }
.mini-part small { color: var(--muted); display: block; }
.mini-part .mini-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.mini-part .mini-price { font-family: var(--display); font-weight: 800; font-size: 1.2rem; }
.small-button { min-height: 38px; padding: .3rem .8rem; border: 2px solid var(--ink); border-radius: 6px; background: transparent; font-weight: 700; }
.small-button:hover { background: var(--ink); color: #fff; }

.cart-items { display: grid; gap: .75rem; max-height: 50dvh; overflow: auto; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: .5rem; padding: .8rem; border: 1px solid var(--line); border-radius: var(--r-card); background: #fff; }
.cart-line small { display: block; color: var(--muted); }
.cart-line .remove { border: 0; background: none; color: var(--red-deep); font-weight: 700; text-decoration: underline; align-self: start; }
.cart-qty { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.cart-qty label { display: grid; gap: .2rem; font-size: .85rem; font-weight: 600; }
.cart-line-price { grid-column: 1 / -1; font-weight: 700; }
.cart-bottom { display: grid; gap: .6rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; }
.cart-total strong { font-family: var(--display); font-size: 1.6rem; }
.basket-note, .basket-collect, .fine-print, .receipt-help { font-size: .9rem; color: var(--muted); }
#orderForm { display: grid; gap: .9rem; }
.form-row { display: grid; gap: .3rem; }
.form-row label { font-weight: 600; }
.req { color: var(--red); }
.field-error, .form-error { color: var(--red-deep); font-weight: 600; }
.form-error { padding: .7rem; border-radius: 6px; background: #fde8ea; }
.success-dialog[open] { display: grid; gap: .6rem; }
.success-icon { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: var(--green); }
.success-icon svg { width: 34px; height: 34px; fill: none; stroke: #fff; stroke-width: 3; }
.reference { font-family: var(--display); font-size: 2rem; letter-spacing: .02em; }
.receipt-download { font-weight: 700; }

/* ---------- mobile ---------- */
.mobile-bar { display: none; }
@media (max-width: 980px) {
  #announcement, .topline-facts [data-site="hours"] { display: none; }
  .topline-inner { flex-wrap: nowrap; }
  .topline-facts { margin-inline-start: 0; }
  .topline-links { margin-inline-start: auto; }
  .yard-inner { grid-template-columns: 1fr; gap: 1.5rem; padding-block: 1.75rem 2rem; }
  .pegboard { grid-template-columns: repeat(6, minmax(92px, 1fr)); overflow-x: auto; padding-block: 1rem .75rem; }
  .tool svg { height: 92px; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0; z-index: 70; padding: 1rem 1.25rem; background: var(--paper); overflow: auto; translate: -100% 0; visibility: hidden; align-content: start; }
  .sidebar.filters-open { translate: 0 0; visibility: visible; }
  .mobile-only { display: inline-flex; }
  .filter-foot.mobile-only { display: block; position: sticky; bottom: 0; padding-block: .75rem; background: var(--paper); }
  .filter-foot .primary-button { width: 100%; }
  .mobile-sort { display: grid; }
  .filter-trigger { align-items: center; gap: .4rem; min-height: 44px; padding: .3rem .9rem; border: 2px solid var(--ink); border-radius: 6px; background: var(--paper); font-weight: 700; }
  .filter-trigger svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
  .parts-layout, .item-layout, .detail-grid, .how-it-works, .store-information { grid-template-columns: 1fr; }
  .parts-aside { border-inline-start: 0; padding-inline-start: 0; border-block-start: 1px solid var(--line); padding-block-start: 1rem; }
  .part-detail { position: static; }
  .footer-inner { grid-template-columns: 1fr; }
  @media (prefers-reduced-motion: no-preference) { .sidebar { transition: translate .25s ease-out, visibility .25s; } }
}
@media (max-width: 700px) {
  :root { --shell: calc(100% - 1.5rem); }
  html { scroll-padding-top: 10.5rem; }
  .topline-links { display: none; }
  .topline-inner { min-height: 32px; }
  .header-inner { grid-template-columns: auto 1fr; gap: .6rem .8rem; }
  .brand-name { display: none; }
  .brand-logo { width: 46px; }
  .header-search { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .header-search kbd { display: none; }
  .search-clear { right: .5rem; }
  .cart-trigger { justify-self: end; }
  .cart-label { display: none; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .product-body { padding-inline: .7rem; }
  .price-strip { margin-inline: -.7rem; padding-inline: .7rem; }
  .product-price { font-size: 1.3rem; }
  .add-button { margin-inline: .7rem; }
  .sort { display: none; }
  .part-row { grid-template-columns: 52px 1fr; }
  .part-row .part-thumb { width: 52px; height: 52px; }
  .part-row .row-price { grid-column: 2; }
  .dialog { padding: 1rem; width: calc(100% - 1rem); }
  .promotion-card { grid-template-columns: 1fr; }
  .mobile-bar { display: grid; grid-template-columns: auto 1fr; gap: .5rem; position: fixed; inset: auto 0 0; z-index: 25; padding: .6rem .75rem calc(.6rem + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); }
  body:not(.view-hardware) .mobile-bar { grid-template-columns: 1fr; }
  body:not(.view-hardware) .mobile-bar-filters { display: none; }
  .mobile-bar button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border-radius: 8px; font-weight: 700; }
  .mobile-bar-filters { border: 2px solid var(--ink); background: var(--paper); padding-inline: 1rem; }
  .mobile-bar-filters svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
  .mobile-bar-basket { border: 0; background: var(--ink); color: #fff; }
  .filter-trigger { display: none; }
}

@media (forced-colors: active) {
  .views a[aria-current="page"]::after { border-color: CanvasText; }
  .price-strip { border: 1px solid CanvasText; }
}
@media print {
  .topline, .site-header, .mobile-bar, .pegboard, .sidebar, .footer { display: none; }
}

/* ---------- brands, departments, shelves (added 25 Nov) ---------- */
.ui-icon { width: 22px; height: 22px; flex: none; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-block-end: .9rem; }
.section-head h2 { font-size: 2rem; display: inline-flex; align-items: center; gap: .5rem; }
.section-head h2 svg { width: 28px; height: 28px; }

.brands { padding-block: 2.25rem .5rem; }
/* Brand tiles: Truper is the large tile, the family brands sit beside it, as on the brand wall. */
.brand-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); grid-template-rows: repeat(2, 72px); gap: .6rem; }
.brand-tile { display: grid; align-content: center; justify-items: center; gap: .1rem; padding: .5rem; border: 0; border-radius: 10px; background: var(--brand-bg); color: var(--brand-fg); }
.brand-tile .brand-name { font-family: var(--display); font-weight: 800; font-size: 1.6rem; line-height: 1; text-transform: uppercase; letter-spacing: .02em; }
.brand-tile small { font-size: .8rem; font-weight: 600; opacity: .85; }
.brand-truper { grid-row: span 2; }
.brand-truper .brand-name { font-size: 2.6rem; }
.brand-tile:disabled { opacity: .45; cursor: default; }
@media (prefers-reduced-motion: no-preference) {
  .brand-tile { transition: translate .15s ease-out, box-shadow .15s ease-out; }
  .brand-tile:not(:disabled):hover { translate: 0 -3px; box-shadow: 0 8px 18px rgb(18 38 63 / .18); }
}

.departments { padding-block: 1.5rem .5rem; }
.dept-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; }
.dept-tile { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: .7rem; align-items: center; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--paper); text-align: start; }
.dept-tile .ui-icon { grid-row: span 2; width: 40px; height: 40px; padding: 8px; border-radius: 8px; background: var(--galv); color: var(--ink); }
.dept-tile strong { line-height: 1.15; }
.dept-tile small { color: var(--muted); }
.dept-tile:hover { border-color: var(--ink); }
.dept-tile:hover .ui-icon { background: var(--yellow); }
.dept-name { display: inline-flex; align-items: center; gap: .45rem; }
.dept-name .ui-icon { width: 18px; height: 18px; }

.shelf-row { padding-block: 1.5rem .5rem; }
.shelf-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: 170px; gap: .75rem; overflow-x: auto; padding-block-end: .5rem; scroll-snap-type: inline proximity; scroll-padding-inline: .25rem; }
.mini-card { scroll-snap-align: start; display: grid; grid-template-rows: auto 1fr auto auto; gap: .3rem; padding: .6rem; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--paper); text-align: start; }
.mini-card:hover { border-color: var(--ink); }
.mini-pic { display: grid; place-items: center; aspect-ratio: 1; background: #fff; border-radius: 6px; overflow: hidden; }
.mini-pic img { width: 100%; height: 100%; object-fit: contain; padding: .4rem; }
.mini-card strong { font-size: .9rem; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini-card .mini-price { font-family: var(--display); font-weight: 800; font-size: 1.1rem; }
.mini-card small { color: var(--muted); font-size: .8rem; }
.pairs-title { font-size: 1.3rem !important; margin-top: .75rem; }
.pair-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }

.type-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-block-end: 1rem; }
.type-label { font-weight: 700; margin-inline-end: .25rem; }
.type-chip { display: inline-flex; align-items: center; gap: .35rem; min-height: 36px; padding: .2rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font-weight: 600; }
.type-chip small { color: var(--muted); font-weight: 400; }
.type-chip:hover { border-color: var(--ink); }
.type-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.type-chip[aria-pressed="true"] small { color: #c9d4e0; }

/* Mascot: the FTC worker gives directions where people might be stuck. */
.mascot { width: 150px; height: auto; margin-block-end: .75rem; }
.mascot-small { width: 72px; height: auto; }
.empty-state.with-mascot { grid-template-columns: auto 1fr; column-gap: 1rem; align-items: center; }
.empty-state.with-mascot .mascot-small { grid-row: span 3; }
.empty-state.with-mascot > :not(img) { grid-column: 2; }
.success-top { display: flex; align-items: end; gap: 1rem; }
.store-photo img { max-width: 480px; margin-inline: auto; border-radius: var(--r-card); }

@media (max-width: 700px) {
  .brand-grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: none; grid-auto-rows: 64px; }
  .brand-truper { grid-column: span 2; grid-row: auto; }
  .brand-truper .brand-name { font-size: 2rem; }
  .brand-tile .brand-name { font-size: 1.3rem; }
  .dept-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dept-tile { grid-template-columns: 1fr; justify-items: start; row-gap: .3rem; }
  .dept-tile .ui-icon { grid-row: auto; }
  .shelf-scroll { grid-auto-columns: 150px; }
  .mascot { width: 110px; }
  .pair-list { grid-template-columns: 1fr 1fr; }
}

/* ---------- storefront in the hero, mascot clip (added 25 Nov) ---------- */
.yard-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "copy photo" "board board"; row-gap: 2rem; }
.yard-copy { grid-area: copy; }
.storefront { grid-area: photo; margin: 0; position: relative; border-radius: 12px; overflow: hidden; box-shadow: 0 18px 40px rgb(18 38 63 / .18); max-width: 560px; justify-self: end; width: 100%; }
.storefront img { width: 100%; height: auto; aspect-ratio: 483 / 326; object-fit: cover; }
.storefront figcaption { position: absolute; inset: auto .75rem .75rem auto; display: grid; padding: .45rem .75rem; border-radius: 8px; background: rgb(251 251 249 / .94); font-size: .9rem; }
.storefront figcaption strong { font-family: var(--display); font-size: 1.15rem; line-height: 1; }
.pegboard { grid-area: board; grid-template-columns: repeat(6, 1fr); }
.mascot-clip { position: relative; width: 120px; }
.mascot-clip video { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; background: #fff; }
.clip-button { position: absolute; inset: auto .3rem .3rem auto; min-height: 28px; padding: 0 .5rem; border: 0; border-radius: 6px; background: rgb(18 38 63 / .85); color: #fff; font-size: .8rem; }
@media (max-width: 980px) {
  .yard-inner { grid-template-columns: 1fr; grid-template-areas: "copy" "photo" "board"; }
  .storefront { justify-self: start; max-width: 520px; }
  .pegboard { grid-template-columns: repeat(6, minmax(92px, 1fr)); }
}
.truper-links { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin-top: .6rem; padding: .7rem .8rem; border-radius: 8px; background: var(--galv); }
.truper-links strong { flex-basis: 100%; font-size: .9rem; }
.truper-links small { flex-basis: 100%; color: var(--muted); }
.truper-link { font-weight: 700; }
.catalog-parts { margin-top: .5rem; display: grid; gap: .4rem; }
.catalog-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; max-height: 320px; overflow: auto; }
.catalog-list li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.catalog-list strong { display: block; line-height: 1.2; }
.catalog-list small { color: var(--muted); }
.catalog-list .small-button { flex: none; text-decoration: none; display: inline-flex; align-items: center; }

/* ---------- fits this item + compare (added 26 Nov) ---------- */
.fits-block { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); display: grid; gap: .4rem; }
.fits-block h2 { font-size: 1.5rem; }
.compare-toggle { margin: -.4rem .9rem .8rem; min-height: 34px; border: 1px dashed var(--line); border-radius: 6px; background: transparent; font-weight: 600; color: var(--ink-soft); }
.compare-toggle[aria-pressed="true"] { border-style: solid; border-color: var(--ink); background: var(--ink); color: #fff; }
.detail-actions .compare-toggle { margin: 0; min-height: 46px; padding-inline: 1rem; }
.compare-bar { position: fixed; inset: auto 1rem 1rem auto; z-index: 26; display: flex; align-items: center; gap: .75rem; padding: .6rem .8rem; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 14px 30px rgb(18 38 63 / .2); font-weight: 600; }
.compare-dialog { width: min(1100px, calc(100% - 1.5rem)); }
.compare-wrap { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.compare-table th, .compare-table td { padding: .55rem .6rem; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.compare-table thead th { vertical-align: bottom; width: 22%; }
.compare-table tbody th { width: 160px; color: var(--muted); font-weight: 600; }
.compare-pic { width: 110px; height: 110px; background: #fff; border-radius: 6px; overflow: hidden; margin-bottom: .4rem; display: grid; place-items: center; }
.compare-pic img { width: 100%; height: 100%; object-fit: contain; }
.compare-table td.best { font-weight: 800; color: var(--green); }
.compare-table td.best small { font-weight: 700; }
.compare-table .add-button { margin: 0; width: 100%; }
@media (max-width: 700px) { .compare-bar { inset: auto .75rem calc(4.5rem + env(safe-area-inset-bottom)) .75rem; justify-content: space-between; } .compare-toggle { margin-inline: .7rem; } }

/* Mascot: transparent cut-out image; the clip's white background blends into the light dialog. */
.mascot, .mascot-small { height: auto; background: none; }
.mascot { width: 130px; }
.mascot-small { width: 56px; }
.mascot-clip video { mix-blend-mode: multiply; background: transparent; border-radius: 0; object-fit: contain; }
