:root {
  --as-header-height-desktop: 170px;
  --as-header-height-tablet: 106px;
  --as-header-height-mobile: 80px;
  --as-header-logo-width-desktop: 210px;
  --as-header-logo-width-tablet: 168px;
  --as-header-logo-width-mobile: 136px;
  --as-header-inline-padding: clamp(18px, 3vw, 48px);
  --as-header-action-height: 44px;
  --as-header-nav-gap: clamp(12px, 1.65vw, 25px);
  --as-header-ink: #181513;
  --as-header-paper: rgba(255, 253, 250, 0.96);
  --as-header-line: rgba(29, 27, 24, 0.12);
}

/* Reserve the reference geometry before deferred header JavaScript runs. */
[data-as-customer-header] {
  display: block;
  width: 100%;
  height: var(--as-header-height-desktop);
  min-height: var(--as-header-height-desktop);
}

.as-customer-header {
  position: relative;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: 100px 70px;
  width: 100%;
  height: var(--as-header-height-desktop);
  min-height: var(--as-header-height-desktop);
  box-sizing: border-box;
  padding: 0 var(--as-header-inline-padding);
  border-bottom: 1px solid var(--as-header-line);
  background: var(--as-header-paper);
  color: var(--as-header-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  contain: layout;
  isolation: isolate;
}

.as-customer-header *,
.as-customer-header *::before,
.as-customer-header *::after {
  box-sizing: border-box;
}

.as-customer-header .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;
}

.as-customer-header__menu-toggle {
  display: none;
}

.as-customer-header__mobile-book {
  display: none;
}

.as-customer-header__logo {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--as-header-logo-width-desktop);
  min-width: var(--as-header-logo-width-desktop);
  line-height: 0;
}

.as-customer-header__logo img {
  display: block;
  width: 100%;
  height: auto;
}

.as-customer-header__nav {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: center;
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--as-header-nav-gap);
  width: 100%;
  min-width: 0;
}

.as-customer-header__link,
.as-customer-header__account summary,
.as-customer-header__account-menu a,
.as-customer-header__account-menu button {
  color: inherit;
  font: 700 12px/1.1 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.as-customer-header__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--as-header-action-height);
  padding: 0 2px;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}

.as-customer-header__link[aria-current="page"] {
  border-bottom-color: currentColor;
}

.as-customer-header__link--book {
  min-width: 112px;
  padding: 0 20px;
  border: 1px solid #050505;
  border-radius: 999px;
  background: #050505;
  color: #fffefa;
}

.as-customer-header__account {
  position: relative;
  min-width: 0;
}

.as-customer-header__account summary {
  display: inline-flex;
  min-height: var(--as-header-action-height);
  align-items: center;
  gap: 7px;
  padding: 0 15px;
  border: 1px solid var(--as-header-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}

.as-customer-header__account summary::-webkit-details-marker {
  display: none;
}

.as-customer-header__account-status {
  color: rgba(24, 21, 19, 0.64);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.as-customer-header__account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  display: grid;
  width: 220px;
  padding: 8px;
  border: 1px solid var(--as-header-line);
  border-radius: 16px;
  background: #fffdfa;
  box-shadow: 0 18px 48px rgba(35, 27, 21, 0.14);
}

.as-customer-header__account-menu a,
.as-customer-header__account-menu button {
  display: flex;
  min-height: 42px;
  align-items: center;
  width: 100%;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.as-customer-header__account-menu a:hover,
.as-customer-header__account-menu button:hover,
.as-customer-header__account-menu a:focus-visible,
.as-customer-header__account-menu button:focus-visible {
  background: #f4eee7;
}

.as-customer-header__link:focus-visible,
.as-customer-header__logo:focus-visible,
.as-customer-header__menu-toggle:focus-visible,
.as-customer-header__account summary:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

@media (max-width: 989px) {
  [data-as-customer-header] {
    height: var(--as-header-height-tablet);
    min-height: var(--as-header-height-tablet);
  }

  .as-customer-header {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    grid-template-rows: 1fr;
    height: var(--as-header-height-tablet);
    min-height: var(--as-header-height-tablet);
    padding-inline: 20px;
  }

  .as-customer-header__menu-toggle {
    grid-column: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
  }

  .as-customer-header__menu-toggle::before,
  .as-customer-header__menu-toggle::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 1px;
    background: currentColor;
    transform: translateY(-4px);
  }

  .as-customer-header__menu-toggle::after {
    transform: translateY(4px);
  }

  .as-customer-header__menu-toggle[aria-expanded="true"]::before {
    transform: rotate(45deg);
  }

  .as-customer-header__menu-toggle[aria-expanded="true"]::after {
    transform: rotate(-45deg);
  }

  .as-customer-header__logo {
    grid-column: 2;
    grid-row: 1;
    width: var(--as-header-logo-width-tablet);
    min-width: var(--as-header-logo-width-tablet);
  }

  .as-customer-header__mobile-book {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 104px;
    min-height: var(--as-header-action-height);
    padding: 0 16px;
    border: 1px solid #050505;
    border-radius: 999px;
    background: #050505;
    color: #fffefa;
    font: 700 12px/1 Inter, ui-sans-serif, system-ui, sans-serif;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
  }

  .as-customer-header__nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    max-height: calc(100dvh - var(--as-header-height-tablet));
    overflow-y: auto;
    padding: 12px 20px 20px;
    border-bottom: 1px solid var(--as-header-line);
    background: #fffdfa;
    box-shadow: 0 20px 44px rgba(35, 27, 21, 0.12);
  }

  .as-customer-header.is-menu-open {
    contain: none;
  }

  .as-customer-header.is-menu-open .as-customer-header__nav {
    display: grid;
  }

  .as-customer-header__link,
  .as-customer-header__account summary {
    justify-content: flex-start;
    width: 100%;
    min-height: 48px;
    padding-inline: 12px;
    border-radius: 10px;
  }

  .as-customer-header__link--book {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    width: auto;
    min-width: 104px;
    min-height: 44px;
    padding-inline: 16px;
    border-radius: 999px;
  }

  .as-customer-header__nav > .as-customer-header__link--book {
    position: static;
    grid-column: auto;
    justify-self: stretch;
    width: 100%;
  }

  .as-customer-header__account {
    min-height: 48px;
  }

  .as-customer-header__account-menu {
    position: static;
    width: 100%;
    margin-top: 4px;
    box-shadow: none;
  }
}

