/* ==========================================================================
   Hero V2.1 — carousel visual layer (2026-07-17 rebuild)

   Visual contract: pixel-derived from the LIVE production hero
   (measured 1920/1280: H=595, title y127, sub y207, cta-row y270,
   search y345 w600, tags y433 · 375: H=400, y15/95/144/207/291).
   All four styles share ONE fixed-height container and ONE centered
   vertical rhythm; slides crossfade as full-bleed background layers.
     A 形象   — image + title/sub + section CTA (== live hero look)
     B 產品   — image + title/sub + auto price + booking CTA
     C 產品   — B + dark glass panel behind text (busy artwork)
     D 廣告   — operator's full artwork, zero overlay, search hidden
   JS: hero-gallery.js ([data-hero-v2] carousel + search state).
   Source mirror: sass/design-system/_hero_v2.scss
   ========================================================================== */

/* ---------- host: fixed uniform height, matches legacy hero exactly ------ */
.bc-form-search-all.unified.hp-hero-section--v2 {
  display: block;
  position: relative;
  height: 595px;
  min-height: 595px;
  padding: 0 !important;
  overflow: visible; /* search dropdown must escape */
}
@media (max-width: 768px) {
  .bc-form-search-all.unified.hp-hero-section--v2 {
    height: 420px;
    min-height: 420px;
  }
}
@media (max-width: 480px) {
  .bc-form-search-all.unified.hp-hero-section--v2 {
    height: 400px;
    min-height: 400px;
  }
}

/* ---------- carousel: absolutely stacked full-bleed slides --------------- */
.bc-hero-v2 {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #0c1620;
}
.bc-hero-v2__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 800ms ease-in-out,
    visibility 800ms;
}
.bc-hero-v2__slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
  .bc-hero-v2__slide {
    transition: none;
  }
}

.bc-hero-v2__bg {
  position: absolute;
  inset: 0;
}
.bc-hero-v2__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
/* One standard scrim so centered white text survives arbitrary banners.
   Style D (pure ad artwork) removes it. */
.bc-hero-v2__scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      62% 58% at 50% 44%,
      rgba(0, 0, 0, 0.34),
      rgba(0, 0, 0, 0.1) 68%,
      rgba(0, 0, 0, 0)
    ),
    linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.3),
      rgba(0, 0, 0, 0.12) 40%,
      rgba(0, 0, 0, 0.1)
    );
}
.bc-hero-v2__scrim--strong {
  background:
    radial-gradient(
      66% 62% at 50% 44%,
      rgba(0, 0, 0, 0.52),
      rgba(0, 0, 0, 0.2) 68%,
      rgba(0, 0, 0, 0.06)
    ),
    linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.42),
      rgba(0, 0, 0, 0.22) 40%,
      rgba(0, 0, 0, 0.18)
    );
}
.bc-hero-v2__slide--d .bc-hero-v2__scrim {
  display: none;
}
.bc-hero-v2__d-link {
  display: block;
  position: absolute;
  inset: 0;
}

/* ---------- per-slide content column (legacy rhythm, fixed zones) -------- */
/* Reuses the live hero type classes (.text-heading/.sub-heading/.hero-cta-btn)
   so typography is identical to production. Zone min-heights keep the title,
   sub and CTA rows at the same y on every slide — nothing jumps between
   slides. */
