/**
 * Chronospride header + primary nav (single source of truth)
 * Versioned via CHILD_THEME_CHRONOSPRIDE_VERSION.
 *
 * Goals:
 * - One coherent desktop/mobile chrome (no layered conflicting hovers)
 * - Shorter, calmer bar heights driven by logo size
 * - Clear 44px utility targets, aligned cart badge
 * - Scannable mobile flyout without double carets
 * - Dropdowns sit under labels without fragile negative margins
 */

:root {
  --cp-nav-ink: #1a1d24;
  --cp-nav-muted: #4b5563;
  --cp-nav-soft: #f3f5f7;
  --cp-nav-line: #e6e9ed;
  --cp-nav-accent: #0170b9;
  --cp-nav-accent-soft: #e8f3fb;
  --cp-nav-shadow: 0 8px 28px rgba(21, 24, 36, 0.12);
  --cp-header-bar-h-desktop: 80px;
  --cp-header-bar-h-mobile: 64px;
  --cp-logo-h-desktop: 64px;
  --cp-logo-h-mobile: 40px;
  --cp-icon-size: 44px;
  --cp-icon-glyph: 20px;
}

/* ------------------------------------------------------------------ */
/* Neutralize known conflicting legacy hover/underline layers          */
/* (kept in style.css for non-header rules; these win via cascade)     */
/* ------------------------------------------------------------------ */
.widget_ctr .ast-search-icon a:hover,
.widget_ctr .wc-myaccount:hover {
  background-color: var(--cp-nav-soft) !important;
  color: var(--cp-nav-accent) !important;
  transform: none !important;
}

.main-header-menu > .menu-item > .menu-link::after,
.main-header-menu > .menu-item > .menu-link .menu-text::after {
  content: none !important;
  display: none !important;
}

/* ------------------------------------------------------------------ */
/* Shared shell                                                        */
/* ------------------------------------------------------------------ */
.site-header .main-header-bar {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: none;
  background: #fff;
}

.ast-sticky-primary-sticked .main-header-bar,
.ast-header-break-point.cp-scrolled header.site-header {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
}

/* Utility cluster: one flex group */
.cp-header-controls,
.ast-masthead-custom-menu-items .cp-header-controls {
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  width: auto;
  max-width: 100%;
  white-space: nowrap;
}

.cp-header-controls > .widget_ctr,
.cp-header-controls > #ast-site-header-cart {
  display: inline-flex !important;
  align-items: center;
  flex: 0 0 auto;
  float: none !important;
  width: auto;
  margin: 0 !important;
  padding: 0;
  position: relative;
  top: auto;
  right: auto;
}

.cp-header-controls > .widget_ctr {
  gap: 4px;
}

/* Empty multicurrency placeholder must never reserve width */
.cp-header-controls > .widget_ctr > .crt_1:first-child {
  display: none !important;
}

.cp-header-controls .crt_1 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  float: none;
}

/* Icon buttons */
.cp-header-controls .astra-search-icon,
.cp-header-controls .wc-myaccount,
.cp-header-controls #ast-site-header-cart .cart-container {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: var(--cp-icon-size);
  height: var(--cp-icon-size);
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 999px;
  color: var(--cp-nav-muted);
  box-sizing: border-box;
  transition: background-color 0.15s ease, color 0.15s ease;
  line-height: 1;
}

.cp-header-controls .astra-search-icon:hover,
.cp-header-controls .astra-search-icon:focus-visible,
.cp-header-controls .wc-myaccount:hover,
.cp-header-controls .wc-myaccount:focus-visible,
.cp-header-controls #ast-site-header-cart .cart-container:hover,
.cp-header-controls #ast-site-header-cart .cart-container:focus-within {
  background-color: var(--cp-nav-soft) !important;
  color: var(--cp-nav-accent) !important;
}

.cp-header-controls .astra-search-icon,
.cp-header-controls .wc-myaccount .fa-regular.fa-user,
.cp-header-controls #ast-site-header-cart i.astra-icon {
  font-size: var(--cp-icon-glyph) !important;
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  width: auto;
  height: auto;
}

/* Cart shell must match icon box (no 60px stretch) */
.cp-header-controls #ast-site-header-cart,
.cp-header-controls #ast-site-header-cart .ast-site-header-cart-li,
.cp-header-controls #ast-site-header-cart .ast-addon-cart-wrap {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: var(--cp-icon-size);
  height: var(--cp-icon-size);
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
}

