/* ========================================
   蜜恋物语 - 全局样式（严格按规格1:1复刻）
   ======================================== */

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

:root {
  --main-color: #D87093;
  --sub-color: #9370DB;
  --accent-color: #FFB6C1;
  --bg-color: #FFF5F8;
  --text-color: #4A3A42;
  --card-bg: #FFFFFF;
  --radius: 16px;
  --shadow: 0 4px 20px rgba(216, 112, 147, 0.15);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  font-size: 32px;
  margin-bottom: 60px;
  color: var(--main-color);
}

/* ========== 通用按钮 ========== */
.btn {
  display: inline-block;
  padding: 14px 40px;
  background: var(--sub-color);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 16px;
  transition: transform .3s, box-shadow .3s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* ========== 【1】导航栏 ========== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  box-shadow: var(--shadow);
  z-index: 1000;
  padding: 16px 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--main-color);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-menu a {
  color: var(--text-color);
  font-weight: 500;
  transition: color .3s;
  text-decoration: none;
}

.nav-menu a:hover {
  color: var(--sub-color);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text-color);
  display: block;
}

/* ========== 【2】Hero 区 ========== */
.hero {
  margin-top: 72px;
  padding: 100px 0;
  background: linear-gradient(135deg, rgba(216,112,147,0.75), rgba(147,112,219,0.75)), url('../images/hero-bg.jpg') center/cover no-repeat;
  color: #fff;
  text-align: center;
  position: relative;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 20px;
}

.hero p {
  font-size: 20px;
  margin-bottom: 40px;
  opacity: .9;
}

/* ========== 【3】服务保障条 ========== */
.service-bar {
  background: var(--card-bg);
  padding: 40px 0;
}

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

.service-item {
  text-align: center;
}

.service-item i {
  font-size: 36px;
  color: var(--sub-color);
  margin-bottom: 16px;
  display: block;
}

.service-item h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.service-item p {
  font-size: 14px;
  opacity: .8;
}

/* ========== 【4】品牌介绍 ========== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-img {
  width: 100%;
  height: 400px;
  border-radius: var(--radius);
  overflow: hidden;
}
.about-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-text h2 {
  font-size: 32px;
  margin-bottom: 20px;
  color: var(--main-color);
}

.about-text p {
  margin-bottom: 16px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 36px;
  font-weight: 700;
  color: var(--sub-color);
  display: block;
}

/* ========== 【5】核心优势 ========== */
.advantages {
  background: var(--card-bg);
}

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

.advantage-card {
  background: var(--card-bg);
  padding: 40px 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform .3s;
}

.advantage-card:hover {
  transform: translateY(-8px);
}

.advantage-card i {
  font-size: 48px;
  color: var(--sub-color);
  margin-bottom: 20px;
  display: block;
}

.advantage-card h3 {
  margin-bottom: 12px;
  font-size: 20px;
}

.advantage-card p {
  font-size: 14px;
  opacity: .8;
}

/* ========== 【6】产品展示 ========== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.product-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .3s;
}

.product-card:hover {
  transform: translateY(-8px);
}

.product-img {
  width: 100%;
  height: 250px;
  overflow: hidden;
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.product-card:hover .product-img img {
  transform: scale(1.05);
}

.product-info {
  padding: 24px;
}

.product-info h3 {
  margin-bottom: 12px;
  color: var(--main-color);
  font-size: 20px;
}

.product-info p {
  font-size: 14px;
  opacity: .8;
}

/* ========== 【7】科普中心 ========== */
.articles {
  background: var(--card-bg);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.article-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .3s;
}

.article-card:hover {
  transform: translateY(-8px);
}

.article-img {
  width: 100%;
  height: 200px;
  overflow: hidden;
}
.article-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.article-card:hover .article-img img {
  transform: scale(1.05);
}

.article-info {
  padding: 24px;
}

.article-info .date {
  color: var(--accent-color);
  font-size: 14px;
  margin-bottom: 12px;
  display: block;
}

.article-info h3 {
  margin-bottom: 12px;
  color: var(--main-color);
  font-size: 18px;
}

.article-info p {
  font-size: 14px;
  opacity: .8;
  margin-bottom: 16px;
}

.article-info a {
  color: var(--sub-color);
  text-decoration: none;
  font-weight: 500;
}

.article-info a i {
  margin-left: 6px;
}

