/* ─── MOBILE NAVIGATION ───
   Shared across every page. The desktop .nav-links are hidden below 768px,
   so a burger button + full-screen panel take over at that size. */

.nav-burger {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  margin-left: 14px;
  padding: 0;
  flex: none;
  background: transparent;
  border: 1px solid var(--border2, rgba(255,255,255,0.18));
  border-radius: 6px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nav-burger span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--white, #fff);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-burger:hover { border-color: #444; }

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 2000;
  /* Pages that style bare elements (index.html has `nav { ... }`) must not
     reach into the panel, so every box below states its own layout. */
  display: flex;
  flex-direction: column;
  padding: 0 6% 40px;
  /* Fully opaque: at 0.98 the page text underneath still read through. */
  background: #080808;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.mobile-nav.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mobile-nav-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: auto;
  height: 68px;
  margin: 0;
  padding: 0;
  flex: none;
  background: none;
  border: 0;
}
.mobile-nav-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
  color: var(--white, #fff);
  background: transparent;
  border: 1px solid var(--border2, rgba(255,255,255,0.18));
  border-radius: 6px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mobile-nav-close:hover { border-color: #444; }

.mobile-nav-links {
  /* This is a <nav>, so it inherits any bare `nav` rules the page defines
     (height, sticky positioning, padding, background). Reset them all. */
  position: static;
  top: auto;
  z-index: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  width: auto;
  height: auto;
  min-height: 0;
  max-height: none;
  flex: 0 0 auto;
  gap: 0;
  margin: 8px 0 0;
  padding: 0;
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 0;
  box-shadow: none;
  overflow: visible;
}
.mobile-nav-links a {
  display: block;
  width: 100%;
  flex: none;
  margin: 0;
  padding: 18px 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--muted, #ccc);
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
}
.mobile-nav-links a:active,
.mobile-nav-links a.active { color: var(--white, #fff); }

.mobile-nav-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: auto;
  height: auto;
  flex: none;
  margin: 32px 0 0;
  padding: 0;
  background: none;
  border: 0;
}
.mobile-nav-actions a {
  display: block;
  width: 100%;
  margin: 0;
  padding: 15px 20px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  color: var(--white, #fff);
  border: 1px solid var(--border2, rgba(255,255,255,0.18));
}
.mobile-nav-actions a.is-primary {
  background: var(--red, #cc1f1f);
  border-color: var(--red, #cc1f1f);
}

body.mobile-nav-open { overflow: hidden; }

@media (max-width: 768px) {
  /* Normalised here so every page switches to the burger at the same width. */
  .nav-links { display: none !important; }
  .nav-burger { display: flex; }
  /* .nav-links carried the margin-left:auto that pushed the CTA right */
  .nav-inner .nav-cta { margin-left: auto; }
}

@media (max-width: 600px) {
  /* Keep room for the burger on small screens; both links live in the panel. */
  .nav-shop { display: none; }
  nav .nav-cta { padding: 9px 14px; font-size: 12.5px; }
}

@media (min-width: 769px) {
  .nav-burger,
  .mobile-nav { display: none !important; }
}

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