.bc-hero-v2__content {
  position: relative;
  z-index: 2;
  height: 100%;
  padding-top: 127px;
  text-align: center;
}
.bravo_wrap .bc-hero-v2__content .text-heading {
  margin: 0 auto 6px;
  height: 74px;
  line-height: 74px;
  max-width: 1260px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; /* last resort — JS auto-fit shrinks font first */
}
.bravo_wrap .bc-hero-v2__content .sub-heading {
  margin: 0 auto 36px;
  min-height: 27px;
  max-width: 860px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bc-hero-v2__cta-row {
  min-height: 51px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

/* Price block (styles B/C, auto-synced from the product) */
.bravo_wrap .bc-hero-v2__price {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  color: #ffffff;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}
.bc-hero-v2__price-cur {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.bc-hero-v2__price-num {
  font-family: "Poppins", "DM Sans", sans-serif;
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
}
.bc-hero-v2__price-from {
  font-size: 13px;
  opacity: 0.85;
}
/* Booking CTA — .hero-cta-btn look, colors forced over theme anchor rules */
.bravo_wrap .bc-hero-v2__content a.hero-cta-btn,
.bravo_wrap .bc-hero-v2__content a.hero-cta-btn:hover,
.bravo_wrap .bc-hero-v2__content a.hero-cta-btn:focus {
  color: #ffffff;
  text-decoration: none;
}

/* Style C glass panel — sits behind the text column for busy artwork */
.bc-hero-v2__panel {
  position: absolute;
  left: 50%;
  top: 96px;
  transform: translateX(-50%);
  width: min(780px, 94%);
  height: 250px;
  background: rgba(8, 18, 28, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  z-index: 1;
}

/* ---------- overlay: hover mode (designed artwork slides) ---------------- */
/* The artwork carries its own title/branding: text overlay stays hidden,
   only the booking CTA row fades in on slide hover / keyboard focus.
   Touch devices (no hover) keep the CTA row always visible. */
.bc-hero-v2__content--hover-reveal .text-heading,
.bc-hero-v2__content--hover-reveal .sub-heading {
  visibility: hidden;
}
.bc-hero-v2__content--hover-reveal .bc-hero-v2__cta-row {
  opacity: 0;
  width: fit-content;
  margin: 0 auto;
  padding: 12px 26px;
  border-radius: 14px;
  background: rgba(8, 18, 28, 0.48);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition: opacity 350ms ease;
}
.bc-hero-v2__slide:hover .bc-hero-v2__content--hover-reveal .bc-hero-v2__cta-row,
.bc-hero-v2__content--hover-reveal .bc-hero-v2__cta-row:focus-within {
  opacity: 1;
}
@media (hover: none) {
  .bc-hero-v2__content--hover-reveal .bc-hero-v2__cta-row {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bc-hero-v2__content--hover-reveal .bc-hero-v2__cta-row {
    transition: none;
  }
}

/* ---------- persistent search layer (legacy y-anchor) -------------------- */
.hp-hero-section--v2 .hero-v2-search-layer {
  position: absolute;
  left: 0;
  right: 0;
  top: 345px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  transition: opacity 450ms ease;
}
.hp-hero-section--v2 .hero-v2-search-layer .hero-search-wrap {
  width: 600px;
  max-width: 92vw;
  margin: 0 auto;
  pointer-events: auto;
}
.hp-hero-section--v2 .hero-v2-search-layer .hero-hot-tags {
  margin-top: 36px;
  pointer-events: auto;
}
/* Style D: layer invisible + inert; hovering the hero or focusing the
   input reveals it. */
.hp-hero-section--v2.hero--search-hidden .hero-v2-search-layer {
  opacity: 0;
}
.hp-hero-section--v2.hero--search-hidden
  .hero-v2-search-layer
  .hero-search-wrap,
.hp-hero-section--v2.hero--search-hidden .hero-v2-search-layer .hero-hot-tags {
  pointer-events: none;
}
.hp-hero-section--v2.hero--search-hidden:hover .hero-v2-search-layer,
.hp-hero-section--v2.hero--search-hidden .hero-v2-search-layer:focus-within {
  opacity: 1;
}
.hp-hero-section--v2.hero--search-hidden:hover
  .hero-v2-search-layer
  .hero-search-wrap,
.hp-hero-section--v2.hero--search-hidden:hover
  .hero-v2-search-layer
  .hero-hot-tags,
.hp-hero-section--v2.hero--search-hidden
  .hero-v2-search-layer:focus-within
  .hero-search-wrap {
  pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
  .hp-hero-section--v2 .hero-v2-search-layer {
    transition: none;
  }
}

/* search: 'hide' (admin per-slide) — locked off, no hover reveal at all.
   Distinct from style D's default hide, which reveals on hero hover. */
.hp-hero-section--v2.hero--search-locked .hero-v2-search-layer,
.hp-hero-section--v2.hero--search-locked:hover .hero-v2-search-layer {
  opacity: 0;
}
.hp-hero-section--v2.hero--search-locked .hero-v2-search-layer .hero-search-wrap,
.hp-hero-section--v2.hero--search-locked .hero-v2-search-layer .hero-hot-tags,
.hp-hero-section--v2.hero--search-locked:hover
  .hero-v2-search-layer
  .hero-search-wrap,
.hp-hero-section--v2.hero--search-locked:hover
  .hero-v2-search-layer
  .hero-hot-tags {
  pointer-events: none;
}

/* ---------- carousel controls ------------------------------------------- */
.bc-hero-v2__controls {
  position: absolute;
  bottom: 22px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 25;
  pointer-events: none;
}
.bc-hero-v2__dots {
  display: inline-flex;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: auto;
}
.bravo_wrap button.bc-hero-v2__dot {
  width: 8px;
  height: 8px;
  min-width: 8px;
  min-height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  border: 0;
  cursor: pointer;
  padding: 0;
  transition:
    width 200ms ease,
    background 200ms ease;
}
.bravo_wrap button.bc-hero-v2__dot.is-active {
  width: 22px;
  border-radius: 999px;
  background: #ffffff;
}
.bc-hero-v2__dot:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}
.bravo_wrap button.bc-hero-v2__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.32);
  color: #ffffff;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  z-index: 26;
  pointer-events: auto;
  transition: background 200ms ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.bravo_wrap button.bc-hero-v2__arrow:hover {
  background: rgba(0, 0, 0, 0.55);
}
.bc-hero-v2__arrow:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}
.bc-hero-v2__arrow--prev {
  left: 18px;
}
.bc-hero-v2__arrow--next {
  right: 18px;
}

/* ---------- mobile (mirror of legacy 375 measurements) ------------------- */
@media (max-width: 768px) {
  .bc-hero-v2__content {
    padding-top: 20px;
  }
  .bravo_wrap .bc-hero-v2__content .text-heading {
    height: auto;
    min-height: 64px;
    max-height: 74px;
    line-height: 1.22;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 6px;
  }
  .bravo_wrap .bc-hero-v2__content .sub-heading {
    min-height: 21px;
    margin-bottom: 24px;
  }
  .bc-hero-v2__cta-row {
    min-height: 47px;
  }
  .bc-hero-v2__price-num {
    font-size: 28px;
  }
  .hp-hero-section--v2 .hero-v2-search-layer {
    top: 218px;
    padding: 0 16px;
  }
  .hp-hero-section--v2 .hero-v2-search-layer .hero-hot-tags {
    margin-top: 28px;
  }
  .bc-hero-v2__panel {
    top: 12px;
    height: 200px;
    width: calc(100% - 24px);
  }
  /* Legacy mobile hero shows arrows only — same here. */
  .bc-hero-v2__dots {
    display: none;
  }
  .bravo_wrap button.bc-hero-v2__arrow {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    font-size: 14px;
  }
  .bc-hero-v2__arrow--prev {
    left: 8px;
  }
  .bc-hero-v2__arrow--next {
    right: 8px;
  }
}
@media (max-width: 480px) {
  .bc-hero-v2__content {
    padding-top: 15px;
  }
  .hp-hero-section--v2 .hero-v2-search-layer {
    top: 207px;
  }
}
