/* ==========================================================================
   上海英登 MRO 商城 - 方案二：公共组件样式 (Header, Nav, Footer, Sidebar)
   ========================================================================== */

/* 0. 头部吸顶锁定包裹层 (Sticky Header: Topbar + Header 一体化吸顶锁定) */
.site-header-sticky-wrapper {
  position: sticky;
  top: 0;
  z-index: 1200;
  width: 100%;
  min-width: 1200px;
  background-color: #ffffff;
  box-shadow: none;
  transition: box-shadow 0.25s ease;
}

.site-header-sticky-wrapper.is-scrolled {
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.1);
}

/* 1. 顶部工具条 (与底部页尾统一品牌绿体系) */
.site-topbar {
  background-color: var(--corporate-navy);
  color: #f1f5f9;
  height: 38px;
  line-height: 38px;
  font-size: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  min-width: 1200px;
}

.topbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-left .welcome-text {
  color: rgba(255, 255, 255, 0.9);
}

.topbar-auth-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-auth-links a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  transition: color 0.15s ease;
}

.topbar-auth-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.topbar-auth-links a.highlight {
  color: #ffffff;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.18);
  padding: 2px 8px;
  border-radius: 4px;
  text-decoration: none;
}

.topbar-auth-links a.highlight:hover {
  background: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

.topbar-auth-links .sep {
  color: rgba(255, 255, 255, 0.4);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar-item {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.92);
}

.topbar-item a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  transition: color 0.15s ease;
}

.topbar-item:hover,
.topbar-item:hover > a {
  color: #ffffff;
}

.topbar-item .icon i {
  color: rgba(255, 255, 255, 0.88);
}

.topbar-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  min-width: 150px;
  padding: 8px 0;
  z-index: 1000;
  display: none;
  border-radius: var(--radius-md);
}

.topbar-dropdown:hover .topbar-dropdown-menu {
  display: block;
}

.topbar-dropdown-menu a {
  display: block;
  padding: 8px 18px;
  font-size: 13px;
  color: var(--text-secondary);
}

.topbar-dropdown-menu a:hover {
  background-color: var(--bg-hover);
  color: var(--primary-color);
}

/* 2. 主头部 */
.site-header {
  background-color: #ffffff;
  padding: 14px 0;
  box-shadow: none;
  position: relative;
  z-index: 950;
}

.header-main {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}

.header-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 240px;
  flex-shrink: 0;
  align-self: center;
  text-decoration: none;
  z-index: 2;
}

.header-logo img {
  height: 76px;
  max-width: 180px;
  object-fit: contain;
  display: block;
}

.logo-icon-box {
  width: 46px;
  height: 46px;
  background: var(--primary-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(4, 117, 83, 0.3);
}

.logo-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--corporate-navy);
  letter-spacing: -0.5px;
}

.logo-title span {
  color: var(--primary-color);
}

.logo-subtitle {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
}

/* 现代流线搜索框 - 绝对居中于网页正中心，不受左侧 Logo 与右侧按钮尺寸变化影响 */
.header-search-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 530px;
  z-index: 1200;
}

.search-box-outer {
  position: relative;
  display: flex;
  align-items: center;
  background-color: #f8fafc;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 2px 4px 2px 18px;
  transition: var(--transition);
}

.search-box-outer:focus-within {
  border-color: var(--primary-color);
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(4, 117, 83, 0.1);
}

.search-input {
  flex: 1;
  height: 40px;
  font-size: 13px;
  color: var(--text-primary);
  background: transparent;
}

.btn-search {
  height: 38px;
  padding: 0 24px;
  background: var(--primary-gradient);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-autocomplete-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  z-index: 1200;
  display: none;
  max-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
}
.search-autocomplete-panel.show { display: block; }

/* 震坤行风格搜索历史下拉 */
.search-history-panel-inner {
  padding: 4px 0 0;
}
.search-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  font-size: 13px;
  color: #1e293b;
  cursor: pointer;
  border-bottom: 1px solid #f8fafc;
  transition: all 0.15s ease;
  user-select: none;
}
.search-history-item:hover {
  background-color: #f1f5f9;
  color: var(--primary-color, #0f766e);
}
.search-history-item .history-keyword {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 16px;
  font-weight: 400;
}
.search-history-item .history-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.search-history-item .history-tag {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 400;
}
.search-history-item .history-del-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-size: 13px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 3px;
  line-height: 1;
  opacity: 0;
  transition: all 0.15s ease;
}
.search-history-item:hover .history-del-btn {
  opacity: 1;
  color: #94a3b8;
}
.search-history-item .history-del-btn:hover {
  color: #ef4444;
  background-color: #fee2e2;
}
.search-history-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 8px 18px;
  border-top: 1px solid #f1f5f9;
  background: #fbfcfd;
}
.search-history-clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  font-size: 12px;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
}
.search-history-clear-btn:hover {
  color: #ef4444;
  background-color: #fee2e2;
}
.search-history-empty {
  padding: 24px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}

