/* ==========================================================================
   MOTOLECTRON HOMEPAGE SECTIONS (homepage.php / homepage.html only)
   Loaded after storefront-theme.css. Every rule is scoped to #homeMain, so an
   id outranks the legacy class chains in homepage.css / motolectron.css, and
   everything reads design tokens, so light mode needs almost no overrides.
   Shared pieces (product card, header, reveal) live in homepage.css.
   Section order: hero (hero-banner.css) · Best Sellers · New Arrivals · Bundles ·
   Complete Your Ride · Trusted Brands ·
   Financing & Payment · Why Choose · Latest News · Reviews · Visit Our Store
   ========================================================================== */

#homeMain {
  display: block;
  --home-gutter: clamp(16px, 3vw, 32px);
  --home-gap: clamp(12px, 1.6vw, 20px);
}

#homeMain ::selection {
  background: var(--moto-red-glow);
}

/* --------------------------------------------------------------------------
   Layout rhythm
   -------------------------------------------------------------------------- */
#homeMain .home-container {
  width: 100%;
  max-width: var(--ui-content-max, 1200px);
  margin-inline: auto;
  padding-inline: var(--home-gutter);
  box-sizing: border-box;
}

#homeMain .home-section {
  padding-top: var(--section-pad-y);
}

/* Full-bleed tinted band that sets Best Sellers apart from New Arrivals */
#homeMain .home-band {
  margin-top: var(--section-pad-y);
  padding-top: clamp(48px, 5.5vw, 80px);
  padding-bottom: clamp(48px, 5.5vw, 80px);
  background: var(--moto-band-bg);
  border-block: 1px solid var(--moto-border);
}

/* --------------------------------------------------------------------------
   Section heading: display-face title, one-line subtitle, "View All"
   -------------------------------------------------------------------------- */
#homeMain .section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  margin: 0 0 clamp(20px, 2.4vw, 32px);
}

#homeMain .section-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  max-width: 60ch;
}

#homeMain .section-title {
  margin: 0 !important;
  color: var(--moto-text) !important;
  font-family: var(--font-display) !important;
  font-size: var(--fs-h2) !important;
  font-stretch: 125%;
  font-style: italic;
  font-weight: 800 !important;
  font-synthesis: none;
  line-height: 1.04;
  letter-spacing: -0.005em !important;
  text-align: left;
  text-transform: uppercase;
  text-wrap: balance;
}

#homeMain .section-title::before,
#homeMain .section-title::after {
  content: none !important;
}

#homeMain .section-subtitle {
  margin: 0;
  color: var(--moto-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  text-wrap: pretty;
}

#homeMain .btn-view-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 2px;
  border: 0;
  background: none;
  color: var(--moto-text);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur-fast) ease, scale var(--ix-scale-dur, 0.3s) var(--ix-scale-ease, ease);
}

#homeMain .btn-view-all svg {
  width: 18px;
  height: 18px;
  flex: none;
  transition: translate var(--dur-base) var(--ease-out-expo);
}

#homeMain .btn-view-all:hover {
  color: var(--moto-red);
}

#homeMain .btn-view-all:hover svg {
  translate: 4px 0;
}

#homeMain .btn-view-all:focus-visible {
  outline: 2px solid var(--moto-red);
  outline-offset: 4px;
  border-radius: 6px;
}

/* --------------------------------------------------------------------------
   Buttons (48px, 10px radius; the filled red uses the logo's true red so
   white labels pass AA in both themes)
   -------------------------------------------------------------------------- */
#homeMain .home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  box-sizing: border-box;
  border: 1px solid transparent;
  border-radius: var(--btn-radius, 12px);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  transition:
    background-color var(--dur-fast) ease,
    border-color var(--dur-fast) ease,
    color var(--dur-fast) ease,
    scale var(--ix-scale-dur, 0.3s) var(--ix-scale-ease, ease);
}

#homeMain .home-btn-icon {
  width: 18px;
  height: 18px;
  flex: none;
  transition: translate var(--dur-base) var(--ease-out-expo);
}

#homeMain .home-btn:hover .home-btn-icon {
  translate: 3px 0;
}

#homeMain .home-btn:active {
  scale: var(--ix-press-btn, 0.96);
  --ix-scale-dur: var(--ix-press-dur, 90ms);
  --ix-scale-ease: ease-out;
}

#homeMain .home-btn--primary {
  background: var(--moto-red-solid);
  color: #ffffff;
}

#homeMain .home-btn--primary:hover {
  background: var(--moto-red-dark);
  color: #ffffff;
}

