/* ===============================
   PC MASTER HEADER (MODULAR)
================================ */
:root {
  --header-bg: var(--bg-dark-soft);
  --header-text: #ffffff;
  --header-accent: var(--accent-gold);
  --header-link-hover: #F2C230;
  --header-nav-bg: #f2f3f6;
  --header-nav-border: #e5e5e5;
  --header-nav-text: #333;
  --header-nav-hover: var(--bg-dark-soft);
  --header-x-pad: 7.5%;
  --header-row-gap: 16px;
  --header-search-height: 50px;
  --header-search-height-mobile: 44px;
}

.pc-header {
  background: var(--header-bg);
  color: var(--header-text);
  position: sticky;
  top: 0;
  z-index: 1150;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .15);
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.pc-header.is-scroll-hidden {
  transform: translateY(calc(-100% - 2px));
}

.pc-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--header-row-gap);
  padding: 16px var(--header-x-pad);
}

.pc-header__top,
.pc-header__middle {
  padding-top: 16px;
  padding-bottom: 16px;
  justify-content: space-between;
}

.pc-header__middle {
  position: relative;
  z-index: 1003;
}

.pc-header__bottom {
  position: relative;
  z-index: 1001;
  padding-top: 12px;
  padding-bottom: 12px;
  justify-content: flex-start;
  gap: 12px;
  background: var(--header-nav-bg);
  border-top: 1px solid #e6e6e6;
  border-bottom: 1px solid #e6e6e6;
  color: var(--header-nav-text);
}

.pc-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  text-decoration: none;
}

.pc-header__logo {
  display: block;
  width: auto;
  height: 78px;
}

.pc-header__brand-text {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1;
  white-space: nowrap;
}

.pc-header__brand-pc { color: var(--header-accent); }
.pc-header__brand-master { color: #e6f2f6; }

.pc-header__top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.pc-header__search-wrap {
  flex: 1 1 auto;
  width: auto;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 1004;
}

.pc-header__middle-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  margin-left: 16px;
}

.pc-header__search {
  position: relative;
  z-index: 1005;
  display: flex;
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  align-items: stretch;
  overflow: visible;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  margin: 0;
  box-sizing: border-box;
  height: var(--header-search-height);
}

.pc-header__search input {
  flex: 1;
  height: 100%;
  padding: 0 20px;
  border: none;
  outline: none;
  font-size: 15px;
  line-height: 1.2;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-style: normal;
  font-weight: 500;
  color: #111;
  background: #fff;
  border-radius: 8px 0 0 8px;
}

.pc-header__search input::placeholder {
  color: #6b7280;
  opacity: 1;
  font-size: inherit;
  font-family: inherit;
  font-style: normal;
  font-weight: inherit;
  letter-spacing: 0.1px;
}

.pc-header__search input::-webkit-input-placeholder {
  color: #6b7280;
  opacity: 1;
  font-size: inherit;
  font-family: inherit;
  font-style: normal;
  font-weight: inherit;
  letter-spacing: 0.1px;
}

.pc-header__search input::-moz-placeholder {
  color: #6b7280;
  opacity: 1;
  font-size: inherit;
  font-family: inherit;
  font-style: normal;
  font-weight: inherit;
  letter-spacing: 0.1px;
}

.pc-header__search button {
  height: 100%;
  padding: 0 20px;
  border: none;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  background: #FFC72C;
  color: var(--header-bg);
  font-size: 16px;
  line-height: 1;
}

.pc-header__search button:hover {
  filter: brightness(0.96);
}

.pc-header__link {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1;
  white-space: nowrap;
  color: var(--header-text);
  text-decoration: none;
  font-weight: 500;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.pc-header__link > i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.pc-header__bottom .pc-header__link {
  color: var(--header-nav-text);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.pc-header__bottom .pc-header__primary-link {
  color: var(--header-nav-text);
}

.pc-header__dept-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.pc-header__dept-menu::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 12px;
}

.pc-header__dept-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  color: var(--header-nav-text);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.pc-header__dept-toggle > i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  position: relative;
  top: 0;
}

