/* Site header — shared across all pages (load after page :root) */
:root {
  --nav-h: 76px;
}

nav#mainNav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 3vw, 28px);
  padding: 0 clamp(16px, 4vw, 56px);
  height: var(--nav-h);
  background: linear-gradient(180deg, #fffefb 0%, #f8f3eb 55%, #f3ebe0 100%);
  border-bottom: 1px solid rgba(160, 120, 64, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
}

nav#mainNav.scrolled {
  box-shadow: 0 12px 36px rgba(42, 31, 20, 0.12);
  border-bottom-color: rgba(160, 120, 64, 0.45);
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.nav-logo-wordmark {
  font-family: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  font-size: clamp(1.25rem, 2.8vw, 1.7rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #231910;
  line-height: 1.1;
}

.nav-logo-wordmark em {
  font-style: italic;
  color: var(--spice, #8b3a1a);
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px 26px;
  list-style: none;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links > li > a {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #2f2318;
  text-decoration: none;
  text-transform: none;
  padding: 10px 2px 8px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-links > li.nav-dropdown > a {
  padding-right: 20px;
}

.nav-links > li > a:hover {
  color: var(--spice, #8b3a1a);
  border-bottom-color: rgba(200, 169, 110, 0.95);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown > a {
  position: relative;
}

.nav-dropdown > a::before {
  content: "";
  position: absolute;
  right: 2px;
  top: 50%;
  width: 0;
  height: 0;
  margin-top: -2px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--gold-deep, #a07840);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: #fffdf9;
  border: 1px solid var(--border, #e2d0b4);
  border-radius: 8px;
  padding: 8px 0;
  min-width: 220px;
  box-shadow: 0 16px 48px rgba(42, 31, 20, 0.14);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 12px 22px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #352818;
  text-decoration: none;
  text-transform: none;
  border-bottom: none;
}

.dropdown-menu a:hover {
  background: var(--parchment, #f5ead8);
  color: var(--spice, #8b3a1a);
}

.nav-links > li > a.nav-cta {
  border-bottom: none;
  background: var(--spice, #8b3a1a);
  color: #fff !important;
  padding: 11px 22px !important;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(139, 58, 26, 0.28);
  margin-left: 4px;
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.nav-links > li > a.nav-cta:hover {
  background: var(--gold-deep, #a07840) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139, 58, 26, 0.32);
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.hamburger:hover {
  background: rgba(200, 169, 110, 0.12);
  border-color: rgba(160, 120, 64, 0.25);
}

.hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: #2a1f14;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-logo:focus-visible,
.nav-links > li > a:focus-visible,
.nav-links > li > a.nav-cta:focus-visible,
.dropdown-menu a:focus-visible,
.hamburger:focus-visible {
  outline: 2px solid var(--gold-deep, #a07840);
  outline-offset: 3px;
}

.page-hero {
  padding-top: var(--nav-h) !important;
}

@media (max-width: 700px) {
  /* Dim the page behind the drawer */
  nav#mainNav:has(.nav-links.open)::before {
    content: "";
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(42, 31, 20, 0.42);
    z-index: 1000;
    pointer-events: auto;
  }

  body:has(#navLinks.open) {
    overflow: hidden;
  }

  nav#mainNav .nav-logo,
  nav#mainNav .hamburger {
    position: relative;
    z-index: 1002;
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    position: fixed;
    top: var(--nav-h);
    right: 0;
    left: auto;
    bottom: 0;
    width: min(82vw, 300px);
    max-width: 100%;
    min-height: calc(100vh - var(--nav-h));
    max-height: calc(100vh - var(--nav-h));
    margin: 0;
    padding: 28px 22px 36px;
    gap: 0;
    list-style: none;
    background: linear-gradient(180deg, #fffefb 0%, #faf5ee 100%);
    border-left: 1px solid rgba(160, 120, 64, 0.28);
    box-shadow: -12px 0 40px rgba(42, 31, 20, 0.12);
    z-index: 1001;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition:
      transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.28s ease,
      visibility 0.38s;
  }

  .nav-links.open {
    transform: translateX(0);
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .hamburger {
    display: flex;
  }

  .nav-links li {
    flex-shrink: 0;
    border-bottom: 1px solid rgba(226, 208, 180, 0.85);
  }

  .nav-links li:last-child {
    border-bottom: none;
    margin-top: 8px;
    padding-top: 16px;
  }

  .nav-links > li > a {
    display: block;
    padding: 18px 6px;
    font-size: 1.06rem;
    font-weight: 600;
    line-height: 1.35;
    border-bottom: none;
  }

  .nav-links > li.nav-dropdown > a {
    padding-right: 28px;
  }

  .nav-links .nav-dropdown {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: rgba(245, 234, 216, 0.72);
    padding: 10px 0 14px;
    margin: 4px 0 6px;
    border-radius: 10px;
    width: 100%;
  }

  .nav-links .dropdown-menu a {
    display: block;
    padding: 14px 18px;
    font-size: 0.98rem;
    line-height: 1.4;
    border-radius: 0;
  }

  .nav-links .dropdown-menu a + a {
    border-top: 1px solid rgba(226, 208, 180, 0.55);
  }

  /* Full-width CTA — avoids overlap with “Bakery Menu” */
  .nav-links > li > a.nav-cta {
    display: block;
    width: 100%;
    margin: 0;
    padding: 16px 20px !important;
    text-align: center;
    border-radius: 999px;
    box-sizing: border-box;
    box-shadow: 0 4px 18px rgba(139, 58, 26, 0.22);
  }
}
