:root {
  color-scheme: light;
  --ink: #171817;
  --muted: #696b66;
  --line: #dedbd2;
  --paper: #f7f4ee;
  --panel: #ffffff;
  --soft: #eee9df;
  --accent: #c84b2d;
  --accent-dark: #87301f;
  --green: #23664c;
  --green-soft: #e8f3ed;
  --blue: #254f73;
  --danger: #9d2f22;
  --shadow: 0 18px 48px rgba(32, 24, 18, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

body.drawer-open,
body.modal-open {
  overflow: hidden;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 100;
  transform: translateY(-180%);
  padding: 10px 14px;
  color: #fff;
  background: var(--ink);
  border-radius: 999px;
  font-weight: 900;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

:is(a, button, input, select, textarea):focus-visible {
  outline: 3px solid rgba(35, 102, 76, 0.72);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 24px;
  background: rgba(247, 244, 238, 0.93);
  border-bottom: 1px solid rgba(222, 219, 210, 0.9);
  backdrop-filter: blur(14px);
}

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

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(32, 24, 18, 0.12);
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  margin-top: 2px;
}

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

.cart-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  font-weight: 900;
}

.cart-button strong {
  min-width: 24px;
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  color: var(--ink);
  background: #fff;
  border-radius: 50%;
}

.hero {
  min-height: calc(100svh - 72px);
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  padding: 56px clamp(24px, 5vw, 72px) 72px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(247, 244, 238, 0.94)),
    linear-gradient(90deg, rgba(35, 102, 76, 0.1), rgba(201, 75, 44, 0.1));
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(44px, 6vw, 78px);
  max-width: 820px;
}

h2 {
  font-size: clamp(30px, 3.6vw, 48px);
}

.hero-claim {
  margin: 24px 0 0;
  color: var(--blue);
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 900;
  line-height: 1.18;
}

.lede {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
  max-width: 680px;
}

.hero-actions,
.drawer-actions,
.card-actions,
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 30px;
}

.primary,
.secondary,
.detail-link,
.text-button,
.load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
}

.primary {
  border: 0;
  background: var(--ink);
  color: #fff;
}

