/* =====================================================================
   Hot Categories (homepage) — single-row modern slider.
   Uses theme tokens from modern-ui.css (--oc-*).
   ===================================================================== */
.oc-hotcat {
  --h-accent: var(--oc-accent, var(--base_color, #ff0027));
  --h-ink: var(--oc-ink, #1f2430);
  --h-muted: #6b7280;
  --h-line: rgba(17, 24, 39, .08);
  --h-ease: var(--oc-ease, cubic-bezier(.22, .61, .36, 1));
  --h-gap: 20px;
  --h-per: 4;                 /* cards visible per view */
  animation: ocFadeUp .6s var(--h-ease) both;
}

/* ---------- Header ---------- */
.oc-hotcat__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.oc-hotcat__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: #c2410c;
  background: #fff1e6;
  border-radius: 999px;
}
.oc-hotcat__title {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.3px;
  color: var(--h-ink);
}
.oc-hotcat__sub { margin: 6px 0 0; font-size: 14px; color: var(--h-muted); }

.oc-hotcat__controls { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.oc-hotcat__all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--h-ink);
  background: #fff;
  border: 1px solid var(--h-line);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(16, 24, 40, .06);
  transition: all .25s var(--h-ease);
}
.oc-hotcat__all:hover { color: #fff; background: var(--h-accent); border-color: var(--h-accent); }
.oc-hotcat__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 16px;
  color: var(--h-ink);
  background: #fff;
  border: 1px solid var(--h-line);
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(16, 24, 40, .06);
  cursor: pointer;
  transition: all .25s var(--h-ease);
}
.oc-hotcat__nav:hover { color: #fff; background: var(--h-ink); border-color: var(--h-ink); transform: translateY(-1px); }
.oc-hotcat__nav:focus-visible { outline: 3px solid rgba(255, 0, 39, .35); outline-offset: 2px; }
.oc-hotcat.is-static .oc-hotcat__nav,
.oc-hotcat.is-static .oc-hotcat__progress { display: none; }

/* ---------- Slider viewport + track (one row) ---------- */
.oc-hotcat__viewport {
  position: relative;
  /* Soft fade on the edges that have more cards */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  margin: 0 -12px;
}
.oc-hotcat.at-start .oc-hotcat__viewport {
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 24px), transparent 100%);
          mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 24px), transparent 100%);
}
.oc-hotcat.at-end .oc-hotcat__viewport {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 100%);
}
.oc-hotcat.is-static .oc-hotcat__viewport { -webkit-mask-image: none; mask-image: none; }

.oc-hotcat__track {
  display: flex;
  gap: var(--h-gap);
  padding: 8px 12px 18px;           /* room for hover lift + shadow */
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 12px;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
}
.oc-hotcat__track::-webkit-scrollbar { display: none; }
.oc-hotcat__track:focus-visible { outline: 3px solid rgba(255, 0, 39, .25); outline-offset: 2px; border-radius: 20px; }
.oc-hotcat__track.is-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; user-select: none; }
.oc-hotcat__track.is-dragging a { pointer-events: none; }

/* ---------- Card ---------- */
.oc-hotcat-card {
  flex: 0 0 calc((100% - (var(--h-per) - 1) * var(--h-gap)) / var(--h-per));
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--h-line);
  border-radius: 20px;
  box-shadow: 0 6px 20px rgba(16, 24, 40, .06);
  transition: transform .35s var(--h-ease), box-shadow .35s var(--h-ease);
}
.oc-hotcat-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(16, 24, 40, .14); }

/* Gap-free mosaic: photos always fill the whole frame (3 / 2 / 1 layouts). */
.oc-hotcat-card__mosaic {
  position: relative;
  display: grid;
  gap: 2px;
  height: 280px;
  background: #f4f5f7;
  overflow: hidden;
}
.oc-hotcat-card__mosaic[data-count="3"] { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.oc-hotcat-card__mosaic[data-count="3"] .oc-hotcat-card__tile:first-child { grid-row: 1 / span 2; }
.oc-hotcat-card__mosaic[data-count="2"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.oc-hotcat-card__mosaic[data-count="1"] { grid-template-columns: 1fr; grid-template-rows: 1fr; }

.oc-hotcat-card__tile {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #eef0f3;
}
/* Override the old global rule (welcome.css: a.single_feature_slide_img img {max-height:130px;width:auto!important}) */
.oc-hotcat-card__tile img {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover;
  object-position: center top;
  transition: transform .8s var(--h-ease), filter .4s var(--h-ease);
  -webkit-user-drag: none;
}
.oc-hotcat-card__tile:hover img { transform: scale(1.07); }
.oc-hotcat-card:hover .oc-hotcat-card__tile:not(:hover) img { filter: saturate(.85) brightness(.95); }
.oc-hotcat-card__tile .oc-id-sku--overlay { z-index: 3; }

/* subtle gradient so the bottom edge blends into the card */
.oc-hotcat-card__shade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .12));
  pointer-events: none;
  z-index: 1;
}

/* Footer */
.oc-hotcat-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 16px;
  color: var(--h-ink);
}
.oc-hotcat-card__text { display: flex; flex-direction: column; min-width: 0; }
.oc-hotcat-card__name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--h-ink);
  transition: color .25s var(--h-ease);
}
.oc-hotcat-card__count { font-size: 12px; font-weight: 600; color: var(--h-muted); }
.oc-hotcat-card__go {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: var(--h-ink);
  background: #f4f5f7;
  border-radius: 50%;
  transition: all .3s var(--h-ease);
}
.oc-hotcat-card__foot:hover .oc-hotcat-card__name { color: var(--h-accent); }
.oc-hotcat-card:hover .oc-hotcat-card__go { color: #fff; background: var(--h-accent); transform: translateX(3px); }

/* ---------- Progress bar ---------- */
.oc-hotcat__progress {
  position: relative;
  height: 4px;
  max-width: 220px;
  margin: 6px auto 0;
  overflow: hidden;
  background: rgba(17, 24, 39, .08);
  border-radius: 999px;
}
.oc-hotcat__progress span {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 25%;
  background: linear-gradient(90deg, var(--h-accent), #ff7a59);
  border-radius: 999px;
  transition: transform .3s var(--h-ease), width .3s var(--h-ease);
}

/* ---------- Responsive: cards per view ---------- */
@media (max-width: 1199.98px) { .oc-hotcat { --h-per: 3; } }
@media (max-width: 991.98px)  { .oc-hotcat { --h-per: 2; --h-gap: 16px; } }
@media (max-width: 767.98px) {
  .oc-hotcat { --h-per: 1.25; --h-gap: 14px; }
  .oc-hotcat__head { flex-direction: column; align-items: flex-start; }
  .oc-hotcat__title { font-size: 24px; }
  .oc-hotcat__controls { width: 100%; }
  .oc-hotcat__all { margin-right: auto; height: 40px; }
  .oc-hotcat__nav { width: 40px; height: 40px; }
  .oc-hotcat-card:hover { transform: none; }
  .oc-hotcat-card__mosaic { height: 240px; }
}
@media (max-width: 400px) { .oc-hotcat { --h-per: 1.12; } }

@media (prefers-reduced-motion: reduce) {
  .oc-hotcat, .oc-hotcat-card, .oc-hotcat-card__tile img, .oc-hotcat-card__go, .oc-hotcat__progress span { animation: none; transition: none; }
  .oc-hotcat__track { scroll-behavior: auto; }
}

