/* ============================================================
   VI FEERIE — Section "Máy tìm lens" (Smart Lens Finder)
   Redesign theo feedback khách: progress bar có cánh bay,
   3 vòng tròn mắt kiểu slider, 2×2 grid style, 3 ring GDIA,
   icon lịch & 24h cho loại lens, sao trang trí.
   ============================================================ */

.finder-section {
  position: relative;
  padding: 72px 0 84px;
  background: linear-gradient(180deg, #ffffff 0%, #fdf6f9 50%, #ffffff 100%);
  border-top: 1px solid var(--line);
  overflow: hidden;
}

/* Nền tròn mờ */
.finder-section::before,
.finder-section::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 233, 241, 0.6) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
  z-index: 0;
}
.finder-section::before { top: 8%; left: -100px; }
.finder-section::after { bottom: 8%; right: -100px; }

/* ============================================================
   Sao trang trí
   ============================================================ */
.finder-star {
  position: absolute;
  width: 44px;
  height: 44px;
  background: #dfb9d2;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}

.finder-star--1 { top: -28px; left: 4%; }
.finder-star--2 { top: -52px; left: 66%; width: 48px; height: 48px; }
.finder-star--3 { top: 15%; right: -25px; }
.finder-star--4 { bottom: -27px; left: 13%; }
.finder-star--5 { bottom: -56px; left: 50%; width: 48px; height: 48px; }
.finder-star--6 { bottom: -28px; right: 13%; }

/* ============================================================
   Container
   ============================================================ */
.finder-container {
  position: relative;
  z-index: 2;
  max-width: 980px;
  margin: 0 auto;
}

.finder-head {
  text-align: center;
  margin-bottom: 36px;
}

.finder-head__title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.25;
}

.finder-head__desc {
  font-size: 15px;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
}

/* ============================================================
   Khung chính (box bo tròn mềm mại)
   ============================================================ */
.finder-box {
  position: relative;
  background: #ffffff;
  border: 1px solid #efe3ea;
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(109, 70, 94, 0.08);
  padding: 48px 56px 44px;
  transition: all 0.3s var(--ease);
}

/* sr-only (ẩn khỏi màn hình nhưng vẫn đọc được) */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============================================================
   HERO (Màn hình khởi đầu)
   ============================================================ */
.finder-hero {
  text-align: center;
  padding: 8px 0 16px;
}

.finder-hero__title-wrap {
  margin-bottom: 20px;
}

.finder-hero__title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.08em;
  margin: 0 0 4px;
  line-height: 1;
}

.finder-hero__subtitle {
  font-size: 16px;
  color: var(--muted);
  margin: 0;
  font-style: italic;
}

.finder-hero__label-main {
  font-size: 14px;
  color: var(--muted);
  margin: 24px 0 18px;
  font-style: italic;
}

/* Slider track với 3 mắt làm nút — track dài full chiều rộng finder-box */
.finder-hero__slider-wrap {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0 auto 36px;
  padding: 0;
}

.finder-hero__slider-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 36px; /* căn giữa với tâm của eye (eye 72px) */
  height: 8px;
  background: linear-gradient(90deg, #3a251a 0%, #7a4b2c 50%, #c48a4f 100%);
  border-radius: 999px;
  z-index: 0;
}

.finder-hero__slider-fill {
  display: none; /* không cần nữa — track đã có gradient */
}

.finder-hero__points {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding: 0;
}

.finder-hero__point {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  outline: none;
  transition: transform 0.25s var(--ease);
}

.finder-hero__point:hover {
  transform: translateY(-2px);
}

/* Mắt tròn — dùng ảnh thật từ designer */
.finder-hero__eye {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: #ffffff;
  display: block;
  position: relative;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.finder-hero__eye img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.finder-hero__point.is-active .finder-hero__eye {
  transform: scale(1.18);
  box-shadow: 0 8px 22px rgba(143, 107, 132, 0.3), 0 0 0 3px rgba(143, 107, 132, 0.18);
}

.finder-hero__label {
  font-size: 13px;
  color: var(--muted);
  transition: all 0.25s var(--ease);
  margin-top: 4px;
  white-space: nowrap;
}

.finder-hero__point.is-active .finder-hero__label {
  color: var(--ink);
  font-weight: 700;
}

/* CTA button */
.finder-hero__actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}

