/* ──────────────────────────────────────────────────────────────────────
   SITE HEADER — single shared stylesheet for the "Approved 2-Row Header
   Architecture" used across every public FoodsJar page. Previously this
   whole block was copy-pasted inside each page's own <style>, which is
   exactly why the pages drifted out of sync with each other (2026-10-22
   audit). From now on every page links this ONE file instead of carrying
   its own copy — a future header change only needs to happen here.
   Paired with /shared-header.js, which injects the matching HTML and
   defines toggleMenu(). Do not duplicate these rules back into a page's
   own <style> block.
   ────────────────────────────────────────────────────────────────────── */
:root {
  --primary: #D4AF37;
  --primary-dark: #B89741;
  --secondary: #1B2A4A;
  --secondary-dark: #131b33;
  --dark: #0A1128;
  --light: #FFFFFF;
  --white: #FFFFFF;
  --radius: 16px;
  --shadow: 0 8px 30px rgba(10,17,40,0.12);
}

header.fj-2row-header {
  background: #FFFFFF;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(10,17,40,0.08);
  border-bottom: 1px solid rgba(10,17,40,0.06);
  display: flex;
  flex-direction: column;
  padding: 0;
}
.hdr-row-utility {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 4%;
  background: #FFFFFF;
  min-height: 60px;
}
.hdr-row-utility .hdr-brand-group { display: flex; align-items: center; gap: 14px; }
.hdr-row-utility .logo img { height: 46px; object-fit: contain; display: block; border-radius: 4px; transition: transform 0.3s ease; }
.hdr-row-utility .logo:hover img { transform: scale(1.03); }
.hdr-row-utility .hdr-divider { width: 1px; height: 22px; background: #E2E8F0; margin: 0 4px; }
.hdr-row-utility .hdr-util-actions { display: flex; align-items: center; gap: 10px; }
.hdr-gold-btn {
  background: #F0B800; color: #0A1128 !important; padding: 7px 18px; border-radius: 20px; font-weight: 800; font-size: 13.5px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 2px 8px rgba(240,184,0,0.3); transition: all 0.2s ease;
}
.hdr-gold-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(240,184,0,0.45); background: #e5af00; }
.hdr-red-btn {
  background: #E53935; color: #FFFFFF !important; padding: 6px 14px; border-radius: 20px; font-weight: 800; font-size: 13px; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; transition: all 0.2s ease;
}
.hdr-red-btn:hover { background: #d32f2f; transform: translateY(-1px); }
.hdr-util-link { color: #0A1128; font-weight: 700; font-size: 13.5px; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.hdr-util-link:hover { color: #C9A227; }
.hdr-cart-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; color: #0A1128; text-decoration: none; padding: 6px; }
.hdr-cart-btn svg { width: 24px; height: 24px; stroke: #0A1128; }
.hdr-cart-badge { position: absolute; top: -2px; left: -2px; background: var(--primary); color: var(--dark); font-size: 10px; font-weight: 800; min-width: 16px; height: 16px; border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 3px; }

.hdr-row-navy {
  background: #0A1128; margin: 0 4% 8px; border-radius: 8px; padding: 0 16px; display: flex; align-items: center; justify-content: flex-start; gap: 0; box-shadow: 0 4px 16px rgba(10,17,40,0.15); min-height: 48px; overflow: visible;
}
.hdr-row-navy::-webkit-scrollbar { display: none; }
.hdr-row-navy .hdr-nav-link { color: #FFFFFF; font-weight: 700; font-size: 13.5px; text-decoration: none; padding: 12px 14px; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; transition: color 0.2s; position: relative; cursor: pointer; }
.hdr-row-navy .hdr-nav-link:hover { color: #F0B800; }
.hdr-row-navy .hdr-nav-link.active { color: #F0B800; font-weight: 800; }
.hdr-row-navy .hdr-nav-link.active::after { content: ''; position: absolute; bottom: 0; left: 14px; right: 14px; height: 3px; background: #F0B800; border-radius: 3px 3px 0 0; }
.hdr-row-navy .hdr-navy-divider { width: 1px; height: 18px; background: rgba(255,255,255,0.15); margin: 0 2px; flex-shrink: 0; }
.hdr-row-navy .dropdown { position: relative; display: flex; align-items: center; height: 100%; }
.hdr-row-navy .dropdown-content { top: 100%; right: 0; background: #FFFFFF; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); border: 1px solid rgba(10,17,40,0.08); min-width: 180px; }
.hdr-row-navy .dropdown-content a { color: #0A1128; padding: 10px 14px; font-size: 13px; }
.hdr-row-navy .dropdown-content a:hover { background: #FEF9E7; color: #C9A227; }

.logo { font-size: 22px; font-weight: 900; color: var(--primary); display: flex; align-items: center; gap: 8px; cursor: pointer; text-decoration: none; }
.nav-links { display: none; gap: 16px; align-items: center; }
.menu-toggle { display: none; font-size: 26px; color: #0A1128; cursor: pointer; user-select: none; }
.overlay-bg { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99; }
.close-menu { display: none; position: absolute; top: 15px; left: 20px; font-size: 30px; color: var(--dark); cursor: pointer; text-decoration: none; border: none; background: none; }

.dropdown { position: relative; display: flex; align-items: center; height: 100%; }
.dropdown > a { padding-right: 8px; }
.dropdown-content { display: none; position: absolute; background-color: var(--white); min-width: 170px; box-shadow: var(--shadow); z-index: 1000; border-radius: 12px; overflow: hidden; top: calc(100% + 4px); right: 0; border: 1px solid rgba(0,0,0,0.04); }
.dropdown-content a { color: var(--dark); padding: 12px 16px; text-decoration: none; display: flex; align-items: center; border-radius: 0; border-bottom: 1px solid #f5f5f5; font-size: 13.5px; }
.dropdown-content a:last-child { border-bottom: none; }
.dropdown-content a:hover { background-color: var(--light); color: var(--primary); }
.dropdown:hover .dropdown-content { display: block; }

@media (max-width: 768px) {
  .hdr-row-navy { display: none; }
  .hdr-hide-mobile { display: none !important; }
  .menu-toggle { display: block; }
}
@media (max-width: 1024px) {
  .hdr-row-utility { padding: 8px 16px; }
  .hdr-row-navy { margin: 0 16px 8px; padding: 0 8px; }
  .hdr-row-navy .hdr-nav-link { padding: 10px 10px; font-size: 12.5px; }
  .menu-toggle { display: block; }
  .nav-links { display: flex; visibility: hidden; pointer-events: none; position: fixed; top: 0; right: -280px; width: 260px; height: 100vh; background: #fff; flex-direction: column; align-items: flex-start; padding: 60px 20px 20px; box-shadow: -4px 0 20px rgba(0,0,0,0.1); transition: right 0.3s ease; z-index: 102; gap: 12px; overflow-y: auto; margin-right: 0; }
  /* ROOT-CAUSE FIX (2026-10-22, confirmed live via click test): the base
     ".nav-links{display:none}" rule above (needed so the drawer doesn't
     occupy desktop layout space) was NEVER overridden back to visible here
     — toggleMenu() correctly added/removed the "open" class and this rule
     correctly animated "right" to 0, but the drawer stayed display:none the
     entire time, so every page's hamburger menu silently did nothing
     visible. Using visibility+pointer-events (not display) on the base
     rule keeps the slide transition working (display:none can't transition)
     while still removing it from desktop flow; .open flips it interactive. */
  .nav-links.open { right: 0; visibility: visible; pointer-events: auto; }
  .nav-links a { font-size: 16px; width: 100%; padding: 10px; border-radius: 8px; }
  .close-menu { display: block; }
  .overlay-bg.open { display: block; }
}
