/* ==========================================================================
   Applications Page Styles
   ========================================================================== */

/* CSS Variables
   ========================================================================== */
:root {
  --green: var(--color-primary, #1a5c3a);
  --green-dark: var(--color-primary-dark, #134530);
  --line: var(--color-border, #e0e0e0);
  --shadow: var(--shadow-md, 0 4px 20px rgba(0, 0, 0, 0.11));
}

/* Topbar
   ========================================================================== */
.topbar {
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 5vw, 76px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #edf2f0;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--green);
  border: 2px solid var(--green);
  border-radius: 10px 4px 10px 4px;
  font-weight: 800;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-copy strong {
  font-size: 23px;
  font-weight: 800;
}

.brand-copy small {
  margin-top: 6px;
  font-size: 9px;
  color: #5a6762;
  letter-spacing: 0.08em;
}

/* Navigation
   ========================================================================== */
.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.7vw, 43px);
}

.main-nav a {
  font-size: 14px;
  font-weight: 600;
  color: #23302c;
  padding: 34px 0 29px;
  border-bottom: 3px solid transparent;
  transition: 0.18s;
}

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

.menu-btn {
  display: none;
  border: 0;
  background: transparent;
  color: var(--green);
  font-size: 24px;
}

/* Hero Section
   ========================================================================== */
.hero-section {
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(420px, 52%) 1fr;
  align-items: stretch;
  background: linear-gradient(90deg, #f8fbfa 0%, #f8fbfa 47%, #eef6f5 100%);
}

.hero-content {
  padding: 28px 24px 54px clamp(56px, 8vw, 112px);
  animation: riseIn 0.55s ease both;
}

.breadcrumb {
  margin: 0 0 42px;
  color: #8a9692;
  font-size: 13px;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(34px, 3vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.04em;
  font-weight: 850;
  color: #101917;
}

.hero-content h2 {
  margin: 13px 0 25px;
  color: var(--green);
  font-size: clamp(18px, 1.65vw, 24px);
  font-weight: 800;
}

.hero-text {
  width: min(650px, 96%);
  margin: 0;
  color: #334641;
  font-size: 15px;
  line-height: 2;
}

.benefit-grid {
  margin-top: 45px;
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 20px;
  max-width: 620px;
}

.benefit,
.advantage {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--green);
}

.benefit span,
.advantage span {
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--green);
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 12px;
}

.benefit strong,
.advantage strong {
  margin-top: 13px;
  color: #273833;
  font-size: 13px;
  font-weight: 700;
}

.benefit em,
.advantage em {
  margin-top: 6px;
  color: #63716c;
  font-size: 12px;
  line-height: 1.45;
  font-style: normal;
}

.image-wrap {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #edf7f5, #fff 58%, #e6f1ee);
}

.hero-visual {
  min-height: 430px;
}

/* ==========================================================================
   修改5：正文区域（section-narrow）向屏幕两侧扩展，减少左右留白
   ========================================================================== */
.section-narrow {
  width: min(1400px, calc(100% - 60px));
  margin-inline: auto;
}

/* Category Strip
   ========================================================================== */
.category-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-top: -24px;
  position: relative;
  z-index: 5;
}

.category {
  height: 88px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #222e2a;
  font-weight: 900;
  font-size: 16px;
  font-family: "Microsoft YaHei", "PingFang SC", "SimHei", sans-serif;
  box-shadow: 0 8px 22px rgba(23, 60, 49, 0.05);
  transition: 0.2s;
  cursor: pointer;
}

/* 修改1：分类图标样式 — 放大图标 */
.cat-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #667870;
  transition: color 0.2s;
}

.cat-icon svg {
  width: 54px;
  height: 54px;
}

.category.selected .cat-icon,
.category:hover .cat-icon {
  color: var(--green);
}

.category.selected,
.category:hover {
  background: #f0f8f5;
  border-color: #cfe5dd;
  transform: translateY(-3px);
}

/* Sections
   ========================================================================== */
.section {
  padding: 58px 0 0;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 13px;
}