#homeMain .home-btn--secondary {
  background: transparent;
  border-color: var(--moto-border-subtle);
  color: var(--moto-text);
}

#homeMain .home-btn--secondary:hover {
  background: var(--moto-panel-soft);
  border-color: var(--moto-border-hover);
  color: var(--moto-text);
}

/* Secondary on a photo (hero): the photo is the surface in both themes */
#homeMain .home-btn--on-dark {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.34);
  color: #ffffff;
}

#homeMain .home-btn--on-dark:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.6);
  color: #ffffff;
}

#homeMain .home-btn:focus-visible {
  outline: 2px solid var(--moto-text);
  outline-offset: 3px;
}

#homeMain .hero-banner .home-btn:focus-visible {
  outline-color: #ffffff;
}

/* Light mode: the hero stage is light too, so its secondary button is a
   white outlined button and focus rings go dark */
html[data-theme="light"] #homeMain .hero-banner .home-btn--on-dark {
  background: var(--moto-panel);
  border-color: var(--moto-border-subtle);
  color: var(--moto-text);
}

html[data-theme="light"] #homeMain .hero-banner .home-btn--on-dark:hover {
  background: var(--moto-panel-soft);
  border-color: var(--moto-border-hover);
  color: var(--moto-text);
}

html[data-theme="light"] #homeMain .hero-banner .home-btn:focus-visible {
  outline-color: var(--moto-text);
}

/* --------------------------------------------------------------------------
   Product grids (Best Sellers before its arc arrives, New Arrivals). Cards: homepage.css
   -------------------------------------------------------------------------- */
#homeMain .product-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: var(--home-gap) !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* New Arrivals: one sideways row at every width, up to 12 cards (Best Sellers
   too, but only if its arc script did not load). Drag it with the mouse (homepage.js setupProductRail), swipe it, or
   use the arrows beside "View All". Four cards fit on a desktop with the next
   one peeking in, so it reads as a row that keeps going. */
#homeMain .home-container > .product-rail {
  display: grid !important;
  grid-auto-flow: column !important;
  grid-template-columns: none !important;
  grid-auto-columns: calc((100% - 3 * var(--home-gap)) / 4.2) !important;
  gap: var(--home-gap) !important;
  margin-inline: calc(var(--home-gutter) * -1) !important;
  padding: 4px var(--home-gutter) 16px !important;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-padding-inline: var(--home-gutter);
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  cursor: grab;
}

#homeMain .product-rail::-webkit-scrollbar {
  display: none;
}

#homeMain .product-rail > * {
  scroll-snap-align: start;
}

#homeMain .product-rail img {
  -webkit-user-drag: none;
}

/* While dragging: no snapping, no text selection, no card hover or click. */
#homeMain .product-rail.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

#homeMain .product-rail.is-dragging > * {
  pointer-events: none;
}

#homeMain .section-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

#homeMain .rail-nav {
  display: inline-flex;
  gap: 8px;
}

#homeMain .rail-nav[hidden] {
  display: none;
}

#homeMain .rail-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--moto-border-subtle);
  border-radius: 999px;
  background: var(--moto-panel);
  color: var(--moto-text);
  cursor: pointer;
  transition: border-color var(--dur-fast) ease, color var(--dur-fast) ease, opacity var(--dur-fast) ease;
}

#homeMain .rail-btn svg {
  width: 18px;
  height: 18px;
}

#homeMain .rail-btn:hover:not(:disabled) {
  border-color: var(--moto-red);
  color: var(--moto-red);
}

#homeMain .rail-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

#homeMain .rail-btn:focus-visible {
  outline: 2px solid var(--moto-red);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  #homeMain .home-container > .product-rail {
    grid-auto-columns: calc((100% - var(--home-gap)) / 2.3) !important;
  }
}

/* Phones swipe; the arrows give the space back to the title. */
@media (max-width: 640px) {
  #homeMain .home-container > .product-rail {
    grid-auto-columns: min(76%, 300px) !important;
    gap: 12px !important;
  }

  #homeMain .rail-nav {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Bundles (homepage.js buildBundleCardHtml / openBundleDialog): bought
   online (Buy now) or at the store. The card is a product card whose picture
   is the bundle's own, else a collage of up to four of its items; the dialog
   lists what is inside, with a quantity and Buy now.
   -------------------------------------------------------------------------- */
#homeMain .bundle-card {
  cursor: pointer;
}

#homeMain .bundle-card-collage {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  background: var(--moto-border);
}

#homeMain .bundle-card-media[data-photos="1"] .bundle-card-collage {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

