:root {
  --bg: #f8f4ec;
  --paper: #ffffff;
  --ink: #20231f;
  --muted: #656b60;
  --line: #e2ded1;
  --brand: #2f6f4e;
  --brand-dark: #214d38;
  --accent: #c88735;
  --danger: #a6422d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  line-height: 1.6;
}

[v-cloak] {
  display: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 245, 239, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.nav {
  min-height: 68px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
}

.brand {
  color: var(--brand-dark);
  font-size: 18px;
  font-weight: 800;
}

nav {
  display: flex;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-pill {
  min-width: 104px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  background: var(--brand);
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.auth-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-actions span {
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 800;
}

.auth-actions button,
.plain-btn {
  min-height: 38px;
  padding: 0 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--brand-dark);
  font-weight: 800;
}

.hero {
  position: relative;
  padding: 28px 0 42px;
  background:
    radial-gradient(circle at 72% 20%, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0) 34%),
    linear-gradient(135deg, #fbf7ee 0%, #eef4e6 48%, #f7ead9 100%);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 34px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  color: var(--brand-dark);
  font-size: clamp(36px, 5.4vw, 62px);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: 28px;
  line-height: 1.24;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: 0;
}

.lead {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 6px;
  font-weight: 800;
}

.btn.primary {
  background: var(--brand);
  color: #fff;
}

.btn.secondary {
  border: 1px solid var(--brand);
  color: var(--brand-dark);
}

.hero-banner,
.hero-carousel {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 22px 52px rgba(75, 64, 41, 0.14);
  backdrop-filter: blur(8px);
}

.hero-banner-large {
  min-height: clamp(440px, 58vw, 680px);
}

.hero-banner img,
.hero-carousel img {
  width: 100%;
  height: 430px;
  display: block;
  object-fit: cover;
}

.hero-banner-large img {
  height: clamp(440px, 58vw, 680px);
}

.hero-copy-overlay {
  position: absolute;
  left: clamp(22px, 5vw, 64px);
  top: 50%;
  width: min(560px, calc(100% - 44px));
  transform: translateY(-50%);
  padding: clamp(20px, 4vw, 36px);
  background: rgba(248, 244, 236, 0.88);
  border: 1px solid rgba(226, 222, 209, 0.88);
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.banner-caption,
.carousel-caption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 4px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 222, 209, 0.9);
  border-radius: 8px;
  backdrop-filter: blur(8px);
}

.banner-caption strong,
.carousel-caption strong {
  color: var(--brand-dark);
  font-size: 20px;
}

.banner-caption span,
.carousel-caption span,
.muted {
  color: var(--muted);
}

.carousel-dots {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
}

.carousel-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(47, 111, 78, 0.3);
  border-radius: 50%;
}

.carousel-dots button.active {
  width: 24px;
  background: var(--brand);
  border-radius: 999px;
}

.section {
  padding: 64px 0;
}

.section.soft {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 0;
  border-right: 0;
}

