/* ============================================================
   Revival Media — Canonical Navigation (nav.css)
   ------------------------------------------------------------
   Single source of truth for the site navbar + cart, shared by
   every content page (modern + legacy). Self-contained: uses
   literal values (no design-token vars) so it renders identically
   whether or not the host page loads global.css.

   Loaded AFTER the page's base stylesheet so it is authoritative.
   Model: priority-collapse. The burger is ALWAYS visible and holds
   the complete menu. As the viewport narrows, bar links drop into
   the burger in priority order: Pricing -> About -> Gallery.
   Bar order: logo … About · Gallery · Pricing · Book Now · ☰ · Cart
   ============================================================ */

/* ── Header shell ─────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  height: 80px;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(200, 149, 90, 0.15);
  transition: background 700ms ease, backdrop-filter 700ms ease, box-shadow 700ms ease;
}

.site-header.scrolled {
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(200, 149, 90, 0.15);
}

/* While the hero is in view (index only), navbar fades to transparent */
body.hero-visible .site-header,
body.hero-visible .site-header.scrolled {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

.main-nav {
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: clamp(1.5rem, 5vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* ── Logo ─────────────────────────────────────────────────── */
.nav-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  transition: opacity 0.4s ease;
}

.nav-logo__img {
  height: 60px;
  width: auto;
}

.nav-logo:hover .nav-logo__img {
  opacity: 0.85;
}

/* ── Right-hand cluster: links · Book Now · burger · cart ──── */
.nav-right {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
}

/* ── Priority links (always flex; individual items collapse) ── */
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

/* .main-nav prefix raises specificity so these win over any legacy
   `.nav-links a` rule in styles.css on the migrated pages. */
.main-nav .nav-link {
  font-family: 'League Spartan', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.70);
  text-decoration: none;
  transition: color 250ms ease;
  position: relative;
  padding-bottom: 3px;
  white-space: nowrap;
}

.main-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: #C8955A;
  transition: width 250ms ease;
}

.main-nav .nav-link:hover { color: #ffffff; }
.main-nav .nav-link:hover::after { width: 100%; }

/* ── Book Now CTA ─────────────────────────────────────────── */
.nav-cta {
  font-family: 'League Spartan', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background-color: #C8955A;
  color: #000000 !important;
  padding: 0.55rem 1.4rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background 250ms ease, transform 250ms ease;
  flex-shrink: 0;
  white-space: nowrap;
}

.nav-cta:hover {
  background-color: #d9ab7a;
  transform: translateY(-1px);
}

.nav-cta::after { display: none !important; }

/* ── Burger toggle — ALWAYS visible ───────────────────────── */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(4px, 0.55vw, 6px);
  width: clamp(34px, 4.2vw, 42px);
  height: clamp(34px, 4.2vw, 42px);
  background: none;
  border: none;
  cursor: pointer;
  padding: clamp(4px, 0.6vw, 7px);
  flex-shrink: 0;
}

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 250ms ease, opacity 250ms ease, width 250ms ease;
  transform-origin: center;
}

.nav-toggle.is-open .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open .nav-toggle__bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.is-open .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Burger menu — sleek compact dropdown (the COMPLETE menu) ──
   Anchored top-right under the header, not a full-screen overlay. */
.nav-menu {
  display: none;
  position: fixed;
  top: 70px;
  right: clamp(12px, 4vw, 2rem);
  left: auto;
  bottom: auto;
  width: 230px;
  max-width: calc(100vw - 24px);
  background: #111111;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  justify-content: flex-start;
  border: 1px solid rgba(200, 149, 90, 0.22);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
  z-index: 950;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  padding: 10px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
}

.nav-menu.is-open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1px;
  width: 100%;
}

.nav-menu .nav-link {
  display: block;
  font-family: 'League Spartan', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  padding: 9px 10px;
  border-radius: 5px;
  text-align: left;
  transition: background 200ms ease, color 200ms ease;
}

.nav-menu .nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-menu .nav-cta {
  margin-top: 8px;
  text-align: center;
  font-size: 0.78rem;
  padding: 0.6rem 1rem;
}