#homeMain .bundle-card-media[data-photos="2"] .bundle-card-collage {
  grid-template-rows: 1fr;
}

#homeMain .bundle-card-media[data-photos="3"] .bundle-card-photo:first-child {
  grid-row: span 2;
}

#homeMain .bundle-card-photo {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  padding: 8%;
  object-fit: contain;
  background: var(--moto-media-well);
}

/* The title opens the dialog for keyboard and screen-reader users */
#homeMain .bundle-card-open {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  cursor: pointer;
}

#homeMain .bundle-card-items {
  display: grid;
  gap: 2px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
  color: var(--moto-text-secondary);
  font-size: 0.8rem;
  line-height: 1.35;
  text-align: left;
}

#homeMain .bundle-card-items li {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#homeMain .bundle-card-qty,
#homeMain .bundle-card-more {
  color: var(--moto-muted);
  font-variant-numeric: tabular-nums;
}

/* The bundle popup and the Latest News popup (Jemmy, 2026-10-24) share their frame. */
#homeMain .bundle-dialog,
#homeMain .news-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--moto-border);
  border-radius: var(--radius-md, 12px);
  background: var(--moto-panel);
  color: var(--moto-text);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

#homeMain .bundle-dialog::backdrop,
#homeMain .news-dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

#homeMain .bundle-dialog-head,
#homeMain .news-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 12px;
}

#homeMain .bundle-dialog-eyebrow,
#homeMain .news-dialog-eyebrow {
  margin: 0 0 4px;
  color: var(--moto-muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#homeMain .bundle-dialog-title,
#homeMain .news-dialog-title {
  margin: 0;
  color: var(--moto-text);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
}

#homeMain .bundle-dialog-close,
#homeMain .news-dialog-close {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 8px;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: var(--moto-text);
  cursor: pointer;
}

#homeMain .bundle-dialog-close:hover,
#homeMain .news-dialog-close:hover {
  background: var(--moto-overlay);
}

#homeMain .bundle-dialog-close:focus-visible,
#homeMain .news-dialog-close:focus-visible,
#homeMain .bundle-dialog a:focus-visible {
  outline: 2px solid var(--moto-red);
  outline-offset: 2px;
}

/* Latest News popup: the whole picture, the posted date and the story. */
#homeMain .news-dialog {
  width: min(560px, calc(100vw - 32px));
}

#homeMain .news-dialog-picture {
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--moto-border);
  /* Posters are dark: a black frame, not the light product well. */
  background: #000;
}

#homeMain .news-dialog-picture img {
  display: block;
  width: 100%;
  max-height: min(60dvh, 560px);
  object-fit: contain;
}

/* The X sits on the picture's top-right corner and stays there while a long
   story scrolls (Jemmy, 2026-10-24): a zero-height sticky bar holds it. */
#homeMain .news-dialog-close-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 0;
}

#homeMain .news-dialog-close-bar .news-dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
}

#homeMain .news-dialog-close-bar .news-dialog-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* No picture (or it failed to load): a plain X beside the title. */
#homeMain .news-dialog:not(.has-picture) .news-dialog-close-bar .news-dialog-close {
  background: transparent;
  color: var(--moto-text);
}

#homeMain .news-dialog:not(.has-picture) .news-dialog-close-bar .news-dialog-close:hover {
  background: var(--moto-overlay);
}

#homeMain .news-dialog:not(.has-picture) .news-dialog-head {
  padding-right: 60px;
}

#homeMain .news-dialog-posted {
  margin: 6px 0 0;
  color: var(--moto-muted);
  font-size: 0.8rem;
}

#homeMain .news-dialog-body {
  margin: 0;
  padding: 0 20px 22px;
  color: var(--moto-text-secondary, var(--moto-text));
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

#homeMain .bundle-dialog-items {
  margin: 0;
  padding: 0 20px;
  list-style: none;
}

#homeMain .bundle-dialog-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--moto-border);
}

#homeMain .bundle-dialog-photo {
  width: 56px;
  height: 56px;
  box-sizing: border-box;
  padding: 4px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--moto-media-well);
}

#homeMain .bundle-dialog-item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

/* Up to two lines, so a long name still reads on a phone */
#homeMain .bundle-dialog-item-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: var(--moto-text);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}

#homeMain a.bundle-dialog-item-name:hover {
  color: var(--moto-red);
  text-decoration: underline;
}

#homeMain .bundle-dialog-item-qty {
  color: var(--moto-muted);
  font-size: 0.78rem;
}

