/* Header hotfixes (wishlist / quick login spacing) */

/* 1) 隐藏 header 心愿单区块（Elementor widget: 88db211） */
#header .elementor-element-88db211.wishlist-header,
#header [data-id="88db211"].wishlist-header,
#header [data-id="88db211"] .header-button-wishlist {
  display: none !important;
}

/*
 * 2) Quick Login（Elementor widget: 7538041）
 * - 去掉文字 “Quick Login”
 * - 轻微向右靠近购物车（减少与 data-id="b1ac409" 区域的间距）
 */
#header .elementor-element-7538041 .hidden-sm-down,
#header [data-id="7538041"] .hidden-sm-down {
  display: none !important;
}

#header .elementor-element-7538041,
#header [data-id="7538041"] {
  margin-right: -1.1rem !important;
}

/*
 * 3) Quick Login → 用户菜单（Elementor widget: 7538041）
 * - 复用主题 popup-over 样式，补齐右侧对齐与阴影
 * - 桌面端 hover 展开，移动端点击展开（Bootstrap dropdown）
 */
#header [data-id="7538041"] .leoquicklogin-user-menu .popup-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
}

#header [data-id="7538041"] .leoquicklogin-user-menu .popup-title .material-icons {
  font-size: 24px;
  line-height: 1;
}

#header [data-id="7538041"] .leoquicklogin-user-menu .popup-title .la {
  font-size: 28px;
  line-height: 1;
}

#header [data-id="7538041"] .leoquicklogin-user-menu .popup-content {
  min-width: 180px;
  max-width: 220px;
  padding: 8px 12px;
  text-align: left;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  right: 0;
  left: auto;
}

.rtl #header [data-id="7538041"] .leoquicklogin-user-menu .popup-content {
  text-align: right;
  left: 0;
  right: auto;
}

#header [data-id="7538041"] .leoquicklogin-user-menu .user-info > li {
  padding: 3px 0;
}

#header [data-id="7538041"] .leoquicklogin-user-menu .user-info > li > a {
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.2;
}

#header [data-id="7538041"] .leoquicklogin-user-menu .user-info > li i.material-icons {
  flex: 0 0 18px;
  width: 18px;
  font-size: 15px;
  line-height: 15px;
  transform: translateY(1px);
  margin-right: 0;
}

.rtl #header [data-id="7538041"] .leoquicklogin-user-menu .user-info > li i.material-icons {
  margin-left: 0;
}

/*
 * 4) 购物车（Elementor widget: b1ac409）
 * - 空购物车也可点击进入 cart（模板已改为始终输出 <a>）
 * - 数量徽标始终可见，避免偏移/被裁切/透明背景看不清
 */
#header [data-id="b1ac409"] #_desktop_cart .cart-preview .header {
  position: relative;
  overflow: visible;
}

#header [data-id="b1ac409"] #_desktop_cart .cart-preview .header > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 46px;
  height: 46px;
  cursor: pointer;
  z-index: 2;
}

/*
 * 徽标：主题里购物车 SVG 约 24×24，在 46×46 区域内垂直居中 → 图标顶边约在 (46-24)/2 ≈ 11px
 * top 与图标顶对齐；right 取图标右缘（约 11px）再 translateX 让圆点压住右上角
 */
#header [data-id="b1ac409"] #_desktop_cart .cart-preview .header .cart-products-count {
  position: absolute;
  top: 11px;
  right: 11px;
  transform: translateX(45%);
  min-width: 13px;
  height: 13px;
  line-height: 13px;
  font-size: 9px;
  font-weight: 700;
  border-radius: 50%;
  color: #fff;
  background: #fb5d5d;
  padding: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* 避免下拉容器在“隐藏态”时挡住点击 */
#header [data-id="b1ac409"] #_desktop_cart .leo-dropdown-cart.dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 1;
}

#header [data-id="b1ac409"] #_desktop_cart:hover .leo-dropdown-cart.dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 9999;
}

