/* ================= RESET & BASE ================= */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #333;
  background: #f5f5f5;
  font-size: 14px;
  line-height: 1.5;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; outline: none; }
input { font-family: inherit; outline: none; }
img { display: block; max-width: 100%; }

/* ================= 顶栏 ================= */
.top-bar {
  background: #fff;
  border-bottom: 2px solid #E1251B;
  position: sticky; top: 0; z-index: 100;
}
.top-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 30px;
  padding: 16px 20px;
}
.brand-logo {
  font-size: 28px; font-weight: 900;
  color: #E1251B; letter-spacing: -1px;
  white-space: nowrap;
}
.top-search {
  flex: 1; max-width: 560px;
  display: flex;
  border: 2px solid #E1251B; border-radius: 2px;
  overflow: hidden;
}
.top-search input {
  flex: 1; padding: 8px 14px;
  font-size: 14px; border: 0;
}
.top-search button {
  background: #E1251B; color: #fff;
  padding: 0 24px; font-size: 14px; font-weight: 500;
}
.top-tools { display: flex; gap: 24px; align-items: center; }
.top-link {
  color: #666; font-size: 14px;
  position: relative; padding: 4px 8px;
}
.top-link:hover { color: #E1251B; }
.cart-link { padding-right: 22px; }
.cart-badge {
  position: absolute; top: -2px; right: 4px;
  background: #E1251B; color: #fff;
  font-size: 11px; padding: 1px 6px;
  border-radius: 10px; font-weight: 700;
  min-width: 18px; text-align: center;
  line-height: 1.4;
}

/* ================= 商品主区 ================= */
.product-main {
  background: #fff;
  padding: 30px 0;
}
.product-container {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  display: grid;
  grid-template-columns: 500px 1fr;
  gap: 40px;
}

/* 画廊 */
.gallery { display: flex; flex-direction: column; gap: 14px; }
.main-image-wrap {
  position: relative;
  width: 500px; height: 500px;
  border: 1px solid #f0f0f0;
  border-radius: 4px;
  background: #fafafa;
  overflow: hidden;
}
.main-image-wrap img {
  width: 100%; height: 100%; object-fit: contain;
}
.gal-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 60px;
  background: rgba(0,0,0,.45);
  color: #fff; font-size: 24px;
  opacity: 0; transition: opacity .2s;
  display: flex; align-items: center; justify-content: center;
}
.main-image-wrap:hover .gal-arrow { opacity: 1; }
.gal-prev { left: 0; }
.gal-next { right: 0; }
.img-counter {
  position: absolute; bottom: 12px; right: 12px;
  background: rgba(0,0,0,.55); color: #fff;
  padding: 3px 10px; font-size: 12px;
  border-radius: 12px;
}
.thumbs {
  display: flex; gap: 10px;
}
.thumb {
  width: 70px; height: 70px;
  border: 2px solid #eee; border-radius: 4px;
  cursor: pointer; object-fit: cover;
  background: #fafafa;
  transition: border-color .15s;
}
.thumb:hover { border-color: #FF6700; }
.thumb.active { border-color: #E1251B; }

/* 商品信息 */
.info { padding: 4px 0; }
.product-title {
  font-size: 22px; font-weight: 500;
  line-height: 1.4; color: #333;
  margin-bottom: 18px;
}

/* 价格区 */
.price-box {
  background: linear-gradient(180deg, #FFF4F0 0%, #FFF8F5 100%);
  padding: 18px 22px;
  margin-bottom: 20px;
  border-radius: 2px;
}
.price-row {
  display: flex; align-items: baseline; gap: 14px;
  margin-bottom: 12px; flex-wrap: wrap;
}
.price-label {
  color: #999; font-size: 13px;
}
.price-now {
  color: #E1251B; display: flex; align-items: baseline;
}
.price-now .cur { font-size: 18px; font-weight: 700; }
.price-now .price-int { font-size: 36px; font-weight: 900; line-height: 1; }
.price-now .price-dec { font-size: 18px; font-weight: 700; }
.price-old {
  color: #999; font-size: 14px;
  text-decoration: line-through;
}
.price-tag {
  background: #E1251B; color: #fff;
  font-size: 11px; padding: 2px 8px;
  border-radius: 2px; font-weight: 600;
}
.price-meta {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; color: #666;
}
.meta-divider { color: #ddd; }

/* 服务保障 */
.service-box {
  padding: 16px 22px;
  background: #fafafa;
  border: 1px solid #f0f0f0;
  margin-bottom: 24px;
  border-radius: 2px;
}
.svc-row {
  display: flex; gap: 14px;
  padding: 6px 0;
  font-size: 13px;
}
.svc-key { color: #999; min-width: 36px; }
.svc-val { color: #333; flex: 1; }

/* 数量 */
.qty-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 22px;
  margin-bottom: 26px;
}
.qty-label { color: #999; font-size: 13px; }
.qty-control {
  display: flex; align-items: center;
  border: 1px solid #ddd;
  border-radius: 2px; overflow: hidden;
}
.qty-control button {
  width: 32px; height: 32px;
  background: #f5f5f5; color: #333;
  font-size: 16px; font-weight: 700;
  transition: background .15s;
}
.qty-control button:hover { background: #e8e8e8; color: #E1251B; }
.qty-control input {
  width: 50px; height: 32px;
  text-align: center; border: 0;
  font-size: 14px; font-weight: 600;
  background: #fff;
}
.qty-stock {
  color: #E1251B; font-size: 13px;
  margin-left: 6px;
}

/* 操作按钮 */
.action-row {
  display: flex; gap: 14px;
  padding: 0 22px;
  margin-top: 30px;
}
.btn-cart, .btn-buy {
  flex: 1; height: 56px;
  font-size: 17px; font-weight: 700;
  letter-spacing: 2px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 2px;
  transition: all .15s;
}
.btn-cart {
  background: linear-gradient(135deg, #FFB300 0%, #FF8800 100%);
  color: #fff;
  border: 1px solid #FF8800;
}
.btn-cart:hover {
  background: linear-gradient(135deg, #FFA700 0%, #FF7700 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255,136,0,.35);
}
.btn-cart:active { transform: translateY(0); }
.btn-buy {
  background: linear-gradient(135deg, #FF4D4D 0%, #E1251B 100%);
  color: #fff;
  border: 1px solid #E1251B;
}
.btn-buy:hover {
  background: linear-gradient(135deg, #FF3D3D 0%, #C81510 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(225,37,27,.35);
}
.btn-buy:active { transform: translateY(0); }
.icon { font-size: 18px; }

/* ================= 详情图区 ================= */
.detail-section {
  background: #fff;
  margin-top: 16px;
  padding: 30px 0;
}
.detail-container {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
}
.detail-heading {
  font-size: 20px; font-weight: 700;
  text-align: center; color: #333;
  padding: 14px 0;
  margin-bottom: 24px;
  border-bottom: 1px solid #eee;
  position: relative;
}
.detail-heading::before {
  content: '';
  position: absolute; bottom: -1px; left: 50%;
  transform: translateX(-50%);
  width: 60px; height: 3px;
  background: #E1251B;
  border-radius: 2px;
}
.detail-images {
  display: flex; flex-direction: column;
  align-items: center; gap: 0;
}
.detail-images img {
  width: 100%; max-width: 900px;
  display: block;
}

/* ================= 页脚 ================= */
.footer {
  background: #fff;
  border-top: 1px solid #eee;
  padding: 30px 0;
  text-align: center;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
}
.footer-brand {
  font-size: 20px; font-weight: 900;
  color: #E1251B; letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.footer-meta {
  font-size: 12px; color: #999;
}

/* ================= 响应式 ================= */
@media (max-width: 1024px) {
  .product-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .gallery { align-items: center; }
  .main-image-wrap { width: 100%; max-width: 500px; height: auto; aspect-ratio: 1; }
}
@media (max-width: 640px) {
  .top-inner { gap: 12px; padding: 12px 14px; flex-wrap: wrap; }
  .top-search { order: 4; flex: 1 0 100%; }
  .top-tools { font-size: 13px; gap: 14px; }
  .brand-logo { font-size: 22px; }
  .product-title { font-size: 18px; }
  .price-now .price-int { font-size: 30px; }
  .action-row { flex-direction: column; gap: 10px; }
  .btn-cart, .btn-buy { height: 50px; font-size: 16px; }
  .thumbs { flex-wrap: wrap; justify-content: center; }
  .thumb { width: 56px; height: 56px; }
}
