/* ===== 哒个车专用样式 ===== */

/* ---------- 商城导航增强 ---------- */
.navbar-shop { background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 100; }
.navbar-shop .navbar-inner { height: 70px; }
.nav-back-home {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600;
  background: var(--accent); color: #fff !important; transition: all .2s; white-space: nowrap;
}
.nav-back-home:hover { background: var(--accent-light); transform: translateY(-1px); }
.cart-badge {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500;
  color: var(--ink-2); transition: all .2s;
}
.cart-badge:hover { background: rgba(14,92,99,.06); color: var(--primary); }
.cart-badge .count {
  min-width: 20px; height: 20px; border-radius: 10px; background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  padding: 0 6px;
}

/* ---------- 商城Banner ---------- */
.shop-banner {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 56px 0; color: #fff; text-align: center; position: relative; overflow: hidden;
}
.shop-banner::before {
  content: ''; position: absolute; inset: 0; opacity: .08;
  background: url('https://trae-api-cn.mchost.guru/api/ide/v1/text_to_image?prompt=packaging%20materials%20warehouse%20supplies%20boxes%20tape%20bubble%20wrap%20display&image_size=landscape_16_9') center/cover;
}
.shop-banner-content { position: relative; z-index: 2; }
.shop-banner h1 { font-size: 36px; font-weight: 700; margin-bottom: 12px; }
.shop-banner p { font-size: 16px; color: rgba(255,255,255,.75); }

/* ---------- 分类导航 ---------- */
.shop-cats { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-bottom: 40px; }
.shop-cat {
  padding: 8px 22px; border-radius: 50px; font-size: 14px; font-weight: 500;
  background: var(--card); border: 1px solid var(--border); color: var(--ink-2);
  cursor: pointer; transition: all .2s;
}
.shop-cat:hover { border-color: var(--primary-light); color: var(--primary); }
.shop-cat.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- 商品网格 ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border); transition: all .3s; cursor: pointer;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.product-card-img { height: 200px; overflow: hidden; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.product-card:hover .product-card-img img { transform: scale(1.06); }
.product-card-body { padding: 16px 18px 20px; }
.product-card-body h3 { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 8px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 45px; }
.product-card-tags { display: flex; gap: 6px; margin-bottom: 10px; }
.product-card-tags span { font-size: 11px; padding: 2px 8px; border-radius: 4px; background: rgba(224,112,31,.08); color: var(--accent); font-weight: 500; }
.product-card-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 12px; }
.product-card-price .now { font-size: 22px; font-weight: 700; color: var(--accent); }
.product-card-price .now small { font-size: 13px; }
.product-card-price .old { font-size: 13px; color: var(--ink-3); text-decoration: line-through; }
.product-card-btn { width: 100%; padding: 9px; border: none; border-radius: var(--radius-sm); background: var(--primary); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .2s; }
.product-card-btn:hover { background: var(--primary-light); }

