/* Kraftrs Promotions — Banner Strip
 * Standalone, responsive row of active campaign banners for
 * [kraftrs_offers_banner] and BannerStripWidget. Self-contained — no
 * dependency on cart-drawer.css/offers-rail.css, since this can render on
 * any page regardless of whether either of those features is enabled.
 */

.kp-banner-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 10px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.kp-banner-strip-item {
  display: block;
  flex: 0 0 auto;
  max-width: 100%;
  height: auto;
  max-height: 160px;
  width: auto;
  border-radius: 10px;
  scroll-snap-align: start;
  object-fit: cover;
}

/* A single banner (the common case) fills the available width instead of
   floating at its native size in a mostly-empty row. */
.kp-banner-strip:has(.kp-banner-strip-item:only-child) .kp-banner-strip-item {
  width: 100%;
  max-width: none;
}

/* Text banner — the alternative to an image banner. A campaign carries one
   or the other, never both. */
.kp-banner-strip-text {
  flex: 1 1 260px;
  min-width: 0;
  padding: 16px 20px;
  border-radius: 10px;
  background: var(--kp-primary, #f5a623);
  color: #fff;
  scroll-snap-align: start;
}

.kp-banner-strip-text strong {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}

.kp-banner-strip-text span {
  display: block;
  font-size: 0.85rem;
  opacity: 0.92;
  margin-top: 3px;
  line-height: 1.4;
}

@media (max-width: 480px) {
  .kp-banner-strip-item {
    max-height: 120px;
  }
}
