/* ========== header_top 顶部栏样式 ========== */
.header_top {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  border-bottom: none;
  position: relative;
  z-index: 999;
}
.header_top::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #e74c3c, #febc8b, #e74c3c);
}
.header_top .container {
  padding-top: 1px;
  padding-bottom: 1px;
}
.header_top .row {
  min-height: 42px;
}

/* 左侧联系信息 */
.header_contact_us {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 42px;
}
.header_contact_item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  padding: 0 4px;
  transition: color 0.3s;
}
.header_contact_item:hover {
  color: #febc8b;
}
.header_contact_item i {
  font-size: 14px;
  color: #febc8b;
}
.header_contact_item a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: color 0.3s;
}
.header_contact_item a:hover {
  color: #febc8b;
}
.header_contact_divider {
  width: 1px;
  height: 16px;
  background: rgba(255,255,255,0.2);
}

/* 右侧用户菜单 */
.header_account_area {
  text-align: right;
}
.header_account_area > ul {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  height: 42px;
  margin: 0;
  padding: 0;
}
.header_account_area > ul > li {
  display: inline-flex;
  align-items: center;
  position: relative;
  padding: 0 16px;
  border-left: none;
  height: 42px;
}
.header_account_area > ul > li::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 14px;
  background: rgba(255,255,255,0.2);
}
.header_account_area > ul > li:last-child::after {
  display: none;
}
.header_account_area > ul > li:last-child {
  border-right: none;
  padding-right: 0;
}
.header_account_area > ul > li > a {
  font-size: 13px;
  line-height: 1;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: nowrap;
}
.header_account_area > ul > li > a:hover {
  color: #febc8b;
  transform: translateY(-1px);
}
.header_account_area > ul > li > a i {
  font-size: 13px;
}

/* 注册按钮特殊样式 */
.header_account_area .btn-register a {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff !important;
  padding: 5px 14px;
  border-radius: 20px;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}
.header_account_area .btn-register a:hover {
  background: linear-gradient(135deg, #febc8b, #e67e22);
  box-shadow: 0 4px 12px rgba(254, 188, 139, 0.4);
  transform: translateY(-2px);
  color: #fff !important;
}

/* 登录按钮特殊样式 */
.header_account_area .btn-login a {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 5px 14px;
  border-radius: 20px;
  color: #fff !important;
  transition: all 0.3s;
}
.header_account_area .btn-login a:hover {
  background: rgba(255,255,255,0.2);
  border-color: #febc8b;
  color: #febc8b !important;
  transform: translateY(-1px);
}
.header_account_area .btn-login::after,
.header_account_area .btn-register::after {
  display: none;
}

/* ========== header_middle 中间栏 - Logo左置 + 卡片操作区 ========== */
.header_middle {
  background: #fff;
  padding: 18px 0;
  position: relative;
  z-index: 998;
  border-bottom: 1px solid #f2f2f2;
}
.header_middle .container > .row_middle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* 左侧：Canvas + Logo */
.header_middle .middle_left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.header_middle .canvas_open a {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #f5f5f5;
  color: #444;
  font-size: 22px;
  text-decoration: none;
  transition: all 0.3s ease;
}
.header_middle .canvas_open a:hover {
  background: #e74c3c;
  color: #fff;
}
.header_middle .logo {
  padding: 0;
}
.header_middle .logo a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: opacity 0.3s;
}
.header_middle .logo a:hover {
  opacity: 0.85;
}
.header_middle .logo img {
  max-height: 46px;
  width: auto;
  display: block;
}
/* Logo 旁品牌标语 */
.header_middle .logo .brand_tagline {
  display: flex;
  flex-direction: column;
  padding-left: 12px;
  border-left: 2px solid #e74c3c;
  line-height: 1.3;
}
.header_middle .logo .brand_tagline .tagline_main {
  font-size: 15px;
  font-weight: 700;
  color: #2c3e50;
  letter-spacing: 1px;
}
.header_middle .logo .brand_tagline .tagline_sub {
  font-size: 11px;
  color: #999;
  letter-spacing: 0.5px;
}

/* 右侧：操作卡片区 */
.header_middle .middle_right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
/* 通用操作卡片 */
.header_middle .action_card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1.5px solid #eee;
  background: #fafafa;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}