.autocomplete-group-title {
  padding: 10px 16px 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}
.autocomplete-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid #f8fafc;
}
.autocomplete-item:hover {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

.hot-search-keywords {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 12px;
  color: #888888;
  padding-left: 12px;
  white-space: nowrap;
}
.hot-search-keywords a {
  color: #888888;
  font-weight: 400;
  text-decoration: none;
  transition: color 0.15s ease;
}
.hot-search-keywords a:hover {
  color: #475569;
}
.hot-search-keywords a.hot {
  color: #888888;
  font-weight: 400;
}

/* 头部右侧按钮 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  align-self: center;
  z-index: 2;
}

.btn-quick-order {
  height: 42px;
  padding: 0 18px;
  background: #ffffff;
  border: 1.5px solid var(--primary-color);
  color: var(--primary-color);
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.btn-quick-order:hover {
  background-color: var(--primary-light);
}

.header-cart-wrap {
  position: relative;
}

.header-cart-btn {
  height: 42px;
  padding: 0 18px;
  background: var(--corporate-navy);
  color: #ffffff;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.header-cart-btn:hover {
  background: #1e293b;
  color: #ffffff;
}

.cart-icon-box {
  position: relative;
  display: flex;
  align-items: center;
}

.cart-badge {
  position: absolute;
  top: -8px; right: -12px;
  background-color: var(--accent-color);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
}

.mini-cart-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  z-index: 1200;
  display: none;
  padding: 16px;
}
.header-cart-wrap:hover .mini-cart-dropdown { display: block; }
.mini-cart-list { max-height: 260px; overflow-y: auto; }
.mini-cart-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid #f1f5f9;
}
.mini-cart-item img {
  width: 48px; height: 48px; object-fit: cover; border-radius: var(--radius-sm);
}
.mini-cart-info { flex: 1; min-width: 0; }
.mini-cart-title { font-size: 12px; color: var(--text-primary); font-weight: 500; }
.mini-cart-price-qty {
  display: flex; justify-content: space-between; margin-top: 4px; font-size: 12px;
}
.mini-cart-price { color: var(--accent-color); font-weight: 700; }
.mini-cart-footer {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: space-between;
}
.mini-cart-total strong { font-size: 18px; color: var(--accent-color); }
.mini-cart-empty { text-align: center; padding: 24px 0; color: var(--text-muted); }

/* 3. 导航栏 */
.site-nav-bar {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  z-index: 900;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
  min-width: 1200px;
}

.nav-container {
  display: flex;
  align-items: center;
  height: 48px;
}

.category-nav-dropdown {
  position: relative;
  width: 240px;
  height: 100%;
}

.category-nav-header {
  height: 100%;
  background: var(--primary-gradient);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

/* --------------------------------------------------------------------------
   全部商品分类菜单面板 (参考英登规范：完整展示8大品类，高度与Banner精准对齐)
   -------------------------------------------------------------------------- */
.category-tree-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 240px;
  height: 480px;
  min-height: 480px;
  max-height: 480px;
  box-sizing: border-box;
  background-color: #047553;
  border: 1px solid #035c42;
  border-top: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  z-index: 1000;
  display: flex;
  flex-direction: column;
}
.category-tree-menu.collapse-mode { display: none; }
/* 鼠标悬停在“全部商品分类”按钮上时自动下拉展开，移开后自动收回 */
.category-nav-dropdown:hover .category-tree-menu.collapse-mode,
.compact-category-nav:hover .category-tree-menu.collapse-mode,
.compact-category-nav.is-open .category-tree-menu.collapse-mode { 
  display: flex; 
}

.category-menu-item {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: all 0.15s ease;
  position: static;
  box-sizing: border-box;
}
.category-menu-item:last-child {
  border-bottom: none;
}
.category-menu-item:hover {
  background-color: #035c42;
}

.cat-primary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cat-primary-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.2;
}
.cat-primary-title a {
  color: #ffffff;
  text-decoration: none;
}
.cat-primary-title .icon {
  font-size: 14px;
  color: #bbf0d4;
  display: inline-flex;
  align-items: center;
}
.cat-arrow {
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  transition: transform 0.15s;
}
.category-menu-item:hover .cat-arrow {
  color: #ffffff;
  transform: translateX(2px);
}

