/* =========================================================
   Pricee navigation — ABOVE THE FOLD (header chrome)
   Deferred polish: mega + drawer visuals → common-btf.css
   ========================================================= */

/* =========================================================
   Pricee premium navigation — polish pass
   <=1199 mobile | 1200–1366 tablet | >=1367 desktop mega
   ========================================================= */

/*
  FOUC guard — keep drawer / mega off the page until common-btf.css
  paints full styles. Without this, .hamburger-menu sits in normal
  flow (giant logo + Welcome/Login copy) for a few seconds.
*/
.hamburger-menu {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  width: min(380px, 90vw);
  height: 100%;
  max-height: 100dvh;
  transform: translateX(105%);
  visibility: hidden;
  pointer-events: none;
  overflow: hidden;
}

.hamburger-menu.active {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.hamburger-menu ~ .__ar_ovrly {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.menu-drawer-brand {
  display: block;
  width: 100px;
  overflow: hidden;
  line-height: 0;
}

.menu-drawer-brand svg {
  width: 100px;
  height: auto;
  max-width: 100%;
}

.px-mega-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1005;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.px-mega-host {
  position: fixed;
  z-index: 1010;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.px-catnav__item > .px-mega {
  display: none !important;
}

.header.header--premium,
.header {
  z-index: 1020;
}

/* Keep sticky behavior from common-atf (.header.is-sticky { position: fixed }) */

.header-content {
  gap: 0.75rem;
  justify-content: space-between;
}

.header-content > .logo {
  flex-shrink: 0;
  margin-right: auto;
}

/* Dark: logo byline + ground shadow */
body.dark .logo .logo-byline {
  fill: rgb(255 255 255 / 69%);
}
body.dark .logo .logo-shadow {
  fill: #433b3f;
}

/* ---------- Shared premium pills ---------- */
.header-utils {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
  margin-left: 0;
}

/* Location control from set-location — fit premium utils row */
.header-utils .location-nav,
.header-mobile-bar .location-nav {
  margin-left: 0;
  margin-right: 0;
  flex-shrink: 0;
  min-width: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Icon-only location — match search circle */
.header-location.location-trigger,
.header-desktop-bar .location-trigger.header-pill,
.header-utils .location-trigger,
.header-mobile-bar .location-trigger {
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 40px !important;
  padding: 0 !important;
  gap: 0 !important;
  border-radius: 50% !important;
  justify-content: center !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  background: linear-gradient(145deg, #fff 0%, #eef2ff 100%) !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06) !important;
  color: #64748b;
}

.header-location.location-trigger svg,
.header-mobile-bar .location-trigger svg {
  width: 20px !important;
  height: 20px !important;
  color: #6366f1 !important;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.header-pill,
.header-lang,
.header-account__trigger,
.header-account__login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 40px;
  padding: 0 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: linear-gradient(145deg,#fff 0%,#eef2ff 100%);
  color: #334155;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
  white-space: nowrap;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-pill:hover,
.header-lang:hover,
.header-account__trigger:hover,
.header-location.location-trigger:hover,
.header-desktop-bar .location-trigger:hover,
.header-mobile-bar .location-trigger:hover {
  border-color: rgba(15, 23, 42, 0.16) !important;
  background: linear-gradient(160deg, #ffffff 0%, #ffeefb 100%) !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1) !important;
}

.header-location.location-trigger:hover svg,
.header-mobile-bar .location-trigger:hover svg {
  color: #64748b !important;
}

body.dark .header-location.location-trigger:hover,
body.dark .header-desktop-bar .location-trigger:hover,
body.dark .header-mobile-bar .location-trigger:hover {
  background: #1f2937 !important;
  border-color: rgba(148, 163, 184, 0.28) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
}

.header-search {
  width: 40px;
  min-width: 40px;
  padding: 0;
}

.header-search svg {
  width: 20px;
  height: 20px;
  color: #64748b;
}

.header-theme {
  padding: 0;
  gap: 0;
}

.header-theme__icons {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.header-theme__icons .theme-icon {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 20px !important;
  height: 20px !important;
  color: #64748b;
  margin: 0 !important;
}

.header-theme__icons .theme-icon-moon {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(0) scale(1) !important;
}

.header-theme__icons .theme-icon-sun {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-75deg) scale(0.45) !important;
  color: #f59e0b;
}

body.dark .header-theme__icons .theme-icon-moon {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(75deg) scale(0.45) !important;
}

body.dark .header-theme__icons .theme-icon-sun {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(0) scale(1) !important;
  color: #fbbf24;
}

.header-theme__label {
  position: relative;
  z-index: 1;
  font-size: 0.75rem;
  font-weight: 500;
  color: #334155;
  line-height: 1;
}

/* Desktop theme = icon-only circle like search */
.header-desktop-bar .header-theme.theme-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  border-radius: 50% !important;
}

.header-desktop-bar .header-theme__label {
  display: none !important;
}

.header-lang {
  padding: 0 0.7rem 0 0.55rem;
}

.header-lang svg {
  width: 16px;
  height: 16px;
  color: #64748b;
  flex-shrink: 0;
}

.header-lang__chev,
.header-account__chev {
  width: 14px !important;
  height: 14px !important;
  color: #94a3b8 !important;
  flex-shrink: 0;
}

.header-account {
  position: relative;
}

.header-account__trigger {
  padding: 0 0.75rem 0 0.35rem;
  color: #1e293b;
}

.header-account__hello {
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-account__dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(320px, 92vw);
  z-index: 1100;
  padding: 0;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background:
    radial-gradient(160px 90px at 12% 0%, rgba(167, 139, 250, 0.18), transparent 70%),
    radial-gradient(180px 110px at 88% 18%, rgba(96, 165, 250, 0.14), transparent 72%),
    radial-gradient(200px 120px at 40% 100%, rgb(214 94 247 / 21%), transparent 70%),
    rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(14px) saturate(1.35);
  -webkit-backdrop-filter: blur(14px) saturate(1.35);
  box-shadow:
    0 18px 48px rgba(15, 23, 42, 0.14),
    0 2px 8px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  overflow: hidden;
  animation: px-fade-up 0.18s ease;
}

/* Portaled to <body> so header transform/backdrop-filter do not isolate blur */
.header-account__dropdown.header-account__dropdown--portal {
  position: fixed;
  z-index: 12001;
  margin: 0;
}

.header-account__dropdown .nav-account-card--dropdown {
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}

body.dark .header-account__dropdown {
  border-color: rgba(148, 163, 184, 0.18);
  background:
    radial-gradient(160px 90px at 12% 0%, rgba(167, 139, 250, 0.22), transparent 70%),
    radial-gradient(180px 110px at 88% 18%, rgba(56, 189, 248, 0.14), transparent 72%),
    radial-gradient(200px 120px at 40% 100%, rgb(214 94 247 / 18%), transparent 70%),
    rgba(17, 24, 39, 0.82);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.header-account.is-open .header-account__dropdown {
  display: block;
}

.header-account.is-open .header-account__trigger {
  border-color: rgba(237, 56, 51, 0.28);
  box-shadow: 0 6px 16px rgba(237, 56, 51, 0.12);
}

/* Kill legacy circular chrome on desktop utility pills */
.header-desktop-bar .header-search,
.header-desktop-bar .header-theme.theme-btn,
.header-desktop-bar .header-lang,
.header-desktop-bar .header-account__trigger,
.header-desktop-bar .location-trigger {
  width: auto !important;
  height: 44px !important;
  /* border-radius: 999px !important; */
  /* background: #fff !important; */
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06) !important;
  transform: none !important;
}

.header-desktop-bar .header-search {
  width: 44px !important;
  min-width: 44px !important;
  padding: 0 !important;
  border-radius: 50% !important;
}

.header-desktop-bar .header-search::before,
.header-desktop-bar .header-search::after,
.header-desktop-bar .header-theme::before,
.header-desktop-bar .header-theme::after,
.header-desktop-bar .location-trigger::before,
.header-desktop-bar .location-trigger::after {
  display: none !important;
}

/* Mobile header: language = same circular icon-only control as theme + menu */
.header-mobile-bar .header-lang {
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  padding: 0 !important;
  gap: 0 !important;
  border-radius: 50% !important;
  justify-content: center !important;
  border: 1px solid rgba(99, 102, 241, 0.22) !important;
  background: linear-gradient(160deg, #ffffff 0%, #eef2ff 100%) !important;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  color: #6366f1;
}

.header-mobile-bar .header-lang span,
.header-mobile-bar .header-lang .header-lang__chev {
  display: none !important;
}

.header-mobile-bar .header-lang svg {
  width: 18px !important;
  height: 18px !important;
  color: #6366f1 !important;
  flex-shrink: 0;
}

.header-mobile-bar .theme-btn,
.header-mobile-bar .togglemenu {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
}


/* ---------- Account avatar (visible in header trigger) ---------- */
.nav-account-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff 0%, #f3e8ff 100%);
  color: #7c3aed;
  font-size: 1.05rem;
  font-weight: 700;
  flex-shrink: 0;
  border: 1px solid rgba(124, 58, 237, 0.15);
}

.nav-account-avatar--sm {
  width: 30px;
  height: 30px;
  font-size: 0.75rem;
}

.nav-account-avatar--guest {
  color: #64748b;
  background: linear-gradient(145deg, #f8fafc, #eef2ff);
}


/* ---------- Mobile header bar shell ---------- */
.header-mobile-bar {
  display: none;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
  padding: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.header-desktop-bar .togglemenu,
.header-desktop-bar .header-user-btn {
  display: none !important;
}

/* ---------- Desktop category nav ---------- */
.header-desktop-bar {
  flex: 1;
  min-width: 0;
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  margin-left: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.header-desktop-bar__menu {
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 0.4rem 0.55rem 0.4rem 0.65rem;
  border-radius: 18px;
  background: radial-gradient(200px 70px at 19% 0%, rgb(59 246 197 / 20%), transparent 70%),
              radial-gradient(200px 70px at 84% 100%, rgb(237 222 51 / 18%), transparent 72%),
              linear-gradient(145deg, #fdfdfd 0%, #fffbfb9e 55%, #fffffe 100%);
  border: 1px solid rgb(61 62 66 / 11%);
  box-shadow: 0 8px 28px rgb(15 23 42 / 8%);
}

.header-desktop-bar__utils {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.px-catnav {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
}

.px-catnav::-webkit-scrollbar {
  display: none;
}

.px-catnav__list {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.px-catnav__item {
  position: static;
}

.px-catnav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 0.7rem;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: #334155;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.px-catnav__link:hover {
  color: #fafcff;
  background: rgba(17, 21, 54, 0.65);
}

.px-catnav__item.is-mega-open > .px-catnav__link {
  color: #fafcff;
  background: rgba(17, 21, 54, 0.65);
}

.px-catnav__item.is-mega-open > .px-catnav__link::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: #ed3833;
}

.px-catnav__link sup {
  margin-left: 0.25rem;
  font-size: 0.65rem;
  color: #ed3833;
  font-weight: 700;
}

/* ---------- Breakpoints ---------- */
@media (max-width: 1199px) {
  .header-desktop-bar {
    display: none !important;
  }

  .header-mobile-bar,
  .nav-mobile.header-mobile-bar {
    display: flex !important;
  }

  .px-mega,
  .px-mega-overlay,
  .px-mega-host {
    display: none !important;
  }
}

@media (min-width: 1200px) {
  .header-mobile-bar,
  .nav-mobile.header-mobile-bar {
    display: none !important;
  }

  .header-desktop-bar,
  .nav-desktop.header-desktop-bar {
    display: flex !important;
  }
}

/* Tablet: compact utilities, no mega overwhelm */
@media (min-width: 1200px) and (max-width: 1366px) {
  .px-catnav__link {
    font-size: 0.75rem;
    padding: 0 0.45rem;
  }

  .header-account__hello {
    max-width: 5.5rem;
  }

  .header-theme__label {
    display: none;
  }

  .header-theme {
    width: 40px !important;
    min-width: 40px !important;
    padding: 0 !important;
  }

  .header-theme__label {
    display: none;
  }

  .header-lang span,
  .header-lang__chev {
    display: none;
  }

  .header-lang {
    width: 40px !important;
    padding: 0 !important;
  }

  .px-mega,
  .px-mega-host {
    display: none !important;
  }

  .px-mega-overlay {
    display: none !important;
  }
}

@media (min-width: 1367px) {
  .px-catnav__link {
    font-size: 0.9rem;
  }
}

/* Dark mode */
body.dark .header-desktop-bar__menu,
body.dark .header-mobile-bar {
  background: radial-gradient(150px 50px at 15% 0%, rgb(59 221 246 / 42%), transparent 70%),
              radial-gradient(180px 80px at 90% 100%, rgb(234 237 51 / 29%), transparent 72%),
              linear-gradient(145deg, #040b1c 0%, #0e092a 55%, #1f0e2d 100%);
  border-color: rgb(197 206 219 / 28%);
}

body.dark .header-desktop-bar {
  background: transparent;
  border: 0;
  box-shadow: none;
}

body.dark .header-pill,
body.dark .header-lang,
body.dark .header-account__trigger,
body.dark .header-desktop-bar .header-search,
body.dark .header-desktop-bar .header-theme.theme-btn,
body.dark .header-desktop-bar .header-lang,
body.dark .header-desktop-bar .header-account__trigger,
body.dark .header-desktop-bar .location-trigger {
  background: #2b2737 !important;
  border-color: rgba(148, 163, 184, 0.27) !important;
  color: #e2e8f0;
}

body.dark .header-search svg{color:#d7e1ef;}

body.dark .header-mobile-bar .header-lang {
  background: linear-gradient(145deg, #111827 0%, #1f2937 100%) !important;
  border-color: rgba(129, 140, 248, 0.35) !important;
  color: #a5b4fc;
  width: 40px !important;
  height: 40px !important;
  padding: 0 !important;
  border-radius: 50% !important;
}

body.dark .header-mobile-bar .header-lang svg {
  color: #a5b4fc !important;
}

body.dark .header-theme__label,
body.dark .header-account__hello {
  color: #e2e8f0;
}

body.dark .px-catnav__link {
  color: #cbd5e1;
}

body.dark .px-catnav__link:hover,
body.dark .px-catnav__item.is-mega-open > .px-catnav__link {
  color: #fb7185;
  background: rgba(251, 113, 133, 0.1);
}
/* ========== Phase 11 — logo sticky sizing from styles.css ========== */
@media (min-width:1025px){
/* .logo img{max-height:66px;transition:max-height .28s ease;} */
.logo svg{max-width:180px;max-height:90px;transition:max-height .28s ease;}
/* .header.is-sticky.is-compact .logo img{max-height:52px;} */
.header.is-sticky.is-compact .logo svg{max-width:130px;max-height:60px;}
}

