/* ===== CSS VARIABLES ===== */
:root {
  --cream: #f7f4ef;
  --ivory: #fdfbf8;
  --sage: #8fa888;
  --sage-light: #c5d4be;
  --sage-deep: #5a7a56;
  --charcoal: #1e1e1c;
  --mid: #5a5851;
  --light-text: #9a9690;
  --white: #ffffff;
  --border: #e4ded5;
  --badge-red: #c94040;
  --badge-green: #2e6b3e;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Jost', sans-serif;

  --nav-h: 72px;
  --transition: 0.3s ease;
  --radius: 4px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--ivory);
  color: var(--charcoal);
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: var(--font-body); }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(253, 251, 248, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.navbar.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.08); }
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--charcoal);
}
.nav-links {
  display: flex;
  gap: 40px;
  align-items: center;
}
.nav-links a {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
  position: relative;
  padding-bottom: 3px;
  transition: color var(--transition);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--sage-deep);
  transition: width var(--transition);
}
.nav-links a:hover { color: var(--charcoal); }
.nav-links a:hover::after { width: 100%; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--charcoal);
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 16px 32px 24px;
  gap: 18px;
  border-top: 1px solid var(--border);
  background: var(--ivory);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
}

/* ===== HERO / CAROUSEL ===== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  margin-top: var(--nav-h);
  overflow: hidden;
}
.carousel { position: relative; width: 100%; height: 100%; }

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity 0.8s ease;
  background-size: cover;
  background-position: center;
}
.slide.active { opacity: 1; z-index: 1; }

/* Slide backgrounds — real images */
/* ⚠️ 请将下方文件名替换为你实际的轮播图文件名 */
.slide-1 {
  background-image: url('img/banner1.jpg');   /* 第1张轮播图 */
  background-size: cover;
  background-position: center;
}
.slide-2 {
  background-image: url('img/banner2.jpg');   /* 第2张轮播图 */
  background-size: cover;
  background-position: center;
}

/* 轮播图遮罩层：让左侧文案更易阅读 */
.slide-1::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.10) 50%,
    transparent 100%);
}
.slide-2::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.10) 50%,
    transparent 100%);
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right,
    rgba(30, 30, 28, 0.08) 0%, transparent 60%);
}
.slide-content {
  position: relative;
  z-index: 2;
  padding: 0 80px;
  max-width: 560px;
}
.slide-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);   /* 白色，适配真实图片背景 */
  margin-bottom: 16px;
  font-weight: 400;
}
.slide-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 4.8rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--white);                /* 白色，适配真实图片背景 */
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}
.slide-sub {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.80);   /* 白色半透明，适配真实图片背景 */
  line-height: 1.7;
  margin-bottom: 36px;
  font-weight: 300;
  letter-spacing: 0.03em;
}
.btn-hero {
  display: inline-block;
  padding: 14px 38px;
  background: var(--white);           /* 白底黑字，在图片上更显眼 */
  color: var(--charcoal);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 400;
  border: 1px solid var(--white);
  transition: background var(--transition), color var(--transition);
}
.btn-hero:hover {
  background: transparent;
  color: var(--white);
}

/* Carousel controls */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px; height: 48px;
  border: 1px solid rgba(30,30,28,0.2);
  background: rgba(253,251,248,0.75);
  backdrop-filter: blur(8px);
  font-size: 1rem;
  color: var(--charcoal);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), border-color var(--transition);
}
.carousel-btn:hover { background: var(--ivory); border-color: var(--charcoal); }
.carousel-btn.prev { left: 24px; }
.carousel-btn.next { right: 24px; }

.carousel-dots {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 10px;
}
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(30,30,28,0.25);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.dot.active {
  background: var(--charcoal);
  transform: scale(1.4);
}

/* ===== SECTIONS SHARED ===== */
.section { padding: 100px 40px; }

.section-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: 12px;
  font-weight: 400;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 400;
  color: var(--charcoal);
  letter-spacing: 0.04em;
  line-height: 1.15;
  margin-bottom: 0;
}

/* ===== PRODUCTS ===== */
.products-section {
  background: var(--ivory);
  max-width: 1400px;
  margin: 0 auto;
}
.section-header-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 56px;
  position: relative;
}
.section-header-block .section-title { margin-top: 0; }
.view-all-link {
  position: absolute;
  right: 0;
  bottom: 0;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage-deep);
  border-bottom: 1px solid var(--sage-deep);
  padding-bottom: 2px;
  transition: opacity var(--transition);
}
.view-all-link:hover { opacity: 0.7; }

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}
.product-card.featured {
  border-color: var(--sage-light);
}

.badges {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.badge.new { background: var(--charcoal); color: var(--white); }
.badge.sale { background: var(--badge-red); color: var(--white); }
.badge.best { background: var(--badge-green); color: var(--white); }
.badge.save { background: #8b6914; color: var(--white); }

.product-img-wrap {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
}
/* 产品图片 */
.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;           /* 图片填满正方形区域，不变形 */
  display: block;
  transition: transform 0.5s ease;
}
.product-card:hover .product-img { transform: scale(1.04); }

.product-info {
  padding: 20px 20px 24px;
  text-align: center;
}
.product-info h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--charcoal);
}
.stars {
  font-size: 0.72rem;
  color: #b8890a;
  margin-bottom: 10px;
}
.stars span { color: var(--light-text); margin-left: 4px; }
.price { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 16px; }
.price .now { font-size: 1rem; font-weight: 400; color: var(--charcoal); }
.price .old { font-size: 0.85rem; color: var(--light-text); text-decoration: line-through; }
.btn-add {
  width: 100%;
  padding: 10px 0;
  border: 1px solid var(--charcoal);
  background: transparent;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--charcoal);
  transition: background var(--transition), color var(--transition);
}
.btn-add:hover { background: var(--charcoal); color: var(--white); }