#homeMain .bundle-dialog-item-price {
  color: var(--moto-text-secondary);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#homeMain .bundle-dialog-totals {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 14px 20px;
  border-top: 1px solid var(--moto-border);
}

#homeMain .bundle-dialog-totals > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--moto-text-secondary);
  font-size: 0.88rem;
}

#homeMain .bundle-dialog-totals dt,
#homeMain .bundle-dialog-totals dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

#homeMain .bundle-dialog-totals s {
  color: var(--moto-text-dim);
}

#homeMain .bundle-dialog-totals .is-price {
  color: var(--moto-text);
  font-size: 1.05rem;
  font-weight: 800;
}

#homeMain .bundle-dialog-totals .is-save {
  color: var(--moto-success);
  font-weight: 600;
}

/* The bundle's own picture, above its name */
#homeMain .bundle-dialog-picture {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--moto-border);
  background: var(--moto-media-well);
}

#homeMain .bundle-dialog-picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#homeMain .bundle-dialog-buy {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px 0;
  border-top: 1px solid var(--moto-border);
}

#homeMain .bundle-dialog-qty {
  display: inline-flex;
  flex: none;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--moto-border-hover, var(--moto-border));
  border-radius: 999px;
}

#homeMain .bundle-dialog-qty button {
  width: 40px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--moto-text);
  font-size: 1.1rem;
  cursor: pointer;
}

#homeMain .bundle-dialog-qty button:hover {
  background: var(--moto-overlay);
}

#homeMain .bundle-dialog-qty input {
  width: 48px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--moto-text);
  font: inherit;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
  -moz-appearance: textfield;
}

#homeMain .bundle-dialog-qty input::-webkit-outer-spin-button,
#homeMain .bundle-dialog-qty input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

#homeMain .bundle-dialog-buy-btn {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--moto-red);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: filter 0.15s ease;
}

#homeMain .bundle-dialog-buy-btn:hover {
  filter: brightness(1.1);
}

#homeMain .bundle-dialog-qty button:focus-visible,
#homeMain .bundle-dialog-qty input:focus-visible,
#homeMain .bundle-dialog-buy-btn:focus-visible {
  outline: 2px solid var(--moto-red);
  outline-offset: 2px;
}

#homeMain .bundle-dialog-error {
  margin: 8px 20px 0;
  color: var(--moto-danger, #ef4444);
  font-size: 0.82rem;
}

#homeMain .bundle-dialog-note {
  margin: 0;
  padding: 12px 20px 20px;
  color: var(--moto-muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

#homeMain .bundle-dialog-note a {
  color: var(--moto-text);
  font-weight: 600;
}

#homeMain .grid-status-text {
  margin: 12px 0;
  padding: 32px 16px;
  border: 1px dashed var(--moto-border-subtle);
  border-radius: var(--radius-md);
  color: var(--moto-muted);
  text-align: center;
}

#homeMain .grid-status-text a {
  color: var(--moto-text);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Horizontal rail on phones (swipe with a peek of the next card) */
@media (max-width: 640px) {
  /* (1,2,0): must beat the "2 columns under 900px" product-grid rule */
  #homeMain .home-container > .home-rail {
    display: grid !important;
    grid-auto-flow: column !important;
    grid-template-columns: none !important;
    /* A fixed track (not minmax(0, …)) so cards overflow into a swipe row
       instead of shrinking to fit */
    grid-auto-columns: min(76%, 300px) !important;
    gap: 12px !important;
    margin-inline: calc(var(--home-gutter) * -1) !important;
    padding: 0 var(--home-gutter) 14px !important;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--home-gutter);
    scrollbar-width: thin;
    scrollbar-color: var(--moto-border-subtle) transparent;
  }

  #homeMain .home-container > .home-rail > * {
    scroll-snap-align: start;
  }

  #homeMain .home-rail::-webkit-scrollbar {
    height: 4px;
  }

  #homeMain .home-rail::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--moto-border-subtle);
  }
}

/* --------------------------------------------------------------------------
   Complete Your Ride: editorial cut-out cards (whole card is one link)
   -------------------------------------------------------------------------- */
#homeMain .ride-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--home-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

#homeMain .ride-grid > li {
  display: flex;
  min-width: 0;
}

#homeMain .ride-card {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--moto-border);
  border-radius: var(--radius-lg);
  background: var(--moto-panel);
  box-shadow: var(--moto-card-shadow);
  color: var(--moto-text);
  text-decoration: none;
  transition:
    transform 320ms var(--ease-out-expo),
    border-color var(--dur-base) ease,
    box-shadow 320ms var(--ease-out-expo),
    scale var(--ix-scale-dur, 0.3s) var(--ix-scale-ease, ease);
}

