/* ===== 基础变量 ===== */
:root {
  --primary: #c0392b;
  --primary-dark: #a33125;
  --text: #2b2b2b;
  --text-light: #767676;
  --border: #e8e2df;
  --bg-gray: #faf7f5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 60px 0;
}

.section-gray {
  background: var(--bg-gray);
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 {
  font-size: 28px;
  margin-bottom: 8px;
}

.section-title p {
  color: var(--text-light);
  font-size: 15px;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
  padding: 11px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

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

.btn-outline {
  background: transparent;
  color: var(--primary);
}

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

/* ===== 顶部导航 ===== */
.header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 100;
}

.header-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  white-space: nowrap;
}

.logo span {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-light);
}

.nav {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.nav a {
  font-size: 15px;
  color: var(--text);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.header-contact {
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
}

.header-contact a {
  font-size: 14px;
  color: var(--text-light);
}

.cart-btn {
  position: relative;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  border-radius: 999px;
  padding: 0 5px;
  min-width: 16px;
  text-align: center;
}

/* ===== 首屏 Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--bg-gray), #fff);
  padding: 70px 0;
}

.hero-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero-inner h1 {
  font-size: 34px;
  margin-bottom: 16px;
}

.hero-inner p {
  color: var(--text-light);
  font-size: 16px;
  max-width: 600px;
  margin-bottom: 28px;
}

.hero-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ===== 特性图标区 ===== */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-item {
  text-align: center;
  padding: 28px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.feature-icon,
.icon {
  font-size: 30px;
  margin-bottom: 12px;
}

.feature-item h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.feature-item p {
  font-size: 14px;
  color: var(--text-light);
  margin: 0;
}

/* ===== 产品网格 / 卡片 ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.product-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}

.product-img {
  width: 100%;
  overflow: hidden;
  background: var(--bg-gray);
}

.product-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-body h3 {
  font-size: 16px;
  margin: 0 0 6px;
}

.product-body .desc {
  font-size: 13px;
  color: var(--text-light);
  margin: 0 0 14px;
  flex: 1;
}

.product-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.price {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

.price small {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-light);
}

/* ===== 产品详情页 ===== */
.detail-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  max-width: 1000px;
  margin: 0 auto;
}

.detail-gallery img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

.detail-info h1 {
  font-size: 26px;
  margin-bottom: 12px;
}

.detail-price {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  margin: 18px 0 8px;
}

.detail-meta {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 24px;
}

.detail-meta span {
  display: inline-block;
  background: #fdf2f4;
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 4px;
  margin-right: 8px;
  font-weight: 500;
}

.detail-desc {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-light);
  margin-bottom: 28px;
}

.detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.detail-section {
  margin-top: 50px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.detail-section h2 {
  font-size: 22px;
  margin-bottom: 20px;
  text-align: center;
}

.detail-section img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

/* ===== 关于我们 ===== */
.about-content {
  max-width: 860px;
  margin: 0 auto;
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.9;
}

.about-content h2 {
  color: var(--text);
  font-size: 22px;
  margin: 32px 0 12px;
}

/* ===== 联系我们 ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  max-width: 1000px;
  margin: 0 auto;
  align-items: start;
}

.contact-info h2 {
  font-size: 22px;
  margin-bottom: 20px;
}

.contact-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 15px;
}

.contact-item .icon {
  font-size: 18px;
  margin: 0;
}

.qr-box {
  margin-top: 24px;
  padding: 20px;
  background: var(--bg-gray);
  border-radius: 10px;
  text-align: center;
}

.qr-box img {
  margin: 0 auto 10px;
  max-width: 160px;
}

/* ===== 表单 ===== */
#inquiry-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

#inquiry-form input,
#inquiry-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

#inquiry-form input:focus,
#inquiry-form textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-actions {
  display: flex;
  gap: 12px;
}

.form-success {
  color: #2a8f4a;
  font-size: 14px;
  display: none;
}

/* ===== 页脚 ===== */
.footer {
  background: #232323;
  color: #cfcfcf;
  margin-top: 40px;
}

.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 50px 24px 30px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.footer h4 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 14px;
}

.footer p,
.footer a {
  font-size: 14px;
  color: #b5b5b5;
  line-height: 2;
}

.footer a:hover {
  color: #fff;
}

.footer-bottom {
  text-align: center;
  font-size: 13px;
  color: #8a8a8a;
  padding: 18px 24px;
  border-top: 1px solid #3a3a3a;
}

/* ===== 响应式 ===== */
@media (max-width: 960px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 800px) {
  .detail-hero,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .header-inner {
    flex-wrap: wrap;
  }
  .nav {
    order: 3;
    width: 100%;
    gap: 16px;
    overflow-x: auto;
  }
  .product-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .features {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .hero-inner h1 {
    font-size: 26px;
  }
}