.cat-sub-shortcuts {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.4;
  white-space: normal; /* 关键：彻底放开换行，绝不使用 ellipsis 截断！ */
  word-break: break-word;
  padding-left: 22px;
  color: rgba(255, 255, 255, 0.82);
}
.cat-sub-shortcuts a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  margin-right: 0;
  transition: color 0.15s;
}
.cat-sub-shortcuts a:hover {
  color: #ffffff;
  text-decoration: underline;
}
.cat-sub-shortcuts .cat-sep {
  margin: 0 4px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 10px;
}

/* 右侧三级飞出面板 (Flyout Panel) */
.category-flyout-panel {
  position: absolute;
  top: 0;
  left: 240px;
  width: 920px;
  height: 480px;
  min-height: 480px;
  max-height: 480px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-left: 3px solid #047553;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 20px 24px;
  z-index: 1010;
  display: none;
  overflow-y: auto;
}
.category-menu-item:hover .category-flyout-panel {
  display: block;
}
.flyout-category-group {
  display: flex; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px dashed #f1f5f9;
}
.flyout-category-group:last-child { border-bottom: none; margin-bottom: 0; }
.flyout-sec-title {
  width: 130px; font-size: 13px; font-weight: 700; color: var(--text-primary);
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.flyout-sec-title a:hover { color: var(--primary-color); }
.flyout-third-list {
  flex: 1; display: flex; flex-wrap: wrap; gap: 10px 16px;
}
.flyout-third-list a {
  font-size: 12px; color: var(--text-secondary); padding-right: 10px; border-right: 1px solid #e2e8f0;
}
.flyout-third-list a:hover { color: var(--primary-color); font-weight: 600; }

.main-nav-links {
  display: flex;
  align-items: center;
  padding-left: 24px;
  gap: 8px;
}
.main-nav-links li a {
  display: block;
  padding: 0 16px;
  height: 48px;
  line-height: 48px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  position: relative;
  border-radius: var(--radius-sm);
}
.main-nav-links li a:hover,
.main-nav-links li.active a {
  color: var(--primary-color);
}
.main-nav-links li.active a::after {
  content: "";
  position: absolute;
  bottom: 0; left: 16px; right: 16px; height: 3px;
  background: var(--primary-gradient);
  border-radius: 2px 2px 0 0;
}
.main-nav-links .tag-hot {
  position: absolute;
  top: 6px;
  right: 2px;
  background: linear-gradient(135deg, #ff4d4f 0%, #fa8c16 100%);
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 10px;
  line-height: 1.2;
  display: inline-block;
}

/* ==========================================================================
   4. 英登标准纯正右侧悬浮导航栏 (West Domain Style Right Floating Sidebar)
   ========================================================================== */
.right-sidebar-toolbar {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  background: #047553;
  border-radius: 6px 0 0 6px;
  z-index: 1500;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
}

.right-sidebar-toolbar.no-transition {
  transition: none !important;
}

/* 折叠状态：主体完全向右移出视口，仅保留左侧切换手柄贴边显示 */
.right-sidebar-toolbar.is-collapsed {
  transform: translateY(-50%) translateX(42px);
  box-shadow: none;
}

.right-sidebar-toolbar.is-collapsed .sidebar-item {
  pointer-events: none;
}

.right-sidebar-toolbar.is-collapsed .sidebar-toggle-tab {
  pointer-events: auto;
}

/* 侧边栏收缩/折叠把手标签 (Retractable Toggle Tab) - 英登深绿弧形微标+纯白三角指针 */
.sidebar-toggle-tab {
  position: absolute !important;
  left: -20px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 20px !important;
  height: 48px !important;
  background: #047553 !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-right: none !important;
  border-radius: 8px 0 0 8px !important;
  box-shadow: -3px 0 10px rgba(0, 0, 0, 0.15) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 !important;
  outline: none !important;
  z-index: 100 !important;
  line-height: 1 !important;
  color: #ffffff !important;
  transition: background-color 0.2s ease, box-shadow 0.2s ease !important;
}

.sidebar-toggle-tab:hover {
  background: #035c41 !important;
  box-shadow: -4px 0 14px rgba(0, 0, 0, 0.22) !important;
}

.sidebar-toggle-tab .toggle-arrow {
  display: inline-block;
  color: #ffffff;
  width: 8px;
  height: 10px;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
  transform: rotate(180deg); /* 展开状态下箭头向右指向屏幕边缘，点击收起 */
}

.sidebar-toggle-tab:hover .toggle-arrow {
  color: #ffffff;
}

.right-sidebar-toolbar.is-collapsed .sidebar-toggle-tab .toggle-arrow {
  transform: rotate(0deg); /* 折叠状态下箭头向左指向屏幕内部，点击展开 */
}

.sidebar-item {
  width: 100%;
  padding: 10px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  cursor: pointer;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  transition: background-color 0.2s ease;
  box-sizing: border-box;
}

.sidebar-item:first-child,
.sidebar-item:first-of-type {
  border-radius: 6px 0 0 0;
}

.sidebar-item:last-child,
.sidebar-item:last-of-type {
  border-bottom: none;
  border-radius: 0 0 0 6px;
}

.sidebar-item:hover {
  background: #035c41;
  color: #ffffff;
}

.sidebar-item .icon {
  font-size: 20px;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: #ffffff;
}

.sidebar-item .text {
  font-size: 11px;
  line-height: 1.15;
  text-align: center;
  font-weight: 500;
  color: #ffffff;
}

.sidebar-item.recent-item.active {
  background: #023827;
}

/* 购物车角标 */
.sidebar-item.cart-item {
  position: relative;
}

.sidebar-item.cart-item .cart-badge-side {
  position: absolute;
  top: 3px;
  right: 3px;
  background: #ef4444;
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  min-width: 14px;
  height: 14px;
  line-height: 14px;
  border-radius: 7px;
  text-align: center;
  padding: 0 3px;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 悬停滑出的提示 Tooltip */
.sidebar-tooltip {
  position: absolute;
  right: 42px;
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  background: #022b1f;
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  white-space: nowrap;
  border-radius: 4px 0 0 4px;
  border-left: 2px solid #10b981;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -4px 4px 16px rgba(0, 0, 0, 0.25);
  z-index: 100;
}

.sidebar-item:hover .sidebar-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

/* 回到顶部按钮（独立浮动在右下角，对齐英登） */
.sidebar-back-to-top {
  position: fixed;
  right: 0;
  bottom: 60px;
  width: 42px;
  padding: 8px 2px;
  background: #047553;
  color: #ffffff;
  border-radius: 4px 0 0 4px;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1500;
  transition: background-color 0.2s ease;
}

.sidebar-back-to-top:hover {
  background: #035c41;
}

.sidebar-back-to-top .icon {
  font-size: 16px;
  margin-bottom: 2px;
}

.sidebar-back-to-top .text {
  font-size: 10px;
  line-height: 1.1;
  color: #ffffff;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   右侧最近浏览足迹抽屉面板 (Right Sidebar Recent Views Drawer)
   -------------------------------------------------------------------------- */
.sidebar-recent-drawer {
  position: fixed;
  top: 0;
  right: 44px;
  bottom: 0;
  width: 320px;
  background: #ffffff;
  box-shadow: -8px 0 28px rgba(0, 0, 0, 0.18);
  z-index: 1480;
  display: flex;
  flex-direction: column;
  transform: translateX(calc(100% + 44px));
  opacity: 0;
  visibility: hidden;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, visibility 0.28s;
}

.sidebar-recent-drawer.is-open {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
}

.sidebar-item.recent-item.active {
  background: #023827;
  color: #ffffff;
}

.recent-drawer-header {
  padding: 14px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.recent-drawer-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.recent-drawer-title i {
  color: var(--primary-color);
  font-size: 18px;
}

.recent-drawer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-clear-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.15s;
}
.drawer-clear-btn:hover {
  color: #e1251b;
  background: #fee2e2;
}

.drawer-close-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all 0.15s;
}
.drawer-close-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.recent-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drawer-item-card {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid #f1f5f9;
  transition: all 0.2s ease;
  position: relative;
  cursor: pointer;
}
.drawer-item-card:hover {
  border-color: #c6ebd9;
  box-shadow: 0 4px 12px rgba(4, 117, 83, 0.08);
  transform: translateY(-1px);
}

.drawer-item-thumb {
  width: 58px;
  height: 58px;
  border-radius: 4px;
  overflow: hidden;
  background: #f8fafc;
  flex-shrink: 0;
  border: 1px solid #eef2f6;
  display: flex;
  align-items: center;
  justify-content: center;
}
.drawer-item-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.drawer-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.drawer-item-title {
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.drawer-item-card:hover .drawer-item-title {
  color: var(--primary-color);
}

.drawer-item-brand {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.drawer-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.drawer-item-price {
  color: #e1251b;
  font-size: 13px;
  font-weight: 700;
}

.drawer-item-add-btn {
  background: #edf8f4;
  color: var(--primary-color);
  border: 1px solid #c6ebd9;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  transition: all 0.15s;
}
.drawer-item-add-btn:hover {
  background: var(--primary-color);
  color: #ffffff;
}

.recent-drawer-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
}
.recent-drawer-empty .empty-icon {
  font-size: 40px;
  color: #cbd5e1;
  margin-bottom: 12px;
}
.recent-drawer-empty p {
  font-size: 13px;
  margin-bottom: 14px;
}

.recent-drawer-footer {
  padding: 12px 16px;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
  text-align: center;
}
.drawer-footer-link {
  font-size: 12px;
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
}
.drawer-footer-link:hover {
  text-decoration: underline;
}

.service-promise-bar {
  background-color: #ffffff;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 20px 0;
  margin-top: 28px;
  min-width: 1200px;
}
.promise-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.promise-item {
  display: flex; align-items: center; gap: 12px;
}
.promise-icon-box {
  width: 46px; height: 46px; border-radius: var(--radius-md);
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.promise-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.promise-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* 5. 现代化品牌深色页尾 (紧凑精致布局优化) */
.site-footer {
  background-color: var(--corporate-navy);
  color: #f1f5f9;
  padding: 26px 0 16px;
  min-width: 1200px;
}
.footer-columns-grid {
  display: flex;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}
.footer-col-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}
.footer-col-links li {
  margin-bottom: 5px;
}
.footer-col-links li a {
  font-size: 12.5px;
  color: #e2e8f0;
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-col-links li a:hover {
  color: #ffffff;
  text-decoration: underline;
}
.footer-contact-box {
  width: 290px;
  padding-left: 24px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}
.footer-tel {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  font-family: var(--font-number);
  letter-spacing: 0.5px;
  line-height: 1.2;
}
.footer-worktime {
  font-size: 12px;
  color: #e2e8f0;
  margin-top: 4px;
  line-height: 1.5;
}
.footer-address {
  font-size: 12px;
  color: #e2e8f0;
  margin-top: 2px;
  line-height: 1.5;
}
.footer-email {
  font-size: 12px;
  color: #e2e8f0;
  margin-top: 2px;
  line-height: 1.5;
}
.footer-email a {
  color: inherit;
  text-decoration: none;
}
.footer-email a:hover {
  text-decoration: underline;
  color: #ffffff;
}
.footer-copyright-bar {
  text-align: center;
  padding-top: 14px;
  font-size: 12px;
  color: #ffffff;
  line-height: 1.7;
}
.footer-corp-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-bottom: 6px;
}
.footer-corp-links a {
  color: #ffffff;
  font-weight: 600;
  font-size: 12.5px;
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-corp-links a:hover {
  color: #a7f3d0;
  text-decoration: underline;
}
.footer-corp-links span {
  color: rgba(255, 255, 255, 0.45);
}


/* ==========================================================================
   全局通用数量步进器 (Global Quantity Stepper)
   ========================================================================== */
.quantity-stepper {
  display: inline-flex !important;
  align-items: center !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 4px !important;
  background: #ffffff !important;
  overflow: hidden !important;
  height: 28px !important;
  width: auto !important;
  vertical-align: middle !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.stepper-btn {
  width: 26px !important;
  height: 28px !important;
  line-height: 28px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #f1f5f9 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #475569 !important;
  cursor: pointer !important;
  user-select: none !important;
  border: none !important;
  padding: 0 !important;
  transition: all 0.15s ease !important;
}

.stepper-btn:hover {
  background: #e2e8f0 !important;
  color: var(--primary-color) !important;
}

.stepper-input {
  width: 44px !important;
  height: 28px !important;
  line-height: 28px !important;
  text-align: center !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  border: none !important;
  border-left: 1px solid #cbd5e1 !important;
  border-right: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  outline: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
}
