:root {
  --bg: #f3f1ec;
  --bg-deep: #e8e4db;
  --ink: #16181c;
  --muted: #5f6570;
  --line: rgba(22, 24, 28, 0.12);
  --accent: #1f6b5a;
  --accent-2: #c45c26;
  --card: #ffffff;
  --shadow: 0 18px 50px rgba(22, 24, 28, 0.08);
  --radius: 18px;
  --font: "DM Sans", sans-serif;
  --display: "Syne", sans-serif;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -10%, rgba(31, 107, 90, 0.16), transparent 42%),
    radial-gradient(circle at 90% 8%, rgba(196, 92, 38, 0.12), transparent 36%),
    linear-gradient(180deg, #f7f5f0 0%, var(--bg) 40%, #efebe3 100%);
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0 0 0.5em; letter-spacing: -0.03em; }
p { line-height: 1.65; color: var(--muted); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(247, 245, 240, 0.88);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 20px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
}
.logo img { height: 42px; width: auto; object-fit: contain; }
.main-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  align-items: center;
}
.main-nav > a,
.nav-dropdown > a {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  border-radius: 999px;
}
.main-nav a.active,
.nav-dropdown.active > a,
.main-nav a:hover,
.nav-dropdown > a:hover {
  background: rgba(31, 107, 90, 0.1);
  color: var(--accent);
}
.nav-dropdown { position: relative; }
.dropdown-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 8px;
  z-index: 20;
}
.nav-dropdown:hover .dropdown-panel { display: grid; }
.dropdown-panel a {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
}
.dropdown-panel a:hover { background: var(--bg-deep); }
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.meta-pill {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.lang-dropdown {
  position: relative;
}
.lang-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: rgba(255,255,255,0.55);
  cursor: pointer;
}
.lang-dropdown-btn svg { transition: transform .2s ease; }
.lang-dropdown.open .lang-dropdown-btn {
  border-color: rgba(31, 107, 90, 0.35);
  color: var(--accent);
}
.lang-dropdown.open .lang-dropdown-btn svg { transform: rotate(180deg); }
.lang-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 132px;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 40;
}
.lang-dropdown.open .lang-dropdown-menu { display: grid; }
.lang-dropdown-menu a {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.lang-dropdown-menu a:hover,
.lang-dropdown-menu a.active {
  background: rgba(31, 107, 90, 0.1);
  color: var(--accent);
}
body.lang-zh {
  font-family: "Noto Sans SC", "DM Sans", sans-serif;
}
body.lang-zh h1,
body.lang-zh h2,
body.lang-zh h3,
body.lang-zh h4 {
  font-family: "Noto Sans SC", "Syne", sans-serif;
  letter-spacing: -0.01em;
}
.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.cart-link span { opacity: 0.75; }
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 10px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.site-main { min-height: 60vh; }
.flash {
  max-width: var(--max);
  margin: 16px auto 0;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 500;
}
.flash-success { background: #dff3ea; color: #155a45; }
.flash-error { background: #fde8e4; color: #8a2f1d; }

.hero {
  position: relative;
  min-height: 72vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(22,24,28,0.15) 0%, rgba(22,24,28,0.62) 100%),
    url("../images/products/hero.jpg") center/cover no-repeat;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px 20px 64px;
  color: #fff;
}
.hero-content h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
  max-width: 10ch;
  line-height: 0.95;
  margin-bottom: 16px;
}
.hero-content p {
  color: rgba(255,255,255,0.82);
  max-width: 38ch;
  font-size: 1.05rem;
  margin-bottom: 28px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: #fff; color: var(--ink); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-ghost {
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px 20px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 28px;
}
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin: 0; }
.section-head p { margin: 0; max-width: 36ch; }
.text-link {
  font-weight: 700;
  color: var(--accent);
  border-bottom: 1px solid currentColor;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.category-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  min-height: 220px;
  box-shadow: var(--shadow);
}
.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: transform .4s ease;
}
.category-card:hover img { transform: scale(1.05); }
.category-card span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 1;
  color: #fff;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  text-shadow: 0 8px 24px rgba(0,0,0,.45);
}
.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,.62));
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.product-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s ease;
}
.product-card:hover { transform: translateY(-4px); }
.product-card .thumb {
  aspect-ratio: 1;
  background: #ece8df;
  overflow: hidden;
}
.product-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-card .body { padding: 16px; }
.product-card h3 {
  font-size: 1rem;
  line-height: 1.35;
  min-height: 2.7em;
}
.price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 10px 0 14px;
}
.price { font-weight: 700; color: var(--ink); font-size: 1.05rem; }
.compare {
  color: var(--muted);
  text-decoration: line-through;
  font-size: 0.92rem;
}

