/* ==========================================
   Mega Menu — 复刻 Shopify iveheader
   ========================================== */

/* ── 页眉基础 ── */
.yolo-header {
  top: 0;
  z-index: 24;
  background: var(--backgroundcolor);
}
.mainbackgroud {
  background: var(--backgroundcolor);
}
.headercontainer {
  grid-template-columns: 0.5fr 3fr 0.5fr;
}

/* ── 汉堡 ── */
.ham-line {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

/* ── Mega 面板 ── */
.mega-content {
  display: none;
}
.mega-content.is-active {
  display: block;
}
.mobile-collection-panel,
.mega-panel {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}
.mobile-collection-panel.is-active,
.mega-panel.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.mega-panel .discounttag img {
  width: clamp(40px, 4.09vw, 60px);
}

/* ── Tab 选项卡 ── */
.mega-tab:not(.is-active) {
  background: var(--imgmainbackground);
}
.mega-tab.is-active {
  background: var(--brandmaincolor);
  color: #fff;
}
.mega-tab:hover:not(.is-active) {
  background: #f0f0f0;
}
.mega-tab svg {
  width: var(--p20-26);
  height: var(--p20-26);
  flex-shrink: 0;
  align-self: center;
}

/* ── 菜单项动效 ── */
.megameauitem::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--brandmaincolor);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}
.megameauitem:hover {
  color: var(--brandmaincolor) !important;
}
.megameauitem:hover::after {
  transform: scaleX(1);
}
.deal-link:has(.mega-panel.is-active) .megameauitem {
  color: var(--brandmaincolor);
}
.deal-link:has(.mega-panel.is-active) .megameauitem::after {
  transform: scaleX(1);
}

/* ── 侧栏滚动条 ── */
.collectionmeau::-webkit-scrollbar-button:vertical:decrement,
.collectionmeau::-webkit-scrollbar-button:vertical:increment,
.collectionitem::-webkit-scrollbar-button:vertical:decrement,
.collectionitem::-webkit-scrollbar-button:vertical:increment {
  display: none !important;
}

/* ── 产品卡片 hover ── */
.meauproduct img {
  transition: transform 0.4s ease;
}
.meauproduct:hover img {
  transform: scale(1.08);
}

/* ── 移动端 ── */
.mobile-collection-panel .meaudetail {
  height: 0;
}
.mobile-collection-panel.is-active .meaudetail {
  height: auto;
}
.pdmeaubutton {
  padding: var(--12-14) var(--10-20);
}
.pdnavtitle {
  padding: 16px var(--10-20);
}
#mobile-menu-drawer svg {
  width: var(--p20-26);
  height: var(--p20-26);
}

/* ── 产品卡片 ── */
.iveproductcard {
  background: #f2f2f2;
  border-radius: 12px;
}
.compareproduct {
  width: clamp(35px, 3.4vw, 50px);
  height: clamp(35px, 3.4vw, 50px);
  border-radius: 12px;
  background: #0071e3;
}
.compareproduct .checkicon {
  display: none;
}
.compareproduct.is-active .checkicon {
  display: flex;
}
.compareproduct.is-active .compareicon {
  display: none;
}

/* ── Geo Popup ── */
.geo-popup {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -50%) translateY(8px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    visibility 0.25s;
}
.geo-popup.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -50%) translateY(0);
}
.geo-item {
  color: inherit;
  transition: background 0.15s;
}
.geo-item.is-current {
  background: var(--brandmaincolor);
  color: #fff;
}
.geo-item.is-current:hover {
  background: var(--brandmaincolor);
}
.geo-flag-btn .geo-globe-icon {
  display: none;
}
.geo-flag-btn .geo-flag-icon {
  display: flex;
  flex-shrink: 0;
}
.geo-flag-btn:hover .geo-globe-icon {
  display: flex;
}
.geo-flag-btn:hover .geo-flag-icon {
  display: none;
}
.geo-flag-icon {
  width: 24px;
  height: 16px;
}

/* ── 响应式 ── */
@media (max-width: 1026px) {
  .headercontainer {
    grid-template-columns: 1fr 0.6fr;
  }
}
@media (max-width: 767px) {
  .headercontainer {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── 遮罩层 ── */
.window-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s,
    visibility 0.3s;
}
.window-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

/* ── 搜索弹窗 ── */
.search-popup {
  transform: translateY(-100%);
  transition: transform 0.35s ease;
}
.search-popup.is-active {
  transform: translateY(0);
}