#homeMain .ride-card-media {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    radial-gradient(closest-side at 50% 62%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 100%),
    var(--moto-media-well);
}

#homeMain .ride-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 8% 14% 4%;
  box-sizing: border-box;
  object-fit: contain;
  filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.22));
  transition: transform 420ms var(--ease-out-expo);
}

#homeMain .ride-card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  padding: 18px 18px 20px;
}

#homeMain .ride-card-title {
  font-family: var(--font-display) !important;
  font-size: 1.12rem;
  font-stretch: 125%;
  font-style: italic;
  font-weight: 800;
  font-synthesis: none;
  line-height: 1.15;
  text-transform: uppercase;
}

#homeMain .ride-card-desc {
  color: var(--moto-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

#homeMain .ride-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--moto-border);
}

#homeMain .ride-card-tags {
  min-width: 0;
  color: var(--moto-text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
}

#homeMain .ride-card-cta {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  color: var(--moto-red);
  font-size: 0.84rem;
  font-weight: 600;
}

#homeMain .ride-card-cta svg {
  width: 16px;
  height: 16px;
  transition: translate var(--dur-base) var(--ease-out-expo);
}

#homeMain .ride-card:focus-visible {
  outline: 2px solid var(--moto-red);
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  #homeMain .ride-card:hover {
    transform: translateY(-4px);
    border-color: var(--moto-border-hover);
    box-shadow: var(--moto-card-shadow-hover);
  }

  #homeMain .ride-card:hover .ride-card-media img {
    transform: scale(1.05);
  }

  #homeMain .ride-card:hover .ride-card-cta svg {
    translate: 4px 0;
  }
}

/* --------------------------------------------------------------------------
   Trusted Brands: one row of equal tiles on a tilted plane, running on a loop.
   A brand whose logo the shop does not have yet shows its name in the same
   tile. A new logo is two <img> in its list item.
   -------------------------------------------------------------------------- */
#homeMain #brandsSection .section-header {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#homeMain #brandsSection .section-title-wrap {
  align-items: center;
}

#homeMain #brandsSection .section-title,
#homeMain #brandsSection .section-subtitle {
  text-align: center;
}

#homeMain .brand-logo-group > li {
  flex: none;
  transform-style: preserve-3d;
}

/* The tone edge under the tile gives it thickness without a drop shadow */
#homeMain .brand-logo-card {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: clamp(156px, 15vw, 196px);
  height: clamp(78px, 7.4vw, 94px);
  padding: 12px 16px;
  border: 1px solid var(--moto-border);
  border-radius: var(--radius-md);
  background: var(--moto-panel);
  box-shadow: 0 3px 0 var(--moto-border);
  color: var(--moto-text);
  text-decoration: none;
  transition:
    transform 320ms var(--ease-out-expo),
    border-color var(--dur-base) ease,
    box-shadow var(--dur-base) ease;
}

/* The tile comes forward and turns to face the viewer */
#homeMain .brand-logo-card:focus-visible {
  outline: 2px solid var(--moto-red);
  outline-offset: 4px;
  transform: var(--brand-tile-lift);
}

@media (hover: hover) and (pointer: fine) {
  #homeMain .brand-logo-card:hover {
    border-color: var(--moto-border-hover);
    box-shadow: 0 3px 0 var(--moto-border-hover);
    transform: var(--brand-tile-lift);
  }
}

#homeMain .brand-logo-media {
  --brand-logo-h: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-width: 0;
}

/* Logos set on two lines read smaller at the same height */
#homeMain .brand-logo-media.is-stacked {
  --brand-logo-h: 54px;
}

#homeMain .brand-logo-media img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: var(--brand-logo-h);
}

#homeMain .brand-wordmark {
  font-family: var(--font-display) !important;
  font-size: 1.05rem;
  font-stretch: 125%;
  font-style: italic;
  font-weight: 800;
  font-synthesis: none;
  letter-spacing: 0.01em;
  line-height: 1.1;
  text-align: center;
}

#homeMain .brand-wordmark[hidden] {
  display: none;
}

/* --------------------------------------------------------------------------
   Brand marquee. homepage.js repeats the group and sets --marquee-start to
   exactly one group, so the loop has no visible seam. The plane holds a fixed
   tilt and only the track moves, so the tilt is never redrawn per frame.
   Overflow stays on the outer box: on the plane it would flatten the 3D.
   Paused off-screen by homepage-sections.js.
   -------------------------------------------------------------------------- */