.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.detail-link {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.text-button {
  min-height: 34px;
  padding: 0;
  border: 0;
  color: var(--blue);
  background: transparent;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-metrics span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}

.hero-metrics strong {
  color: var(--ink);
}

.hero-market {
  display: grid;
  grid-template-columns: 1fr 0.82fr;
  gap: 16px;
  align-items: start;
}

.showcase-card,
.showcase-qr {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.showcase-card.is-large {
  grid-row: span 2;
  align-self: start;
}

.showcase-card picture {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--soft);
}

.showcase-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.showcase-card div {
  padding: 16px;
}

.showcase-card span,
.showcase-card small,
.showcase-qr small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.showcase-card strong,
.showcase-qr strong {
  display: block;
  margin: 6px 0;
  font-size: 18px;
}

.showcase-qr {
  display: grid;
  justify-items: center;
  align-content: center;
  padding: 18px;
  text-align: center;
}

.showcase-qr img {
  width: min(132px, 70%);
  height: auto;
  max-height: 170px;
  object-fit: contain;
  border-radius: 8px;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.trust-strip div {
  padding: 26px clamp(20px, 4vw, 64px);
  border-right: 1px solid var(--line);
}

.trust-strip div:last-child {
  border-right: 0;
}

.trust-strip strong,
.trust-strip span {
  display: block;
}

.trust-strip strong {
  font-size: 22px;
}

.trust-strip span {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.trust-qr-cell {
  display: grid;
  grid-template-columns: 86px 1fr;
  align-items: center;
  gap: 16px;
}

.trust-qr {
  width: 86px;
  height: 86px;
  object-fit: contain;
  border: 6px solid #f8f1e8;
  border-radius: 12px;
}

.hot-products,
.storefront,
.process,
.faq-band,
.wechat,
footer {
  width: min(1380px, calc(100% - 48px));
  margin-inline: auto;
}

.hot-products {
  padding: 70px 0 24px;
}

.section-head {
  scroll-margin-top: 92px;
  padding: 0 0 22px;
}

.section-head.compact {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-head p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.7;
}

.hot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.storefront {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  padding: 56px 0 64px;
  align-items: start;
}

.store-sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 18px;
}

.sidebar-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.sidebar-section h2 {
  font-size: 24px;
}

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

.chip {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  padding: 0 12px;
  border-radius: 8px;
  font-weight: 900;
}

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

.chip small {
  color: inherit;
  opacity: 0.76;
}

.mini-contact {
  text-align: center;
}

.mini-contact img {
  width: 150px;
  height: auto;
  margin: 0 auto 12px;
  border-radius: 8px;
}

.mini-contact strong,
.mini-contact span {
  display: block;
}

.mini-contact span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.store-main {
  min-width: 0;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 160px 190px;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.search-box,
.select-box,
.toggle-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 14px;
  background: var(--paper);
  border: 1px solid transparent;
  border-radius: 8px;
}

.search-box span,
.select-box span,
.toggle-box span {
  color: var(--muted);
  font-weight: 900;
  white-space: nowrap;
}

.toggle-box {
  cursor: pointer;
}

.toggle-box input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.search-box input,
.select-box select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.store-status {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 16px 0 20px;
}

.result-count {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

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

.product-card {
  content-visibility: auto;
  contain-intrinsic-size: 430px;
  display: grid;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 79, 115, 0.35);
  box-shadow: var(--shadow);
}

.product-card.is-sold-out {
  background: #fbfaf7;
}

.product-card.is-sold-out .product-image img {
  filter: grayscale(0.8);
  opacity: 0.58;
}

.product-image {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--soft);
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-badge,
.stock-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.rank-badge {
  top: 10px;
  left: 10px;
  background: var(--ink);
}

.stock-badge {
  right: 10px;
  top: 10px;
  background: var(--danger);
}

.stock-badge.in-stock {
  background: var(--green);
}

.product-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 22px;
}

.category-row span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.product-body h3 {
  min-height: 44px;
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.price-row,
.meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.price {
  color: var(--accent-dark);
  font-size: 21px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.price-note,
.meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.card-actions button {
  flex: 1 1 120px;
  min-height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 900;
  font-size: 13px;
}

.card-actions .add-cart {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.card-actions .add-cart.is-added {
  background: var(--green);
  border-color: var(--green);
}

.load-more {
  width: min(320px, 100%);
  margin: 28px auto 0;
  border: 1px solid var(--line);
  background: #fff;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 220px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 32px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.empty-state strong,
.empty-state span {
  display: block;
}

.empty-state span {
  color: var(--muted);
}

.process {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 48px;
  padding: 56px 0;
  scroll-margin-top: 92px;
}

.process ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.process li {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.process li:last-child {
  border-bottom: 1px solid var(--line);
}

.process span {
  color: var(--muted);
}

.faq-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-bottom: 56px;
  background: var(--line);
  border: 1px solid var(--line);
}

.faq-band div {
  padding: 24px;
  background: #fff;
}

.faq-band strong,
.faq-band span {
  display: block;
}

.faq-band span {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.wechat {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 52px;
  align-items: center;
  padding: 48px;
  background:
    linear-gradient(135deg, rgba(201, 75, 44, 0.16), transparent 48%),
    var(--ink);
  color: #fff;
  margin-bottom: 60px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  scroll-margin-top: 92px;
}

.wechat .eyebrow,
.wechat p {
  color: rgba(255, 255, 255, 0.76);
}

.wechat p {
  line-height: 1.7;
}

.fine-print {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.wechat .fine-print {
  color: rgba(255, 255, 255, 0.72);
}

.qr {
  width: 300px;
  height: auto;
  background: #fff;
  border: 12px solid #fff;
  border-radius: 8px;
}

.inquiry-drawer,
.product-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  background: rgba(23, 24, 23, 0.42);
}

.inquiry-drawer.is-open,
.product-modal.is-open {
  display: block;
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(460px, 100%);
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) 150px auto auto;
  gap: 16px;
  padding: 22px;
  background: #fff;
  box-shadow: var(--shadow);
  overscroll-behavior: contain;
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
}

.drawer-items {
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  padding-right: 4px;
}

.cart-item {
  display: grid;
  grid-template-columns: 68px 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
}

.cart-item img {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--soft);
}

.cart-item strong,
.cart-item span {
  display: block;
}

.cart-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.remove-cart {
  width: 32px;
  height: 32px;
  border: 0;
  color: var(--danger);
  background: transparent;
  font-size: 22px;
}

#inquiryMessage {
  width: 100%;
  min-height: 140px;
  resize: none;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
}

.drawer-actions .primary,
.drawer-actions .secondary {
  flex: 1 1 160px;
}

.modal-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(920px, calc(100% - 32px));
  max-height: calc(100svh - 32px);
  overflow: auto;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
  overscroll-behavior: contain;
}

.modal-close {
  position: sticky;
  top: 16px;
  float: right;
  margin: 16px 16px 0 0;
  z-index: 2;
}

.modal-product {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(280px, 1.1fr);
  gap: 28px;
  padding: 28px;
}

.modal-product img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--soft);
  border-radius: 8px;
}

