/* ============================================================
   Parts Kenya - Main Stylesheet
   Colours follow the Parts Kenya B2B platform and the logo gear:
   ink navy #1c4589, bright blue #2d6be4, dotted ground #eef1f7.
   ============================================================ */

/* 1. Variables
/* 2. Reset & Base
/* 3. Typography
/* 4. Utilities & Buttons
/* 5. Navigation
/* 6. Hero (search + offer deck)
/* 8. Product Showcase
/* 9. Brands
/* 10. Trade Band
/* 11. Visit Us / Find Us
/* 12. Footer
/* 13. Scroll Reveal
/* 14. Page Headers
/* 15. About Page
/* 16. Products Page
/* 17. Product Detail Page
/* 18. Contact Page
/* 19. Responsive
/* 20. Reduced Motion


/* ============================================================
   1. Variables
   ============================================================ */

:root {
  --brand:        #1c4589;
  --brand-deep:   #142f5e;
  --brand-night:  #0b1a38;
  --accent:       #2d6be4;
  --accent-hover: #1f58c9;
  --accent-soft:  rgba(45, 107, 228, 0.10);
  --sky:          #7cc4f2;

  --white:    #FFFFFF;
  --ground:   #eef1f7;
  --ground-2: #f6f8fc;
  --dots:     #c5cde0;
  --ink:      #111827;
  --grey:     #5b6474;
  --grey-lt:  #9aa4b2;
  --border:   #e2e7f0;
  --border-lt: rgba(255, 255, 255, 0.10);

  --wa:      #25D366;
  --wa-ink:  #0e8a3b;
  --ok:      #1a7f37;
  --bad:     #c0342f;

  --glass-bg:  rgba(255, 255, 255, 0.92);
  --topbar-h:  38px;
  --nav-bar-h: 76px;
  --nav-h:     calc(var(--nav-bar-h) + var(--topbar-h));

  --sec-y:    104px;
  --wrap:     1280px;
  --pad:      clamp(16px, 4vw, 64px);
  --radius:   14px;

  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.04), 0 2px 8px rgba(28, 69, 137, 0.06);
  --shadow-md: 0 12px 32px -8px rgba(28, 69, 137, 0.18), 0 4px 12px rgba(17, 24, 39, 0.05);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}


/* ============================================================
   2. Reset & Base
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 2000;
  background: var(--brand);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}

.skip-link:focus { top: 12px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ============================================================
   3. Typography
   ============================================================ */

.overline {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 14px;
}

.overline--light { color: var(--sky); }

.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 16px;
  text-wrap: balance;
}

.section-title--light { color: var(--white); }

.section-sub {
  font-size: 17px;
  line-height: 1.7;
  color: var(--grey);
  max-width: 520px;
}

.section-sub--light { color: rgba(255, 255, 255, 0.74); }


/* ============================================================
   4. Utilities & Buttons
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.section-header {
  margin-bottom: 48px;
}

.section-header--center {
  text-align: center;
}

.section-header--center .section-sub {
  margin: 0 auto;
}

.section-header--split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 64px;
  flex-wrap: wrap;
}

.section-header--split .section-title { margin-bottom: 0; }
.section-header--split .section-sub   { max-width: 460px; }

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  border-radius: 10px;
  padding: 14px 24px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--brand-deep);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -6px rgba(28, 69, 137, 0.55);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--brand);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--white);
}

.btn-light {
  background: var(--white);
  color: var(--brand);
}

.btn-light:hover {
  background: var(--ground);
  transform: translateY(-1px);
}

.btn-whatsapp {
  background: var(--wa);
  color: #fff;
}

.btn-whatsapp:hover {
  background: #1ebe5d;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
}

.btn-text {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: gap 200ms ease;
}

.btn-text:hover { gap: 10px; }

/* Ghost button for dark backgrounds */
.btn-ghost-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  background: transparent;
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease;
}

.btn-ghost-white:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.55);
}

/* Search bar (shared by the hero, products and product pages) */
.search-wrap {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.search-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.search-icon {
  padding: 0 14px 0 16px;
  color: var(--grey-lt);
  font-size: 15px;
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  padding: 14px 0;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--ink);
  background: none;
  border: none;
  outline: none;
  min-width: 0;
}

.search-input::placeholder { color: var(--grey-lt); }

.search-btn {
  background: var(--brand);
  color: var(--white);
  border: none;
  padding: 0 22px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  align-self: stretch;
  transition: background 200ms ease;
  flex-shrink: 0;
  white-space: nowrap;
}

.search-btn:hover { background: var(--brand-deep); }

.search-clear-btn {
  background: transparent;
  color: var(--grey);
  font-size: 13px;
  padding: 0 14px;
}

.search-clear-btn:hover {
  background: transparent;
  color: var(--ink);
}