#homeMain .brand-marquee {
  --marquee-gap: clamp(12px, 1.5vw, 20px);
  --marquee-time: 60s;
  --brand-tilt-x: 10deg;
  --brand-tilt-y: -4deg;
  --brand-tile-lift:
    translateZ(28px)
    rotateY(calc(var(--brand-tilt-y) * -1))
    rotateX(calc(var(--brand-tilt-x) * -1));
  position: relative;
  padding-block: 22px;
  overflow: hidden;
  perspective: clamp(640px, 97vw, 1400px);
}

/* The edges fade into the page */
#homeMain .brand-marquee::before,
#homeMain .brand-marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  width: clamp(28px, 6%, 72px);
  pointer-events: none;
}

#homeMain .brand-marquee::before {
  left: 0;
  background: linear-gradient(90deg, var(--moto-black), transparent);
}

#homeMain .brand-marquee::after {
  right: 0;
  background: linear-gradient(270deg, var(--moto-black), transparent);
}

/* Wider than its box, so the tilt never shows the end of the row */
#homeMain .brand-marquee-plane {
  margin-inline: -8%;
  transform: rotateX(var(--brand-tilt-x)) rotateY(var(--brand-tilt-y));
  transform-style: preserve-3d;
}

#homeMain .brand-marquee-track {
  display: flex;
  width: max-content;
  transform-style: preserve-3d;
  animation: homeMarquee var(--marquee-time) linear infinite;
  will-change: transform;
}

#homeMain .brand-marquee:hover .brand-marquee-track,
#homeMain .brand-marquee:focus-within .brand-marquee-track,
#homeMain .brand-marquee.is-offscreen .brand-marquee-track {
  animation-play-state: paused;
}

@keyframes homeMarquee {
  to { transform: translateX(var(--marquee-start, 0)); }
}

/* The gap after the last item keeps the spacing the same across the join */
#homeMain .brand-logo-group {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--marquee-gap);
  margin: 0;
  padding: 0 var(--marquee-gap) 0 0;
  list-style: none;
  transform-style: preserve-3d;
}

/* No running row and no tilt for anyone who asked for less motion: the logos
   sit flat and scroll by hand */
@media (prefers-reduced-motion: reduce) {
  #homeMain .brand-marquee {
    overflow-x: auto;
    perspective: none;
    scrollbar-color: var(--moto-border-subtle) transparent;
    scrollbar-width: thin;
  }

  #homeMain .brand-marquee::before,
  #homeMain .brand-marquee::after {
    display: none;
  }

  #homeMain .brand-marquee-plane {
    margin-inline: 0;
    transform: none;
  }

  #homeMain .brand-marquee-track {
    animation: none;
    will-change: auto;
  }

  #homeMain .brand-logo-group[aria-hidden="true"] {
    display: none;
  }

  #homeMain .brand-logo-card,
  #homeMain .brand-logo-card:hover,
  #homeMain .brand-logo-card:focus-visible {
    transform: none;
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   Why Choose Motolectron: a divided strip, no boxes
   -------------------------------------------------------------------------- */
#homeMain .why-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--moto-border);
}

#homeMain .why-item {
  padding: 28px 24px 4px;
}

#homeMain .why-item:first-child {
  padding-left: 0;
}

#homeMain .why-item + .why-item {
  border-left: 1px solid var(--moto-border);
}

#homeMain .why-icon {
  display: block;
  width: 26px;
  height: 26px;
  margin-bottom: 16px;
  color: var(--moto-muted);
}

#homeMain .why-title {
  margin: 0 0 8px;
  color: var(--moto-text);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.3;
}

#homeMain .why-text {
  max-width: 34ch;
  margin: 0;
  color: var(--moto-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

#homeMain .why-text a {
  color: var(--moto-text);
  font-weight: 600;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: var(--moto-border-hover);
  text-underline-offset: 3px;
}

#homeMain .why-text a:hover {
  text-decoration-color: currentColor;
}

/* --------------------------------------------------------------------------
   Financing & Payment Options
   -------------------------------------------------------------------------- */
#homeMain .pay-columns {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--home-gap);
}

#homeMain .pay-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: clamp(20px, 2.4vw, 28px);
  border: 1px solid var(--moto-border);
  border-radius: var(--radius-lg);
  background: var(--moto-panel);
}

#homeMain .pay-panel-title {
  margin: 0;
  color: var(--moto-text);
  font-size: 1.1rem;
  font-weight: 700;
}

