/* Shared public-site navigation */
nav {
  --nav-offset: 220px;
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
  background: transparent;
  transition: padding 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

nav + * {
  margin-top: var(--nav-offset);
}

/* Products is the reference: page content tokens must not recolor the navbar. */
.site-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #a39b90;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav .nav-links a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-nav .nav-links a:hover,
.site-nav .nav-links a[aria-current="page"] { color: #f7f4ee; }

/* Equal side columns keep the visible navigation group centered in the viewport. */
@media (min-width: 821px) {
  nav.site-nav { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .site-nav .nav-mark { justify-self: start; }
  .site-nav .nav-links { justify-self: center; }
  .site-nav .nav-actions { justify-self: end; }
}

/* Desktop menus share the scrolled navbar's espresso Liquid Glass surface. */
.site-nav { overflow: visible !important; }
.nav-item-has-menu { position: relative; display: flex; align-items: center; min-height: 44px; padding-right: 18px; }
.nav-item-has-menu > a { display: inline-flex; align-items: center; gap: 7px; }
/* Count the visible arrow in item spacing; extend its tap target into the gap. */
.nav-dropdown-toggle {
  position: absolute;
  left: calc(100% - 18px);
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  padding: 0 0 0 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
.nav-dropdown-toggle:hover { color: #f7f4ee; }
.nav-chevron {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}
.nav-dropdown-toggle[aria-expanded="true"] .nav-chevron { transform: rotate(225deg) translate(-1px, -1px); }
.nav-dropdown {
  position: absolute;
  z-index: 120;
  top: calc(100% + 12px);
  left: -18px;
  min-width: 230px;
  padding: 9px;
  display: grid;
  gap: 3px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(63, 56, 46, 0.78), rgba(35, 32, 28, 0.82));
  backdrop-filter: blur(20px) saturate(190%) brightness(110%);
  -webkit-backdrop-filter: blur(20px) saturate(190%) brightness(110%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), inset 0 -1px 2px rgba(0,0,0,.1), 0 12px 40px rgba(0,0,0,.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(7px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.nav-dropdown::before { content: ""; position: absolute; left: 0; right: 0; top: -13px; height: 13px; }
@media (min-width: 821px) {
  .nav-dropdown::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    border-radius: inherit;
    clip-path: inset(0 round 18px);
    background: linear-gradient(135deg, rgba(255, 249, 234, 0.055), transparent 55%, rgba(255, 249, 234, 0.02));
    filter: url(#smiths-glass-displacement);
  }
  .nav-dropdown a { position: relative; z-index: 1; }
}
.nav-dropdown a {
  display: block;
  padding: 11px 13px;
  border-radius: 10px;
  color: var(--cream, #f7f4ee);
  text-decoration: none;
  font: 500 14px var(--font-body);
  transition: color .2s ease, background .2s ease;
}
.nav-dropdown a:hover, .nav-dropdown a:focus-visible { color: var(--crema, #C08A3E); background: rgba(192,138,62,.16); }
.nav-item-has-menu.is-menu-open .nav-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown-toggle:focus-visible, .nav-item-has-menu > a:focus-visible, .nav-dropdown a:focus-visible { outline: 2px solid var(--crema, #C08A3E); outline-offset: 2px; }

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.nav-cta,
.nav-account {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 43px;
  height: 43px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--crema, #C08A3E);
  color: #1a1815;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.nav-cta:hover,
.nav-account:hover {
  background: #d09849;
  transform: translateY(-1px);
}

.nav-cta:focus-visible,
.nav-account:focus-visible {
  outline: 3px solid rgba(247, 244, 238, 0.85);
  outline-offset: 3px;
}

.nav-cta svg,
.nav-account svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 43px;
  height: 43px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--crema, #C08A3E);
  color: #1a1815;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.nav-cart:hover {
  background: #d09849;
  transform: translateY(-1px);
}

.nav-cart:focus-visible {
  outline: 3px solid rgba(247, 244, 238, 0.85);
  outline-offset: 3px;
}

.nav-cart svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-cart::after {
  content: "";
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--surface, #2e2b26);
  border-radius: 50%;
  background: #ff8585;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: scale(0.55);
  transform-origin: center;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.nav-cart.has-items::after {
  opacity: 1;
  transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .nav-cart::after { transition: none; }
}

@media (max-width: 820px) {
  nav {
    --nav-offset: 160px;
  }
}