.section-head h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 820;
  letter-spacing: -0.02em;
}

.section-head span {
  width: 18px;
  height: 2px;
  background: var(--green);
  display: inline-block;
}

/* 修改2：肌肤问题标题居中样式 */
.section-head-center {
  justify-content: center;
  margin-bottom: 28px;
}

.section-head-center h3 {
  white-space: nowrap;
}

.head-line {
  flex: 1;
  height: 1px !important;
  width: auto !important;
  background: #d0ddd9 !important;
  display: block !important;
  max-width: 80px;
}

.section-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 25px;
}

/* Buttons
   ========================================================================== */
.ghost-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 16px;
  border: 1px solid #c9ded7;
  border-radius: 4px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  background: #fff;
  transition: 0.2s;
}

.ghost-link:hover,
.primary-btn:hover {
  transform: translateX(3px);
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--green);
  color: #fff;
  border-radius: 4px;
  padding: 13px 27px;
  font-size: 14px;
  font-weight: 800;
  transition: 0.2s;
}

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

/* Problem Cards
   ========================================================================== */
.problem-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.problem-card,
.ingredient-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(18, 52, 43, 0.04);
  transition: 0.22s;
}

.problem-card:hover,
.ingredient-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: #cce3db;
}

.problem-card img {
  height: 134px;
  width: 100%;
  object-fit: cover;
  background: #edf4f2;
  display: block;
}

.problem-card div {
  padding: 18px 17px 20px;
}

.problem-card h4,
.ingredient-card h4 {
  margin: 0 0 10px;
  font-size: 15px;
  color: #17241f;
  font-weight: 800;
}

.problem-card p,
.ingredient-card p {
  margin: 0;
  color: #697671;
  font-size: 12px;
  line-height: 1.7;
}

/* Ingredient Grid
   ========================================================================== */
.ingredient-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

.ingredient-card img {
  height: 132px;
  width: 100%;
  object-fit: cover;
  background: #edf4f2;
  display: block;
}

.ingredient-card div {
  padding: 18px 16px 22px;
}

/* Formula Section
   ========================================================================== */
.formula-section {
  padding-top: 60px;
}

/* Formula Panel
   ========================================================================== */
.formula-panel {
  display: grid;
  grid-template-columns: 1.15fr 0.8fr 1.15fr;
  gap: 38px;
  align-items: start;
}

.formula-left img {
  height: 260px;
  width: 100%;
  object-fit: cover;
  border-radius: 4px;
  background: #eef6f3;
  display: block;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #fff;
  box-shadow: 0 10px 26px rgba(12, 52, 42, 0.07);
}

.spec-grid div {
  min-height: 74px;
  padding: 16px 20px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.spec-grid div:last-child {
  border-right: 0;
}

.spec-grid small {
  color: #66746f;
  font-weight: 700;
}

.spec-grid strong {
  color: #273833;
  font-size: 13px;
}

.formula-mid {
  padding-top: 52px;
}

.formula-mid h4,
.formula-table h4 {
  margin: 0 0 20px;
  font-size: 17px;
  font-weight: 800;
}

.formula-mid p {
  margin: 0 0 16px;
  color: #465751;
  font-size: 14px;
}

.formula-table h4 small {
  color: #87928e;
  font-weight: 500;
}

/* Table
   ========================================================================== */
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  box-shadow: 0 10px 26px rgba(12, 52, 42, 0.05);
}

th,
td {
  padding: 15px 14px;
  border: 1px solid #e8efec;
  text-align: left;
  font-size: 12px;
  color: #52615c;
}

th {
  background: #f8faf9;
  color: #77837f;
  font-weight: 700;
}

td:last-child,
th:last-child {
  text-align: center;
}

/* Why Section
   ========================================================================== */
.why-section {
  margin-top: 70px;
  min-height: 195px;
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  align-items: center;
  border-radius: 4px;
  border: 1px solid #e8efec;
}

/* 修改4：why-section 背景图样式 */
.why-bg-section {
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  grid-template-columns: 1fr;
  position: relative;
  overflow: hidden;
}