.modal-detail {
  display: grid;
  align-content: start;
  gap: 16px;
}

.modal-detail h2 {
  font-size: clamp(26px, 3vw, 42px);
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.detail-row dt {
  color: var(--muted);
  font-weight: 900;
}

.detail-row dd {
  margin: 0;
  text-align: right;
}

.product-detail-page {
  padding: 34px clamp(18px, 5vw, 72px) 58px;
}

.breadcrumb {
  max-width: 1180px;
  margin: 0 auto 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.breadcrumb a {
  color: var(--blue);
}

.product-detail-layout {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(300px, 1.08fr);
  gap: clamp(24px, 5vw, 58px);
  align-items: start;
}

.product-detail-media {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.product-detail-media img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.product-detail-copy {
  display: grid;
  gap: 18px;
}

.product-detail-copy h1 {
  font-size: clamp(34px, 5vw, 64px);
}

.related-products {
  padding: 12px clamp(18px, 5vw, 72px) 72px;
}

.related-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.related-card a {
  display: grid;
  gap: 10px;
  height: 100%;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.related-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  background: var(--soft);
}

.related-card strong {
  line-height: 1.35;
}

.related-card span {
  color: var(--muted);
  font-weight: 800;
}

.float-qr {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 110px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.float-qr img {
  width: 86px;
  height: auto;
  border-radius: 6px;
}

.float-qr span {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 32px 0 48px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

footer strong {
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 1120px) {
  .product-grid,
  .hot-grid,
  .related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .hero,
  .storefront,
  .process,
  .wechat,
  .product-detail-layout,
  .modal-product {
    grid-template-columns: 1fr;
  }

  .store-sidebar {
    position: static;
  }

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

  .toolbar {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 640px) {
  .site-header {
    height: auto;
    padding: 12px 14px;
  }

  .brand {
    min-width: 0;
  }

  .brand small,
  nav,
  .cart-button span {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 34px 18px;
  }

  h1 {
    font-size: 40px;
  }

  .hero-market,
  .trust-strip,
  .category-list,
  .product-grid,
  .hot-grid,
  .related-grid,
  .process li,
  .faq-band,
  .wechat {
    grid-template-columns: 1fr;
  }

  .trust-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .trust-qr-cell {
    grid-template-columns: 72px 1fr;
  }

  .trust-qr {
    width: 72px;
    height: 72px;
  }

  .hot-products,
  .storefront,
  .process,
  .faq-band,
  .wechat,
  .product-detail-page,
  .related-products,
  footer {
    width: min(100% - 32px, 1180px);
  }

  .product-detail-page,
  .related-products {
    margin-inline: auto;
    padding-left: 0;
    padding-right: 0;
  }

  .wechat {
    padding: 28px;
  }

  .qr {
    width: 100%;
  }

  .drawer-panel {
    width: 100%;
    padding: 18px;
  }

  .modal-product {
    padding: 18px;
  }

  .float-qr {
    display: none;
  }

  footer {
    display: grid;
  }
}
