/* hero.css — popular-products carousel inside the hero's floating card.
   Namespaced .hc- (hero-carousel). Lives entirely within #heroCarouselMount,
   which keeps draft.css's .shell (outer bezel) wrapper; we render the .core
   and everything inside it. Cohesive with the .hv-product floating-card look. */

/* The mount keeps its .shell bezel + drift float from draft.css. We only need
   to make the inner core a positioned, padded container. */
#heroCarouselMount .hc-core {
  position: relative;
  padding: 0.85rem 0.85rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* ─────────── viewport + track ─────────── */
#heroCarouselMount .hc-viewport {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--r-xl) - var(--bezel) - 0.45rem);
  touch-action: pan-y;
  cursor: grab;
}
#heroCarouselMount .hc-viewport:active { cursor: grabbing; }

#heroCarouselMount .hc-track {
  display: flex;
  will-change: transform;
  /* transition is toggled inline (off during drag / reduced motion) */
}

#heroCarouselMount .hc-slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.55rem;
  padding: 0.2rem 0.15rem 0.35rem;
  background: none;
  border: 0;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  appearance: none;
  opacity: 0.35;
  transition: opacity 0.5s var(--soft-out, cubic-bezier(0.22,1,0.36,1));
}
#heroCarouselMount .hc-slide.is-active { opacity: 1; }
#heroCarouselMount .hc-slide:focus-visible {
  outline: 2px solid var(--herbalife);
  outline-offset: 3px;
  border-radius: 12px;
}

/* ─────────── product slide ─────────── */
#heroCarouselMount .hc-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  /* definite height so the image's max-height:100% resolves (aspect-ratio box
     doesn't propagate a resolvable % height → tall bottles would clip) */
  height: clamp(150px, 15vw, 196px);
  background: radial-gradient(14rem 10rem at 50% 30%, #fff, var(--porcelain-2));
  border-radius: calc(var(--r-xl) - var(--bezel) - 0.45rem);
  overflow: hidden;
}
#heroCarouselMount .hc-media img,
#heroCarouselMount .hc-media .hc-svg,
#heroCarouselMount .hc-media .hc-svg svg {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
#heroCarouselMount .hc-media .hc-svg {
  width: 78%;
  height: 78%;
  display: grid;
  place-items: center;
}

#heroCarouselMount .hc-cap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18rem;
  padding-top: 0.1rem;
}
#heroCarouselMount .hc-tag {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--herbalife);
  background: rgba(0, 158, 73, 0.1);
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.15rem;
}
#heroCarouselMount .hc-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.08rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
#heroCarouselMount .hc-price {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

/* ─────────── quiz slide (slide 0) ─────────── */
#heroCarouselMount .hc-quiz {
  justify-content: center;
  gap: 0.65rem;
  min-height: 1px;
  padding: 1.4rem 0.6rem 1.5rem;
  background:
    radial-gradient(18rem 12rem at 50% 0%, rgba(0,158,73,0.1), transparent 70%),
    linear-gradient(165deg, var(--paper), var(--porcelain-2));
  border-radius: calc(var(--r-xl) - var(--bezel) - 0.45rem);
}
#heroCarouselMount .hc-quiz-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
#heroCarouselMount .hc-dot-mark {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--herbalife);
  display: inline-block;
}
#heroCarouselMount .hc-quiz-line {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.18rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  max-width: 14ch;
}
#heroCarouselMount .hc-quiz-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cream-on-dark, #F2EDE0);
  background: var(--ink-deep);
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.45s var(--spring, cubic-bezier(0.32,0.72,0,1)), background-color 0.45s var(--spring, cubic-bezier(0.32,0.72,0,1));
}
#heroCarouselMount .hc-quiz:hover .hc-quiz-cta { background: var(--leaf, #1b6b3a); transform: translateY(-1px); }
#heroCarouselMount .hc-arrow-i {
  transition: transform 0.45s var(--spring, cubic-bezier(0.32,0.72,0,1));
}
#heroCarouselMount .hc-quiz:hover .hc-arrow-i { transform: translateX(3px); }

/* ─────────── arrows ─────────── */
#heroCarouselMount .hc-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(17, 39, 28, 0.08);
  background: rgba(252, 250, 244, 0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transition: opacity 0.35s var(--soft-out, cubic-bezier(0.22,1,0.36,1)), transform 0.35s var(--spring, cubic-bezier(0.32,0.72,0,1));
}
#heroCarouselMount .hc-prev { left: 0.4rem; }
#heroCarouselMount .hc-next { right: 0.4rem; }
#heroCarouselMount:hover .hc-arrow,
#heroCarouselMount .hc-arrow:focus-visible { opacity: 1; }
#heroCarouselMount .hc-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.08); }
#heroCarouselMount .hc-arrow:active { transform: translateY(-50%) scale(0.94); }
#heroCarouselMount .hc-arrow:focus-visible { outline: 2px solid var(--herbalife); outline-offset: 2px; }

/* ─────────── dots ─────────── */
#heroCarouselMount .hc-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding-top: 0.1rem;
}
#heroCarouselMount .hc-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 39, 28, 0.18);
  cursor: pointer;
  transition: width 0.4s var(--spring, cubic-bezier(0.32,0.72,0,1)), background-color 0.4s var(--soft-out, cubic-bezier(0.22,1,0.36,1));
}
#heroCarouselMount .hc-dot:hover { background: rgba(17, 39, 28, 0.32); }
#heroCarouselMount .hc-dot.is-active {
  width: 16px;
  background: var(--herbalife);
}
#heroCarouselMount .hc-dot:focus-visible { outline: 2px solid var(--herbalife); outline-offset: 2px; }

/* ─────────── mobile: hero stacks under 900px; carousel still tidy at ~360px ─────────── */
@media (max-width: 900px) {
  #heroCarouselMount .hc-arrow { opacity: 1; } /* no hover on touch → always show */
}
@media (max-width: 560px) {
  #heroCarouselMount .hc-core { padding: 0.75rem 0.75rem 0.65rem; }
  #heroCarouselMount .hc-name { font-size: 1rem; }
  #heroCarouselMount .hc-quiz-line { font-size: 1.08rem; }
}

/* ─────────── reduced motion ─────────── */
@media (prefers-reduced-motion: reduce) {
  #heroCarouselMount .hc-track,
  #heroCarouselMount .hc-slide,
  #heroCarouselMount .hc-arrow,
  #heroCarouselMount .hc-dot,
  #heroCarouselMount .hc-quiz-cta,
  #heroCarouselMount .hc-arrow-i { transition: none !important; }
}
