html { scroll-padding-top: 9.5rem; }
.shop-mast { --ornament: #957647; }
[data-theme="charcoal"] .shop-mast { --ornament: #d9be8f; }
.brand-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 5.9rem;
  padding: .55rem var(--pad) .35rem;
}
.desktop-appearance, .menu-switch { justify-self: start; }
.mast-brand {
  grid-column: 2;
  display: grid;
  justify-items: center;
  color: var(--ink);
}
.mast-name { font: italic 3.15rem/.88 Georgia, serif; letter-spacing: -.082em; padding-right: .08em; }
.ribbon-mark { width: 3.35rem; height: 1.18rem; color: var(--ornament); }
.mast-caption { font-size: .55rem; line-height: 1; text-transform: uppercase; letter-spacing: .23em; margin-top: .5rem; }
.shop-tools { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 1rem; }
.gift-search { display: flex; align-items: center; gap: .7rem; min-height: 2.45rem; width: clamp(8rem, 12vw, 13rem); border: 1px solid var(--book-rule); border-radius: 3px; padding: .45rem .8rem; font-size: .82rem; color: var(--muted); }
.gift-search .icon { width: 1.05rem; height: 1.05rem; }
.gift-search:hover { border-color: var(--ink); color: var(--ink); }
.shop-tools .bag-button { min-width: 2.8rem; justify-content: center; gap: .24rem; }
.menu-switch, .mobile-appearance { display: none; }
.mast .gift-nav { display: flex; justify-content: center; align-items: stretch; gap: clamp(1.5rem, 3.5vw, 4rem); padding-inline: var(--pad); }
.gift-nav .nav-group { position: relative; }
.mast .nav-item {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .9rem 0 1rem;
  font: 600 .73rem/1.2 Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: .1em;
  position: relative;
  list-style: none;
}
.mast .nav-item:hover { text-decoration: none; color: var(--wine); }
.nav-item::after { content: ''; position: absolute; inset: auto 0 .55rem; height: 1px; background: var(--ornament); transform: scaleX(0); transform-origin: left; }
.nav-item:hover::after, .nav-item:focus-visible::after, .nav-group[open] summary::after { transform: scaleX(1); }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::before { content: ''; order: 1; width: .4rem; height: .4rem; margin-top: -.18rem; border: solid currentColor; border-width: 0 1px 1px 0; transform: rotate(45deg); }
.nav-group[open] summary::before { transform: rotate(225deg); margin-top: .23rem; }
.nav-panel { position: absolute; top: 100%; left: 50%; translate: -50% 0; border: 1px solid var(--line); border-top: 2px solid var(--ornament); background: var(--paper); padding: .45rem; border-radius: 0 0 .45rem .45rem; box-shadow: 0 .8rem 1.6rem #0002; }
.mast .nav-panel a { display: flex; align-items: center; gap: .8rem; padding: .55rem; border-radius: .2rem; font: 1.05rem/1.2 Georgia, serif; }
.mast .nav-panel a:hover, .mast .nav-panel a:focus-visible { background: var(--panel); text-decoration: none; }
.collection-menu { width: 17.5rem; }
.collection-menu img { width: 3.1rem; height: 3.1rem; object-fit: cover; border-radius: .2rem; }
.collection-menu small { display: block; font: .73rem/1.3 Arial, sans-serif; color: var(--muted); padding-top: .27rem; }
.price-menu { width: 13.5rem; }
.mast .price-menu a { justify-content: space-between; padding: .8rem .7rem; }
.price-menu .icon { width: .75rem; height: .75rem; color: var(--muted); }
.filter-bar [data-clear-price] { border-style: dashed; }
.builder-summary { top: 9.4rem; max-height: calc(100svh - 10.5rem); }
@media (prefers-reduced-motion: no-preference) {
  .nav-item::after, .nav-group summary::before { transition: transform .18s ease; }
  .nav-group[open] .nav-panel, .gift-nav[data-open] { animation: unfold-menu .18s ease-out; }
  @keyframes unfold-menu { from { opacity: 0; transform: translateY(-.35rem); } to { opacity: 1; transform: translateY(0); } }
}
@media (max-width: 720px) {
  html { scroll-padding-top: 5.3rem; }
  .brand-row { min-height: 4.55rem; padding: .3rem clamp(.45rem, 3vw, 1.25rem); }
  .desktop-appearance { display: none; }
  .menu-switch { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; }
  .menu-switch[aria-expanded="false"] .icon:last-child, .menu-switch[aria-expanded="true"] .icon:first-child { display: none; }
  .ribbon-mark { width: 2.4rem; height: .87rem; }
  .mast-name { font-size: 2.55rem; }
  .mast-caption { font-size: .46rem; margin-top: .36rem; }
  .shop-tools { gap: 0; }
  .gift-search { width: 2.75rem; height: 2.75rem; padding: 0; justify-content: center; border: none; color: var(--ink); }
  .gift-search .icon { width: 1.18rem; height: 1.18rem; }
  .gift-search span { display: none; }
  .mast .gift-nav { display: none; position: absolute; top: 100%; inset-inline: 0; flex-direction: column; justify-content: start; gap: 0; background: var(--paper); padding: .35rem 1.25rem 1rem; border-block: 1px solid var(--line); box-shadow: 0 1rem 2rem #0002; max-height: calc(100dvh - 4.55rem); overflow-y: auto; overscroll-behavior: contain; }
  .mast .gift-nav[data-open] { display: flex; }
  .mast .nav-item { justify-content: space-between; padding: 1rem .15rem; border-bottom: 1px solid var(--line); font-size: .8rem; }
  .nav-item::after { display: none; }
  .nav-panel { width: auto; position: static; translate: none; border: 0; border-radius: 0; box-shadow: none; padding: .25rem 0 .5rem .5rem; }
  .mobile-appearance { display: block; padding-top: 1rem; }
  .mobile-appearance button { min-height: 2.2rem; padding-inline: .8rem; }
  .builder-summary { top: 5.4rem; max-height: none; }
}

/* Larger header navigation on tablets and desktops */
@media (min-width: 721px) {
  .brand-row { min-height: 6.6rem; }
  .mast-name { font-size: 3.7rem; }
  .mast-caption { font-size: .64rem; margin-top: .6rem; }
  .gift-search { min-height: 2.8rem; font-size: .92rem; }
  .mast .gift-nav { gap: clamp(1.8rem, 4vw, 4.6rem); }
  .mast .nav-item { font-size: .9rem; padding: 1.1rem 0 1.2rem; letter-spacing: .11em; }
  .shop-tools { gap: 1.2rem; }
}