.header_middle .action_card:hover {
  border-color: #e74c3c;
  background: #fff;
  box-shadow: 0 4px 16px rgba(231,76,60,0.1);
  transform: translateY(-2px);
}
.header_middle .action_card .card_icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 16px;
  flex-shrink: 0;
}
.header_middle .action_card .card_text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.header_middle .action_card .card_text .card_label {
  font-size: 10px;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.header_middle .action_card .card_text .card_title {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

/* 心愿单卡片 */
.header_middle .action_card.card_wishlist .card_icon {
  background: #fff0f0;
  color: #e74c3c;
}
.header_middle .action_card.card_wishlist:hover .card_icon {
  background: #e74c3c;
  color: #fff;
}
.header_middle .action_card.card_wishlist span.item_count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  background: #e74c3c;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 10px;
  padding: 0 5px;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(231,76,60,0.3);
}

/* 购物车卡片 */
.header_middle .action_card.card_cart {
  border-color: #e74c3c;
  background: linear-gradient(135deg, #fff, #fff5f5);
}
.header_middle .action_card.card_cart .card_icon {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff;
  font-size: 15px;
}
.header_middle .action_card.card_cart:hover {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  border-color: #c0392b;
  box-shadow: 0 4px 18px rgba(231,76,60,0.3);
}
.header_middle .action_card.card_cart:hover .card_icon {
  background: rgba(255,255,255,0.2);
}
.header_middle .action_card.card_cart:hover .card_text .card_label,
.header_middle .action_card.card_cart:hover .card_text .card_title {
  color: #fff;
}
.header_middle .action_card.card_cart span.item_count {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  background: #2c3e50;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 11px;
  padding: 0 6px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ---------- header_middle 响应式 ---------- */
@media (max-width: 991px) {
  .header_middle {
    padding: 14px 0;
  }
  .header_middle .canvas_open a {
    display: inline-flex;
  }
  .header_middle .logo img {
    max-height: 38px;
  }
  .header_middle .logo .brand_tagline {
    display: none;
  }
  .header_middle .action_card {
    padding: 8px 12px;
    gap: 6px;
  }
  .header_middle .action_card .card_icon {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }
  .header_middle .action_card .card_text .card_title {
    font-size: 12px;
  }
}

@media (max-width: 767px) {
  .header_middle {
    padding: 12px 0;
  }
  .header_middle .container > .row_middle {
    gap: 10px;
  }
  .header_middle .middle_left {
    gap: 10px;
  }
  .header_middle .canvas_open a {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  .header_middle .logo img {
    max-height: 32px;
  }
  .header_middle .middle_right {
    gap: 8px;
  }
  .header_middle .action_card {
    padding: 6px 10px;
    border-radius: 8px;
  }
  .header_middle .action_card .card_text {
    display: none;
  }
  .header_middle .action_card {
    gap: 0;
    justify-content: center;
  }
  .header_middle .action_card .card_icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
  }
}

@media (max-width: 575px) {
  .header_middle {
    padding: 10px 0;
  }
  .header_middle .container > .row_middle {
    gap: 8px;
  }
  .header_middle .canvas_open a {
    width: 32px;
    height: 32px;
    border-radius: 6px;
  }
  .header_middle .logo img {
    max-height: 28px;
  }
  .header_middle .middle_right {
    gap: 6px;
  }
  .header_middle .action_card {
    padding: 5px;
  }
  .header_middle .action_card .card_icon {
    width: 30px;
    height: 30px;
  }
}

/* header_top 响应式 */
@media (max-width: 991px) {
  .header_top .container {
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .header_top .row {
    flex-direction: column;
    gap: 6px;
  }
  .header_contact_us {
    justify-content: center;
    flex-wrap: wrap;
    height: auto;
    gap: 12px;
  }
  .header_contact_divider {
    display: none;
  }
  .header_account_area {
    text-align: center;
  }
  .header_account_area > ul {
    justify-content: center;
    flex-wrap: wrap;
    height: auto;
  }
  .header_account_area > ul > li {
    height: auto;
    padding: 0 12px;
  }
  .header_account_area > ul > li > a {
    font-size: 12px;
    line-height: 28px;
  }
}
@media (max-width: 480px) {
  .header_contact_us {
    gap: 8px;
  }
  .header_contact_item {
    font-size: 11px;
  }
  .header_account_area > ul > li {
    padding: 0 8px;
  }
  .header_account_area > ul > li::after {
    display: none;
  }
}

/* ========== header_bottom 导航栏 ========== */
.header_bottom {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  position: relative;
  z-index: 997;
  border-bottom: none;
}
/* 顶部红橙渐变装饰线 */
.header_bottom::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #e74c3c, #febc8b, #e74c3c);
}
.header_bottom .container {
  position: relative;
}
.header_bottom .col-lg-12 {
  padding: 0;
}
.header_bottom .offset-lg-1 {
  margin-left: 0;
}

/* ========== 主导航菜单 ========== */
.main_menu {
  position: relative;
}
.main_menu nav {
  display: flex;
}
.main_menu nav > ul {
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 0;
}
.main_menu nav > ul > li {
  position: relative;
  margin: 0;
}

/* 菜单项链接 */
.main_menu nav > ul > li > a {
  display: flex;
  align-items: center;
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  padding: 0 20px;
  height: 52px;
  line-height: 1;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  z-index: 1;
}

/* 底部滑动指示条 */
.main_menu nav > ul > li > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 28px;
  height: 3px;
  background: #febc8b;
  border-radius: 3px 3px 0 0;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 悬浮态 */
.main_menu nav > ul > li > a:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
}
.main_menu nav > ul > li > a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

/* 当前激活项 */
.main_menu nav > ul > li > a.active {
  color: #fff;
  font-weight: 600;
  background: rgba(254, 188, 139, 0.12);
}
.main_menu nav > ul > li > a.active::after {
  transform: translateX(-50%) scaleX(1);
  width: 36px;
  background: linear-gradient(90deg, #e74c3c, #febc8b);
}

/* 首项（首页）左侧圆点 */
.main_menu nav > ul > li:first-child > a {
  padding-left: 28px;
}
.main_menu nav > ul > li:first-child > a::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: #febc8b;
  border-radius: 50%;
  animation: menuDotPulse 2s ease-in-out infinite;
}
@keyframes menuDotPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(254,188,139,0.6); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(254,188,139,0); }
}

