/* ============================================================
   惠州市粒合科技有限公司 - 官网样式
   纯本地实现，不依赖任何外网资源
   ============================================================ */

:root {
  --gold: #b8860b;
  --gold-light: #d4a94f;
  --gold-deep: #8a6508;
  --dark: #221d18;
  --dark-2: #2e2821;
  --cream: #faf6f0;
  --cream-2: #f3ece1;
  --text: #3a332b;
  --text-light: #7a7064;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(34, 29, 24, 0.10);
  --shadow-lg: 0 18px 45px rgba(34, 29, 24, 0.16);
  --radius: 14px;
  --font: "Microsoft YaHei", "PingFang SC", "Segoe UI", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--cream);
  line-height: 1.7;
}

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

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

.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--white);
  box-shadow: 0 8px 20px rgba(184, 134, 11, 0.35);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(184, 134, 11, 0.45); }

.btn-outline {
  border-color: rgba(255, 255, 255, 0.85);
  color: var(--white);
}

.btn-outline:hover { background: rgba(255, 255, 255, 0.14); transform: translateY(-2px); }

.btn-lg { padding: 15px 38px; font-size: 16px; }

.btn-sm { padding: 8px 18px; font-size: 13px; }

.btn-block { width: 100%; border: none; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(34, 29, 24, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background .3s ease, box-shadow .3s ease;
}

.site-header.scrolled { background: rgba(34, 29, 24, 0.96); box-shadow: 0 6px 20px rgba(0,0,0,0.25); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

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

.brand-mark {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--white);
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(184, 134, 11, 0.4);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }

.brand-text strong { color: var(--white); font-size: 15px; font-weight: 600; }

.brand-text em { color: var(--gold-light); font-size: 11px; font-style: normal; letter-spacing: 2px; }

.main-nav { display: flex; align-items: center; gap: 30px; }

.main-nav .nav-link {
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
  position: relative;
  padding: 6px 0;
  transition: color .2s;
}

.main-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--gold-light);
  transition: width .25s ease;
}

.main-nav .nav-link:hover, .main-nav .nav-link.active { color: var(--gold-light); }
.main-nav .nav-link:hover::after, .main-nav .nav-link.active::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: var(--white);
  overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 78% 30%, rgba(212, 169, 79, 0.28), transparent 55%),
    radial-gradient(ellipse at 15% 85%, rgba(184, 134, 11, 0.18), transparent 50%),
    linear-gradient(150deg, #1c1712 0%, #2e2821 55%, #3a2f1e 100%);
  z-index: -1;
}

.hero-bg::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(rgba(212, 169, 79, 0.22) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.35;
}

.hero-inner { padding: 120px 0 80px; }

.hero-tag {
  display: inline-block;
  color: var(--gold-light);
  letter-spacing: 6px;
  font-size: 13px;
  border: 1px solid rgba(212, 169, 79, 0.5);
  border-radius: 999px;
  padding: 6px 18px;
  margin-bottom: 22px;
}

.hero-title {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.25;
  font-weight: 800;
  margin-bottom: 22px;
  max-width: 720px;
}

.gold {
  background: linear-gradient(120deg, #f0d48c, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  max-width: 640px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  margin-bottom: 36px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 56px; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
}

.stat { display: flex; flex-direction: column; }

.stat strong {
  font-size: 26px;
  color: var(--gold-light);
  font-weight: 800;
}

.stat span { font-size: 13px; color: rgba(255, 255, 255, 0.65); letter-spacing: 1px; }

/* ---------- 通用区块 ---------- */
.section { padding: 90px 0; }

.section:nth-child(even) { background: var(--cream-2); }

.section-head { text-align: center; margin-bottom: 52px; }

.section-eyebrow {
  color: var(--gold);
  letter-spacing: 5px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(26px, 3.4vw, 38px);
  color: var(--dark);
  font-weight: 800;
  margin-bottom: 10px;
}

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

/* ---------- 关于我们 ---------- */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.about-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 34px 28px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--gold-light);
  transition: transform .25s ease, box-shadow .25s ease;
}

.about-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.about-icon { font-size: 34px; margin-bottom: 16px; }

.about-card h3 { font-size: 19px; color: var(--dark); margin-bottom: 12px; }

.about-card p { font-size: 14.5px; color: var(--text-light); }

/* ---------- 产品展示 ---------- */
.products { background: var(--cream-2); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}

.product-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }

.product-cover {
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  background: linear-gradient(150deg, #f7efe2, #eadfc9);
  position: relative;
}

.product-cover::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(184, 134, 11, 0.35);
  border-radius: 8px;
}