/* ============================================================
   5. Navigation
   ============================================================ */

/* Top info bar */
.site-topbar {
  position: relative;
  height: var(--topbar-h);
  background: var(--brand);
  display: flex;
  align-items: center;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar-right { gap: 16px; }

.topbar-left a,
.topbar-left span,
.topbar-right a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  transition: color 180ms ease;
}

.topbar-left i,
.topbar-right i {
  font-size: 12px;
  color: var(--sky);
}

.topbar-right a[aria-label] i {
  font-size: 15px;
  color: var(--white);
}

.topbar-left a:hover,
.topbar-right a:hover { color: var(--white); }

.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-bar-h);
  display: flex;
  align-items: center;
  width: 100%;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  transition: background 300ms ease, box-shadow 300ms ease, border-color 300ms ease;
}

.site-nav.is-stuck {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 6px 24px -10px rgba(28, 69, 137, 0.22);
}

.nav-inner {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* The logo sits on a white chip so it reads on the navy hero as well as on white */
.nav-logo {
  flex-shrink: 0;
  display: block;
  background: var(--white);
  border-radius: 14px;
  padding: 4px 8px;
}

.nav-logo img {
  height: 56px;
  width: auto;
}

/* Links centred, actions pushed right */
.nav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  position: relative;
  padding: 6px 0;
  transition: color 180ms ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 200ms ease-out;
}

.nav-link:hover { color: var(--brand); }

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: none;
}

.nav-link.is-active { color: var(--brand); font-weight: 600; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.nav-cta {
  font-size: 14px;
  padding: 12px 20px;
  border-radius: 999px;
}

.nav-cta i { font-size: 13px; }

/* Mobile burger */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}

.nav-burger span {
  display: block;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
  transition: transform 300ms ease, opacity 300ms ease;
}

.nav-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav overlay */
.nav-overlay {
  position: fixed;
  inset: var(--nav-bar-h) 0 0 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-bottom: 96px;
  opacity: 0;
  transition: opacity 300ms ease;
}

.nav-overlay.is-open { opacity: 1; }

.nav-overlay .nav-link {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 700;
  padding: 10px 0;
}

.nav-overlay .nav-cta {
  margin-top: 20px;
  font-size: 16px;
  padding: 15px 30px;
}

.nav-overlay-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 18px 24px 32px;
  border-top: 1px solid var(--border);
}

.nav-overlay-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

.nav-overlay-contact span,
.nav-overlay-contact a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--grey);
}

.nav-overlay-contact i { color: var(--accent); font-size: 12px; }

/* Home: the top bar and nav sit on the hero, then the nav detaches once the page scrolls */
.has-hero-header .site-topbar {
  z-index: 1001;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.has-hero-header .site-nav:not(.is-stuck):not(.is-menu-open) {
  background: transparent;
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.has-hero-header .site-nav:not(.is-stuck):not(.is-menu-open) .nav-link { color: rgba(255, 255, 255, 0.82); }
.has-hero-header .site-nav:not(.is-stuck):not(.is-menu-open) .nav-link:hover,
.has-hero-header .site-nav:not(.is-stuck):not(.is-menu-open) .nav-link.is-active { color: var(--white); }
.has-hero-header .site-nav:not(.is-stuck):not(.is-menu-open) .nav-link::after { background: var(--sky); }
.has-hero-header .site-nav:not(.is-stuck):not(.is-menu-open) .nav-burger span { background: var(--white); }

.has-hero-header .site-nav:not(.is-stuck):not(.is-menu-open) .nav-cta {
  background: var(--white);
  color: var(--brand);
}

.has-hero-header .site-nav:not(.is-stuck):not(.is-menu-open) .nav-cta:hover {
  background: var(--ground);
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.35);
}


/* ============================================================
   6. Hero - search + offer deck
   A full-width navy band; on the home page the top bar and nav
   sit on it. Offers from the B2B "Home Page Banners" sit on the
   right as a stacked deck of white posters.
   ============================================================ */

.hero {
  position: relative;
  z-index: 0;
  color: var(--white);
  background:
    radial-gradient(70% 80% at 85% 0%, rgba(45, 107, 228, 0.55) 0%, rgba(45, 107, 228, 0) 60%),
    radial-gradient(50% 60% at 0% 100%, rgba(124, 196, 242, 0.14) 0%, rgba(124, 196, 242, 0) 70%),
    linear-gradient(135deg, var(--brand-night) 0%, var(--brand-deep) 55%, var(--brand) 100%);
  overflow: hidden;
  isolation: isolate;
}

/* Pull the hero up under the top bar and nav */
.has-hero-header .hero {
  margin-top: calc(-1 * var(--nav-h));
  padding-top: var(--nav-h);
}

/* The gear from the logo, as a faint watermark */
.hero::before {
  content: '';
  position: absolute;
  z-index: -1;
  width: 680px;
  height: 680px;
  left: -240px;
  bottom: -340px;
  background: url('../../content/partskenya/gear.svg') center / contain no-repeat;
  opacity: 0.06;
  pointer-events: none;
}

.hero-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(40px, 6vw, 96px);
  padding: clamp(40px, 5vw, 72px) 0 clamp(56px, 6vw, 88px);
}