.pc-header__dept-label--desktop,
.pc-header__dept-label--mobile {
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.pc-header__dept-label--mobile {
  display: none;
}

.pc-header__dept-menu .dropdown-menu {
  display: none;
  top: calc(100% + 12px);
  left: 0;
  min-width: 240px;
  border-color: #d9dee5;
  border-radius: 10px;
  padding: 10px 0;
  z-index: 2100;
}

.pc-header__dept-menu:hover .dropdown-menu,
.pc-header__dept-menu:focus-within .dropdown-menu,
.pc-header__dept-menu.open .dropdown-menu {
  display: block;
}

.pc-header__dept-menu .dropdown-menu > li > a,
.pc-header__dept-menu .group-label,
.pc-header__dept-menu .sub-menu li a {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-style: normal;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 700;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.pc-header__dept-menu .dropdown-menu > li > a:hover,
.pc-header__dept-menu .dropdown-menu > li > a:focus,
.pc-header__dept-menu .dropdown-menu > li > a:focus-visible,
.pc-header__dept-menu .dropdown-menu > li > a:active,
.pc-header__dept-menu .group-label:hover,
.pc-header__dept-menu .group-label:focus,
.pc-header__dept-menu .group-label:focus-visible,
.pc-header__dept-menu .group-label:active,
.pc-header__dept-menu .sub-menu li a:hover,
.pc-header__dept-menu .sub-menu li a:focus,
.pc-header__dept-menu .sub-menu li a:focus-visible,
.pc-header__dept-menu .sub-menu li a:active {
  color: #F2C230 !important;
  -webkit-text-fill-color: #F2C230 !important;
  background-color: rgba(242, 194, 48, 0.14) !important;
}

.hot-deals-link::after {
  content: "🔥";
  position: static;
  display: inline-block;
  margin-left: 6px;
  font-size: 14px;
  line-height: 1;
  color: currentColor;
  vertical-align: middle;
}

.pc-header__dept-menu .dropdown-menu.active {
  display: block;
}

.pc-header__dept-menu.open .pc-header__dept-toggle {
  color: #F2C230 !important;
  -webkit-text-fill-color: #F2C230 !important;
}

.pc-header__divider {
  margin: 0 14px;
  color: rgba(255, 255, 255, 0.8);
  opacity: .6;
}

.pc-header__bottom .pc-header__divider {
  color: #8f95a1;
}

.pc-header .pc-header__link:hover,
.pc-header .pc-header__link:focus,
.pc-header .pc-header__link:focus-visible,
.pc-header .pc-header__link:active,
.pc-header .pc-header__link:visited:hover,
.pc-header .pc-header__link:visited:focus,
.pc-header .pc-header__link:visited:focus-visible,
.pc-header .pc-header__link:visited:active {
  color: #F2C230 !important;
  -webkit-text-fill-color: #F2C230 !important;
  background-color: transparent;
}

.pc-header .count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--header-accent);
  color: #0E2A36 !important;
  -webkit-text-fill-color: #0E2A36 !important;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  border: 1px solid #0E2A36;
}

.pc-header .pc-header__link:hover .count-badge,
.pc-header .pc-header__link:focus .count-badge,
.pc-header .pc-header__link:focus-visible .count-badge,
.pc-header .pc-header__link:active .count-badge,
.pc-header .pc-header__link:visited:hover .count-badge,
.pc-header .pc-header__link:visited:focus .count-badge,
.pc-header .pc-header__link:visited:focus-visible .count-badge,
.pc-header .pc-header__link:visited:active .count-badge {
  color: #0E2A36 !important;
  -webkit-text-fill-color: #0E2A36 !important;
  background: var(--header-accent) !important;
  border-color: #0E2A36 !important;
}

.pc-header .count-badge:empty {
  display: none;
}

.pc-header .cart-wrapper {
  position: relative;
  z-index: 1008;
}

