﻿/* ============================================================
   VI Feerie — Banner slider + hàng chọn lens nổi trên ảnh
   ============================================================ */

.hero {
  position: relative;
  background: var(--ink);
}

.hero__viewport {
  position: relative;
  overflow: hidden;
}

.hero__track {
  display: flex;
  transition: transform 0.6s var(--ease);
  will-change: transform;
}

/* ---------------- Slide: chỉ có ảnh banner ---------------- */
.slide {
  flex: 0 0 100%;
  min-width: 100%;
}

.slide__link {
  display: block;
}

.slide__link img {
  width: 100%;
  /* Cao bằng phần màn hình còn lại dưới header, nhưng chặn lại ở màn rất lớn */
  height: calc(100vh - var(--header-h));
  min-height: 420px;
  max-height: 820px;
  object-fit: cover;
  object-position: center 42%;
}

/* ---------------- Mũi tên ---------------- */
.hero__arrow {
  position: absolute;
  top: 50%;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-top: -23px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  opacity: 0;
  transition: opacity 0.3s var(--ease), background 0.25s var(--ease),
    color 0.25s var(--ease);
}

.hero__arrow svg {
  width: 20px;
  height: 20px;
}

.hero__viewport:hover .hero__arrow,
.hero__arrow:focus-visible {
  opacity: 1;
}

.hero__arrow:hover {
  background: var(--brand);
  color: #fff;
}

.hero__arrow--prev { left: 20px; }
.hero__arrow--next { right: 20px; }

/* ---------------- Hàng chọn màu lens (nằm dưới Lens Match) ---------------- */
.lensrail {
  padding: 0 0 56px;
}

.lensrail__inner {
  display: flex;
  justify-content: center;
}

.lensrail__list {
  display: flex;
  gap: 4px;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(18, 14, 11, 0.5);
  backdrop-filter: blur(14px);
  overflow-x: auto;
  scrollbar-width: none;
}

.lensrail__list::-webkit-scrollbar {
  display: none;
}

.lens {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 6px 12px 8px;
  border-radius: 999px;
  transition: background 0.25s var(--ease);
}

.lens:hover {
  background: rgba(255, 255, 255, 0.1);
}

.lens__img {
  display: block;
  width: 42px;
  height: 42px;
  padding: 2px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}

.lens__img img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.lens__name {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
  transition: color 0.25s var(--ease);
}

.lens:hover .lens__img {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px var(--brand-light);
}

.lens:hover .lens__name {
  color: #fff;
}

.lens.is-active .lens__img {
  box-shadow: 0 0 0 2px var(--brand);
}

.lens.is-active .lens__name {
  color: var(--brand-light);
  font-weight: 600;
}

/* ============================================================
   Responsive
   ============================================================ */

@media screen and (max-width: 1100px) {
  .hero__arrow {
    width: 40px;
    height: 40px;
    margin-top: -20px;
  }
  .hero__arrow--prev { left: 12px; }
  .hero__arrow--next { right: 12px; }
}

@media screen and (max-width: 820px) {
  .slide__link img {
    height: auto;
    aspect-ratio: 4 / 3;
    min-height: 0;
    max-height: 62vh;
  }
  .hero__arrow {
    display: none;
  }
  .lensrail {
    padding-bottom: 36px;
  }
  .lensrail__inner {
    justify-content: flex-start;
  }
  .lensrail__list {
    gap: 2px;
    padding: 8px 10px;
  }
  .lens {
    padding: 5px 9px 7px;
  }
  .lens__img {
    width: 38px;
    height: 38px;
  }
  .lens__name {
    font-size: 10.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__track {
    transition: none;
  }
}