.hero-copy {
  max-width: 600px;
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(40px, 4.8vw, 68px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin-bottom: 22px;
  text-wrap: balance;
}

.hero-title span {
  background: linear-gradient(90deg, #8fd0f7 0%, #d4ecff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 17px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.76);
  max-width: 500px;
  margin-bottom: 30px;
}

.hero-search {
  max-width: 560px;
}

.hero-search .search-wrap {
  border: none;
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 20px 44px -14px rgba(0, 0, 0, 0.55);
}

.hero-search .search-wrap:focus-within {
  box-shadow: 0 0 0 4px rgba(124, 196, 242, 0.35), 0 20px 44px -14px rgba(0, 0, 0, 0.55);
}

.hero-search .search-icon { padding-left: 12px; }
.hero-search .search-input { font-size: 16px; padding: 13px 0; }

.hero-search .search-btn {
  border-radius: 10px;
  padding: 0 26px;
}


/* --- Offer deck --- */

.offers {
  --deck: clamp(300px, calc(100svh - 400px), 460px);
  --peek: 18px;
  width: calc(var(--deck) + var(--peek) * 2);
}

.offers-deck,
.offers-progress,
.offers-bar {
  width: calc(100% - var(--peek) * 2);
}

.offers-deck {
  position: relative;
  aspect-ratio: 1 / 1;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.offer-card {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 30px 60px -22px rgba(2, 8, 28, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.06);
  transform-origin: right center;
  transition: transform 700ms var(--ease-out), opacity 700ms var(--ease-out);
}

.offer-card a {
  display: block;
  height: 100%;
}

.offer-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  transition: transform 600ms var(--ease-out);
}

.offer-card a:hover img { transform: scale(1.025); }

.offer-card[data-pos="0"] { z-index: 4; }
.offer-card[data-pos="1"] { z-index: 3; transform: translateX(var(--peek)) scale(0.94); opacity: 0.5; }
.offer-card[data-pos="2"] { z-index: 2; transform: translateX(calc(var(--peek) * 2)) scale(0.88); opacity: 0.22; }
.offer-card[data-pos="3"] { z-index: 1; transform: translateX(calc(var(--peek) * 2)) scale(0.88); opacity: 0; }

/* Progress segments - each fills while its offer is showing, and doubles as a "go to" button */
.offers-progress {
  display: flex;
  gap: 6px;
  margin-top: 22px;
}

.offers-seg {
  position: relative;
  flex: 1;
  height: 16px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.offers-seg::before,
.offers-seg span {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 3px;
}

.offers-seg::before {
  right: 0;
  background: rgba(255, 255, 255, 0.2);
  transition: background 200ms ease;
}

.offers-seg:hover::before { background: rgba(255, 255, 255, 0.4); }

.offers-seg span {
  width: 0;
  background: var(--white);
}

.offers-seg.is-done span { width: 100%; opacity: 0.55; }
.offers-seg.is-active span { animation: segFill var(--offer-ms, 6500ms) linear forwards; }
.offers.is-paused .offers-seg.is-active span { animation-play-state: paused; }

@keyframes segFill {
  from { width: 0; }
  to   { width: 100%; }
}

.offers-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  min-height: 72px;
}

.offers-progress + .offers-bar { margin-top: 10px; }

.offer-caption.is-active {
  animation: captionIn 500ms var(--ease-out);
}

@keyframes captionIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.offer-kicker {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  font-variant-numeric: tabular-nums;
}

.offer-title {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  margin: 4px 0 6px;
}

.offer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--sky);
  transition: gap 200ms ease, color 200ms ease;
}

.offer-link:hover {
  color: var(--white);
  gap: 12px;
}

.offers-controls {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.offers-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}

.offers-btn:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--brand);
}

.offers-btn[data-offers-pause] { font-size: 11px; }