/* ===== INGREDIENT PHILOSOPHY ===== */
.ingredient-section {
  background: var(--cream);
  padding: 100px 40px;
}
.ingredient-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.ingredient-frame {
  position: relative;
  aspect-ratio: 4/5;
  max-width: 480px;
  background: var(--white);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ingredient-frame::before {
  content: '';
  position: absolute;
  inset: 20px;
  border: 1px solid var(--sage-light);
  opacity: 0.6;
}

/* 成分区图片 */
.ingredient-img {
  width: 100%;
  height: 100%;
  object-fit: cover;           /* 图片填满框架，不变形 */
  display: block;
}

.frame-label {
  position: absolute;
  bottom: 28px;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--light-text);
  /* 若图片较暗，可加白色以增加可读性：color: rgba(255,255,255,0.75); */
}

.ingredient-heading {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 300;
  line-height: 1.25;
  color: var(--charcoal);
  margin-bottom: 28px;
}
.ingredient-heading em {
  font-style: italic;
  color: var(--sage-deep);
}
.ingredient-body {
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--mid);
  font-weight: 300;
  margin-bottom: 36px;
}
.ingredient-body strong { color: var(--charcoal); font-weight: 500; }
.btn-outline {
  display: inline-block;
  padding: 12px 32px;
  border: 1px solid var(--charcoal);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--charcoal);
  transition: background var(--transition), color var(--transition);
}
.btn-outline:hover { background: var(--charcoal); color: var(--white); }

/* ===== CONNECT / NEWSLETTER ===== */
.connect-section {
  background: var(--charcoal);
  text-align: center;
  padding: 100px 40px;
}
.connect-inner { max-width: 640px; margin: 0 auto; }
.section-eyebrow.light { color: var(--sage-light); }
.connect-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 300;
  color: var(--white);
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}
.connect-body {
  font-size: 0.92rem;
  line-height: 1.85;
  color: rgba(255,255,255,0.65);
  font-weight: 300;
  margin-bottom: 40px;
}
.newsletter-wrap {
  display: flex;
  gap: 0;
  max-width: 500px;
  margin: 0 auto 16px;
}
.email-input {
  flex: 1;
  padding: 14px 20px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-right: none;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  outline: none;
  transition: border-color var(--transition);
}
.email-input::placeholder { color: rgba(255,255,255,0.4); }
.email-input:focus { border-color: rgba(255,255,255,0.5); }
.btn-subscribe {
  padding: 14px 28px;
  background: var(--white);
  color: var(--charcoal);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid var(--white);
  transition: background var(--transition), color var(--transition);
}
.btn-subscribe:hover { background: var(--sage-light); border-color: var(--sage-light); }
.form-success {
  display: none;
  color: var(--sage-light);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  margin-top: 12px;
}
.form-success.visible { display: block; }

/* ===== FAQ ===== */
.faq-section {
  background: var(--ivory);
  padding: 100px 40px;
}
.faq-inner {
  max-width: 800px;
  margin: 0 auto;
}
.faq-inner .section-title { margin-bottom: 56px; }

.faq-list { display: flex; flex-direction: column; }
.faq-item {
  border-top: 1px solid var(--border);
}
.faq-item:last-child { border-bottom: 1px solid var(--border); }

.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--charcoal);
  text-align: left;
  gap: 16px;
  transition: color var(--transition);
}
.faq-q:hover { color: var(--sage-deep); }
.faq-icon {
  font-size: 1.4rem;
  font-weight: 200;
  color: var(--sage-deep);
  flex-shrink: 0;
  transition: transform var(--transition);
  line-height: 1;
}
.faq-q[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s ease, padding 0.3s ease;
}
.faq-a.open { max-height: 200px; }
.faq-a p {
  padding-bottom: 24px;
  font-size: 0.9rem;
  line-height: 1.85;
  color: var(--mid);
  font-weight: 300;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--charcoal);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 48px 40px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-brand .logo.footer-logo {
  color: var(--white);
  display: block;
  margin-bottom: 8px;
}
.footer-brand p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  font-weight: 300;
  letter-spacing: 0.06em;
}
.footer-links {
  display: flex;
  gap: 28px;
}
.footer-links a {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--white); }
.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.08em;
  margin-top: 16px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .ingredient-inner { grid-template-columns: 1fr; gap: 48px; }
  .ingredient-frame { max-width: 360px; margin: 0 auto; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .slide-content { padding: 0 40px; }
  .slide-title { font-size: 2.4rem; }
  .section { padding: 70px 24px; }
  .products-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .newsletter-wrap { flex-direction: column; }
  .email-input { border-right: 1px solid rgba(255,255,255,0.2); border-bottom: none; }
}
@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
  .slide-content { padding: 0 24px; }
}