.pc-header .cart-preview {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1108;
  display: none;
  width: 220px;
  padding: 12px;
  border-radius: 8px;
  background: #fff;
  color: #111;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.pc-header .cart-wrapper:hover .cart-preview,
.pc-header .cart-wrapper:focus-within .cart-preview,
.pc-header .cart-wrapper:active .cart-preview {
  display: block;
}

.mobile-sidebar-panel {
  position: fixed !important;
  z-index: 12000 !important;
}

.mobile-sidebar-backdrop {
  position: fixed !important;
  z-index: 11999 !important;
}

.mobile-sidebar-panel a,
.mobile-sidebar-panel summary {
  transition: color 0.2s ease, background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.mobile-sidebar-panel a:hover,
.mobile-sidebar-panel a:focus,
.mobile-sidebar-panel a:focus-visible,
.mobile-sidebar-panel a:active,
.mobile-sidebar-panel summary:hover,
.mobile-sidebar-panel summary:focus,
.mobile-sidebar-panel summary:focus-visible,
.mobile-sidebar-panel summary:active {
  color: #F2C230 !important;
  -webkit-text-fill-color: #F2C230 !important;
  background-color: rgba(242, 194, 48, 0.14) !important;
}

.pc-header .pc-header__link:active,
.pc-header .pc-header__link:visited:active,
.pc-header__dept-toggle:active {
  color: #F2C230 !important;
  -webkit-text-fill-color: #F2C230 !important;
  background-color: transparent !important;
}

.pc-header__dept-toggle {
  transition: color 0.2s ease, background-color 0.2s ease;
}

.pc-header__dept-toggle:hover,
.pc-header__dept-toggle:focus,
.pc-header__dept-toggle:focus-visible,
.pc-header__dept-toggle:active {
  color: #F2C230 !important;
  -webkit-text-fill-color: #F2C230 !important;
  background-color: transparent !important;
}

@media (max-width: 992px) {
  .pc-header__top {
    flex-wrap: nowrap;
  }

  .pc-header__brand-text {
    font-size: 26px;
  }

  .pc-header__logo {
    height: 64px;
  }

  .pc-header__middle {
    flex-wrap: nowrap;
  }

  .pc-header__search-wrap {
    width: auto;
    flex: 1 1 auto;
  }

  .pc-header__middle-actions {
    width: auto;
    justify-content: flex-end;
    margin-left: 0;
    flex: 0 0 auto;
  }

  .pc-header__top-actions {
    width: auto;
    justify-content: flex-end;
  }

  .pc-header__bottom {
    flex-wrap: nowrap;
    gap: 10px;
  }
}

@media (max-width: 768px) {
  .pc-header__row {
    padding: 10px var(--header-x-pad);
    gap: 10px;
  }

  .pc-header__top,
  .pc-header__middle {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .pc-header__logo {
    height: 52px;
  }

  .pc-header__brand-text {
    font-size: 22px;
  }

  .pc-header__search input {
    padding: 0 14px;
    font-size: 14px;
  }

  .pc-header__search button {
    padding: 0 14px;
    font-size: 15px;
  }

  .pc-header__middle-actions {
    gap: 8px;
    margin-left: 8px;
    align-items: center;
  }

  .pc-header__middle-actions .pc-header__link,
  .pc-header__middle-actions .cart-wrapper .pc-header__link {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
    line-height: 1;
    font-size: 13px;
  }

  .pc-header__middle-actions .pc-header__link > i,
  .pc-header__middle-actions .cart-wrapper .pc-header__link > i {
    font-size: 14px;
    line-height: 1;
  }

  .pc-header .count-badge {
    min-width: 18px;
    height: 18px;
    margin-left: 4px;
    padding: 0 5px;
    font-size: 10px;
    line-height: 1;
  }

  .pc-header__divider {
    margin: 0 8px;
  }

  #mobile-sidebar-toggle,
  .mobile-sidebar-toggle {
    display: none !important;
  }

  .pc-header__bottom .pc-header__dept-menu {
    display: inline-flex !important;
  }

  .pc-header__dept-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 14px;
    line-height: 1;
    gap: 6px;
    min-height: 20px;
    white-space: nowrap;
  }

  .pc-header__dept-toggle > i {
    top: 0;
    font-size: 14px;
    line-height: 1;
  }

  .pc-header__dept-menu .dropdown-menu {
    display: none !important;
  }

  .pc-header__dept-label--desktop {
    display: none;
  }

  .pc-header__dept-label--mobile {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    white-space: nowrap;
  }

  .pc-header__bottom {
    justify-content: flex-start;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .pc-header__bottom > a,
  .pc-header__bottom > .pc-header__divider {
    display: none;
  }

  .pc-header__top-actions .pc-header__link:nth-child(1),
  .pc-header__top-actions .pc-header__link:nth-child(3),
  .pc-header__top-actions .pc-header__divider {
    display: none;
  }
}

@media (max-width: 565px) {
  .pc-header__middle {
    flex-wrap: wrap;
    align-items: stretch;
    row-gap: 0;
    position: relative;
    z-index: 1120;
  }

  .pc-header__search-wrap {
    width: 100%;
    flex: 0 0 100%;
    position: relative;
    z-index: 1122;
  }

  .pc-header__search input {
    padding: 0 16px;
  }

  .pc-header__search {
    height: var(--header-search-height-mobile);
    z-index: 1123;
  }

  .pc-header__search .search-suggestions,
  .pc-header__search-wrap .search-suggestions,
  .pc-header .search-box .search-suggestions {
    z-index: 1124 !important;
  }

  .pc-header__middle-actions {
    display: flex;
    justify-content: space-between;
    width: 100%;
    flex: 0 0 100%;
    margin-left: 0;
    margin-top: var(--header-row-gap);
    gap: 10px;
    align-items: center;
    min-width: 0;
  }

  .pc-header__middle-actions .pc-header__link {
    white-space: nowrap;
    font-size: 13px;
    gap: 4px;
  }

  .pc-header__middle-actions > .pc-header__divider {
    display: none;
  }

  .pc-header__middle-actions > .pc-header__link:first-child,
  .pc-header__middle-actions > .cart-wrapper {
    flex: 1 1 0;
    min-width: 0;
  }

  .pc-header__middle-actions > .cart-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
  }

  .pc-header .cart-preview {
    top: auto;
    bottom: calc(100% + 8px);
    right: 0;
    left: auto;
    width: min(220px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    z-index: 1110;
  }

  .pc-header__middle-actions > .pc-header__link:first-child {
    justify-content: flex-start;
  }

  .pc-header__bottom {
    position: relative;
    z-index: 1110;
  }

  .pc-header__dept-menu,
  .pc-header__dept-toggle {
    position: relative;
    z-index: 1111;
  }
}

