:root {
  --primary: #1f6b4a;
  --primary-dark: #145034;
  --primary-light: #e8f4ee;
  --text: #2b2f2d;
  --text-light: #6b7470;
  --bg: #ffffff;
  --bg-soft: #f6f8f7;
  --border: #e3e8e5;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(20, 80, 52, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
}

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

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

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.5px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.brand small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-light);
  letter-spacing: 1px;
}

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

.main-nav a {
  color: var(--text-light);
  font-size: 15px;
  padding: 8px 16px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.main-nav a:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.main-nav a.active {
  color: var(--primary);
  font-weight: 600;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(160deg, var(--primary-light) 0%, #ffffff 70%);
  padding: 88px 0;
  text-align: center;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 18px;
}

.hero h1 em {
  font-style: normal;
  color: var(--primary);
}

.hero p {
  color: var(--text-light);
  font-size: clamp(15px, 2vw, 18px);
  max-width: 560px;
  margin: 0 auto 32px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
}

.hero-tags span {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 18px;
  font-size: 14px;
  color: var(--text);
  box-shadow: var(--shadow);
}

.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 12px 34px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
}

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

.btn.ghost {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn.ghost:hover {
  background: var(--primary-light);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

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

.section.soft {
  background: var(--bg-soft);
}

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

.section-head h2 {
  font-size: clamp(22px, 3.5vw, 30px);
  font-weight: 700;
  margin-bottom: 12px;
}

.section-head h2::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  margin: 14px auto 0;
}

.section-head p {
  color: var(--text-light);
  font-size: 15px;
  max-width: 620px;
  margin: 0 auto;
}

/* ===== Cards ===== */
.grid {
  display: grid;
  gap: 22px;
}

.grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

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

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

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 26px;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.card .icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

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

.card .more {
  display: inline-block;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
}

/* ===== Intro (about summary) ===== */
.intro {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}

.intro h2 {
  font-size: clamp(22px, 3vw, 28px);
  margin-bottom: 18px;
}

.intro p {
  color: var(--text-light);
  margin-bottom: 24px;
}

.fact-list {
  background: var(--primary-light);
  border-radius: var(--radius);
  padding: 32px;
}

.fact-list dt {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 4px;
}

.fact-list dd {
  font-weight: 600;
  margin-bottom: 18px;
}

.fact-list dd:last-child {
  margin-bottom: 0;
}

/* ===== Article page (about / contact) ===== */
.page-hero {
  background: var(--primary-light);
  padding: 56px 0;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(24px, 4vw, 32px);
  margin-bottom: 10px;
}

.page-hero p {
  color: var(--text-light);
  font-size: 15px;
}

.article {
  max-width: 760px;
  margin: 0 auto;
}

.article h2 {
  font-size: 22px;
  margin: 36px 0 14px;
  padding-left: 14px;
  border-left: 4px solid var(--primary);
}

.article p {
  color: var(--text-light);
  margin-bottom: 14px;
}

.article strong {
  color: var(--text);
}

.value-grid {
  margin-top: 22px;
}

/* ===== Contact ===== */
.contact-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow);
}

.contact-card .icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

.contact-card h3 {
  font-size: 17px;
  color: var(--text-light);
  font-weight: 500;
  margin-bottom: 6px;
}

.contact-card .address {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
}

/* ===== Footer ===== */
.site-footer {
  background: #1c2420;
  color: #a8b3ad;
  padding: 40px 0 28px;
  margin-top: 0;
}

.footer-inner {
  text-align: center;
}

.footer-inner p {
  font-size: 13px;
  margin-bottom: 8px;
}

.footer-inner a {
  color: #cdd8d2;
}

.footer-inner a:hover {
  color: #fff;
}

.footer-sep {
  color: #4a5650;
  margin: 0 8px;
}

/* ===== Shop: header cart entry ===== */
[hidden] {
  display: none !important;
}

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

.cart-entry {
  position: relative;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.cart-entry:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
}

.cart-entry svg {
  width: 20px;
  height: 20px;
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  font-weight: 600;
  text-align: center;
}

/* ===== Shop: product grid ===== */
.shop-note {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  margin-bottom: 28px;
  text-align: center;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
}

.filter-chip {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-light);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.filter-chip:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.filter-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

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

.product-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f1f4f2;
  overflow: hidden;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.product-card:hover .product-media img {
  transform: scale(1.04);
}

.product-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

.product-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px;
}

.product-body h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.product-desc {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 16px;
}

.product-foot {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-top: auto;
}

.product-foot .btn {
  width: 100%;
}

.product-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.2;
  white-space: nowrap;
}

.product-price small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-light);
  margin-bottom: 2px;
}

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

.btn.btn-sm {
  padding: 9px 16px;
  font-size: 13px;
  flex-shrink: 0;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* ===== Shop: cart drawer ===== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 32, 26, 0.42);
  z-index: 190;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(400px, 100%);
  background: #fff;
  z-index: 200;
  display: flex;
  flex-direction: column;
  transform: translateX(102%);
  transition: transform 0.28s ease;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.12);
}