/* ========== 下拉子菜单 ========== */
.main_menu nav > ul > li > ul.sub_menu {
  display: block;
  visibility: hidden;
  opacity: 0;
  transform: translateY(10px);
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 180px;
  padding: 8px 0;
  margin: 0;
  list-style: none;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  border: 1px solid #eee;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 99;
}
.main_menu nav > ul > li:hover > ul.sub_menu {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}
.main_menu nav > ul > li > ul.sub_menu li {
  list-style: none;
}
.main_menu nav > ul > li > ul.sub_menu li a {
  display: block;
  padding: 8px 20px;
  font-size: 13px;
  color: #555;
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
}
.main_menu nav > ul > li > ul.sub_menu li a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 3px;
  height: 16px;
  background: #e74c3c;
  border-radius: 0 2px 2px 0;
  transition: transform 0.2s ease;
}
.main_menu nav > ul > li > ul.sub_menu li a:hover {
  color: #e74c3c;
  background: #fff5f5;
  padding-left: 28px;
}
.main_menu nav > ul > li > ul.sub_menu li a:hover::before {
  transform: translateY(-50%) scale(1);
}

/* ========== mega_menu 大类菜单 ========== */
.main_menu nav > ul > li .mega_menu {
  visibility: hidden;
  opacity: 0;
  transform: translateY(10px);
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  border: 1px solid #eee;
  padding: 20px;
  min-width: 500px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 99;
}
.main_menu nav > ul > li:hover .mega_menu {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ========== Sticky 吸顶 ========== */
.header_bottom.sticky-header.sticky {
  background: rgba(44, 62, 80, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
  animation: headerSlideDown 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.header_bottom.sticky-header.sticky::after {
  opacity: 0.6;
}
.header_bottom.sticky-header.sticky .main_menu nav > ul > li > a {
  height: 44px;
}
@keyframes headerSlideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ========== 导航栏响应式 ========== */
@media (max-width: 1199px) {
  .header_bottom .offset-lg-1 {
    margin-left: 0;
  }
  .main_menu nav > ul > li > a {
    padding: 0 14px;
    font-size: 13px;
  }
}
@media (max-width: 991px) {
  .header_bottom {
    display: none;
  }
  .header_bottom.sticky-header.sticky {
    position: inherit;
    box-shadow: inherit;
    animation: none;
    background: inherit;
  }
}