/* No banners published: the parts line art fills the space instead */
.hero-art {
  width: min(500px, 40vw);
  aspect-ratio: 1500 / 841;
  background: linear-gradient(135deg, #8fd0f7, #d4ecff);
  -webkit-mask: url('../../content/partskenya/parts-lineart.webp') center / contain no-repeat;
  mask: url('../../content/partskenya/parts-lineart.webp') center / contain no-repeat;
  opacity: 0.85;
}


/* ============================================================
   8. Product Showcase
   ============================================================ */

.products-section {
  padding: 80px 0 88px;
}

/* Tabs */
.products-tabs-outer {
  position: relative;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.products-tabs-outer::-webkit-scrollbar { display: none; }

.products-tabs {
  display: flex;
  position: relative;
}

.product-tab {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--grey);
  background: none;
  border: none;
  padding: 14px 22px;
  cursor: pointer;
  transition: color 200ms ease;
  white-space: nowrap;
}

.product-tab:hover { color: var(--ink); }

.product-tab.is-active {
  color: var(--brand);
  font-weight: 600;
}

.tab-indicator {
  position: absolute;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  transition: left 250ms var(--ease-out), width 250ms var(--ease-out);
}

/* Rails */
.product-rails-container { position: relative; }

.product-rail {
  display: none;
  grid-auto-flow: column;
  grid-auto-columns: 280px;
  gap: 20px;
  overflow-x: auto;
  padding: 8px 4px 28px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.product-rail::-webkit-scrollbar { display: none; }

.product-rail.is-active {
  display: grid;
  animation: railIn 400ms var(--ease-out) both;
}

@keyframes railIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: none; }
}

/* Product Card */
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  scroll-snap-align: start;
  transition: transform 280ms var(--ease-out), box-shadow 280ms var(--ease-out), border-color 280ms ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(45, 107, 228, 0.3);
}

.card-img-wrap {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  container-type: inline-size;
}

.card-img-wrap img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  background: var(--white);
  transition: transform 400ms var(--ease-out);
}

/* Part number shown as the image until a photo is uploaded (sits under the <img>).
   --len is set per part so short numbers print large and long ones still fit. */
.part-ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10%;
  background-color: var(--ground);
  background-image: radial-gradient(var(--dots) 1px, transparent 1px);
  background-size: 16px 16px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 24px;
  font-size: clamp(14px, calc(125cqi / var(--len, 10)), 14cqi);
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--brand);
  text-align: center;
  overflow-wrap: anywhere;
}

.product-card:hover .card-img-wrap img { transform: scale(1.05); }

.card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
}

.card-brand {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 8px;
}

.card-partno {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--brand);
  background: var(--ground);
  border-radius: 6px;
  padding: 3px 8px;
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}

.card-name {
  font-family: 'Outfit', sans-serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: 12px;
}

.card-name a { color: inherit; }
.card-name a:hover { color: var(--accent); }

.card-price {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 14px;
}

/* Stock line + WhatsApp button, pinned to the bottom of the card */
.card-foot {
  margin-top: auto;
  width: 100%;
}

.stock-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.stock-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-lt);
}

.stock-label::after { content: ':'; }

/* Shown only for parts in stock */
.stock-tick {
  font-size: 13px;
  color: var(--ok);
}

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--wa-ink);
  transition: opacity 200ms ease;
  position: relative;
  z-index: 2;
}

.card-cta:hover { opacity: 0.7; }
.card-cta .fa-whatsapp { font-size: 15px; }

/* Rail navigation + see all */
.rail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
}

.rail-nav {
  display: flex;
  gap: 10px;
}

.rail-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--white);
  color: var(--brand);
  border: 1.5px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
  flex-shrink: 0;
}

.rail-btn:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--white);
}


/* ============================================================
   Help band - the mascot beside the "can't find your part" CTA.
   He stands on the bottom edge of the card and pokes out above it.
   ============================================================ */

.help-section {
  padding: 0 0 var(--sec-y);
}

.help-band {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: end;
  gap: 0 56px;
  margin-top: 40px;
  padding: 0 clamp(28px, 4vw, 64px);
  border-radius: 28px;
  background:
    radial-gradient(70% 90% at 0% 100%, rgba(45, 107, 228, 0.16) 0%, rgba(45, 107, 228, 0) 70%),
    linear-gradient(120deg, #e3eefc 0%, #f3f7fd 65%, #f6f8fc 100%);
  isolation: isolate;
}

.help-mascot img {
  width: 100%;
  max-width: 470px;
  height: auto;
  margin-top: -40px;
}

.help-copy {
  align-self: center;
  padding: 56px 0;
}

.help-copy .section-sub { max-width: 440px; }

.help-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* White so it lifts off the tinted band; keep the standard navy hover */
.help-actions .btn-ghost { background: var(--white); }
.help-actions .btn-ghost:hover { background: var(--brand); border-color: var(--brand); color: var(--white); }


/* ============================================================
   9. Brands
   ============================================================ */

.brands-section {
  background: var(--ground);
  background-image: radial-gradient(var(--dots) 1px, transparent 1px);
  background-size: 22px 22px;
  padding: var(--sec-y) 0;
}

/* Full-width strip that fades out at both edges */
.brand-marquee {
  overflow: hidden;
  padding: 10px 0 18px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}

.brand-track {
  display: flex;
  width: max-content;
  animation: brandMarquee var(--marquee-duration, 60s) linear infinite;
}

.brand-marquee:hover .brand-track,
.brand-marquee:focus-within .brand-track { animation-play-state: paused; }

/* Each set carries its trailing gap, so sliding by exactly one set (-50%) loops seamlessly */
.brand-set {
  display: flex;
  gap: 14px;
  padding-right: 14px;
}

.brand-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 92px;
  min-width: 180px;
  padding: 0 36px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand);
  white-space: nowrap;
  transition: border-color 220ms ease, color 220ms ease, box-shadow 220ms ease;
}