#homeMain .pay-panel-text {
  max-width: 52ch;
  margin: 0;
  color: var(--moto-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

#homeMain .pay-group-label {
  margin: 4px 0 -2px;
  color: var(--moto-text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
}

#homeMain .pay-logos {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Financing and online checkout: three in a row that never wraps */
#homeMain .pay-logos--lg {
  grid-template-columns: repeat(3, minmax(0, 120px));
}

/* QR Ph: 18 logos in three rows, see Responsive for smaller widths */
#homeMain .pay-logos--sm {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

#homeMain .partner-logo-media {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 1px solid var(--moto-border);
  border-radius: var(--radius-sm);
  background: var(--moto-panel-inset);
}

#homeMain .pay-logos--lg .partner-logo-media {
  height: 58px;
  padding: 10px 14px;
}

#homeMain .pay-logos--sm .partner-logo-media {
  height: 44px;
  padding: 5px 8px;
}

#homeMain .partner-logo-media img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

#homeMain .partner-logo-media .logo-on-light,
#homeMain .brand-logo-media .logo-on-light {
  display: none;
}

html[data-theme="light"] #homeMain .partner-logo-media .logo-on-dark,
html[data-theme="light"] #homeMain .brand-logo-media .logo-on-dark {
  display: none;
}

html[data-theme="light"] #homeMain .partner-logo-media .logo-on-light,
html[data-theme="light"] #homeMain .brand-logo-media .logo-on-light {
  display: block;
}

/* homepage.js hides a logo that failed to load and shows its text fallback */
#homeMain .partner-logo-media img[hidden],
#homeMain .brand-logo-media img[hidden] {
  display: none !important;
}

#homeMain .payment-logo-fallback:not([hidden]) {
  color: var(--moto-text);
  font-size: 0.74rem;
  font-weight: 700;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Latest News (admin-managed cards stay photo-backed in both themes)
   -------------------------------------------------------------------------- */
#homeMain .news-carousel-section {
  position: relative;
  width: 100%;
  margin: 0;
  padding-top: var(--section-pad-y);
  overflow: hidden;
}

#homeMain .news-carousel-container {
  position: relative;
  width: 100%;
  max-width: var(--ui-content-max, 1200px);
  margin-inline: auto;
  padding-inline: var(--home-gutter);
  box-sizing: border-box;
}

#homeMain .news-carousel-viewport {
  position: relative;
  overflow: hidden;
  padding: 6px 0 10px;
  user-select: none;
}

#homeMain .news-carousel-track {
  display: flex;
  gap: var(--home-gap);
  cursor: grab;
  transition: transform 0.45s var(--ease-out-expo);
  will-change: transform;
}

#homeMain .news-carousel-track.is-dragging {
  cursor: grabbing;
  transition: none;
}

#homeMain .news-card {
  position: relative;
  display: block;
  flex: 0 0 clamp(270px, 30vw, 350px);
  width: clamp(270px, 30vw, 350px);
  aspect-ratio: 1;
  height: auto;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background-color: #141418;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: var(--moto-card-shadow);
  cursor: pointer;
  transition:
    transform 320ms var(--ease-out-expo),
    box-shadow 320ms var(--ease-out-expo),
    scale var(--ix-scale-dur, 0.3s) var(--ix-scale-ease, ease);
}

#homeMain .news-card-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 45%, rgba(0, 0, 0, 0.06) 100%);
  color: #ffffff;
}

#homeMain .news-card-category {
  display: inline-block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#homeMain .news-card-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
}

#homeMain .news-card-desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.94rem;
  line-height: 1.55;
}

#homeMain .news-card:focus-visible {
  outline: 2px solid var(--moto-red);
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  #homeMain .news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--moto-card-shadow-hover);
  }
}

#homeMain .news-carousel-btn {
  position: absolute;
  top: calc(50% + 40px);
  z-index: 30;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.78);
  color: #ffffff;
  cursor: pointer;
  transform: translateY(-50%);
  transition: opacity var(--dur-base) ease, background-color var(--dur-fast) ease, scale var(--ix-scale-dur, 0.3s) var(--ix-scale-ease, ease);
}

#homeMain .news-carousel-btn svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.5;
  pointer-events: none;
}

#homeMain .news-carousel-btn:hover {
  background: rgba(10, 10, 10, 0.94);
}

#homeMain .news-carousel-btn:focus-visible {
  outline: 2px solid var(--moto-red);
  outline-offset: 3px;
}

#homeMain .news-carousel-btn-prev {
  left: max(6px, calc(var(--home-gutter) - 22px));
}

#homeMain .news-carousel-btn-next {
  right: max(6px, calc(var(--home-gutter) - 22px));
}

