/* 田香沁心商城 - 精美版样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif; background: #f8f8f8; color: #333; -webkit-font-smoothing: antialiased; }
a { color: #333; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== 头部 ===== */
.header {
  background: linear-gradient(135deg, #FF6B35, #F7C948);
  padding: 0;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 10px rgba(255,107,53,0.3);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center;
  padding: 10px 16px; gap: 10px;
}
.logo {
  color: #fff; font-size: 20px; font-weight: 800;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.logo span { color: #FFE066; }
.back-btn { color: #fff; font-size: 18px; white-space: nowrap; }
.search-bar { flex: 1; display: flex; max-width: 500px; }
.search-bar input {
  flex: 1; padding: 10px 16px;
  border: none; border-radius: 25px 0 0 25px;
  outline: none; font-size: 14px; background: rgba(255,255,255,0.95);
}
.search-bar button {
  padding: 10px 18px; border: none;
  background: rgba(255,255,255,0.95);
  border-radius: 0 25px 25px 0; cursor: pointer;
  font-size: 16px; color: #FF6B35;
}

/* ===== 轮播Banner ===== */
.banner {
  max-width: 1200px; margin: 0 auto; padding: 0;
  background: #fff;
}
.banner img {
  width: 100%; aspect-ratio: 2/1;
  object-fit: cover;
}

/* ===== 分类图标导航 ===== */
.category-icons {
  max-width: 1200px; margin: 0 auto;
  background: #fff; padding: 16px;
  display: flex; gap: 8px; overflow-x: auto;
  border-radius: 0 0 16px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.cat-icon {
  flex-shrink: 0; text-align: center;
  padding: 8px 16px;
  background: linear-gradient(135deg, #FFF5F0, #FFF8E7);
  border-radius: 20px;
  font-size: 13px; color: #FF6B35; font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s;
}
.cat-icon:hover { background: #FF6B35; color: #fff; }
.cat-icon.active { background: #FF6B35; color: #fff; }

/* ===== 主内容 ===== */
.main { max-width: 1200px; margin: 0 auto; padding: 12px; }

/* ===== 板块标题 ===== */
.section-title {
  display: flex; align-items: center;
  font-size: 18px; font-weight: 700; color: #333;
  margin: 16px 0 12px;
}
.section-title::before {
  content: ''; display: inline-block;
  width: 4px; height: 20px;
  background: linear-gradient(180deg, #FF6B35, #F7C948);
  border-radius: 2px; margin-right: 10px;
}
.more-link { margin-left: auto; font-size: 13px; color: #999; font-weight: normal; }

/* ===== 商品网格 ===== */
.goods-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 768px) { .goods-grid { grid-template-columns: repeat(4, 1fr); } }

.goods-card {
  background: #fff; border-radius: 12px; overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.goods-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.goods-img {
  width: 100%; aspect-ratio: 1; overflow: hidden;
  background: #f9f9f9; position: relative;
}
.goods-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.3s;
}
.goods-card:hover .goods-img img { transform: scale(1.05); }
.goods-badge {
  position: absolute; top: 8px; left: 8px;
  background: #FF6B35; color: #fff;
  padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 600;
}
.goods-info { padding: 12px; }
.goods-info h3 {
  font-size: 13px; line-height: 1.4; font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 8px; color: #333;
}
.goods-price { display: flex; align-items: center; gap: 6px; }
.price { color: #FF3B30; font-size: 16px; font-weight: 700; }
.price::before { content: '¥'; font-size: 12px; }
.original-price { color: #bbb; font-size: 12px; text-decoration: line-through; }
.sales { color: #bbb; font-size: 11px; margin-left: auto; }
.tag {
  display: inline-block; padding: 1px 6px;
  border-radius: 4px; font-size: 10px;
  background: #FFF0E8; color: #FF6B35; margin-right: 4px;
}

/* ===== 商品详情页 ===== */
.detail-slider {
  background: #fff; position: relative;
  max-width: 1200px; margin: 0 auto;
  border-radius: 0 0 20px 20px; overflow: hidden;
}
.detail-slider img { width: 100%; aspect-ratio: 1; object-fit: contain; }

.detail-info {
  background: #fff; padding: 20px; margin-top: -10px;
  border-radius: 20px 20px 0 0; position: relative; z-index: 2;
  max-width: 1200px; margin-left: auto; margin-right: auto;
}
.detail-info h1 { font-size: 18px; line-height: 1.4; font-weight: 700; }
.subtitle { color: #999; font-size: 13px; margin-top: 6px; }
.detail-price {
  display: flex; align-items: center; gap: 10px;
  margin: 12px 0; padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}
.detail-price .price { font-size: 28px; }
.detail-price .original-price { font-size: 14px; }
.detail-meta {
  display: flex; gap: 24px; font-size: 13px; color: #999; margin-bottom: 4px;
}

/* ===== 购买表单 ===== */
.buy-form {
  background: #fff; padding: 20px; margin-top: 12px;
  border-radius: 12px; max-width: 1200px; margin-left: auto; margin-right: auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.buy-form h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }

.form-group { margin-bottom: 14px; }
.form-group label {
  display: block; font-size: 13px; color: #666; margin-bottom: 6px; font-weight: 500;
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 14px;
  border: 1px solid #eee; border-radius: 10px;
  font-size: 14px; outline: none;
  background: #fafafa; transition: all 0.2s;
}
.form-group input:focus, .form-group textarea:focus {
  border-color: #FF6B35; background: #fff;
  box-shadow: 0 0 0 3px rgba(255,107,53,0.1);
}

.submit-btn {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, #FF6B35, #F7C948);
  color: #fff; border: none; border-radius: 12px;
  font-size: 17px; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 12px rgba(255,107,53,0.3);
  transition: all 0.2s;
}
.submit-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(255,107,53,0.4); }
.submit-btn:disabled { opacity: 0.6; transform: none; }

/* ===== 商品详情区域 ===== */
.detail-desc {
  background: #fff; padding: 20px; margin-top: 12px;
  border-radius: 12px; max-width: 1200px; margin-left: auto; margin-right: auto;
}
.detail-desc h3 {
  font-size: 16px; font-weight: 700; margin-bottom: 12px;
  padding-bottom: 12px; border-bottom: 1px solid #f0f0f0;
}
.desc-content { font-size: 14px; line-height: 1.8; color: #555; }
.desc-content img { max-width: 100%; margin: 8px auto; border-radius: 8px; }
.detail-imgs { margin-top: 12px; }
.detail-imgs img { width: 100%; margin: 8px 0; border-radius: 8px; }

/* ===== 底部 ===== */
.footer {
  text-align: center; padding: 24px 16px;
  color: #999; font-size: 12px; margin-top: 20px;
}
.footer a { color: #FF6B35; }

/* ===== 空状态 ===== */
.empty {
  text-align: center; padding: 60px 20px;
  color: #bbb; font-size: 15px;
}

/* ===== 页面标题 ===== */
.page-title {
  font-size: 16px; padding: 14px 0; color: #666;
  font-weight: 600;
}