.cp-header-controls #ast-site-header-cart i.astra-icon {
  position: relative;
}

/* Count bubble on the shoulder */
.cp-header-controls #ast-site-header-cart i.astra-icon::after {
  top: -6px !important;
  right: -10px !important;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
}

/* ------------------------------------------------------------------ */
/* DESKTOP (≥1141)                                                     */
/* ------------------------------------------------------------------ */
@media (min-width: 1141px) {
  .ast-desktop .main-header-bar {
    min-height: var(--cp-header-bar-h-desktop);
  }

  .ast-desktop .main-header-bar .ast-container,
  .ast-desktop .main-header-bar .main-header-container {
    min-height: var(--cp-header-bar-h-desktop);
    align-items: center;
  }

  .ast-desktop .ast-site-identity {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  /* Logo drives height calmly — removes the old 138px bar + dropdown offset hack */
  .ast-desktop .site-branding .custom-logo-link,
  .ast-desktop .site-branding .custom-logo {
    display: block;
    width: auto;
    max-width: none;
    height: auto;
    max-height: var(--cp-logo-h-desktop);
  }

  .ast-desktop .site-header .site-branding {
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .ast-desktop .main-header-bar-navigation,
  .ast-desktop .main-header-menu {
    height: auto !important;
    min-height: 0;
    align-items: center;
  }

  .ast-desktop .main-header-menu {
    gap: 2px;
  }

  .ast-desktop .main-header-menu > .menu-item > .menu-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 12px !important;
    font-size: 15px !important;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--cp-nav-ink) !important;
    line-height: 1.2;
    border-radius: 8px;
    transition: color 0.15s ease, background-color 0.15s ease;
  }

  .ast-desktop .main-header-menu > .menu-item > .menu-link:hover,
  .ast-desktop .main-header-menu > .menu-item.focus > .menu-link,
  .ast-desktop .main-header-menu > .menu-item.current-menu-item > .menu-link,
  .ast-desktop .main-header-menu > .menu-item.current-menu-ancestor > .menu-link {
    color: var(--cp-nav-accent) !important;
    background: var(--cp-nav-accent-soft);
  }

  /* Underline via box-shadow on the link itself (single system) */
  .ast-desktop .main-header-menu > .menu-item > .menu-link {
    box-shadow: inset 0 0 0 0 transparent;
  }
  .ast-desktop .main-header-menu > .menu-item:hover > .menu-link,
  .ast-desktop .main-header-menu > .menu-item.current-menu-item > .menu-link,
  .ast-desktop .main-header-menu > .menu-item.current-menu-ancestor > .menu-link {
    box-shadow: inset 0 -2px 0 0 var(--cp-nav-accent);
    border-radius: 8px 8px 0 0;
  }

  /* Dropdowns flush under the shorter bar — no negative margin hack */
  .ast-desktop .main-header-menu > .menu-item > .sub-menu {
    margin-top: 0 !important;
    top: 100% !important;
    border: 1px solid var(--cp-nav-line) !important;
    border-radius: 12px !important;
    box-shadow: var(--cp-nav-shadow) !important;
    padding: 8px !important;
    min-width: 220px;
    background: #fff !important;
  }

  .ast-desktop .main-header-menu .sub-menu .menu-item {
    border-radius: 8px;
  }

  .ast-desktop .main-header-menu .sub-menu .menu-link {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 10px 14px !important;
    font-size: 14.5px !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
    color: #2a3038 !important;
    border-radius: 8px !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-align: left !important;
    white-space: nowrap;
  }

  /* Astra prints <span class="ast-icon icon-arrow"> BEFORE .menu-text.
     Without reordering, flex puts the caret on the left and the label
     shoved right. Put label first; caret only on parents, at the end. */
  .ast-desktop .main-header-menu .sub-menu .menu-link > .menu-text {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
  }
  .ast-desktop .main-header-menu .sub-menu .menu-link > .ast-icon.icon-arrow {
    order: 2;
    flex: 0 0 auto;
    margin-left: 8px;
    opacity: 0.55;
  }
  .ast-desktop .main-header-menu .sub-menu .menu-item:not(.menu-item-has-children) > .menu-link > .ast-icon.icon-arrow {
    display: none !important;
  }

  .ast-desktop .main-header-menu .sub-menu .menu-item:hover > .menu-link,
  .ast-desktop .main-header-menu .sub-menu .menu-item.focus > .menu-link {
    background: var(--cp-nav-accent-soft) !important;
    color: var(--cp-nav-accent) !important;
  }

  /* Nested brand columns stay readable, not shouting uppercase headers */
  .ast-desktop .main-header-menu .sub-menu .menu-item-has-children > .menu-link {
    font-weight: 600 !important;
    font-size: 14px !important;
    color: var(--cp-nav-ink) !important;
    text-transform: none !important;
    letter-spacing: 0.01em !important;
  }

  .ast-desktop .main-header-menu .sub-menu .sub-menu {
    border-radius: 12px !important;
    border: 1px solid var(--cp-nav-line) !important;
    box-shadow: var(--cp-nav-shadow) !important;
    padding: 8px !important;
    min-width: 210px;
  }

  .ast-desktop .main-header-menu > .menu-item > .sub-menu {
    min-width: 240px;
  }

  .ast-desktop .main-header-bar .ast-masthead-custom-menu-items {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
  }

  .ast-desktop .main-header-bar .ast-masthead-custom-menu-items.woocommerce-custom-menu-item {
    flex-direction: row !important;
  }
}