.cta-band {
  margin: 20px;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  min-height: 280px;
  display: grid;
  align-items: center;
}
.cta-band-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(22,24,28,.78), rgba(22,24,28,.35)),
    url("../images/products/cta.jpg") center/cover no-repeat;
}
.cta-band-content {
  position: relative;
  z-index: 1;
  color: #fff;
  padding: 48px;
  max-width: 560px;
}
.cta-band-content p { color: rgba(255,255,255,.8); }

.favorites {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
}
.favorite-feature,
.favorite-list .product-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.favorite-feature img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}
.favorite-feature .body,
.page-hero,
.page-content,
.form-card,
.cart-table,
.detail-grid > * {
  padding: 22px;
}
.favorite-list {
  display: grid;
  gap: 18px;
}

.page-hero {
  max-width: var(--max);
  margin: 28px auto 0;
  padding: 36px 20px 8px;
}
.page-hero h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
.page-content {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 20px 72px;
}
.breadcrumbs {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}
.breadcrumbs a:hover { color: var(--accent); }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.detail-grid .gallery {
  background: #ece8df;
  min-height: 420px;
}
.detail-grid .gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.specs {
  margin: 18px 0;
  padding: 0;
  list-style: none;
}
.specs li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.specs span { color: var(--muted); }
.qty-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
}
.qty-row input {
  width: 72px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.form-card,
.cart-table,
.news-list article,
.about-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-grid .full { grid-column: 1 / -1; }
label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}
input, textarea, select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}
textarea { min-height: 140px; resize: vertical; }

.cart-table { overflow: hidden; }
.cart-table table {
  width: 100%;
  border-collapse: collapse;
}
.cart-table th,
.cart-table td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.cart-table th {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.cart-product {
  display: flex;
  align-items: center;
  gap: 14px;
}
.cart-product img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
}
.cart-summary {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.news-list {
  display: grid;
  gap: 16px;
}
.news-list article { padding: 22px; }
.news-list time {
  color: var(--muted);
  font-size: 13px;
}

.about-panel { padding: 28px; }
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}
.muted { color: var(--muted); }

.site-footer {
  margin-top: 40px;
  background: #17191d;
  color: #f4f1ea;
}
.footer-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px 20px 28px;
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr 1.6fr;
  gap: 28px;
}
.footer-brand img {
  height: 40px;
  width: auto;
  margin-bottom: 14px;
  filter: brightness(1.05);
}
.site-footer p,
.site-footer a { color: rgba(244,241,234,.78); }
.site-footer h4 {
  color: #fff;
  margin-bottom: 12px;
}
.newsletter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}
.newsletter-row > p {
  margin: 0;
  flex: 0 1 auto;
  white-space: nowrap;
}
.newsletter-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  margin-top: 0;
}
.newsletter-form input {
  flex: 1 1 auto;
  min-width: 120px;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.18);
  color: #fff;
}
.newsletter-form button {
  flex: 0 0 auto;
  border: none;
  border-radius: 12px;
  padding: 11px 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 18px 20px;
  text-align: center;
  font-size: 13px;
}

.empty-state {
  padding: 48px 20px;
  text-align: center;
  background: var(--card);
  border-radius: 20px;
  border: 1px dashed var(--line);
}

@media (max-width: 960px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 12px;
    right: 12px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    box-shadow: var(--shadow);
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: inline-flex; }
  .nav-dropdown .dropdown-panel {
    position: static;
    display: grid;
    box-shadow: none;
    border: none;
    padding: 0 0 0 12px;
  }
  .meta-pill { display: none; }
  .category-grid,
  .favorites,
  .detail-grid,
  .about-grid,
  .footer-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .newsletter-row {
    flex-wrap: wrap;
  }
  .newsletter-row > p {
    white-space: normal;
    width: 100%;
  }
  .hero { min-height: 62vh; }
  .cta-band-content { padding: 32px 24px; }
}