.brand-tile:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-md);
}

/* Logo tiles: each logo is pre-sized to about the same visual area (see fetchTopBrands.php) */
.brand-tile--logo { padding: 0 32px; }

.brand-tile--logo img {
  width: var(--w);
  height: var(--h);
  max-width: none;
  object-fit: contain;
}

@keyframes brandMarquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}


/* ============================================================
   10. Trade Band
   ============================================================ */

.trade-section {
  padding: var(--sec-y) 0 0;
}

.trade-band {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: 40px 72px;
  padding: clamp(36px, 5vw, 64px);
  border-radius: 28px;
  background:
    radial-gradient(70% 90% at 100% 0%, rgba(45, 107, 228, 0.5) 0%, rgba(45, 107, 228, 0) 60%),
    linear-gradient(120deg, var(--brand-night) 0%, var(--brand) 100%);
  overflow: hidden;
  isolation: isolate;
}

.trade-band::before {
  content: '';
  position: absolute;
  z-index: -1;
  width: 420px;
  height: 420px;
  right: -140px;
  bottom: -200px;
  background: url('../../content/partskenya/gear.svg') center / contain no-repeat;
  opacity: 0.06;
}

.trade-copy .section-sub { max-width: 480px; }

.trade-points {
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
}

.trade-points li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--white);
}

.trade-points i {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(124, 196, 242, 0.18);
  color: var(--sky);
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trade-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}


/* ============================================================
   11. Visit Us / Find Us
   ============================================================ */

.visit-section {
  padding: var(--sec-y) 0;
}

.trade-section + .visit-section { padding-top: 32px; }

.visit-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 40px 64px;
  align-items: center;
  padding: clamp(28px, 4vw, 48px) clamp(28px, 4vw, 56px);
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--ground-2);
}

.visit-main .section-title {
  font-size: clamp(28px, 3.2vw, 40px);
  margin-bottom: 12px;
}

.visit-address {
  display: flex;
  gap: 10px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--grey);
  margin-bottom: 24px;
}

.visit-address i { color: var(--accent); margin-top: 5px; }

.visit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.visit-hours {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
}

.visit-hours-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.visit-hours-title i { color: var(--accent); }

.hours-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 24px;
}

.hours-day {
  font-size: 15px;
  color: var(--grey);
}

.hours-time {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  text-align: right;
}

/* Find us (contact page) */
.findus-section {
  background: var(--ground-2);
  padding: var(--sec-y) 0;
}

.findus-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: stretch;
}

.findus-details {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 36px;
}

.findus-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.findus-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 16px;
  flex-shrink: 0;
}

.findus-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--grey-lt);
  margin-bottom: 4px;
}

.findus-value {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.55;
}

.findus-value a { transition: color 200ms ease; }
.findus-value a:hover { color: var(--accent); }

.findus-value.hours-grid { margin-top: 4px; gap: 4px 20px; }
.findus-value.hours-grid .hours-time { text-align: left; }

.map-wrap {
  border-radius: 20px;
  overflow: hidden;
  min-height: 420px;
  background: var(--ground);
  border: 1px solid var(--border);
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: none;
  display: block;
}


/* ============================================================
   12. Footer
   ============================================================ */

.site-footer {
  background: var(--brand-night);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

/* --- Logo chip (sits above the tagline) --- */
.footer-logo-chip {
  display: inline-block;
  background: var(--white);
  border-radius: 14px;
  padding: 6px 12px;
  margin-bottom: 26px;
}

.footer-logo-chip img {
  height: 56px;
  width: auto;
}

.footer-socials {
  display: flex;
  gap: 10px;
  align-items: center;
}

.footer-socials a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-lt);
  color: var(--white);
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 200ms ease, border-color 200ms ease;
}

.footer-socials a:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

/* --- Hero CTA section --- */
.footer-hero { position: relative; }

.footer-hero-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 52px;
  padding-bottom: 56px;
  gap: 40px;
}