.why-bg-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.96) 0%, rgba(255,255,255,0.85) 55%, rgba(255,255,255,0.15) 100%);
  pointer-events: none;
}

.why-content {
  padding: 35px 42px;
  position: relative;
  z-index: 1;
}

.why-content h3 {
  margin: 0 0 34px;
  font-size: 21px;
  font-weight: 820;
}

.advantage-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

/* CTA Section
   ========================================================================== */
.cta {
  margin-top: 28px;
  margin-bottom: 36px;
  min-height: 188px;
  border-radius: 4px;
  border: 1px solid #e8efec;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.cta > div {
  padding-left: 84px;
  position: relative;
  z-index: 1;
}

.cta h3 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 850;
}

.cta p {
  margin: 0 0 28px;
  color: #596863;
  font-size: 14px;
}

/* 修改4：cta 背景图样式 */
.cta-bg-section {
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  grid-template-columns: 1fr;
  position: relative;
  overflow: hidden;
}

.cta-bg-section::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Footer
   ========================================================================== */
.site-footer {
  background: linear-gradient(135deg, #006845, #004c39 58%, #003d30);
  color: #dcebe6;
  padding: 48px clamp(24px, 5vw, 76px) 24px;
}

.inverse .brand-mark {
  border-color: #dcebe6;
  color: #dcebe6;
}

.inverse .brand-copy small {
  color: #b9d4cc;
}

.footer-brand p {
  margin: 23px 0;
  color: #bdd5cd;
  font-size: 13px;
  line-height: 1.9;
}

.socials {
  display: flex;
  gap: 13px;
}

.socials span {
  width: 22px;
  height: 22px;
  border: 1px solid #b7d5cb;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
}

.footer-links h5,
.contact-card h5 {
  margin: 0 0 17px;
  color: #fff;
  font-size: 15px;
}

.contact-card p {
  margin: 0 0 12px;
  font-size: 12px;
  color: #c1d8d0;
  line-height: 1.55;
}

.qr {
  width: 88px;
  height: 88px;
  margin: 18px 0 8px;
  display: grid;
  place-items: center;
  color: var(--green);
  background: repeating-linear-gradient(
    45deg,
    #fff 0 5px,
    #dfeee9 5px 10px
  );
  font-size: 12px;
  font-weight: 800;
}

.contact-card small {
  color: #c1d8d0;
}

.copyright {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  max-width: 1260px;
  margin: 48px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  color: #c2d9d1;
  font-size: 12px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* Large Tablets & Small Laptops */
@media (max-width: 1120px) {
  .main-nav {
    gap: 18px;
  }

  .hero-section {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 300px;
  }

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

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

  .formula-panel {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .formula-mid {
    padding-top: 0;
  }
}

/* Tablets */
@media (max-width: 820px) {
  .topbar {
    height: 72px;
    padding-inline: 20px;
  }

  .menu-btn {
    display: block;
  }

  .main-nav {
    position: fixed;
    inset: 72px 0 auto 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 24px 22px;
    box-shadow: var(--shadow);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 14px 0;
  }

  .hero-content {
    padding: 28px 24px 44px;
  }

  .benefit-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-strip,
  .ingredient-grid,
  .problem-row,
  .advantage-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .why-section,
  .cta {
    grid-template-columns: 1fr;
  }

  .cta > div {
    padding: 36px 28px;
  }

  .section-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .copyright {
    flex-direction: column;
  }

  .section-narrow {
    width: min(100% - 40px, 1400px);
  }
}

/* Mobile Phones */
@media (max-width: 520px) {
  .brand {
    min-width: auto;
  }

  .brand-copy strong {
    font-size: 19px;
  }

  .brand-copy small {
    font-size: 8px;
  }

  .section-narrow {
    width: min(100% - 24px, 1400px);
  }

  .category-strip,
  .ingredient-grid,
  .problem-row,
  .advantage-row,
  .spec-grid {
    grid-template-columns: 1fr;
  }

  .category {
    height: 68px;
  }

  .head-line {
    max-width: 30px;
  }
}
