/* ============================================================
   10K USED GEAR — PROMO BANNER SLIDER
   Ported verbatim from the hand-coded homepage <style> block so the
   plugin renders identically to what it replaces.

   The homepage defines --tku-* on :root. Every var() here carries the
   homepage's literal value as a fallback so the slider also looks
   correct on pages that don't ship those custom properties.
   ============================================================ */
.tku-promo-slot {
  background: var(--tku-offwhite, #f7f9fb);
  padding: 36px 0;
  border-top: 1px solid var(--tku-border, rgba(0,40,68,.1));
  border-bottom: 1px solid var(--tku-border, rgba(0,40,68,.1));
}
.tku-promo-slot .tku-con {
  /* The homepage supplies .tku-con; repeat it here (harmlessly identical)
     so the slot is still centred and guttered when used standalone. */
  max-width: var(--tku-max, 1240px);
  margin: 0 auto;
  padding: 0 24px;
}
.tku-promo-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--tku-shl, 0 8px 32px rgba(0,40,68,.14));
}
/* Default placeholder state — shown to logged-in editors only, when no
   banners are active, so an empty slot is obvious in admin but invisible
   to the public (the shortcode renders nothing at all for visitors). */
.tku-promo-placeholder {
  border: 2px dashed rgba(0,138,205,.3);
  border-radius: var(--tku-r, 6px);
  padding: 36px;
  text-align: center;
  color: var(--tku-muted, #6b7f91);
  font-size: .9rem;
  background: rgba(0,138,205,.03);
}
/* --- Promo banner slider (cycling, auto-sizes to active banner) --- */
.tku-promo-slider {
  position: relative;
  border-radius: var(--tku-r, 6px);
  overflow: hidden;
  box-shadow: var(--tku-sh, 0 2px 16px rgba(0,40,68,.08));
  background: var(--tku-offwhite, #f7f9fb);
  /* Floor for the rare case an image fails to load; normally the width/height
     attributes on the <img> reserve the right space before it arrives. No
     height transition: the slot is sized by the in-flow active frame (below)
     rather than by a pixel height set from JS, so there is nothing to animate. */
  min-height: 80px;
}
.tku-promo-track {
  position: relative;
  width: 100%;
}
/* Inactive frames are lifted out of the flow and stacked; the ACTIVE frame stays
   in flow, so the track (and so the slot) is exactly as tall as the banner on
   show. The original stylesheet made every frame absolute, which collapsed the
   slot to min-height until the script measured the image and set a pixel height
   — a visible jump on every page load. In flow, the slot is correctly sized by
   the HTML alone, so the script no longer manages height at all. */
.tku-promo-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
.tku-promo-frame--active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}
.tku-promo-frame .tku-promo-link {
  display: block;
  transition: transform .2s ease, box-shadow .2s ease;
}
.tku-promo-frame img {
  width: 100%;
  height: auto;
  display: block;
}
.tku-promo-arr {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(0,40,68,.55);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease;
}
.tku-promo-arr:hover { background: var(--tku-blue, #008acd); }
.tku-promo-arr--prev { left: 12px; }
.tku-promo-arr--next { right: 12px; }
.tku-promo-dots {
  /* Hidden by request — arrows handle navigation. Set display:flex to bring them back. */
  display: none;
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  gap: 6px;
  z-index: 3;
}
.tku-promo-dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255,255,255,.5);
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.tku-promo-dots button:hover { transform: scale(1.15); }
.tku-promo-dots button.tku-promo-dot-active { background: var(--tku-blue, #008acd); }

/* A single banner needs no navigation. Done in CSS rather than JS (as the
   old inline script did) so there is no flash of arrows before JS runs. */
.tku-promo-slider--single .tku-promo-arr,
.tku-promo-slider--single .tku-promo-dots { display: none; }

/* A banner with no mobile image is hidden below 768px. This preserves the old
   script's rule exactly: on a phone it only showed banners that had a mobile
   image, while desktop fell back to the mobile image if no desktop one was set.
   The old code enforced that by rebuilding the track per breakpoint; doing it
   in CSS keeps the markup server-rendered (no CLS) and the JS just skips any
   frame the breakpoint has hidden. */
@media (max-width: 767px) {
  .tku-promo-frame--desktop-only { display: none; }
}