.footer-watermark {
  position: absolute;
  bottom: -28px;
  left: calc(var(--pad) * -0.4);
  font-family: 'Outfit', sans-serif;
  font-size: clamp(80px, 13vw, 200px);
  font-weight: 800;
  color: rgba(255, 255, 255, 0.035);
  letter-spacing: -0.03em;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.footer-brand {
  position: relative;
  z-index: 1;
}

.footer-cta-text {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(34px, 3.8vw, 54px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
  position: relative;
  z-index: 1;
}

.footer-cta-text span { color: var(--sky); }

.footer-contact-lines {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.footer-contact-line {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 16px;
  font-weight: 500;
}

.footer-contact-line i {
  color: var(--white);
  font-size: 14px;
  background: rgba(255, 255, 255, 0.08);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.footer-contact-line .fa-whatsapp { font-size: 17px; }

.footer-contact-line a { transition: opacity 200ms ease; }
.footer-contact-line a:hover { opacity: 0.75; }

/* --- Columns --- */
.footer-cols { border-top: 1px solid var(--border-lt); }

.footer-cols-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-top: 40px;
  padding-bottom: 40px;
}

.footer-col {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
}

.footer-col-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 14px;
}

.footer-col-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-weight: 600;
  color: var(--sky);
  transition: gap 200ms ease;
}

.footer-col-link:hover { gap: 12px; }

.footer-store { color: var(--white); font-weight: 600; }

.footer-hours {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
}

.footer-hours dd { color: var(--white); }

.footer-links {
  display: grid;
  gap: 6px;
}

.footer-links a { transition: color 200ms ease; }
.footer-links a:hover { color: var(--white); }


/* --- Bottom bar --- */
.footer-bottom { border-top: 1px solid var(--border-lt); }

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copy,
.footer-credit {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
}

.footer-credit {
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-heart { color: #e5484d; font-size: 12px; }

.footer-credit a {
  color: var(--white);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 200ms ease;
}

.footer-credit a:hover { opacity: 0.75; }

/* --- Scroll to top button --- */
.scroll-top-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 280ms ease, transform 280ms ease, visibility 280ms ease, background 200ms ease;
  z-index: 900;
  box-shadow: 0 8px 20px -6px rgba(11, 26, 56, 0.5);
}

.scroll-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover { background: var(--brand-deep); }


/* ============================================================
   13. Scroll Reveal
   ============================================================ */

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

[data-reveal][data-delay="1"] { transition-delay: 80ms; }
[data-reveal][data-delay="2"] { transition-delay: 160ms; }
[data-reveal][data-delay="3"] { transition-delay: 240ms; }


/* ============================================================
   14. Page Headers (about, contact, products)
   The dotted ground is the B2B platform's page background.
   ============================================================ */

.page-header {
  background: var(--ground);
  background-image: radial-gradient(var(--dots) 1px, transparent 1px);
  background-size: 22px 22px;
  border-bottom: 1px solid var(--border);
}

.page-header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 40px;
  padding-top: 56px;
  padding-bottom: 56px;
}

.page-header .section-title {
  font-size: clamp(36px, 4.6vw, 60px);
}

.page-header-art {
  width: min(440px, 36vw);
  aspect-ratio: 1500 / 841;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  -webkit-mask: url('../../content/partskenya/parts-lineart.webp') center / contain no-repeat;
  mask: url('../../content/partskenya/parts-lineart.webp') center / contain no-repeat;
  opacity: 0.22;
}


/* ============================================================
   15. About Page
   ============================================================ */

.about-section {
  padding: var(--sec-y) 0;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.about-card {
  padding: 32px 30px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  transition: border-color 220ms ease, box-shadow 220ms ease;
}

.about-card:hover {
  border-color: rgba(45, 107, 228, 0.35);
  box-shadow: var(--shadow-md);
}

.about-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}

.about-card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}

.about-card-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--grey);
}

.about-card .btn-text { margin-top: 16px; }



/* ============================================================
   16. Products Page
   ============================================================ */

.products-page-header .page-header-inner {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding-top: 40px;
  padding-bottom: 36px;
}

.products-page-header .section-title {
  font-size: clamp(30px, 3.4vw, 44px);
  margin-bottom: 0;
}

.products-search-bar {
  max-width: 680px;
  margin-top: 16px;
}

.products-search-bar .search-wrap {
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.products-search-bar .search-wrap:focus-within { border-color: var(--accent); }
.products-search-bar .search-input { padding: 17px 0; }

.products-grid-section {
  background: var(--white);
  padding: 48px 0 var(--sec-y);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.products-grid .product-card { scroll-snap-align: none; }

/* Kept for search scripting, not shown - the site doesn't publish stock counts */
.products-count {
  display: none;
}

.products-empty {
  text-align: center;
  padding: 72px 0;
  color: var(--grey);
}

.products-empty-mascot {
  width: 240px;
  height: auto;
  margin: 0 auto 12px;
}

.products-empty h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  color: var(--ink);
  margin-bottom: 10px;
}

.products-empty .btn { margin-top: 24px; }

/* Product card - stretched overlay link */
.card-overlay-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
}