@media (max-width: 749px) {
  [data-as-customer-header] {
    height: var(--as-header-height-mobile);
    min-height: var(--as-header-height-mobile);
  }

  .as-customer-header {
    height: var(--as-header-height-mobile);
    min-height: var(--as-header-height-mobile);
    padding-inline: 14px;
  }

  .as-customer-header__logo {
    width: var(--as-header-logo-width-mobile);
    min-width: var(--as-header-logo-width-mobile);
  }

  .as-customer-header__nav {
    max-height: calc(100dvh - var(--as-header-height-mobile));
    padding-inline: 14px;
  }

}

@media (max-width: 399px) {
  :root {
    --as-header-height-mobile: 76px;
    --as-header-logo-width-mobile: 124px;
  }

  .as-customer-header__link--book {
    min-width: 94px;
    padding-inline: 13px;
    font-size: 11px;
  }

  .as-customer-header__mobile-book {
    min-width: 94px;
    padding-inline: 13px;
    font-size: 11px;
  }
}

@media (max-width: 369px) {
  :root {
    --as-header-height-mobile: 72px;
    --as-header-logo-width-mobile: 116px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .as-customer-header *,
  .as-customer-header *::before,
  .as-customer-header *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Unified public/customer shell: approved paper, ink and square actions. */
[data-as-customer-header] {
  --as-header-paper: #f4efe7;
  --as-header-ink: #171714;
  --as-header-line: rgba(23, 23, 20, 0.18);
  background: rgba(244, 239, 231, 0.98);
}
.as-customer-header__link--book,
.as-customer-header__mobile-book,
.as-customer-header__account summary,
.as-customer-header__account-menu,
.as-customer-header__account-menu a,
.as-customer-header__account-menu button {
  border-radius: 0;
  box-shadow: none;
}

/* Shop uses the approved public-site header geometry without changing the client portal shell. */
[data-as-customer-header].as-customer-header--shop {
  height: 178px;
  min-height: 178px;
}

.as-customer-header--shop {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-rows: 36px 142px;
  height: 178px;
  min-height: 178px;
  padding: 0 clamp(28px, 4vw, 88px);
  contain: none;
}

.as-customer-header__announcement {
  display: none;
  margin: 0;
}

.as-customer-header--shop .as-customer-header__announcement {
  grid-column: 1 / -1;
  grid-row: 1;
  align-self: center;
  display: block;
  margin-inline: calc(clamp(28px, 4vw, 88px) * -1);
  padding-bottom: 1px;
  border-bottom: 1px solid var(--as-header-line);
  color: var(--as-header-ink);
  font: 500 12px/35px Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-align: center;
}

.as-customer-header--shop .as-customer-header__logo {
  grid-column: 2;
  grid-row: 2;
  width: clamp(230px, 16vw, 320px);
  min-width: clamp(230px, 16vw, 320px);
}

.as-customer-header--shop .as-customer-header__nav {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-self: stretch;
  justify-self: stretch;
  width: 100%;
}

.as-customer-header__nav-primary,
.as-customer-header__nav-actions {
  display: flex;
  align-items: center;
}

.as-customer-header--shop .as-customer-header__nav-primary {
  grid-column: 1;
  justify-self: start;
  gap: clamp(18px, 2.2vw, 42px);
}

.as-customer-header--shop .as-customer-header__nav-actions {
  grid-column: 3;
  justify-self: end;
  gap: 12px;
}

.as-customer-header--shop .as-customer-header__link,
.as-customer-header--shop .as-customer-header__account summary {
  font-size: clamp(11px, 0.78vw, 13px);
  letter-spacing: 0.09em;
}

.as-customer-header--shop .as-customer-header__account summary,
.as-customer-header--shop .as-customer-header__link--book {
  min-height: 54px;
  padding: 0 clamp(14px, 1.4vw, 26px);
  border: 1px solid var(--as-header-ink);
}

.as-customer-header--shop .as-customer-header__link--gift {
  min-height: auto;
  padding: 12px 4px 8px;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 16px;
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
}

.as-customer-header--shop .as-customer-header__account-status {
  display: none;
}

.as-customer-header--shop .as-customer-header__link--book {
  min-width: 218px;
  background: var(--as-header-ink);
  color: #fffdf9;
}

.as-customer-header--shop .as-customer-header__account-menu {
  top: calc(100% + 10px);
}

@media (max-width: 1260px) and (min-width: 990px) {
  .as-customer-header--shop {
    padding-inline: 24px;
  }

  .as-customer-header--shop .as-customer-header__logo {
    width: 190px;
    min-width: 190px;
  }

  .as-customer-header--shop .as-customer-header__nav-primary {
    gap: 16px;
  }

  .as-customer-header--shop .as-customer-header__nav-actions {
    gap: 8px;
  }

  .as-customer-header--shop .as-customer-header__account summary,
  .as-customer-header--shop .as-customer-header__link--book {
    padding-inline: 13px;
  }

  .as-customer-header--shop .as-customer-header__link--book {
    min-width: 178px;
  }
}

@media (max-width: 989px) {
  [data-as-customer-header].as-customer-header--shop,
  .as-customer-header--shop {
    height: 116px;
    min-height: 116px;
  }

  .as-customer-header--shop {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    grid-template-rows: 32px 84px;
    padding-inline: 18px;
  }

  .as-customer-header--shop .as-customer-header__announcement {
    margin-inline: -18px;
    font-size: 10px;
    line-height: 31px;
  }

  .as-customer-header--shop .as-customer-header__menu-toggle,
  .as-customer-header--shop .as-customer-header__logo,
  .as-customer-header--shop .as-customer-header__mobile-book {
    grid-row: 2;
  }

  .as-customer-header--shop .as-customer-header__logo {
    width: 146px;
    min-width: 146px;
  }

  .as-customer-header--shop .as-customer-header__nav {
    top: 100%;
    display: none;
    grid-template-columns: minmax(0, 1fr);
    max-height: calc(100dvh - 116px);
    padding: 0;
  }

  .as-customer-header--shop.is-menu-open .as-customer-header__nav {
    display: grid;
  }

  .as-customer-header--shop .as-customer-header__nav-primary,
  .as-customer-header--shop .as-customer-header__nav-actions {
    grid-column: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 0;
    padding: 12px 18px;
  }

  .as-customer-header--shop .as-customer-header__nav-actions {
    border-top: 1px solid var(--as-header-line);
    padding-top: 0;
  }

  .as-customer-header--shop .as-customer-header__nav-primary .as-customer-header__link,
  .as-customer-header--shop .as-customer-header__nav-actions > * {
    width: 100%;
  }

  .as-customer-header--shop .as-customer-header__account summary,
  .as-customer-header--shop .as-customer-header__link--book {
    min-height: 50px;
  }

  .as-customer-header--shop .as-customer-header__link--gift {
    min-height: auto;
    justify-content: flex-start;
    padding: 13px 2px 9px;
    border-radius: 0;
  }

  .as-customer-header--shop .as-customer-header__link--book {
    min-width: 0;
  }
}

@media (max-width: 520px) {
  .as-customer-header--shop .as-customer-header__nav-primary,
  .as-customer-header--shop .as-customer-header__nav-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}
