/* ==========================================================================
   HEADER RESPONSIVENESS FIXES — task 86ewt8a5k
   Site-specific overrides for choiceammunition.com
   ========================================================================== */

/* =======================================================================
   RULE 1 — Raise hamburger menu breakpoint from 1000px to 1350px.
   Blocksy default: desktop nav ≥1000px, hamburger ≤999.98px.
   This override forces hamburger at 1000–1349px (tablets/narrow laptops).
   At 1350px+ the 10-item nav fits without overflow.
   ======================================================================= */

@media (min-width: 1000px) and (max-width: 1349.98px) {
  /* Hide desktop header row */
  #header [data-device=desktop] { display: none !important; }
  /* Show mobile header row (hamburger) */
  #header [data-device=mobile] { display: block !important; }
}

/* =======================================================================
   RULE 2 — Reduce padding-inline at 1350–1500px
   to give the 10-item nav more horizontal room
   ======================================================================= */

@media (min-width: 1350px) and (max-width: 1500px) {
  #header [data-row*=top],
  #header [data-row*=middle],
  #header [data-row*=bottom] {
    padding-inline: 32px !important;
  }
}

/* =======================================================================
   RULE 3 — Reduce inter-item gap at 1350–1500px
   Default is 24px; reducing to 10px recovers space at narrower desktops
   ======================================================================= */

@media (min-width: 1350px) and (max-width: 1500px) {
  [data-header*="type-1"] .ct-header [data-id="menu"] {
    --menu-items-spacing: 10px;
  }
}

/* =======================================================================
   RULE 4 — Nav bottom row: Fix white background at 1000–1349px
   global.css sets var(--theme-palette-color-8) (#fff) here;
   override with same dark colour used at ≤999.98px
   ======================================================================= */

@media (min-width: 1000px) and (max-width: 1349.98px) {
  [data-header*="type-1"] .ct-header [data-row*="bottom"] {
    background-color: #111111 !important;
  }
}

/* =======================================================================
   RULE 5 — Nav bottom row: Horizontal scroll on overflow at 1000–1349px
   Prevents nav items from being clipped at narrower tablet-landscape sizes
   ======================================================================= */

@media (min-width: 1000px) and (max-width: 1349.98px) {
  #header [data-device=mobile] [data-row=bottom] {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
}

/* =========================================================================
   Fix: Wishlist sign-up button unclickable (86ewt8bmx)
   Root cause 1: header#header z-index:1000 < spu-bg z-index:99999 (WP Popups
   backdrop, position:fixed) → wishlist icon unclickable on fresh page loads.
   Root cause 2: body[data-panel*="in"] never matches "wishlist-offcanvas-panel"
   → pointer-events:none on the panel, blocking the sign-up button.
   Fix 1: raise real header above spu-bg.
   Fix 2: hide spu-bg when any panel is open (belt+suspenders).
   Fix 3: restore pointer-events on active wishlist panel.
   ========================================================================= */

/* Fix 1: Raise header above WP Popups backdrop (z-index:99999) */
header#header.ct-header {
  z-index: 1000000 !important;
}

/* Fix 2: Hide WP Popups backdrop when a panel is open */
body[data-panel] .spu-bg {
  display: none !important;
}

/* Fix 3: Restore pointer-events on active wishlist offcanvas panel */
body[data-panel] #wishlist-offcanvas-panel.active {
  pointer-events: auto !important;
}

/* Fix 4: Lower header z-index when panel is open so offcanvas renders above header */
body[data-panel] header#header.ct-header {
  z-index: 999 !important;
}