.product-body { padding: 22px 20px 24px; display: flex; flex-direction: column; flex: 1; }

.product-name { font-size: 18px; color: var(--dark); font-weight: 700; margin-bottom: 8px; }

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

.product-price {
  font-size: 15px;
  color: var(--gold-deep);
  font-weight: 700;
  margin-bottom: 16px;
}

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

.product-btn {
  width: 100%;
  background: var(--dark);
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: 11px 0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

.product-btn:hover { background: var(--gold); transform: translateY(-2px); }

/* ---------- CTA ---------- */
.cta {
  background:
    radial-gradient(ellipse at 85% 20%, rgba(212, 169, 79, 0.25), transparent 55%),
    linear-gradient(140deg, #2e2821, #221d18);
  color: var(--white);
  text-align: center;
  padding: 80px 0;
}

.cta h2 { font-size: clamp(24px, 3vw, 34px); margin-bottom: 14px; }

.cta p { color: rgba(255, 255, 255, 0.75); margin-bottom: 30px; }

/* ---------- 联系我们 ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: start;
}

.contact-info {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 30px;
  box-shadow: var(--shadow);
}

.info-item { padding: 16px 0; border-bottom: 1px dashed #e5dccb; }

.info-item:last-of-type { border-bottom: none; }

.info-label {
  display: block;
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.info-value { font-size: 16px; color: var(--dark); font-weight: 600; }

.contact-tip { margin-top: 18px; font-size: 13.5px; color: var(--text-light); }

.contact-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 30px;
  box-shadow: var(--shadow);
}

.form-row { margin-bottom: 16px; }

.form-row input, .form-row textarea {
  width: 100%;
  border: 1.5px solid #e5dccb;
  border-radius: 10px;
  padding: 13px 16px;
  font-size: 14.5px;
  font-family: var(--font);
  color: var(--text);
  background: #fdfbf7;
  transition: border-color .2s, box-shadow .2s;
  resize: vertical;
}

.form-row input:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--gold-light);
  box-shadow: 0 0 0 3px rgba(212, 169, 79, 0.18);
  background: var(--white);
}

.form-note { margin-top: 12px; font-size: 13.5px; min-height: 20px; }

.form-note.ok { color: var(--gold-deep); }

.form-note.err { color: #c0392b; }

/* ---------- 页脚 ---------- */
.site-footer {
  background: #191512;
  color: rgba(255, 255, 255, 0.6);
  padding: 30px 0;
  text-align: center;
  font-size: 13.5px;
}

.footer-inner { display: flex; flex-direction: column; gap: 8px; }

.footer-links a { color: rgba(255, 255, 255, 0.8); margin: 0 8px; transition: color .2s; }

.footer-links a:hover { color: var(--gold-light); }

.footer-links span { opacity: 0.4; }

/* ---------- 响应式 ---------- */
@media (max-width: 992px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .main-nav {
    position: absolute;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    background: rgba(34, 29, 24, 0.98);
    padding: 22px 24px 30px;
    gap: 18px;
    align-items: flex-start;
    transform: translateY(-140%);
    opacity: 0;
    transition: transform .3s ease, opacity .3s ease;
    box-shadow: 0 16px 30px rgba(0,0,0,0.3);
  }

  .main-nav.open { transform: translateY(0); opacity: 1; }

  .nav-cta { margin-top: 6px; }

  .hero-stats { gap: 16px 30px; }
}

@media (max-width: 560px) {
  .product-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .section { padding: 66px 0; }
}

/* 入场动画 */
.fade-up {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .6s ease, transform .6s ease;
}

.fade-up.visible { opacity: 1; transform: translateY(0); }

/* 关于我们-核心优势列表 */
.about-list { list-style: none; margin-top: 4px; }
.about-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: 14.5px;
  color: var(--text-light);
  line-height: 1.75;
}
.about-list li:last-child { margin-bottom: 0; }
.about-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
}

/* 产品图片：有图显示图片，无图显示灰色占位图标 */
.product-cover { overflow: hidden; position: relative; }
/* 有真实图片时隐藏装饰虚线框 */
.product-cover:has(.product-img)::after { display: none; }
.product-cover .product-img {
  width: 100%;
  height: auto;
  max-height: 340px;
  object-fit: contain;
  display: block;
  transition: transform .5s ease;
}
.product-card:hover .product-img { transform: scale(1.06); }
.product-cover .product-cover-placeholder {
  width: 100%;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: #b8aa90;
  background: linear-gradient(160deg, #f7f2e8, #efe7d8);
  user-select: none;
}