.products-grid .product-card { cursor: pointer; }

/* Pagination */
.products-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 56px;
  flex-wrap: wrap;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--grey);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 180ms ease;
}

.page-btn:hover:not(:disabled) {
  color: var(--brand);
  border-color: var(--brand);
}

.page-btn.is-active {
  background: var(--brand);
  color: var(--white);
  border-color: var(--brand);
}

.page-btn.is-disabled,
.page-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 42px;
  font-size: 14px;
  color: var(--grey-lt);
  user-select: none;
}

.search-cap-notice {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: var(--grey);
  font-style: italic;
}


/* ============================================================
   17. Product Detail Page
   ============================================================ */

.product-detail-page {
  min-height: 70vh;
}

.product-header .page-header-inner {
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding-top: 24px;
  padding-bottom: 20px;
}

.product-header .products-search-bar { margin-top: 0; }

.product-breadcrumb nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.breadcrumb-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 180ms ease;
}

.breadcrumb-link:hover { color: var(--accent); }

.breadcrumb-sep {
  color: var(--grey-lt);
  font-size: 13px;
}

.breadcrumb-current {
  font-size: 13px;
  color: var(--grey);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 420px;
}

.product-detail-wrap {
  padding: 56px 0 var(--sec-y);
}

.product-detail-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.product-detail-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  container-type: inline-size;
}

.product-detail-img-wrap img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 24px;
  background: var(--white);
}

.product-detail-info { padding-top: 8px; }

.product-detail-brand {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 10px;
}

.product-detail-partno {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--brand);
  background: var(--ground);
  border-radius: 8px;
  padding: 5px 12px;
  margin-bottom: 16px;
}

.product-detail-name {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
}

.product-detail-spec {
  font-size: 15px;
  line-height: 1.6;
  color: var(--grey);
  margin-bottom: 16px;
}

.product-detail-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.product-price {
  font-family: 'Outfit', sans-serif;
  font-size: 30px;
  font-weight: 700;
  color: var(--brand);
}

.product-stock-status { margin: 0; }
.product-stock-status .stock-label { font-size: 11px; }
.product-stock-status .stock-tick  { font-size: 16px; }

.product-detail-divider {
  height: 1px;
  background: var(--border);
  margin: 28px 0;
}

.product-detail-note {
  font-size: 14px;
  line-height: 1.6;
  color: var(--grey);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.product-detail-note i {
  color: var(--accent);
  margin-top: 4px;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.product-detail-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.product-detail-cta {
  font-size: 15px;
  padding: 15px 26px;
}


/* ============================================================
   18. Contact Page
   ============================================================ */

.contact-layout {
  background: var(--white);
  padding: var(--sec-y) 0;
}

.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 64px;
  align-items: start;
}

.contact-primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 44px;
  border-radius: 28px;
  color: var(--white);
  background:
    radial-gradient(80% 70% at 100% 0%, rgba(45, 107, 228, 0.5) 0%, rgba(45, 107, 228, 0) 60%),
    linear-gradient(150deg, var(--brand-night) 0%, var(--brand) 100%);
}

.contact-primary::before {
  content: '';
  position: absolute;
  z-index: -1;
  width: 360px;
  height: 360px;
  right: -150px;
  bottom: -160px;
  background: url('../../content/partskenya/gear.svg') center / contain no-repeat;
  opacity: 0.07;
}

.contact-primary-title {
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
}

.contact-primary-sub {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
}

.contact-primary .btn { align-self: flex-start; font-size: 15px; padding: 15px 26px; }

.contact-lines {
  display: grid;
  gap: 14px;
  padding-top: 22px;
  border-top: 1px solid var(--border-lt);
}

.contact-line {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 15px;
}