/* ========== 【8】常见问题 ========== */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--card-bg);
  border-radius: var(--radius);
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-question {
  padding: 20px 24px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question i {
  transition: transform .3s;
  color: var(--sub-color);
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 24px 20px;
  color: var(--text-color);
  opacity: .8;
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

/* ========== 【9】CTA 区 ========== */
.cta {
  background: linear-gradient(135deg, rgba(216,112,147,0.75), rgba(147,112,219,0.75)), url('../images/cta-bg.jpg') center/cover no-repeat;
  color: #fff;
  text-align: center;
  padding: 60px 0;
}

.cta h2 {
  font-size: 32px;
  margin-bottom: 20px;
}

.cta p {
  margin-bottom: 30px;
  opacity: .9;
}

.cta .btn {
  background: #fff;
  color: var(--main-color);
}

.cta .btn:hover {
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.4);
}

/* ========== 【10】页脚 ========== */
.footer {
  background: var(--card-bg);
  padding: 60px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  margin-bottom: 20px;
  color: var(--main-color);
  font-size: 18px;
}

.footer-col p {
  font-size: 14px;
  opacity: .8;
  line-height: 1.8;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul li a {
  color: var(--text-color);
  text-decoration: none;
  opacity: .8;
  transition: opacity .3s, color .3s;
  font-size: 14px;
}

.footer-col ul li a:hover {
  opacity: 1;
  color: var(--sub-color);
}

.friend-links {
  border-top: 1px solid rgba(0, 0, 0, .1);
  padding-top: 20px;
  margin-bottom: 20px;
  font-size: 14px;
}

.friend-links a {
  color: var(--text-color);
  text-decoration: none;
  margin-right: 20px;
  opacity: .7;
  transition: opacity .3s, color .3s;
}

.friend-links a:hover {
  opacity: 1;
  color: var(--sub-color);
}

.copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, .1);
  font-size: 14px;
  opacity: .7;
}

/* ========== 文章详情页 ========== */
.breadcrumb {
  margin-top: 72px;
  padding: 20px 0;
  background: var(--card-bg);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--sub-color);
  text-decoration: none;
}

.breadcrumb span {
  margin: 0 8px;
  opacity: .6;
}

.article-detail {
  padding: 60px 0;
  max-width: 800px;
  margin: 0 auto;
}

.article-detail h1 {
  font-size: 36px;
  color: var(--main-color);
  margin-bottom: 20px;
  line-height: 1.4;
}

.article-meta {
  color: var(--accent-color);
  margin-bottom: 40px;
  font-size: 14px;
}

.article-content p {
  margin-bottom: 24px;
  line-height: 1.9;
  font-size: 16px;
}

.article-content h2 {
  font-size: 24px;
  color: var(--main-color);
  margin: 40px 0 20px;
}

.article-content img {
  width: 100%;
  border-radius: var(--radius);
  margin: 20px 0;
  background: linear-gradient(135deg, var(--accent-color), var(--sub-color));
  height: 300px;
}

.article-content ul {
  margin: 20px 0;
  padding-left: 24px;
}

.article-content ul li {
  margin-bottom: 10px;
  line-height: 1.8;
}

.article-tags {
  margin-top: 40px;
}

.article-tags span {
  display: inline-block;
  padding: 6px 16px;
  background: var(--accent-color);
  color: var(--main-color);
  border-radius: var(--radius);
  margin-right: 10px;
  font-size: 14px;
}

.related-articles {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid rgba(0, 0, 0, .1);
}

.related-articles h3 {
  color: var(--main-color);
  margin-bottom: 20px;
  font-size: 20px;
}

.related-list {
  list-style: none;
}

.related-list li {
  margin-bottom: 12px;
}

.related-list li a {
  color: var(--text-color);
  text-decoration: none;
  transition: color .3s;
  font-size: 15px;
}

.related-list li a:hover {
  color: var(--sub-color);
}

.back-home {
  text-align: center;
  margin-top: 40px;
}

.back-home .btn {
  color: #fff;
}

/* ========== 响应式断点（唯一断点 max-width:768px） ========== */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    box-shadow: var(--shadow);
  }

  .nav-menu.active {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero p {
    font-size: 16px;
  }

  .service-grid,
  .advantage-grid,
  .product-grid,
  .article-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .about-img {
    height: 250px;
  }

  .stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  .section {
    padding: 50px 0;
  }

  .section-title {
    font-size: 24px;
    margin-bottom: 40px;
  }

  .article-detail h1 {
    font-size: 28px;
  }
}