.finder-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 32px;
  border-radius: 999px;
  background: var(--brand);
  color: #ffffff;
  border: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(143, 107, 132, 0.3);
  transition: all 0.25s var(--ease);
}

.finder-hero__cta:hover {
  background: var(--brand-deep);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(143, 107, 132, 0.4);
}

/* ============================================================
   WIZARD — Progress bar có cánh bay
   ============================================================ */
.finder-progress {
  position: relative;
  max-width: 560px;
  margin: 0 auto 40px;
  padding: 28px 32px 24px;
  height: 60px;
}

/* Đường kẻ liền mạch chạy giữa các dot */
.finder-progress__track {
  position: absolute;
  left: 36px;
  right: 36px;
  top: 50%;
  height: 2.5px;
  background: #c9a8bd;
  border-radius: 999px;
  transform: translateY(-50%);
  z-index: 0;
}

.finder-progress__fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: var(--brand-deep);
  border-radius: 999px;
  transition: width 0.4s var(--ease);
}

.finder-progress__steps {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  height: 100%;
}

.finder-progress__step {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #c9a8bd;
  transition: all 0.3s var(--ease);
}

.finder-progress__step.is-done,
.finder-progress__step.is-current {
  background: var(--brand-deep);
}

/* Icon cánh bay — đè che lên dot & line bước hiện tại */
.finder-progress__wing {
  position: absolute;
  top: 50%;
  left: 36px;
  width: 36px;
  height: 36px;
  transform: translate(-50%, -50%);
  transition: left 0.4s var(--ease);
  pointer-events: none;
  z-index: 3;
  background-color: #ffffff;
}

.finder-progress__wing svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Vòng trắng đệm phía sau wing để che hoàn toàn dot + line */
.finder-progress__wing::before {
  content: "";
  position: absolute;
  inset: 20% 10% 20% 25%;
  background: #ffffff;
  border-radius: 50%;
  z-index: -1;
}

/* ============================================================
   Step content
   ============================================================ */
.finder-step {
  display: none;
  animation: finderFadeIn 0.35s var(--ease);
}

.finder-step.is-active {
  display: block;
}

@keyframes finderFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.finder-step__title {
  font-size: 16px;
  color: var(--muted);
  text-align: center;
  margin: 0 0 28px;
  font-style: italic;
}

/* Grid lựa chọn */
.finder-options {
  display: grid;
  gap: 20px;
  margin-bottom: 36px;
  justify-content: center;
}