.shop-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.filters {
  position: sticky;
  top: 88px;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.search {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  outline-color: var(--brand);
}

.category-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.category-list button {
  min-height: 38px;
  padding: 0 12px;
  background: #f2f0e8;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  text-align: left;
}

.category-list button.active {
  background: #e6f0e6;
  border-color: rgba(47, 111, 78, 0.32);
  color: var(--brand-dark);
  font-weight: 800;
}

.notice {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding: 14px;
  background: #fff8ea;
  border: 1px solid #ead8b5;
  border-radius: 8px;
}

.notice span {
  color: #665b46;
  font-size: 13px;
}

.section-title {
  max-width: 720px;
  margin-bottom: 24px;
}

.section-title.compact {
  display: flex;
  align-items: end;
  justify-content: space-between;
  max-width: none;
  gap: 16px;
}

.section-title p:not(.eyebrow) {
  color: var(--muted);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(75, 64, 41, 0.06);
}

.product-visual {
  height: 214px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4efe5;
}

.product-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.product-body {
  padding: 18px;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.product-body p {
  min-height: 70px;
  color: var(--muted);
  font-size: 14px;
}

.buy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.buy-row strong {
  color: var(--danger);
  font-size: 21px;
}

.buy-row button,
.checkout {
  min-height: 38px;
  padding: 0 14px;
  background: var(--brand);
  border: 0;
  border-radius: 6px;
  color: #fff;
  font-weight: 800;
}

.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(320px, 1fr);
  gap: 34px;
  align-items: start;
}

.cart-box {
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.empty {
  margin: 0;
  color: var(--muted);
}

.cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 86px;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.cart-item span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.qty {
  display: grid;
  grid-template-columns: 32px 32px 32px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: center;
}

.qty button {
  height: 32px;
  background: var(--paper);
  border: 0;
}

.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  font-size: 18px;
}

.cart-total strong {
  color: var(--danger);
  font-size: 24px;
}

.checkout {
  width: 100%;
  min-height: 44px;
  margin-top: 16px;
}

.checkout:disabled {
  cursor: not-allowed;
  background: #aeb7ad;
}

.license-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.license-table div {
  padding: 16px 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.license-table div:nth-child(2n) {
  border-right: 0;
}

.license-table span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.license-table strong {
  display: block;
  margin-top: 4px;
  word-break: break-word;
}

.scope {
  margin: 18px 0 0;
  padding: 18px;
  background: #fff8ea;
  border: 1px solid #ead8b5;
  border-radius: 8px;
  color: #4d4639;
}

.contact {
  padding-top: 40px;
}

.contact-box {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  background: var(--brand-dark);
  border-radius: 8px;
  color: #fff;
}

.contact-box .eyebrow,
.contact-box p,
.contact-note span {
  color: rgba(255, 255, 255, 0.78);
}

.contact-note {
  max-width: 380px;
}

.contact-note strong {
  display: block;
  margin-bottom: 8px;
}

footer {
  padding: 24px 0;
  color: var(--muted);
  font-size: 13px;
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 60;
  transform: translateX(-50%);
  max-width: min(420px, calc(100% - 32px));
  padding: 12px 18px;
  background: rgba(33, 77, 56, 0.96);
  border-radius: 8px;
  color: #fff;
  box-shadow: 0 14px 34px rgba(32, 35, 31, 0.2);
  font-weight: 800;
  text-align: center;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(32, 35, 31, 0.46);
}

.auth-card {
  position: relative;
  width: min(420px, 100%);
  padding: 26px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(32, 35, 31, 0.22);
}

.auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  background: #f2f0e8;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.auth-card label,
.address-form label {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
}

.auth-card input,
.address-form input,
.address-form textarea {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  outline-color: var(--brand);
}

.address-form textarea {
  min-height: 92px;
  padding: 10px 12px;
  resize: vertical;
}

.auth-message {
  margin-bottom: 12px;
  color: var(--danger);
  font-size: 14px;
}

.auth-switch {
  width: 100%;
  min-height: 38px;
  margin-top: 10px;
  background: transparent;
  border: 0;
  color: var(--brand-dark);
  font-weight: 800;
}

.cart-page {
  min-height: calc(100vh - 116px);
  padding: 74px 0;
  background:
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0) 34%),
    linear-gradient(135deg, #fbf7ee 0%, #eef4e6 48%, #f7ead9 100%);
}

.cart-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(420px, 1fr);
  gap: 34px;
  align-items: start;
}

.cart-box-page,
.address-form,
.pay-box {
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 42px rgba(75, 64, 41, 0.1);
}

.cart-item-rich {
  grid-template-columns: 76px minmax(0, 1fr) auto 92px;
}

.cart-item-rich img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 8px;
}

.qr-card {
  width: min(300px, 100%);
  margin: 0 auto 20px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.qr-card img {
  width: 100%;
  display: block;
}

.pay-box {
  text-align: center;
}

.order-summary {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  padding: 16px;
  background: #fff8ea;
  border: 1px solid #ead8b5;
  border-radius: 8px;
  color: #4d4639;
  text-align: left;
}

@media (max-width: 980px) {
  .hero-grid,
  .shop-layout,
  .cart-layout,
  .cart-page-grid {
    grid-template-columns: 1fr;
  }

  .filters {
    position: static;
  }

  .category-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

@media (max-width: 640px) {
  .nav {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 14px 0;
    gap: 12px;
  }

  nav {
    width: 100%;
    justify-content: space-between;
  }

  .cart-pill {
    width: 100%;
  }

  .hero {
    min-height: auto;
    padding: 18px 0 32px;
    background:
      radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0) 38%),
      linear-gradient(135deg, #fbf7ee 0%, #eef4e6 48%, #f7ead9 100%);
  }

  .hero-carousel,
  .hero-banner,
  .hero-banner img,
  .hero-carousel img {
    min-height: 420px;
    height: 420px;
  }

  .hero-copy-overlay {
    left: 14px;
    right: 14px;
    top: 18px;
    width: auto;
    transform: none;
    padding: 18px;
  }

  .section {
    padding: 46px 0;
  }

  .category-list,
  .product-grid,
  .license-table {
    grid-template-columns: 1fr;
  }

  .section-title.compact,
  .contact-box,
  footer .wrap {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-title.compact {
    display: block;
  }

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

  .nav-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .auth-actions {
    width: 100%;
  }

  .auth-actions button {
    flex: 1;
  }

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

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

  .license-table div,
  .license-table div:nth-child(2n) {
    border-right: 0;
  }
}
