/* Homelights short-video reels. Scoped to .hl-reels to avoid theme conflicts. */
.hl-reels {
  --hl-ink: #171411;
  --hl-copy: #746d65;
  --hl-line: rgba(23, 20, 17, 0.22);
  --hl-surface: #f2eee8;
  --hl-accent: #b64a24;

  width: 100%;
  margin: 0;
  color: var(--hl-ink);
  background: #ffffff;
  font-family: inherit;
}

.hl-reels,
.hl-reels *,
.hl-reels *::before,
.hl-reels *::after {
  box-sizing: border-box;
}

.hl-reels a,
.hl-reels button {
  font: inherit;
}

.hl-reels a {
  color: inherit;
}

.hl-reels__inner {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0 0 clamp(64px, 5vw, 84px);
}

.hl-reels-section-wrap {
  width: 100%;
  max-width: none;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.hl-reels__topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  min-height: 48px;
  margin: 0 0 clamp(22px, 3vw, 36px);
  padding-right: clamp(16px, 2.5vw, 48px);
  padding-left: clamp(16px, 2.5vw, 48px);
}

.hl-reels__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(16px, 2.2vw, 30px);
}

.hl-reels__profile-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 0 5px;
  border-bottom: 1px solid var(--hl-line);
  color: var(--hl-ink) !important;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none !important;
  white-space: nowrap;
  transition:
    color 180ms ease,
    border-color 180ms ease;
}

.hl-reels__profile-link:hover,
.hl-reels__profile-link:focus-visible {
  border-color: currentColor;
  color: var(--hl-accent) !important;
}

.hl-reels__arrow {
  width: 30px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.35;
}

.hl-reels__nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hl-reels__nav-button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--hl-line);
  border-radius: 0;
  background: transparent;
  color: var(--hl-ink);
  cursor: pointer;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    opacity 180ms ease;
}

.hl-reels__nav-button:hover {
  border-color: var(--hl-ink);
  background: var(--hl-ink);
  color: #ffffff;
}

.hl-reels__nav-button:focus-visible,
.hl-reels__play:focus-visible,
.hl-reels__product:focus-visible,
.hl-reels__track:focus-visible {
  outline: 2px solid var(--hl-accent);
  outline-offset: 4px;
}

.hl-reels__nav-button:disabled {
  opacity: 0.28;
  cursor: default;
  pointer-events: none;
}

.hl-reels__nav-icon {
  width: 20px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.35;
}

.hl-reels__viewport {
  width: 100%;
  min-width: 0;
}

.hl-reels__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 90px) / 6);
  gap: 18px;
  width: 100%;
  margin: 0;
  padding: 0 0 3px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
}

.hl-reels__track::-webkit-scrollbar {
  display: none;
}

.hl-reels__card {
  min-width: 0;
  margin: 0;
  scroll-snap-align: start;
  -webkit-tap-highlight-color: transparent;
}

.hl-reels__media {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: var(--hl-surface);
  isolation: isolate;
}

.hl-reels__video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  background: #111111;
  object-fit: cover;
}

.hl-reels__media::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), transparent 24%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.3), transparent 30%);
  pointer-events: none;
  transition: opacity 240ms ease;
}

.hl-reels__card.is-playing .hl-reels__media::after,
.hl-reels__card.is-playing .hl-reels__play {
  opacity: 0;
  pointer-events: none;
}

.hl-reels__card.is-playing .hl-reels__media::after {
  visibility: hidden;
}

.hl-reels__play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: clamp(56px, 5vw, 74px);
  height: clamp(56px, 5vw, 74px);
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #171411;
  box-shadow:
    0 0 0 14px rgba(255, 255, 255, 0.12),
    0 10px 32px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition:
    background-color 180ms ease,
    transform 180ms ease,
    opacity 180ms ease;
}

.hl-reels__play:hover {
  background: #ffffff;
  transform: translate(-50%, -50%) scale(1.045);
}

.hl-reels__play svg {
  width: 18px;
  height: 22px;
  margin-left: 4px;
  fill: currentColor;
  pointer-events: none;
}

.hl-reels__play[data-replay="true"] svg {
  width: 24px;
  height: 24px;
  margin-left: 0;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.hl-reels__meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-height: 76px;
  padding: 16px 1px 0;
}

.hl-reels__product {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  color: var(--hl-ink) !important;
  text-decoration: none !important;
}

.hl-reels__product-name {
  display: -webkit-box;
  overflow: hidden;
  font-family: Verdana, Geneva, sans-serif;
  font-size: calc(var(--font-base-size, 15) * 1px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.hl-reels__product-action {
  flex: 0 0 auto;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--hl-line);
  color: var(--hl-ink);
  font-size: 14px;
  line-height: 1.35;
  white-space: nowrap;
  transition:
    color 180ms ease,
    border-color 180ms ease;
}

.hl-reels__product:hover .hl-reels__product-action,
.hl-reels__product:focus-visible .hl-reels__product-action {
  border-color: currentColor;
  color: var(--hl-accent);
}

@media (min-width: 1200px) {
  .hl-reels__meta {
    min-height: 88px;
  }

  .hl-reels__product {
    display: block;
  }

  .hl-reels__product-action {
    display: inline-block;
    margin-top: 4px;
  }
}

@media (max-width: 1199px) {
  .hl-reels__track {
    grid-auto-columns: calc((100% - 54px) / 4);
    gap: 18px;
  }

  .hl-reels__meta {
    min-height: 92px;
  }

  .hl-reels__product {
    display: block;
  }

  .hl-reels__product-action {
    display: inline-block;
    margin-top: 8px;
  }
}

@media (max-width: 900px) {
  .hl-reels__inner {
    padding: 0 0 56px;
  }

  .hl-reels__track {
    grid-auto-columns: calc((100% - 20px) / 2);
    gap: 20px;
  }

  .hl-reels__meta {
    min-height: 78px;
  }
}

@media (max-width: 600px) {
  .hl-reels__inner {
    padding: 0 0 48px;
  }

  .hl-reels__topbar {
    justify-content: flex-end;
    margin-bottom: 22px;
  }

  .hl-reels__actions {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .hl-reels__profile-link {
    gap: 8px;
    font-size: 14px;
  }

  .hl-reels__arrow {
    width: 24px;
  }

  .hl-reels__nav {
    gap: 8px;
  }

  .hl-reels__nav-button {
    width: 44px;
    height: 44px;
  }

  .hl-reels__track {
    grid-auto-columns: 82%;
    gap: 14px;
  }

  .hl-reels__meta {
    min-height: 72px;
    padding-top: 13px;
  }

  .hl-reels__product,
  .hl-reels__product-name {
    display: block;
  }

  .hl-reels__product-name {
    display: -webkit-box;
    font-family: Verdana, Geneva, sans-serif;
    font-size: calc(var(--font-base-size, 15) * 1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hl-reels__track {
    scroll-behavior: auto;
  }

  .hl-reels *,
  .hl-reels *::before,
  .hl-reels *::after {
    transition: none !important;
  }
}
