/*
 * Obsessive Wholesale Header v1.0
 * Desktop: Search | centered logo | utilities
 * Mobile: menu | centered logo | utilities/search
 */

:root {
  --obs-header-accent: #DE237B;
  --obs-header-text: #111111;
  --obs-header-muted: #777777;
  --obs-header-line: #eeeeee;
  --obs-header-bg: #ffffff;
  --obs-header-primary-height: 76px;
}

body.obs-header-search-open {
  overflow-x: hidden;
}

/* ----------------------------------------------------------
   DESKTOP PRIMARY HEADER
   ---------------------------------------------------------- */

#header_primary.obs-header-v1 {
  position: relative;
  z-index: 1100;
  background: var(--obs-header-bg);
  border-bottom: 1px solid #f4f4f4;
}

#header_primary.obs-header-v1 #header_primary_container {
  position: relative;
}

#header_primary.obs-header-v1 .obs-header-primary-grid {
  display: grid !important;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  min-height: var(--obs-header-primary-height);
  width: 100%;
}

#header_primary.obs-header-v1 .obs-header-left {
  min-width: 0;
  justify-self: start;
}

#header_primary.obs-header-v1 .obs-header-center {
  min-width: 0;
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

#header_primary.obs-header-v1 .obs-header-right {
  min-width: 0;
  justify-self: end;
}

#header_primary.obs-header-v1 #header_right_top,
#header_primary.obs-header-v1 #header_right_bottom {
  justify-content: flex-end !important;
  align-items: center;
  gap: 4px;
}

#header_primary.obs-header-v1 .obs-header-logo-box,
#header_primary.obs-header-v1 .obs-header-logo-box .slogan_horizon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

#header_primary.obs-header-v1 .obs-header-shop-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

#header_primary.obs-header-v1 .obs-header-shop-logo .logo {
  display: block;
  width: auto !important;
  max-width: 158px;
  max-height: 48px;
  height: auto !important;
}

/* Search trigger */

.obs-header-search-toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--obs-header-text);
  font-family: "Open Sans", Tahoma, sans-serif, Arial;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .2s ease, opacity .2s ease;
}

.obs-header-search-toggle i {
  font-size: 17px;
}

.obs-header-search-toggle:hover,
.obs-header-search-toggle:focus {
  color: var(--obs-header-accent);
  outline: 0;
}

/* Search overlay */

.obs-header-search-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1210;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  background: #fff;
  border-top: 1px solid var(--obs-header-line);
  border-bottom: 1px solid var(--obs-header-line);
  box-shadow: 0 18px 40px rgba(0,0,0,.08);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

#header_primary.obs-header-v1.obs-search-open .obs-header-search-panel {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.obs-header-search-panel-inner {
  position: relative;
  width: min(920px, calc(100% - 48px));
  margin: 0 auto;
  padding: 26px 54px 28px 0;
}

.obs-header-search-panel-content,
.obs-header-search-panel-content .search_widget_block,
.obs-header-search-panel-content .search_widget {
  width: 100% !important;
  max-width: none !important;
}

.obs-header-search-panel-content .search_widget_form_inner {
  min-height: 54px;
  width: 100% !important;
  border: 0 !important;
  border-bottom: 1px solid #222 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.obs-header-search-panel-content .search_widget_text {
  min-height: 54px !important;
  padding: 0 14px 0 2px !important;
  border: 0 !important;
  background: transparent !important;
  color: #111 !important;
  font-family: "Open Sans", Tahoma, sans-serif, Arial !important;
  font-size: 20px !important;
  font-weight: 400 !important;
  box-shadow: none !important;
}

.obs-header-search-panel-content .search_widget_text::placeholder {
  color: #aaa !important;
  opacity: 1;
}

.obs-header-search-panel-content .search_widget_btn {
  min-width: 52px;
  min-height: 52px;
  border: 0 !important;
  background: transparent !important;
  color: #111 !important;
  box-shadow: none !important;
}

.obs-header-search-panel-content .search_widget_btn:hover {
  color: var(--obs-header-accent) !important;
}

.obs-header-search-panel-content .search_results,
.obs-header-search-panel-content .autocomplete-suggestions {
  z-index: 1220 !important;
}

.obs-header-search-close {
  appearance: none;
  position: absolute;
  top: 28px;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111;
  font-size: 31px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition: color .2s ease, transform .2s ease;
}