/* ------------------------------------------------------------------ */
/* MOBILE / TABLET (≤1140)                                             */
/* ------------------------------------------------------------------ */
@media (max-width: 1140px) {
  .ast-header-break-point header.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
  }

  .ast-header-break-point.cp-scrolled .reviews-io-rating-bar-widget,
  .ast-header-break-point.cp-nav-open .reviews-io-rating-bar-widget,
  .ast-header-break-point.ast-main-header-nav-open .reviews-io-rating-bar-widget {
    display: none !important;
  }

  .ast-header-break-point .main-header-bar {
    padding-top: 0;
    padding-bottom: 0;
    min-height: var(--cp-header-bar-h-mobile);
  }

  .ast-header-break-point .main-header-container {
    position: relative;
    flex-wrap: nowrap;
    align-items: center;
    min-height: var(--cp-header-bar-h-mobile);
    gap: 4px;
  }

  .ast-header-break-point .ast-site-identity {
    padding: 0 !important;
  }

  /* Collapse empty alignment gutter (Astra order:4 full-width trap) */
  .ast-header-break-point .ast-main-header-bar-alignment {
    display: none !important;
    flex: 0 0 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  /* Full-width header row; icons packed to the right with even gaps */
  .ast-header-break-point .main-header-bar .ast-container {
    max-width: none !important;
    width: 100% !important;
    padding-left: 12px !important;
    padding-right: 10px !important;
    box-sizing: border-box;
  }

  .ast-header-break-point .main-header-container {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    gap: 6px !important;
    box-sizing: border-box;
  }

  .ast-header-break-point .site-branding {
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .ast-header-break-point .ast-masthead-custom-menu-items.woocommerce-custom-menu-item,
  .ast-header-break-point .ast-header-custom-item-outside .ast-masthead-custom-menu-items {
    margin-left: auto !important;
    margin-right: 0 !important;
    flex: 0 0 auto !important;
    float: none !important;
    padding: 0 !important; /* Astra default ~13.68px was leaving empty space before the hamburger */
  }

  .ast-header-break-point .ast-mobile-menu-buttons {
    flex: 0 0 auto !important;
    margin: 0 !important;
    margin-left: 0 !important;
  }

  .ast-header-break-point .ast-header-custom-item-outside .ast-masthead-custom-menu-items {
    margin-left: auto;
  }

  .ast-header-break-point.ast-header-custom-item-outside .site-header .main-header-bar-wrap .site-branding {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0;
    max-width: none;
    padding-right: 0 !important;
  }

  .ast-header-break-point .site-branding .custom-logo-link,
  .ast-header-break-point .site-branding .custom-logo {
    display: block;
    width: auto !important;
    max-width: none !important;
    height: auto;
    max-height: var(--cp-logo-h-mobile) !important;
  }

  .ast-header-break-point .ast-button-wrap .ast-mobile-menu-buttons-fill.menu-toggle.main-header-menu-toggle {
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0 0 0 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: transparent !important;
    color: var(--cp-nav-ink);
    position: relative;
    z-index: 100020; /* above flyout so hamburger can always close */
  }

  .ast-header-break-point .ast-button-wrap .main-header-menu-toggle.toggled,
  .ast-header-break-point .ast-button-wrap .main-header-menu-toggle[aria-expanded="true"] {
    background: var(--cp-nav-soft) !important;
    color: var(--cp-nav-accent);
  }

  .ast-header-break-point span.menu-toggle-icon {
    font-size: 26px;
    color: inherit;
  }

  /* Icon cluster: even horizontal rhythm across search / account / cart / menu */
  .ast-header-break-point .main-header-container {
    gap: 0 !important;
  }

  .ast-header-break-point .cp-header-controls {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
  }

  .ast-header-break-point .cp-header-controls > .widget_ctr {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .ast-header-break-point .cp-header-controls .crt_1,
  .ast-header-break-point .cp-header-controls .ast-search-icon,
  .ast-header-break-point .cp-header-controls #ast-site-header-cart,
  .ast-header-break-point .cp-header-controls #ast-site-header-cart .ast-site-header-cart-li,
  .ast-header-break-point .cp-header-controls #ast-site-header-cart .cart-container,
  .ast-header-break-point .cp-header-controls .ast-addon-cart-wrap {
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
  }

  .ast-header-break-point .cp-header-controls .astra-search-icon,
  .ast-header-break-point .cp-header-controls .wc-myaccount,
  .ast-header-break-point .cp-header-controls #ast-site-header-cart .cart-container {
    width: 40px !important;
    height: 40px !important;
  }

  .ast-header-break-point .ast-mobile-menu-buttons {
    margin-left: 6px !important;
  }

  .ast-header-break-point .ast-button-wrap .ast-mobile-menu-buttons-fill.menu-toggle.main-header-menu-toggle {
    margin-left: 0 !important;
    width: 40px !important;
    height: 40px !important;
  }

  /*
   * CLOSED flyout must never intercept taps (confirmed bug: after a bad close
   * the panel stayed visibility:visible and blocked the hamburger).
   */
  .ast-header-break-point:not(.ast-main-header-nav-open) .main-header-bar-navigation {
    visibility: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
  }

  /* OPEN: lock chrome height so the bar cannot inflate (was growing to
     110–150px and fighting flyout top). */
  .ast-header-break-point.ast-main-header-nav-open header.site-header,
  .ast-header-break-point.cp-nav-open header.site-header,
  .ast-header-break-point.cp-nav-scroll-locked header.site-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 100010 !important;
    background: #fff;
    height: var(--cp-header-bar-h-mobile) !important;
    min-height: var(--cp-header-bar-h-mobile) !important;
    max-height: var(--cp-header-bar-h-mobile) !important;
    overflow: hidden !important;
  }
  .ast-header-break-point.ast-main-header-nav-open .main-header-bar-wrap,
  .ast-header-break-point.cp-nav-open .main-header-bar-wrap,
  .ast-header-break-point.ast-main-header-nav-open .main-header-bar,
  .ast-header-break-point.cp-nav-open .main-header-bar,
  .ast-header-break-point.ast-main-header-nav-open .main-header-container,
  .ast-header-break-point.cp-nav-open .main-header-container {
    height: var(--cp-header-bar-h-mobile) !important;
    min-height: var(--cp-header-bar-h-mobile) !important;
    max-height: var(--cp-header-bar-h-mobile) !important;
    overflow: hidden !important;
  }

  body.ast-flyout-menu-enable.ast-header-break-point.ast-main-header-nav-open .main-header-bar .main-header-bar-navigation,
  body.ast-flyout-menu-enable.ast-header-break-point.cp-nav-open .main-header-bar .main-header-bar-navigation,
  .ast-header-break-point.ast-main-header-nav-open .main-header-bar-navigation,
  .ast-header-break-point.cp-nav-open .main-header-bar-navigation {
    top: var(--cp-flyout-top, var(--cp-header-bar-h-mobile)) !important;
    height: calc(100vh - var(--cp-flyout-top, var(--cp-header-bar-h-mobile))) !important;
    height: calc(100dvh - var(--cp-flyout-top, var(--cp-header-bar-h-mobile))) !important;
    background: #fff;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.12);
    visibility: visible !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    z-index: 100005;
  }

  /* Hide Astra's stray close in outside-menu slot */
  .ast-header-break-point .ast-masthead-custom-menu-items > .ast-nav-close {
    display: none !important;
  }

  .ast-header-break-point .main-header-bar-navigation .ast-nav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    top: 6px;
    right: 6px;
    border-radius: 10px;
    background: var(--cp-nav-soft);
  }

  /* Compact flyout header row (close only) */
  .ast-header-break-point .main-header-bar-navigation .main-header-menu {
    padding-top: 8px;
    padding-bottom: 24px;
  }

  .ast-header-break-point .main-header-bar-navigation #primary-menu > li.menu-item > .menu-link {
    padding: 14px 52px 14px 18px !important;
    font-size: 16.5px !important;
    font-weight: 650 !important;
    line-height: 1.3 !important;
    color: var(--cp-nav-ink) !important;
    border-bottom: 1px solid var(--cp-nav-line);
  }

  .ast-header-break-point .main-header-bar-navigation #primary-menu .sub-menu .menu-link {
    padding: 12px 48px 12px 18px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
    color: #374151 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    text-transform: none !important;
    letter-spacing: normal !important;
  }

  /* Kill double-caret: Astra injects <span class="ast-icon icon-arrow"> inside
     every .menu-link (including leaves), while .ast-menu-toggle already owns
     the expand chevron. Hide the in-link arrows in the flyout only. */
  .ast-header-break-point #primary-menu .menu-link > .ast-icon.icon-arrow,
  .ast-header-break-point #primary-menu .menu-link > .icon-arrow {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  .ast-header-break-point #primary-menu .sub-menu .menu-link::before {
    content: none !important;
    display: none !important;
  }

  .ast-header-break-point #primary-menu .sub-menu {
    border-left: 3px solid var(--cp-nav-accent-soft);
    margin-left: 0;
    padding-left: 0;
    background: #fafbfc;
  }

  .ast-header-break-point #primary-menu .sub-menu .sub-menu {
    border-left-color: #dbe7f2;
    background: #f5f7f9;
  }

  .ast-header-break-point #primary-menu .sub-menu .menu-link .menu-text {
    display: inline;
    padding-left: 8px !important;
    font-size: inherit !important;
    color: inherit !important;
  }

  .ast-header-break-point #primary-menu .sub-menu .sub-menu .menu-link .menu-text {
    padding-left: 16px !important;
  }

  /* Chevron hit target — works when drawer is parked on body OR inside masthead.
     Astra only shows .ast-menu-toggle under .main-header-bar … paths, so parked
     drawers got display:none and children could never expand. */
  .ast-header-break-point .main-header-bar-navigation .menu-item-has-children > .ast-menu-toggle,
  body > .main-header-bar-navigation .menu-item-has-children > .ast-menu-toggle {
    top: 0 !important;
    right: 4px !important;
    left: auto !important;
    transform: none !important;
    width: 48px !important;
    height: 48px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px;
    position: absolute !important;
    background: transparent;
    border: 0;
    color: var(--cp-nav-muted);
    z-index: 2;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .ast-header-break-point .main-header-bar-navigation .sub-menu .menu-item-has-children > .ast-menu-toggle,
  body > .main-header-bar-navigation .sub-menu .menu-item-has-children > .ast-menu-toggle {
    height: 44px !important;
  }

  .ast-header-break-point .main-header-bar-navigation .menu-item-has-children > .ast-menu-toggle:focus-visible,
  .ast-header-break-point .main-header-bar-navigation .menu-item-has-children > .ast-menu-toggle:hover,
  body > .main-header-bar-navigation .menu-item-has-children > .ast-menu-toggle:focus-visible,
  body > .main-header-bar-navigation .menu-item-has-children > .ast-menu-toggle:hover {
    background: var(--cp-nav-soft);
    color: var(--cp-nav-accent);
  }

  /* Expanded child lists (our JS toggles display + this class) */
  .ast-header-break-point .main-header-bar-navigation .menu-item-has-children.cp-submenu-open > .sub-menu,
  body > .main-header-bar-navigation .menu-item-has-children.cp-submenu-open > .sub-menu {
    display: block !important;
    visibility: visible !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .ast-header-break-point .main-header-bar-navigation .menu-item-has-children > .sub-menu,
  body > .main-header-bar-navigation .menu-item-has-children > .sub-menu {
    display: none;
  }

  .ast-header-break-point .main-header-bar-navigation .menu-item-has-children,
  body > .main-header-bar-navigation .menu-item-has-children {
    position: relative;
  }

  /* Chevron glyph — Astra icon-font ::before is lost when the drawer is
     parked outside .main-header-bar. Draw our own caret on the toggle. */
  .ast-header-break-point .main-header-bar-navigation .menu-item-has-children > .ast-menu-toggle .ast-icon.icon-arrow,
  body > .main-header-bar-navigation .menu-item-has-children > .ast-menu-toggle .ast-icon.icon-arrow {
    display: none !important;
  }
  .ast-header-break-point .main-header-bar-navigation .menu-item-has-children > .ast-menu-toggle::after,
  body > .main-header-bar-navigation .menu-item-has-children > .ast-menu-toggle::after {
    content: "" !important;
    display: block !important;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-top: -4px;
    transition: transform 0.15s ease;
  }
  .ast-header-break-point .main-header-bar-navigation .menu-item-has-children.cp-submenu-open > .ast-menu-toggle::after,
  body > .main-header-bar-navigation .menu-item-has-children.cp-submenu-open > .ast-menu-toggle::after {
    transform: rotate(-135deg);
    margin-top: 2px;
  }

  /* Parked drawer: same link/close polish as in-masthead flyout */
  body > .main-header-bar-navigation {
    background: #fff;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  body > .main-header-bar-navigation .ast-nav-close {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    position: absolute;
    top: 6px;
    right: 6px;
    border-radius: 10px;
    background: var(--cp-nav-soft);
    z-index: 3;
  }
  body > .main-header-bar-navigation #primary-menu {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 8px 0 28px !important;
    margin: 0 !important;
  }
  body > .main-header-bar-navigation #primary-menu > li.menu-item {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    align-self: stretch !important;
    box-sizing: border-box;
  }
  body > .main-header-bar-navigation #primary-menu > li.menu-item > .menu-link {
    padding: 14px 52px 14px 18px !important;
    font-size: 16.5px !important;
    font-weight: 650 !important;
    line-height: 1.3 !important;
    color: var(--cp-nav-ink) !important;
    border-bottom: 1px solid var(--cp-nav-line);
    display: block !important;
    width: 100% !important;
    box-sizing: border-box;
  }
  body > .main-header-bar-navigation #primary-menu .sub-menu .menu-link {
    padding: 12px 48px 12px 18px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #374151 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    display: block !important;
  }
  body > .main-header-bar-navigation #primary-menu .menu-link > .ast-icon.icon-arrow,
  body > .main-header-bar-navigation #primary-menu .menu-link > .icon-arrow {
    display: none !important;
  }
  body > .main-header-bar-navigation #primary-menu .sub-menu {
    border-left: 3px solid var(--cp-nav-accent-soft);
    background: #fafbfc;
    margin: 0;
    padding: 0;
  }

  .ast-masthead-custom-menu-items.woocommerce-custom-menu-item {
    flex-direction: row !important;
    align-items: center;
    justify-content: flex-end;
  }
}

/* Very narrow phones */
@media (max-width: 374px) {
  .ast-header-break-point .cp-header-controls .astra-search-icon,
  .ast-header-break-point .cp-header-controls .wc-myaccount,
  .ast-header-break-point .cp-header-controls #ast-site-header-cart,
  .ast-header-break-point .cp-header-controls #ast-site-header-cart .cart-container {
    width: 38px;
    height: 38px;
  }

  .ast-header-break-point .site-branding .custom-logo {
    max-height: 36px !important;
  }

  .ast-header-break-point .ast-button-wrap .ast-mobile-menu-buttons-fill.menu-toggle.main-header-menu-toggle {
    width: 40px;
    height: 40px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .cp-header-controls .astra-search-icon,
  .cp-header-controls .wc-myaccount,
  .cp-header-controls #ast-site-header-cart .cart-container,
  .main-header-menu > .menu-item > .menu-link {
    transition: none !important;
  }
}