.finder-options--3cols {
  grid-template-columns: repeat(3, 1fr);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.finder-options--2cols {
  grid-template-columns: repeat(2, 1fr);
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.finder-options--2x2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   Thẻ Option chung
   ============================================================ */
.finder-opt {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 14px;
  background: #ffffff;
  border: 1.5px solid #e9d9e2;
  border-radius: 14px;
  cursor: pointer;
  outline: none;
  font: inherit;
  color: inherit;
  text-align: center;
  transition: all 0.25s var(--ease);
}

.finder-opt:hover {
  border-color: var(--brand-light, #c9a8bd);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(143, 107, 132, 0.1);
}

.finder-opt.is-selected {
  border-color: var(--brand-deep);
  background: #fffaff;
  box-shadow: 0 6px 18px rgba(143, 107, 132, 0.16);
}

.finder-opt__label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.finder-opt.is-selected .finder-opt__label {
  color: var(--brand-deep);
}

/* ============================================================
   Step 1 — Mắt (ảnh tròn)
   ============================================================ */
.finder-options--eye .finder-opt {
  padding: 20px 14px 16px;
  border-radius: 14px;
}

.finder-opt__eye {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  margin-bottom: 6px;
  overflow: hidden;
  background: #ffffff;
  display: block;
  position: relative;
  transition: transform 0.25s var(--ease);
}

.finder-opt__eye img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.finder-opt.is-selected .finder-opt__eye {
  transform: scale(1.04);
}

/* ============================================================
   Step 2 — Tile icon (2×2)
   ============================================================ */
.finder-opt--tile {
  padding: 22px 14px 18px;
  min-height: 150px;
  gap: 8px;
}

.finder-opt__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  color: var(--brand-deep);
  margin-bottom: 2px;
  position: relative;
}

/* Glow halo mờ phía sau icon cho đẹp (giống mockup) */
.finder-opt__icon::before {
  content: "";
  position: absolute;
  inset: 8%;
  background: radial-gradient(circle, rgba(228, 199, 215, 0.45) 0%, rgba(255, 255, 255, 0) 65%);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

.finder-opt__icon svg,
.finder-opt__icon img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ============================================================
   Step 3 — Vòng tròn GDIA 3 size (có đường đo kích thước)
   ============================================================ */
.finder-options--gdia .finder-opt {
  padding: 14px 10px 14px;
  gap: 8px;
  border-radius: 14px;
}

.finder-opt--circle {
  justify-content: flex-end;
}

.finder-opt__ring {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px solid #2a1f26;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  background: transparent;
  transition: all 0.25s var(--ease);
}

.finder-opt__ring--sm { width: 92px; height: 92px; }
.finder-opt__ring--md { width: 110px; height: 110px; }
.finder-opt__ring--lg { width: 128px; height: 128px; }

.finder-opt.is-selected .finder-opt__ring {
  border-color: var(--brand-deep);
  color: var(--brand-deep);
}

.finder-opt__ring-label {
  text-align: center;
  padding: 0 6px;
}

/* Đường đo kích thước: nét đứt + 2 tick dọc 2 đầu */
.finder-opt__dim-line {
  position: relative;
  display: block;
  height: 1px;
  margin-top: 2px;
  background-image: linear-gradient(to right, #c9a8bd 50%, transparent 50%);
  background-size: 6px 1px;
  background-repeat: repeat-x;
}

.finder-opt--circle:nth-of-type(1) .finder-opt__dim-line { width: 92px; }
.finder-opt--circle:nth-of-type(2) .finder-opt__dim-line { width: 110px; }
.finder-opt--circle:nth-of-type(3) .finder-opt__dim-line { width: 128px; }

.finder-opt__dim-line::before,
.finder-opt__dim-line::after {
  content: "";
  position: absolute;
  top: -5px;
  width: 1.5px;
  height: 11px;
  background: #c9a8bd;
  border-radius: 1px;
}

.finder-opt__dim-line::before { left: 0; }
.finder-opt__dim-line::after { right: 0; }

.finder-opt.is-selected .finder-opt__dim-line {
  background-image: linear-gradient(to right, var(--brand-deep) 50%, transparent 50%);
}

.finder-opt.is-selected .finder-opt__dim-line::before,
.finder-opt.is-selected .finder-opt__dim-line::after {
  background: var(--brand-deep);
}

.finder-opt__dim {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-top: 2px;
}

.finder-opt.is-selected .finder-opt__dim {
  color: var(--brand-deep);
  font-weight: 600;
}

/* ============================================================
   Step 4 — Loại lens (icon tile)
   ============================================================ */
.finder-options--duration .finder-opt--tile {
  min-height: 170px;
  padding: 26px 16px 20px;
}

.finder-options--duration .finder-opt__icon {
  width: 96px;
  height: 96px;
}

.finder-options--duration .finder-opt__label {
  font-size: 15px;
}

/* ============================================================
   Nút điều hướng
   ============================================================ */
.finder-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  margin-top: 8px;
}

.finder-nav__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  font-family: inherit;
}

.finder-nav__btn--back {
  background: #ffffff;
  border: 1.5px solid #e9d9e2;
  color: var(--muted);
}

.finder-nav__btn--back:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* ============================================================
   MÀN HÌNH KẾT QUẢ GỢI Ý
   ============================================================ */
.finder-results {
  display: none;
  animation: finderFadeIn 0.4s var(--ease);
}

.finder-results.is-active {
  display: block;
}

.finder-results__head {
  text-align: center;
  margin-bottom: 32px;
}

.finder-results__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 999px;
  background: #ebf7ee;
  color: #1e7e34;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}

.finder-results__title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.finder-results__desc {
  font-size: 14.5px;
  color: var(--muted);
  max-width: 580px;
  margin: 0 auto;
}

.finder-results__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}

.finder-results__grid > .pcard {
  min-width: 0;
}

.finder-results__grid .pcard__match-badge {
  top: 40px;
  max-width: calc(100% - 20px);
}

.finder-results__grid .pcard__match-reason {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.finder-results__message {
  grid-column: 1 / -1;
  margin: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
}

.finder-results__foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* ============================================================
   Responsive
   ============================================================ */
@media screen and (max-width: 900px) {
  .finder-box {
    padding: 36px 28px 32px;
    border-radius: 20px;
  }

  .finder-hero__title { font-size: 30px; }
  .finder-hero__eye { width: 64px; height: 64px; }

  .finder-options--3cols {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .finder-opt__eye { width: 76px; height: 76px; }

  .finder-opt__ring--sm { width: 78px; height: 78px; font-size: 13.5px; }
  .finder-opt__ring--md { width: 92px; height: 92px; font-size: 13.5px; }
  .finder-opt__ring--lg { width: 108px; height: 108px; font-size: 13.5px; }

  .finder-opt--circle:nth-of-type(1) .finder-opt__dim-line { width: 78px; }
  .finder-opt--circle:nth-of-type(2) .finder-opt__dim-line { width: 92px; }
  .finder-opt--circle:nth-of-type(3) .finder-opt__dim-line { width: 108px; }

  .finder-results__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 640px) {
  .finder-section {
    padding: 48px 0 56px;
  }

  .finder-box {
    padding: 28px 18px 24px;
    border-radius: 18px;
  }

  .finder-head__title { font-size: 24px; }
  .finder-hero__title { font-size: 26px; }
  .finder-hero__subtitle { font-size: 14px; }

  .finder-hero__slider-wrap {
    padding: 0;
    max-width: 100%;
  }

  .finder-hero__eye { width: 54px; height: 54px; border-width: 2px; }
  .finder-hero__label { font-size: 11.5px; white-space: normal; max-width: 70px; }

  .finder-hero__cta {
    width: 100%;
    justify-content: center;
    padding: 0 20px;
    font-size: 13px;
  }

  .finder-progress {
    padding: 24px 24px 20px;
    max-width: 100%;
  }

  .finder-progress__track { left: 28px; right: 28px; }
  .finder-progress__wing { width: 28px; height: 28px; }

  /* Step 1 giữ 3 cột nhưng nhỏ lại */
  .finder-opt__eye { width: 56px; height: 56px; }
  .finder-opt__label { font-size: 11.5px; }

  /* Step 2 giữ 2x2 */
  .finder-opt--tile { min-height: 128px; padding: 18px 10px 14px; }
  .finder-opt__icon { width: 68px; height: 68px; }

  /* Step 3 */
  .finder-opt__ring--sm { width: 66px; height: 66px; font-size: 11.5px; }
  .finder-opt__ring--md { width: 80px; height: 80px; font-size: 11.5px; }
  .finder-opt__ring--lg { width: 94px; height: 94px; font-size: 11.5px; }
  .finder-opt--circle:nth-of-type(1) .finder-opt__dim-line { width: 66px; }
  .finder-opt--circle:nth-of-type(2) .finder-opt__dim-line { width: 80px; }
  .finder-opt--circle:nth-of-type(3) .finder-opt__dim-line { width: 94px; }
  .finder-opt__dim-line::before, .finder-opt__dim-line::after { height: 9px; top: -4px; }
  .finder-opt__dim { font-size: 10.5px; }

  /* Step 4 */
  .finder-options--duration .finder-opt--tile { min-height: 140px; padding: 20px 12px 16px; }
  .finder-options--duration .finder-opt__icon { width: 76px; height: 76px; }

  .finder-nav__btn { height: 40px; padding: 0 18px; font-size: 12.5px; }

  .finder-results__grid {
    grid-template-columns: 1fr;
  }

  .finder-results__foot {
    flex-direction: column;
  }

  .finder-results__foot .btn {
    width: 100%;
  }

  .finder-star { width: 30px; height: 30px; }
  .finder-star--1 { top: -20px; left: 5%; }
  .finder-star--2 { top: -30px; left: 67%; width: 32px; height: 32px; }
  .finder-star--3 { top: 18%; right: -17px; }
  .finder-star--4 { bottom: -18px; left: 11%; }
  .finder-star--5 { bottom: -34px; left: 48%; width: 32px; height: 32px; }
  .finder-star--6 { bottom: -18px; right: 11%; }
}