.obs-header-search-close:hover {
  color: var(--obs-header-accent);
  transform: rotate(90deg);
}

.obs-header-search-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1090;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background: rgba(0,0,0,.13);
  transition: opacity .2s ease, visibility .2s ease;
}

body.obs-header-search-open .obs-header-search-backdrop {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* Right-side Panda utilities */

#header_primary.obs-header-v1 #header_right_top > *,
#header_primary.obs-header-v1 #header_right_bottom > * {
  flex: 0 0 auto;
}

#header_primary.obs-header-v1 .header_item,
#header_primary.obs-header-v1 .top_bar_item {
  color: var(--obs-header-text);
}

/* ----------------------------------------------------------
   MENU
   ---------------------------------------------------------- */

.obs-header-menu-v1 {
  border-bottom: 1px solid var(--obs-header-line);
  background: #fff;
}

.obs-header-menu-v1 .st_mega_menu_container {
  background: #fff;
}

.obs-header-menu-v1 #top_extra_container {
  min-height: 55px;
  align-items: center;
}

.obs-header-menu-v1 .ma_level_0,
.obs-header-menu-v1 .stmenu_sub {
  font-family: "Open Sans", Tahoma, sans-serif, Arial;
}

/* ----------------------------------------------------------
   MOBILE
   ---------------------------------------------------------- */

.obs-mobile-header-v1 {
  background: #fff;
  border-bottom: 1px solid var(--obs-header-line);
}

.obs-mobile-header-v1 .obs-mobile-header-grid {
  display: grid !important;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 60px;
}

.obs-mobile-header-v1 .obs-mobile-header-left {
  justify-self: start;
  min-width: 0;
}

.obs-mobile-header-v1 .obs-mobile-header-center {
  justify-self: center;
  min-width: 0;
}

.obs-mobile-header-v1 .obs-mobile-header-right {
  justify-self: end;
  min-width: 0;
}

.obs-mobile-header-v1 .obs-mobile-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.obs-mobile-header-v1 .obs-mobile-logo .logo {
  display: block;
  width: auto !important;
  max-width: 126px;
  max-height: 38px;
  height: auto !important;
}

.obs-mobile-header-v1 #mobile_bar_left .flex_container,
.obs-mobile-header-v1 #mobile_bar_center .flex_container,
.obs-mobile-header-v1 #mobile_bar_right .flex_container {
  align-items: center;
}

.obs-mobile-header-v1 .mobile_bar_item {
  min-width: 40px;
}

/* ----------------------------------------------------------
   RESPONSIVE
   ---------------------------------------------------------- */

@media (max-width: 1199px) and (min-width: 992px) {
  #header_primary.obs-header-v1 .obs-header-primary-grid {
    grid-template-columns: minmax(170px, 1fr) auto minmax(170px, 1fr);
  }

  #header_primary.obs-header-v1 .obs-header-shop-logo .logo {
    max-width: 145px;
  }

  .obs-header-search-toggle span {
    display: none;
  }
}

@media (max-width: 991px) {
  /* Panda uses the mobile bar at this breakpoint.
     Keep the desktop search overlay completely out of the mobile layout. */
  #header_primary.obs-header-v1 {
    display: none !important;
  }

  .obs-header-search-backdrop {
    display: none !important;
  }
}

@media (min-width: 992px) {
  .obs-mobile-header-v1 {
    display: none !important;
  }
}


/* ==========================================================
   V1.2 - SAFE / LIGHT MEGAMENU POLISH
   IMPORTANT:
   We intentionally DO NOT alter display/position/width/floats
   of Panda's UL/LI/dropdown structure.
   ========================================================== */

