/* Mobile header and hamburger styles - applied only on small viewports */
/* Minimal, high-specificity rules to avoid changing desktop layout */

/* Hide toggle by default (desktop) */
.site-header .nav-toggle { display: none !important; }

/* Hide nav-close on desktop by default; shown on mobile when nav-open */
.site-header .nav-close { display: none; }

/* Basic hamburger lines are hidden in favor of a flat SVG-style icon */
.site-header .nav-toggle span { display:none; }

/* Ensure toggle is clickable and above content */
.site-header .nav-toggle {
  position: relative;
  z-index: 1300;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  box-sizing: border-box;
  border-radius: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: #f7f8f7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  -webkit-appearance: none;
  text-shadow: none;
}
.site-header .nav-toggle::before {
  content: '';
  width: 24px;
  height: 24px;
  display: block;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M4 7.5h16M4 12h16M4 16.5h16' stroke='%23000' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M4 7.5h16M4 12h16M4 16.5h16' stroke='%23000' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
}
.site-header .nav-toggle, .site-header .nav-toggle span { pointer-events: auto; }

@media (max-width: 900px) {
  /* Start hidden: header hidden off-canvas until user scrolls */
  .site-header { transform: translateY(-110%) !important; }

  /* When revealed, give header a solid, slightly translucent background
     with blur and shadow so it reads over any section (hero or others). */
  .site-header.show-on-scroll {
    transform: translateY(0) !important;
    background: linear-gradient(180deg, rgba(1,26,28,0.92), rgba(1,26,28,0.72)) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    box-shadow: 0 8px 28px rgba(0,0,0,0.45) !important;
    padding-top: calc(0.6rem + env(safe-area-inset-top)) !important;
    padding-bottom: 0.4rem !important;
  }

  /* Show toggle only when header is revealed or when nav is open */
  .nav-toggle { display: none !important; }
  /* Force hide desktop nav on mobile (high specificity to override other CSS) */
  .site-header .site-nav { display: none !important; }

  .site-header {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    background: transparent;
    backdrop-filter: none;
    transform: translateY(-110%);
    transition: transform 260ms ease, box-shadow 160ms ease, background 220ms ease;
    box-shadow: 0 6px 20px rgba(2,8,10,0.15);
    z-index: 1400;
    --header-height: 56px; /* expose header height for other components (used by cart drawer) */
  }

  /* Neutralize any page-level hide-on-scroll logic on mobile */
  .site-header.header-hidden {
    transform: translateY(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* visible when we want header to show on mobile */
  .site-header.show-on-scroll { transform: translateY(0); }

  .site-header.show-on-scroll .nav-toggle,
  .site-header.nav-open .nav-toggle {
    display:inline-flex !important;
    position: fixed !important;
    top: 12px !important;
    right: 12px !important;
    z-index: 1305 !important;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    padding: 0 !important;
    box-shadow: none !important;
    outline: none !important;
  }
  /* Make header inner spacing consistent so it doesn't overlap content oddly */
  .site-header .header-inner { padding: 0 1rem; align-items: center; height: 56px; }
  .site-header .brand-logo { max-height: 28px; }
  .nav-toggle span { background: currentColor; }
  /* default hamburger uses currentColor; override for dark headers */
  .site-header[style*="background: transparent"] .nav-toggle span { background: #111; }

  /* reserve space when header is visible to avoid overlapping top content */
  .header-visible { padding-top: 56px !important; }

  body.nav-open { overflow: hidden; }

  /* Full-screen navigation panel when opened */
  .site-header.nav-open .site-nav {
    display: flex !important;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    min-height: 100dvh;
    margin: 0;
    overflow-y: auto;
    background: linear-gradient(180deg, #062326 0%, #031315 100%);
    padding: calc(92px + env(safe-area-inset-top)) 1.25rem 2rem;
    z-index: 1450;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    -webkit-overflow-scrolling: touch;
    box-shadow: none;
    border-radius: 0;
    border: 0;
    position: fixed;
    isolation: isolate;
  }
  .site-header.nav-open .site-nav::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
      radial-gradient(circle at 50% 0%, rgba(45,180,160,0.10), transparent 32%),
      radial-gradient(circle at 50% 100%, rgba(255,255,255,0.05), transparent 34%);
    pointer-events: none;
  }
  .site-header.nav-open .site-nav::before {
    content: '';
    position: absolute;
    top: calc(18px + env(safe-area-inset-top));
    left: 50%;
    transform: translateX(-50%);
    width: 148px;
    height: 48px;
    background: url('../images/logo.png') center/contain no-repeat;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.45));
    pointer-events: none;
  }
  .site-header.nav-open .nav-close {
    position: absolute;
    top: calc(14px + env(safe-area-inset-top));
    right: 14px;
    width: 44px;
    height: 44px;
    border-radius: 0;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    cursor: pointer;
    color: #fff;
  }
  .site-header.nav-open .nav-close span {
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 0;
    background: currentColor;
    display: block;
  }
  .site-header.nav-open .nav-close span:first-child {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 5l14 14' stroke='%23000' stroke-width='2.3' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 5l14 14' stroke='%23000' stroke-width='2.3' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
  }
  .site-header.nav-open .nav-close span:last-child {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M19 5L5 19' stroke='%23000' stroke-width='2.3' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M19 5L5 19' stroke='%23000' stroke-width='2.3' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
  }
  .site-header.nav-open .site-nav a {
    display: block;
    padding: 0.9rem 0.5rem;
    color: #fff;
    font-weight: 600;
    font-size: 1.12rem;
    text-transform: none;
    letter-spacing: 0.04em;
    width: min(100%, 280px);
    text-align: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    position: relative;
    z-index: 1;
  }
  .site-header.nav-open .site-nav a + a { margin-top: 0.35rem; }
  .site-header.nav-open .site-nav a::after {
    content: '';
    display: block;
    width: 72px;
    height: 1px;
    margin: 0.75rem auto 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.38), transparent);
    opacity: 0.85;
    transform: scaleX(0.85);
    transition: transform 180ms ease, opacity 180ms ease;
  }
  .site-header.nav-open .site-nav a:last-child::after { display: none; }
  .site-header.nav-open .site-nav a:hover { color: #ffffff; transform: translateY(-1px); }
  .site-header.nav-open .site-nav a:hover::after { opacity: 1; transform: scaleX(1); }

  /* ensure header inner layout on mobile so logo left / toggle right */
  .site-header .header-inner { display:flex; align-items:center; justify-content:space-between; padding: 0 1rem; }

  /* Close X effect for toggle when nav is open */
  .site-header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; transform: scale(0.5); }
  .site-header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  /* when the fullscreen nav is open the overlay is white, make the toggle icon dark for contrast */
  .site-header.nav-open .nav-toggle { color: #0b2b2c; }

  /* hide large CTA used on desktop to avoid duplicate controls */
  .btn-login { display: none !important; }
}