/* ---------- 商品详情 ---------- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.product-detail-img { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--bg); height: 460px; }
.product-detail-img img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-info h1 { font-size: 26px; font-weight: 700; color: var(--ink); margin-bottom: 12px; line-height: 1.4; }
.product-detail-tags { display: flex; gap: 8px; margin-bottom: 20px; }
.product-detail-tags span { font-size: 12px; padding: 4px 12px; border-radius: 4px; background: rgba(224,112,31,.08); color: var(--accent); font-weight: 500; }
.product-detail-price { background: var(--bg); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.product-detail-price .now { font-size: 36px; font-weight: 700; color: var(--accent); }
.product-detail-price .now small { font-size: 16px; }
.product-detail-price .old { font-size: 15px; color: var(--ink-3); text-decoration: line-through; margin-left: 12px; }
.product-detail-desc { color: var(--ink-2); font-size: 15px; line-height: 1.9; margin-bottom: 24px; }
.product-detail-specs { margin-bottom: 28px; }
.product-detail-specs li { display: flex; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.product-detail-specs li .lbl { width: 100px; color: var(--ink-3); flex-shrink: 0; }
.product-detail-specs li .val { color: var(--ink); }
.qty-selector { display: flex; align-items: center; gap: 0; margin-bottom: 28px; }
.qty-selector label { font-size: 14px; font-weight: 600; color: var(--ink); margin-right: 16px; }
.qty-selector .qty-btn { width: 40px; height: 40px; border: 1.5px solid var(--border); background: #fff; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.qty-selector .qty-btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.qty-selector .qty-btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.qty-selector input { width: 60px; height: 40px; border: 1.5px solid var(--border); border-left: none; border-right: none; text-align: center; font-size: 16px; font-weight: 600; color: var(--ink); }
.product-detail-actions { display: flex; gap: 16px; }
.product-detail-actions .btn { flex: 1; }

/* ---------- 购物车 ---------- */
.cart-wrap { max-width: 900px; margin: 0 auto; }
.cart-list { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--border); overflow: hidden; margin-bottom: 24px; }
.cart-item { display: grid; grid-template-columns: 80px 1fr auto auto auto; gap: 20px; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.cart-item:last-child { border-bottom: none; }
.cart-item-img { width: 80px; height: 80px; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg); }
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info h4 { font-size: 15px; color: var(--ink); margin-bottom: 4px; }
.cart-item-info .spec { font-size: 13px; color: var(--ink-3); }
.cart-item-price { font-size: 16px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.cart-item-qty { display: flex; align-items: center; }
.cart-item-qty .qbtn { width: 30px; height: 30px; border: 1px solid var(--border); background: #fff; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.cart-item-qty .qbtn:first-child { border-radius: 4px 0 0 4px; }
.cart-item-qty .qbtn:last-child { border-radius: 0 4px 4px 0; }
.cart-item-qty input { width: 44px; height: 30px; border: 1px solid var(--border); border-left: none; border-right: none; text-align: center; font-size: 14px; font-weight: 600; }
.cart-item-del { width: 32px; height: 32px; border: none; background: none; color: var(--ink-3); font-size: 18px; cursor: pointer; border-radius: 6px; transition: all .2s; }
.cart-item-del:hover { background: rgba(220,38,38,.08); color: var(--danger); }
.cart-footer { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--border); padding: 24px; display: flex; justify-content: space-between; align-items: center; }
.cart-footer-total .lbl { font-size: 14px; color: var(--ink-2); }
.cart-footer-total .amt { font-size: 28px; font-weight: 700; color: var(--accent); }
.cart-empty { text-align: center; padding: 80px 20px; }
.cart-empty .icon { font-size: 64px; margin-bottom: 20px; }
.cart-empty h3 { font-size: 20px; color: var(--ink-2); margin-bottom: 12px; }
.cart-empty p { font-size: 14px; color: var(--ink-3); margin-bottom: 24px; }

/* ---------- 结算页 ---------- */
.checkout-wrap { max-width: 860px; margin: 0 auto; }
.checkout-card { background: var(--card); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); border: 1px solid var(--border); margin-bottom: 24px; }
.checkout-card h3 { font-size: 18px; color: var(--primary); margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.checkout-items { margin-bottom: 8px; }
.checkout-item { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.checkout-item:last-child { border-bottom: none; }
.checkout-item-img { width: 60px; height: 60px; border-radius: 8px; overflow: hidden; background: var(--bg); flex-shrink: 0; }
.checkout-item-img img { width: 100%; height: 100%; object-fit: cover; }
.checkout-item-info { flex: 1; }
.checkout-item-info h4 { font-size: 14px; color: var(--ink); margin-bottom: 2px; }
.checkout-item-info .qty { font-size: 13px; color: var(--ink-3); }
.checkout-item-price { font-size: 15px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.checkout-total { display: flex; justify-content: space-between; align-items: center; padding-top: 20px; margin-top: 12px; border-top: 2px solid var(--border); }
.checkout-total .lbl { font-size: 15px; color: var(--ink-2); }
.checkout-total .amt { font-size: 30px; font-weight: 700; color: var(--accent); }

/* ---------- 响应式 ---------- */
@media (max-width: 968px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-detail { grid-template-columns: 1fr; gap: 32px; }
  .product-detail-img { height: 320px; }
  .cart-item { grid-template-columns: 60px 1fr auto; gap: 12px; }
  .cart-item-qty, .cart-item-del { grid-column: 2 / -1; }
}
@media (max-width: 600px) {
  .product-grid { grid-template-columns: 1fr; }
  .checkout-card { padding: 24px; }
  .cart-footer { flex-direction: column; gap: 16px; }
}