.contact-line i {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.contact-line small {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.contact-line a:hover { color: var(--sky); }

/* Contact form */
.contact-form-section h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 30px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.contact-form-section > p {
  font-size: 15px;
  color: var(--grey);
  margin-bottom: 28px;
}

.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--grey);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 13px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  transition: border-color 200ms ease, box-shadow 200ms ease;
  appearance: none;
  outline: none;
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.form-control::placeholder { color: var(--grey-lt); }

textarea.form-control {
  resize: vertical;
  min-height: 130px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-feedback {
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 0.95rem;
  background: #eaf6ea;
  color: #1a5c1a;
  border: 1px solid #a8d5a8;
}

.form-feedback.error {
  background: #fdecea;
  color: #7a1a1a;
  border: 1px solid #f0a8a8;
}


/* ============================================================
   19. Responsive
   ============================================================ */

@media (max-width: 1180px) {
  .topbar-hours { display: none; }
}

@media (max-width: 1080px) {
  /* Hero stacks: copy first, offers centred below */
  .hero-stage            { grid-template-columns: minmax(0, 1fr); }
  .hero-copy             { max-width: 680px; }
  .offers                { width: 100%; max-width: 500px; justify-self: center; }
  .hero-art              { display: none; }

  .nav-links             { gap: 24px; }
}

@media (max-width: 960px) {
  :root { --sec-y: 80px; }

  .trade-band,
  .visit-card,
  .findus-inner,
  .contact-inner         { grid-template-columns: minmax(0, 1fr); }

  .about-grid            { grid-template-columns: 1fr; }

  /* Help band stacks: copy first, mascot standing on the bottom edge */
  .help-band             { grid-template-columns: minmax(0, 1fr); margin-top: 0; }
  .help-copy             { order: -1; padding: 40px 0 8px; }
  .help-mascot img       { margin: 0 auto; max-width: 380px; }

  .page-header-art       { display: none; }
  .page-header-inner     { grid-template-columns: minmax(0, 1fr); }

  .footer-cols-inner     { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  /* Nav collapses to the burger */
  .site-topbar           { display: none; }
  :root                  { --topbar-h: 0px; --nav-bar-h: 68px; }

  .site-nav {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
  }

  .nav-logo             { padding: 3px 7px; border-radius: 12px; }
  .nav-logo img          { height: 48px; }
  .nav-links             { display: none; }
  .nav-burger            { display: flex; }

  /* The B2B Portal button stays, centred between the logo and the burger */
  .nav-actions           { position: absolute; left: 50%; transform: translateX(-50%); margin: 0; }
  .nav-actions .nav-cta  { padding: 10px 16px; font-size: 13px; }
  .nav-actions .nav-cta i { font-size: 12px; }

  .product-detail-inner  { grid-template-columns: 1fr; gap: 32px; }
  .product-detail-wrap   { padding: 32px 0 80px; }
  .breadcrumb-current    { max-width: 220px; }
}

@media (max-width: 768px) {
  .search-input          { font-size: 16px; } /* under 16px, iOS Safari zooms the page in on focus */

  .products-grid         { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .products-grid .card-body { padding: 14px 14px 16px; }
  .products-grid .card-name { font-size: 16px; }

  .footer-hero-inner     { flex-direction: column; align-items: flex-start; padding-top: 36px; padding-bottom: 40px; }
  .footer-bottom-inner   { flex-direction: column; align-items: center; gap: 6px; text-align: center; }

  .section-header        { margin-bottom: 32px; }
  .contact-primary       { padding: 32px 26px; }
  .form-row              { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 600px) {
  .hero-stage            { padding: 32px 0 40px; gap: 32px; }
  .hero::before          { width: 440px; height: 440px; left: -210px; bottom: auto; top: -120px; }
  .hero-title            { font-size: clamp(34px, 10vw, 44px); margin-bottom: 14px; }
  .hero-sub              { font-size: 15px; margin-bottom: 22px; }
  .hero-search .search-btn { padding: 0 18px; }

  .offers                { --peek: 12px; max-width: none; }
  .offer-card            { border-radius: 16px; }
  .offer-title           { font-size: 19px; }
  .offers-btn            { width: 38px; height: 38px; }


  .products-section      { padding: 56px 0 64px; }
  .product-rail          { grid-auto-columns: 78%; gap: 14px; }
  .rail-footer           { flex-direction: column-reverse; align-items: stretch; }
  .rail-nav              { justify-content: center; }
  .product-tab           { padding: 12px 16px; font-size: 14px; }

  .brand-set             { gap: 10px; padding-right: 10px; }
  .brand-tile            { height: 76px; min-width: 140px; padding: 0 26px; font-size: 18px; }
  .brand-tile--logo img  { width: calc(var(--w) * 0.8); height: calc(var(--h) * 0.8); }

  .trade-band,
  .visit-card            { border-radius: 22px; }
  .trade-actions .btn,
  .trade-actions .btn-ghost-white,
  .visit-actions .btn    { flex: 1 1 100%; }

  .footer-cols-inner     { grid-template-columns: 1fr; gap: 28px; }
  .scroll-top-btn        { right: 16px; bottom: 16px; }
}

@media (max-width: 420px) {
  .products-grid         { grid-template-columns: 1fr; }
}


/* ============================================================
   20. Reduced Motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  /* The offers and the brand strip keep moving with reduced motion on, so they are
     exempt from the blanket rule above - gently: offers fade instead of sliding, the
     brands drift at a steady pace, and both pause on hover (the offers also have a
     pause button). */
  .offers-seg.is-active span {
    animation-duration: var(--offer-ms, 6500ms) !important;
  }

  .offer-card {
    transition: opacity 600ms ease !important;
  }

  .offer-card a:hover img { transform: none; }

  .brand-track {
    animation-duration: var(--marquee-duration, 60s) !important;
    animation-iteration-count: infinite !important;
  }
}