#homeMain .news-carousel-btn.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Customer Reviews (rendered by homepage-sections.js, hidden until 3 exist)
   -------------------------------------------------------------------------- */
#homeMain .review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--home-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

#homeMain .review-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  padding: 24px;
  box-sizing: border-box;
  border: 1px solid var(--moto-border);
  border-radius: var(--radius-lg);
  background: var(--moto-panel);
}

#homeMain .review-stars {
  display: flex;
  gap: 2px;
  color: var(--moto-warning);
}

#homeMain .review-stars svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

#homeMain .review-stars .is-empty {
  color: var(--moto-border-hover);
}

#homeMain .review-text {
  margin: 0;
  color: var(--moto-text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

#homeMain .review-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--moto-border);
  color: var(--moto-muted);
  font-size: 0.82rem;
}

#homeMain .review-author {
  color: var(--moto-text);
  font-weight: 600;
}

#homeMain .review-verified {
  color: var(--moto-success);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Visit Our Store
   -------------------------------------------------------------------------- */
#homeMain .store-section {
  padding-bottom: var(--section-pad-y);
}

#homeMain .store-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: stretch;
  gap: clamp(24px, 3.5vw, 48px);
}

#homeMain .store-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

#homeMain .store-info .section-subtitle {
  margin-bottom: 20px;
}

#homeMain .store-facts {
  display: grid;
  gap: 18px;
  margin: 0 0 28px;
}

#homeMain .store-fact dt {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  color: var(--moto-muted);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#homeMain .store-fact dt svg {
  width: 16px;
  height: 16px;
  flex: none;
}

#homeMain .store-fact dd {
  margin: 0 0 0 24px;
  color: var(--moto-text);
  font-size: 0.98rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

#homeMain .store-fact address {
  margin: 0;
  font-style: normal;
}

#homeMain .store-fact a {
  color: var(--moto-text);
  text-decoration: underline;
  text-decoration-color: var(--moto-border-hover);
  text-underline-offset: 3px;
}

#homeMain .store-fact a:hover {
  text-decoration-color: currentColor;
}

#homeMain .store-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
}

#homeMain .store-map {
  position: relative;
  min-height: 380px;
  overflow: hidden;
  border: 1px solid var(--moto-border);
  border-radius: var(--radius-lg);
  background: var(--moto-panel-inset);
}

#homeMain .store-map-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

html:not([data-theme="light"]) #homeMain .store-map-frame {
  filter: invert(90%) hue-rotate(180deg) brightness(85%) contrast(85%);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  #homeMain .pay-logos--sm {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  #homeMain .ride-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #homeMain .why-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #homeMain .why-item:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }

  #homeMain .why-item:nth-child(n + 3) {
    border-top: 1px solid var(--moto-border);
  }
}

@media (max-width: 900px) {
  #homeMain .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #homeMain .pay-columns,
  #homeMain .store-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  #homeMain .review-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #homeMain .store-map {
    min-height: 300px;
  }
}

@media (max-width: 640px) {
  /* The link moves under the subtitle so long titles keep the full width */
  #homeMain .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  #homeMain .btn-view-all {
    min-height: 40px;
    font-size: 0.86rem;
  }

  #homeMain .section-subtitle {
    font-size: 0.9rem;
  }

  #homeMain .pay-logos--sm {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #homeMain .pay-logos--lg .partner-logo-media {
    height: 52px;
    padding: 9px 12px;
  }

  #homeMain .store-actions > .home-btn {
    flex: 1 1 0;
  }
}

@media (max-width: 540px) {
  #homeMain .why-grid {
    grid-template-columns: minmax(0, 1fr);
    border-top: 0;
  }

  #homeMain .why-item,
  #homeMain .why-item:nth-child(odd),
  #homeMain .why-item + .why-item {
    padding: 22px 0 6px;
    border-left: 0;
    border-top: 1px solid var(--moto-border);
  }

  #homeMain .news-carousel-btn {
    display: none;
  }
}

@media (max-width: 340px) {
  #homeMain .pay-logos--sm {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Touch devices get no hover transforms; reduced motion gets none at all */
@media (prefers-reduced-motion: reduce) {
  #homeMain .ride-card,
  #homeMain .ride-card:hover,
  #homeMain .news-card:hover,
  #homeMain .ride-card:hover .ride-card-media img {
    transform: none !important;
  }

  #homeMain .btn-view-all svg,
  #homeMain .home-btn-icon,
  #homeMain .ride-card-cta svg {
    transition: none;
  }
}