.cart-drawer.open {
  transform: translateX(0);
}

body.cart-open {
  overflow: hidden;
}

.cart-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
}

.cart-drawer-head h2 {
  font-size: 18px;
}

.cart-close {
  border: 0;
  background: transparent;
  color: var(--text-light);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.cart-close:hover {
  color: var(--text);
}

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 6px 22px;
}

.cart-drawer-empty {
  padding: 40px 0;
  text-align: center;
  color: var(--text-light);
  font-size: 14px;
}

.cart-drawer-foot {
  border-top: 1px solid var(--border);
  padding: 16px 22px 22px;
}

.drawer-total {
  font-size: 14px;
  color: var(--text-light);
  text-align: right;
  margin-bottom: 12px;
}

.drawer-total strong {
  font-size: 20px;
  color: var(--primary-dark);
  margin-left: 6px;
}

/* ===== Shop: cart lines ===== */
.cart-line {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px dashed var(--border);
}

.cart-line:last-child {
  border-bottom: 0;
}

.cart-line img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f1f4f2;
}

.cart-panel .cart-line img {
  width: 76px;
  height: 76px;
}

.cart-line-main {
  flex: 1;
  min-width: 0;
}

.cart-line-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 3px;
}

.cart-line-price {
  font-size: 12px;
  color: var(--text-light);
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 8px;
}

.qty button {
  width: 28px;
  height: 26px;
  border: 0;
  background: #fff;
  color: var(--text);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.qty button:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.qty span {
  min-width: 32px;
  text-align: center;
  font-size: 13px;
}

.cart-line-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  flex-shrink: 0;
}

.cart-line-side strong {
  font-size: 14px;
  color: var(--text);
}

.cart-remove {
  border: 0;
  background: transparent;
  color: #aab3ae;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 2px;
}

.cart-remove:hover {
  color: #c0392b;
}

/* ===== Shop: cart page ===== */
.cart-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 30px;
  align-items: start;
}

.cart-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 24px 20px;
}

.cart-panel-title {
  font-size: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.cart-empty {
  padding: 56px 0;
  text-align: center;
  color: var(--text-light);
  font-size: 15px;
}

.cart-empty a {
  font-weight: 600;
}

.cart-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cart-summary {
  background: var(--primary-light);
  border-radius: var(--radius);
  padding: 22px;
}

.cart-summary .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 10px;
}

.cart-summary .row.total {
  padding-top: 12px;
  border-top: 1px dashed rgba(31, 107, 74, 0.25);
  color: var(--text);
  font-size: 15px;
}

.cart-summary .row.total strong {
  font-size: 22px;
  color: var(--primary-dark);
}

.summary-note {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 6px;
}

.checkout-form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.checkout-form h2 {
  font-size: 17px;
  margin-bottom: 16px;
}

.checkout-form label {
  display: block;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 12px;
}

.checkout-form input,
.checkout-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  resize: vertical;
}

.checkout-form input:focus,
.checkout-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 107, 74, 0.1);
}

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

.form-note {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 10px;
  text-align: center;
}

.order-result {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.order-result h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.order-result p {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 14px;
}

.order-text {
  white-space: pre-wrap;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 14px;
  overflow-x: auto;
}

.order-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.order-result-actions .btn {
  padding: 10px 20px;
  font-size: 14px;
}

/* ===== Shop: toast ===== */
.cart-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 16px);
  background: rgba(28, 36, 32, 0.94);
  color: #fff;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 999px;
  z-index: 210;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  max-width: 86%;
  text-align: center;
}

.cart-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cart-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .grid.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .main-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0;
    display: none;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
  }

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

  .main-nav a {
    padding: 14px 24px;
    border-radius: 0;
    font-size: 16px;
  }

  .menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero {
    padding: 56px 0;
  }

  .section {
    padding: 52px 0;
  }

  .grid.cols-4,
  .grid.cols-3,
  .grid.cols-2 {
    grid-template-columns: 1fr;
  }

  .intro {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .contact-card {
    padding: 28px 20px;
  }

  .header-actions {
    gap: 8px;
  }
}

@media (max-width: 560px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .product-body {
    padding: 12px;
  }

  .product-body h3 {
    font-size: 14px;
  }

  .product-desc {
    font-size: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .product-tag {
    top: 8px;
    left: 8px;
    font-size: 11px;
    padding: 3px 8px;
  }

  .product-price {
    font-size: 17px;
  }

  .btn.btn-sm {
    padding: 8px 10px;
    font-size: 12px;
  }

  .cart-panel {
    padding: 4px 16px 16px;
  }

  .checkout-form {
    padding: 20px 16px;
  }

  .cart-drawer-head,
  .cart-drawer-body,
  .cart-drawer-foot {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 360px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}
