/*
 * Jontro Bazar – Brand Strip CSS
 * File: /wp-content/themes/YOUR-CHILD-THEME/jontrobazar/brand-strip.css
 *
 * Slim continuous marquee. Pure CSS — no JavaScript.
 * Scoped .jbbs-* · Loads on homepage only.
 */

/* ═══════════════════════════════════════
   STRIP
═══════════════════════════════════════ */
.jbbs {
  display: flex;
  align-items: stretch;
  width: 100%;
  background: #fff;
  border-top: 1px solid #ECECF0;
  border-bottom: 1px solid #ECECF0;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  box-sizing: border-box;
  overflow: hidden;
  contain: layout paint;
}
.jbbs *, .jbbs *::before, .jbbs *::after { box-sizing: inherit; }

/* ═══════════════════════════════════════
   LEFT LABEL ("64+ Trusted Brands")
═══════════════════════════════════════ */
.jbbs__label {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 10px 18px;
  background: #F26522;
  color: #fff;
  position: relative;
  z-index: 2;
}
.jbbs__label-num {
  font-family: 'Syne', Georgia, serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}
.jbbs__label-text {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  line-height: 1.2;
  opacity: .92;
  white-space: nowrap;
}

/* ═══════════════════════════════════════
   SCROLLING AREA
═══════════════════════════════════════ */
.jbbs__viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  position: relative;
  /* soft fade on both edges */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
}

.jbbs__track {
  display: flex;
  width: max-content;
  /* 64 brands x 2 copies — slow, readable speed */
  animation: jbbsScroll 260s linear infinite;
  will-change: transform;
}
.jbbs__viewport:hover .jbbs__track,
.jbbs__viewport:focus-within .jbbs__track {
  animation-play-state: paused;
}

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

/* ═══════════════════════════════════════
   BRAND ITEM
═══════════════════════════════════════ */
.jbbs__item {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 9px 22px;
  text-decoration: none;
  border-right: 1px solid #F0F0F3;
  transition: background .18s ease;
}
.jbbs__item:hover,
.jbbs__item:focus-visible {
  background: #FFF3EC;
  outline: none;
}

.jbbs__name {
  font-family: 'Syne', Georgia, serif;
  font-size: 15px;
  font-weight: 800;
  color: #111;
  line-height: 1.15;
  white-space: nowrap;
  transition: color .18s ease;
}
.jbbs__item:hover .jbbs__name { color: #F26522; }

.jbbs__info {
  font-size: 11px;
  font-weight: 500;
  color: #888;
  line-height: 1.2;
  white-space: nowrap;
}

/* ═══════════════════════════════════════
   MOBILE — even slimmer
═══════════════════════════════════════ */
@media (max-width: 600px) {
  .jbbs__label        { padding: 8px 12px; }
  .jbbs__label-num    { font-size: 15px; }
  .jbbs__label-text   { font-size: 9px; }
  .jbbs__item         { padding: 8px 16px; }
  .jbbs__name         { font-size: 13.5px; }
  .jbbs__info         { font-size: 10.5px; }
  .jbbs__track        { animation-duration: 200s; }
}

/* ═══════════════════════════════════════
   REDUCED MOTION — no animation,
   strip becomes a manual swipe/scroll row
═══════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .jbbs__viewport { overflow-x: auto; }
  .jbbs__track    { animation: none; }
}
