/* VESTA shared site header
   Keeps the original black / cream / gold visual language while giving every
   page one navigation system and one mobile behaviour. */

:root {
  --vesta-header-height: 76px;
  --vesta-context-height: 58px;
}

body.vesta-menu-open {
  overflow: hidden !important;
}

.vesta-site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 9000;
  width: 100%;
  height: var(--vesta-header-height);
  padding: 0 !important;
  display: block !important;
  color: var(--cream, #f0ebe0);
  background: linear-gradient(to bottom, rgba(7, 7, 10, .7), transparent);
  border-bottom: 1px solid transparent;
  transition: background .45s ease, border-color .45s ease, box-shadow .45s ease;
}

.vesta-site-header--flow {
  position: sticky;
  background: rgba(7, 7, 10, .97);
  border-bottom-color: rgba(201, 168, 76, .14);
}

.vesta-site-header--solid,
.vesta-site-header.scrolled,
.vesta-menu-open .vesta-site-header {
  background: rgba(7, 7, 10, .95);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border-bottom-color: rgba(201, 168, 76, .14);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .14);
}

.vesta-site-header__inner {
  width: 100%;
  max-width: 1600px;
  height: 100%;
  margin: 0 auto;
  padding: 0 64px;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
  align-items: center;
  gap: 34px;
}

.vesta-site-logo {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold, #c9a84c);
  font-family: var(--serif, 'Cormorant Garamond', serif);
  font-size: 1.62rem;
  font-weight: 300;
  line-height: 1;
  letter-spacing: .22em;
  text-decoration: none;
  white-space: nowrap;
}

.vesta-site-logo__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold, #c9a84c);
  opacity: .72;
}

.vesta-site-logo span {
  color: var(--cream, #f0ebe0);
  font-weight: 200;
  letter-spacing: .12em;
}

.vesta-site-links {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.05vw, 34px);
}

.vesta-site-links a,
.vesta-header-link {
  position: relative;
  padding: 9px 0;
  color: rgba(240, 235, 224, .56);
  font-family: var(--sans, 'DM Sans', sans-serif);
  font-size: .65rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: color .25s ease;
}

.vesta-site-links a::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 1px;
  left: 0;
  height: 1px;
  background: var(--gold, #c9a84c);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s ease;
}