@media (min-width: 992px) {

  /* Side rhythm: search / utilities line up visually with nav */
  #header_primary.obs-header-v1 #header_primary_container {
    padding-left: 28px !important;
    padding-right: 28px !important;
  }

  /* Keep Panda's original menu mechanics.
     Only the DIRECT first-level anchors are restyled. */
  .obs-header-menu-v1
  #st_mega_menu_wrap
  > ul.st_mega_menu.mu_level_0
  > li.ml_level_0
  > a.ma_level_0 {
    position: relative;

    color: #171717 !important;
    background: transparent !important;

    font-family: "Open Sans", Tahoma, sans-serif, Arial !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.25 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;

    padding-left: 17px !important;
    padding-right: 17px !important;

    border: 0 !important;
    box-shadow: none !important;

    transition: color .18s ease !important;
  }

  /* Subtle fashion hover:
     only text color + a short centered line. */
  .obs-header-menu-v1
  #st_mega_menu_wrap
  > ul.st_mega_menu.mu_level_0
  > li.ml_level_0
  > a.ma_level_0::after {
    content: "" !important;
    position: absolute !important;

    left: 50% !important;
    bottom: 5px !important;

    width: 24px !important;
    height: 1px !important;

    margin-left: -12px !important;

    background: #DE237B !important;

    opacity: 0 !important;
    transform: scaleX(.45) !important;
    transform-origin: center !important;

    transition:
      opacity .18s ease,
      transform .18s ease !important;

    pointer-events: none !important;
  }

  .obs-header-menu-v1
  #st_mega_menu_wrap
  > ul.st_mega_menu.mu_level_0
  > li.ml_level_0:hover
  > a.ma_level_0,
  .obs-header-menu-v1
  #st_mega_menu_wrap
  > ul.st_mega_menu.mu_level_0
  > li.ml_level_0
  > a.ma_level_0:hover,
  .obs-header-menu-v1
  #st_mega_menu_wrap
  > ul.st_mega_menu.mu_level_0
  > li.ml_level_0
  > a.ma_level_0:focus {
    color: #DE237B !important;
    background: transparent !important;
  }

  .obs-header-menu-v1
  #st_mega_menu_wrap
  > ul.st_mega_menu.mu_level_0
  > li.ml_level_0:hover
  > a.ma_level_0::after,
  .obs-header-menu-v1
  #st_mega_menu_wrap
  > ul.st_mega_menu.mu_level_0
  > li.ml_level_0
  > a.ma_level_0:hover::after,
  .obs-header-menu-v1
  #st_mega_menu_wrap
  > ul.st_mega_menu.mu_level_0
  > li.ml_level_0
  > a.ma_level_0:focus::after {
    opacity: 1 !important;
    transform: scaleX(1) !important;
  }

  /* Current/active category - support common Panda/Presta states
     without touching the dropdown structure. */
  .obs-header-menu-v1
  #st_mega_menu_wrap
  > ul.st_mega_menu.mu_level_0
  > li.ml_level_0.current
  > a.ma_level_0,
  .obs-header-menu-v1
  #st_mega_menu_wrap
  > ul.st_mega_menu.mu_level_0
  > li.ml_level_0.active
  > a.ma_level_0,
  .obs-header-menu-v1
  #st_mega_menu_wrap
  > ul.st_mega_menu.mu_level_0
  > li.ml_level_0
  > a.ma_level_0.active {
    color: #DE237B !important;
    font-weight: 500 !important;
  }

  /* Top-level parent arrows/icons: lighter, but no layout mutation */
  .obs-header-menu-v1
  #st_mega_menu_wrap
  > ul.st_mega_menu.mu_level_0
  > li.ml_level_0
  > a.ma_level_0
  > .is_parent_icon {
    opacity: .48 !important;
  }

  /* Submenus remain 100% Panda-native structurally.
     Only typography is gently normalized. */
  .obs-header-menu-v1 .stmenu_sub,
  .obs-header-menu-v1 .stmenu_sub a {
    font-family: "Open Sans", Tahoma, sans-serif, Arial !important;
  }

  .obs-header-menu-v1 .stmenu_sub a {
    font-weight: 400 !important;
  }
}

/* Progressive spacing only on top-level anchors. */
@media (min-width: 1200px) and (max-width: 1500px) {
  .obs-header-menu-v1
  #st_mega_menu_wrap
  > ul.st_mega_menu.mu_level_0
  > li.ml_level_0
  > a.ma_level_0 {
    padding-left: 13px !important;
    padding-right: 13px !important;
    font-size: 13.5px !important;
  }

  #header_primary.obs-header-v1 #header_primary_container {
    padding-left: 22px !important;
    padding-right: 22px !important;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .obs-header-menu-v1
  #st_mega_menu_wrap
  > ul.st_mega_menu.mu_level_0
  > li.ml_level_0
  > a.ma_level_0 {
    padding-left: 9px !important;
    padding-right: 9px !important;
    font-size: 12.5px !important;
  }

  #header_primary.obs-header-v1 #header_primary_container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}
