/* shop_c - 全局通用样式 */
:root {
  --primary: #c59b27;
  --primary-hover: #b0871d;
  --secondary: #1e293b;
  --accent-red: #e11d48;
  --bg-main: #f8fafc;
  --border-color: #e2e8f0;
  --text-main: #1e293b;
  --text-sub: #64748b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

ul, ol {
  list-style: none;
}

/* 顶部黑色导航条 */
.top-bar {
  background-color: #0f172a;
  color: #94a3b8;
  font-size: 13px;
  border-bottom: 1px solid #1e293b;
}

.top-bar a:hover {
  color: #f1f5f9;
}

/* 主头部与搜索框 */
.site-header {
  background-color: #ffffff;
  border-bottom: 2px solid #f1f5f9;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #c59b27 0%, #9a7413 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 22px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(197, 155, 39, 0.3);
}

.search-box {
  display: flex;
  align-items: center;
  border: 2px solid var(--primary);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.search-input {
  border: none;
  outline: none;
  padding: 10px 16px;
  width: 100%;
  font-size: 14px;
  color: #334155;
}

.search-btn {
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  padding: 10px 24px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
  white-space: nowrap;
}

.search-btn:hover {
  background-color: var(--primary-hover);
}

/* 购物车快捷入口 */
.header-cart-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background-color: #f8fafc;
  color: #334155;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
  position: relative;
}

.header-cart-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: #fff;
}

.cart-badge {
  background-color: var(--accent-red);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  line-height: 1;
}

/* 主分类导航条 */
.main-nav-bar {
  background-color: #1e293b;
  color: #ffffff;
  font-weight: 500;
  position: relative;
  z-index: 40;
}

.nav-all-category {
  width: 220px;
  background-color: #0f172a;
  padding: 14px 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: var(--primary);
}

.nav-links-list {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 24px;
}

.nav-link-item {
  padding: 14px 0;
  font-size: 15px;
  font-weight: 600;
  color: #e2e8f0;
  position: relative;
}

.nav-link-item:hover, .nav-link-item.active {
  color: var(--primary);
}

.nav-link-item.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--primary);
  border-radius: 3px 3px 0 0;
}

/* 面包屑导航 */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-sub);
  padding: 16px 0;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb-separator {
  color: #cbd5e1;
}

/* 通用商品卡片 */
.product-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.product-img-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: #f1f5f9;
  position: relative;
}

.product-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-img-box img {
  transform: scale(1.05);
}

.product-tag-list {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  z-index: 10;
}

.tag-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.tag-red {
  background-color: #ffe4e6;
  color: #e11d48;
}

.tag-gold {
  background-color: #fef3c7;
  color: #b45309;
}

.tag-blue {
  background-color: #e0f2fe;
  color: #0369a1;
}

.product-info-box {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-title {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.4;
  height: 40px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 6px;
}

.product-card:hover .product-title {
  color: var(--primary);
}

.product-price-bar {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

.price-current {
  color: var(--accent-red);
  font-size: 18px;
  font-weight: 800;
}

.price-current .currency {
  font-size: 13px;
  font-weight: 600;
  margin-right: 1px;
}

.price-origin {
  color: #94a3b8;
  font-size: 12px;
  text-decoration: line-through;
}

.product-store-link {
  font-size: 12px;
  color: #64748b;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.product-store-link:hover {
  color: var(--primary);
}

/* 首页与列表页共用；列表页不会加载 home.css。 */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

.add-cart-fast-btn {
  margin-top: 10px;
  width: 100%;
  padding: 8px 0;
  background-color: #f1f5f9;
  color: #334155;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.product-card:hover .add-cart-fast-btn {
  background-color: var(--primary);
  color: #ffffff;
}

/* 页脚 Footer */
.site-footer {
  background-color: #0f172a;
  color: #cbd5e1;
  padding-top: 48px;
  padding-bottom: 24px;
  margin-top: 60px;
  border-top: 4px solid var(--primary);
}

.footer-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-bottom: 36px;
  border-bottom: 1px solid #1e293b;
  margin-bottom: 36px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(197, 155, 39, 0.15);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}

.footer-sitemap {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  padding-bottom: 36px;
  border-bottom: 1px solid #1e293b;
}

.sitemap-col h4 {
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
}

.sitemap-col ul li {
  margin-bottom: 8px;
  font-size: 13px;
}

.sitemap-col ul li a {
  color: #94a3b8;
}

.sitemap-col ul li a:hover {
  color: var(--primary);
}

.footer-bottom {
  text-align: center;
  font-size: 13px;
  color: #64748b;
  padding-top: 24px;
}

/* 通用弹窗 Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: #ffffff;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(10px);
  transition: transform 0.2s ease;
}

.modal-overlay.active .modal-dialog {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 16px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: #94a3b8;
  cursor: pointer;
}

.modal-close-btn:hover {
  color: #0f172a;
}