.vesta-site-links a:hover,
.vesta-site-links a[aria-current='page'],
.vesta-header-link:hover {
  color: var(--gold, #c9a84c);
}

.vesta-site-links a:hover::after,
.vesta-site-links a[aria-current='page']::after {
  transform: scaleX(1);
  transform-origin: left;
}

.vesta-site-actions {
  justify-self: end;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.vesta-site-actions .lang-toggle {
  flex: 0 0 auto;
}

.vesta-wishlist-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(240, 235, 224, .58);
  text-decoration: none;
  transition: color .25s ease;
}

.vesta-wishlist-link:hover,
.vesta-wishlist-link[aria-current='page'] {
  color: var(--gold, #c9a84c);
}

.vesta-wishlist-link svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.vesta-wishlist-count {
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink, #07070a);
  background: var(--gold, #c9a84c);
  border-radius: 20px;
  font-family: var(--sans, 'DM Sans', sans-serif);
  font-size: .58rem;
  font-weight: 500;
}

.vesta-header-cta {
  min-height: 38px;
  padding: 0 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(201, 168, 76, .48);
  color: var(--gold, #c9a84c);
  font-family: var(--sans, 'DM Sans', sans-serif);
  font-size: .61rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: color .3s ease, background .3s ease, border-color .3s ease;
}

.vesta-header-cta:hover {
  color: var(--ink, #07070a);
  background: var(--gold, #c9a84c);
  border-color: var(--gold, #c9a84c);
}

.vesta-menu-toggle {
  justify-self: end;
  width: 42px;
  height: 42px;
  padding: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid rgba(201, 168, 76, .28);
  background: transparent;
  color: var(--gold, #c9a84c);
  cursor: pointer;
}

.vesta-menu-toggle span {
  width: 17px;
  height: 1px;
  display: block;
  background: currentColor;
  transition: transform .3s ease, opacity .3s ease;
}

.vesta-menu-toggle[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.vesta-menu-toggle[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}

.vesta-menu-toggle[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.vesta-site-header a:focus-visible,
.vesta-site-header button:focus-visible,
.vesta-mobile-menu a:focus-visible,
.vesta-context-bar a:focus-visible,
.vesta-context-bar button:focus-visible,
.vesta-context-bar select:focus-visible {
  outline: 1px solid var(--gold, #c9a84c);
  outline-offset: 4px;
}

.vesta-mobile-menu {
  position: fixed;
  inset: var(--vesta-header-height) 0 0 0;
  z-index: 8999;
  padding: 42px 28px 34px;
  display: grid;
  grid-template-rows: 1fr auto;
  color: var(--cream, #f0ebe0);
  background:
    radial-gradient(circle at 100% 0, rgba(201, 168, 76, .12), transparent 38%),
    rgba(7, 7, 10, .985);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
  overflow-y: auto;
  transition: opacity .3s ease, transform .3s ease, visibility .3s ease;
}

.vesta-mobile-menu.is-open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.vesta-mobile-menu__links {
  display: grid;
  align-content: start;
}

.vesta-mobile-menu__links a {
  padding: 13px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(240, 235, 224, .07);
  color: rgba(240, 235, 224, .72);
  font-family: var(--serif, 'Cormorant Garamond', serif);
  font-size: clamp(1.65rem, 7vw, 2.25rem);
  font-weight: 300;
  line-height: 1.05;
  text-decoration: none;
}

.vesta-mobile-menu__links a::after {
  content: '\2197';
  color: rgba(201, 168, 76, .38);
  font-family: var(--sans, 'DM Sans', sans-serif);
  font-size: .9rem;
}

.vesta-mobile-menu__links a[aria-current='page'] {
  color: var(--gold, #c9a84c);
}

.vesta-mobile-menu__footer {
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: rgba(240, 235, 224, .34);
  font-family: var(--sans, 'DM Sans', sans-serif);
  font-size: .6rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* Page-specific tools live below the shared navigation. */
.vesta-context-bar {
  position: relative;
  z-index: 8800;
  min-height: var(--vesta-context-height);
  padding: 10px 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #0d0d10;
  border-bottom: 1px solid rgba(201, 168, 76, .12);
}

.vesta-context-bar--fixed {
  position: fixed;
  top: var(--vesta-header-height);
  right: 0;
  left: 0;
}

.vesta-context-bar__title {
  flex: 0 0 auto;
  color: rgba(240, 235, 224, .44);
  font-family: var(--sans, 'DM Sans', sans-serif);
  font-size: .6rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  white-space: nowrap;
}

.vesta-context-bar__title strong {
  margin-left: 9px;
  color: var(--gold, #c9a84c);
  font-weight: 400;
}

.vesta-context-bar__actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.vesta-context-bar .map-filters,
.vesta-context-bar .compare-actions,
.vesta-context-bar .wish-actions,
.vesta-site-actions .prop-nav-actions {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.vesta-site-actions .prop-nav-actions .prop-btn {
  min-height: 38px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  white-space: nowrap;
}

/* Map has two fixed navigation rows. */
body[data-vesta-page='map'] #map {
  top: calc(var(--vesta-header-height) + var(--vesta-context-height)) !important;
}

body[data-vesta-page='map'] .map-search,
body[data-vesta-page='map'] .prop-count {
  top: calc(var(--vesta-header-height) + var(--vesta-context-height) + 16px);
}

body[data-vesta-page='property'] .vesta-site-header {
  background: rgba(7, 7, 10, .6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

body[data-vesta-page='404'] .vesta-site-header {
  background: transparent;
}

body[data-vesta-page='404'] > .logo {
  display: none;
}

@media (max-width: 1300px) {
  .vesta-site-header__inner {
    padding: 0 28px;
    grid-template-columns: minmax(170px, 1fr) auto minmax(170px, 1fr);
    gap: 20px;
  }

  .vesta-site-links {
    gap: 18px;
  }

  .vesta-site-links a {
    font-size: .59rem;
    letter-spacing: .12em;
  }

  .vesta-header-cta {
    padding: 0 14px;
  }

  .vesta-site-actions .lang-toggle {
    display: none;
  }

  .vesta-context-bar {
    padding-right: 28px;
    padding-left: 28px;
  }
}

@media (max-width: 1024px) {
  :root {
    --vesta-header-height: 68px;
  }

  .vesta-site-header__inner {
    padding: 0 22px;
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .vesta-site-logo {
    font-size: 1.42rem;
  }

  .vesta-site-links,
  .vesta-site-actions {
    display: none;
  }

  body[data-vesta-page='property'] .vesta-site-header__inner {
    grid-template-columns: 1fr auto auto;
    gap: 10px;
  }

  body[data-vesta-page='property'] .vesta-site-actions {
    display: flex;
  }

  body[data-vesta-page='property'] .prop-nav-actions .btn-back {
    display: none;
  }

  body[data-vesta-page='property'] .prop-nav-actions .btn-wishlist {
    width: 42px;
    min-width: 42px;
    padding: 0 !important;
    overflow: hidden;
    font-size: 0;
  }

  body[data-vesta-page='property'] .prop-nav-actions .btn-wishlist svg {
    width: 17px;
    height: 17px;
    margin: 0;
  }

  .vesta-menu-toggle {
    display: flex;
  }

  .vesta-context-bar {
    min-height: 54px;
    padding: 8px 22px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .vesta-context-bar::-webkit-scrollbar {
    display: none;
  }

  .vesta-context-bar__title {
    display: none;
  }

  .vesta-context-bar__actions {
    width: 100%;
    min-width: max-content;
    justify-content: flex-start;
  }

  .vesta-context-bar .map-filters,
  .vesta-context-bar .compare-actions,
  .vesta-context-bar .wish-actions {
    width: 100%;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start;
  }

  .vesta-context-bar .compare-actions > *,
  .vesta-context-bar .wish-actions > * {
    min-height: 38px;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .68rem;
    line-height: 1;
  }

  .vesta-context-bar .compare-actions .btn-compare {
    flex: 1 1 auto;
  }

  .vesta-context-bar .compare-actions .btn-back {
    flex: 0 0 auto;
    width: auto !important;
  }

  .vesta-context-bar .wish-actions > * {
    flex: 1 1 0;
  }

  .vesta-context-bar .map-back {
    display: none;
  }

  body[data-vesta-page='map'] #map {
    top: calc(var(--vesta-header-height) + 54px) !important;
  }

  body[data-vesta-page='map'] .map-search,
  body[data-vesta-page='map'] .prop-count {
    top: auto;
  }

  body[data-vesta-page='compare'] .compare-main,
  body[data-vesta-page='wishlist'] .wish-main {
    padding-top: 42px;
  }
}

@media (max-width: 520px) {
  .vesta-site-header__inner {
    padding: 0 16px;
  }

  .vesta-site-logo {
    font-size: 1.25rem;
    letter-spacing: .18em;
  }

  .vesta-context-bar {
    padding-right: 16px;
    padding-left: 16px;
  }

  .vesta-context-bar .filter-select {
    max-width: none;
  }

  body[data-vesta-page='map'] .vesta-context-bar__actions {
    min-width: 0;
  }

  body[data-vesta-page='map'] .map-filters {
    min-width: 0;
    display: grid !important;
    grid-template-columns: .9fr 1.1fr 1fr .8fr;
    gap: 6px;
  }

  body[data-vesta-page='map'] .map-filters .filter-select,
  body[data-vesta-page='map'] .map-filters .filter-btn {
    width: 100%;
    min-width: 0;
    padding: 6px 7px;
    font-size: .64rem;
  }

  body[data-vesta-page='map'] .map-filters .filter-select {
    padding-right: 19px;
    background-position: right 6px center;
  }

  .vesta-context-bar .compare-actions,
  .vesta-context-bar .wish-actions {
    gap: 8px;
  }

  .vesta-context-bar .compare-actions a,
  .vesta-context-bar .compare-actions button,
  .vesta-context-bar .wish-actions a {
    padding-right: 10px;
    padding-left: 10px;
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vesta-site-header,
  .vesta-site-links a::after,
  .vesta-menu-toggle span,
  .vesta-mobile-menu {
    transition-duration: .01ms !important;
  }
}

@media print {
  .vesta-site-header,
  .vesta-mobile-menu,
  .vesta-context-bar {
    display: none !important;
  }
}