/* Compact dropdown — no need to lock page scroll while open */
body.nav-open { overflow: visible; }

/* ── Cart icon + dropdown (right-most) ────────────────────── */
.nav-cart {
  position: relative;
  flex-shrink: 0;
}

.nav-cart__btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(34px, 4.2vw, 42px);
  height: clamp(34px, 4.2vw, 42px);
  position: relative;
  padding: 0;
  transition: opacity 250ms ease;
}

.nav-cart__btn svg { width: 60%; height: 60%; }
.nav-cart__btn:hover { opacity: 0.75; }

.nav-cart__badge {
  position: absolute;
  top: -3px;
  right: -5px;
  background: #C8955A;
  color: #ffffff;
  font-family: 'League Spartan', sans-serif;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0 3px;
}

.nav-cart__badge.is-visible { display: flex; }

.cart-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: 320px;
  background: #111111;
  border: 1px solid rgba(200, 149, 90, 0.2);
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  padding: 20px;
  z-index: 950;
  max-height: 400px;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cart-dropdown.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cart-dropdown__empty {
  text-align: center;
  padding: 20px 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.4);
}

.cart-dropdown__items { display: flex; flex-direction: column; gap: 12px; }

.cart-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 14px;
  color: #ffffff;
}

.cart-item__name { flex: 1; }
.cart-item__price { flex-shrink: 0; white-space: nowrap; }

.cart-item__remove {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
  padding: 2px 4px;
  transition: color 250ms ease;
  flex-shrink: 0;
  line-height: 1;
}

.cart-item__remove:hover { color: #ffffff; }

.cart-dropdown__rule {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 16px 0 12px;
}

.cart-dropdown__footer { display: none; }
.cart-dropdown__footer.is-visible { display: block; }

.cart-dropdown__total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'League Spartan', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 14px;
  letter-spacing: 0.04em;
}

.cart-dropdown__proceed {
  display: block;
  width: 100%;
  background: #C8955A;
  color: #ffffff;
  font-family: 'League Spartan', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  padding: 12px;
  border-radius: 6px;
  transition: background 250ms ease;
  box-sizing: border-box;
}

.cart-dropdown__proceed:hover { background: #d9ab7a; }

.cart-dropdown__reassurance {
  margin-top: 14px;
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.4;
  text-align: center;
}

/* ── Priority collapse — links drop into the burger in order ─
   Our Process → Pricing → About → Gallery (Gallery survives longest).
   About is held down to mobile so two titles (About + Gallery) remain. */
@media (max-width: 1180px) { .nav-item--process  { display: none; } }
@media (max-width: 1020px) { .nav-item--pricing  { display: none; } }
@media (max-width: 360px)  { .nav-item--about    { display: none; } }
@media (max-width: 320px)  { .nav-item--gallery  { display: none; } }

/* ── Responsive logo / spacing ────────────────────────────── */
@media (max-width: 1023px) {
  .nav-logo__img { height: 48px; }
  .main-nav { padding-inline: clamp(1rem, 4vw, 2rem); gap: 1rem; }
  .nav-right { gap: clamp(0.75rem, 2vw, 1.25rem); }
}

/* Tighten so two titles (About + Gallery) still fit on phones */
@media (max-width: 600px) {
  .nav-logo__img { height: 28px; }
  .main-nav { padding-inline: 12px; gap: 0.5rem; }
  .nav-right { gap: 9px; }
  .nav-links { gap: 11px; }
  .main-nav .nav-link { font-size: 0.72rem; letter-spacing: 0.1em; }
  .nav-cta { padding: 0.45rem 0.75rem; font-size: 0.7rem; }
}

@media (max-width: 430px) {
  .nav-logo__img { height: 22px; }
  .main-nav { padding-inline: 8px; gap: 6px; }
  .nav-right { gap: 6px; }
  .nav-links { gap: 7px; }
  .main-nav .nav-link { font-size: 0.64rem; letter-spacing: 0.06em; }
  .nav-cta { padding: 0.4rem 0.55rem; font-size: 0.62rem; }
}

@media (max-width: 480px) {
  .cart-dropdown { width: 90vw; right: -8px; }
}
