:root {
  color-scheme: light;
  --ink: #142321;
  --muted: #5f716d;
  --paper: #fbfaf6;
  --surface: rgba(255, 255, 255, 0.78);
  --line: rgba(20, 35, 33, 0.12);
  --green: #1b7f68;
  --green-strong: #075b49;
  --coral: #e4694b;
  --gold: #c7933a;
  --blue: #236d8f;
  --shadow: 0 22px 55px rgba(20, 35, 33, 0.16);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 8% 14%, rgba(35, 109, 143, 0.12), transparent 26rem),
    radial-gradient(circle at 86% 4%, rgba(228, 105, 75, 0.12), transparent 22rem),
    var(--paper);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

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

button {
  font: inherit;
}

.page-shell {
  max-width: 1360px;
  margin: 0 auto;
  padding: 18px clamp(14px, 3vw, 34px) 112px;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(251, 250, 246, 0.76);
  box-shadow: 0 10px 35px rgba(20, 35, 33, 0.08);
  backdrop-filter: blur(24px) saturate(170%);
}

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: white;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
  white-space: nowrap;
}

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

.nav-pills {
  justify-self: center;
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
}

.nav-pills a {
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
}

.nav-pills a:hover {
  background: white;
  color: var(--ink);
}

.icon-btn {
  position: relative;
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(20, 35, 33, 0.12);
}

.icon-btn svg,
.primary-btn svg,
.ghost-btn svg,
.bag-preview svg,
.pay-grid svg,
.origin-list svg {
  width: 19px;
  height: 19px;
  stroke-width: 2;
}

.cart-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--coral);
  color: white;
  font-size: 12px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
}

.hero {
  position: relative;
  display: grid;
  min-height: min(760px, calc(100vh - 112px));
  margin-top: 18px;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.hero-photo,
.hero picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-photo {
  object-fit: cover;
  transform: scale(1.03);
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(6, 31, 29, 0.78), rgba(6, 31, 29, 0.32) 48%, rgba(6, 31, 29, 0.06)),
    linear-gradient(0deg, rgba(6, 31, 29, 0.42), transparent 38%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  width: min(690px, 100%);
  padding: clamp(28px, 6vw, 84px);
  color: white;
}

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

.hero .eyebrow {
  color: #ffd69b;
}

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

h1 {
  max-width: 12ch;
  margin-bottom: 18px;
  font-size: clamp(42px, 7vw, 88px);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 19px;
}

.hero-copy p:not(.eyebrow) {
  max-width: 590px;
  margin-bottom: 26px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(16px, 1.7vw, 20px);
  line-height: 1.7;
}

.hero-actions,
.section-head,
.origin-list,
.sheet-head {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.primary-btn,
.ghost-btn,
.checkout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.22s ease;
}

.primary-btn,
.checkout-btn {
  background: var(--green);
  color: white;
}

.primary-btn:hover,
.checkout-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
}

.primary-btn:disabled {
  cursor: wait;
  filter: grayscale(0.2) opacity(0.78);
  transform: none;
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.14);
  color: white;
  backdrop-filter: blur(18px);
}

.compact {
  min-height: 44px;
  padding: 0 15px;
}

.full {
  width: 100%;
}

.hero-panel {
  position: absolute;
  right: clamp(16px, 4vw, 48px);
  bottom: clamp(16px, 4vw, 48px);
  z-index: 2;
  width: min(330px, calc(100% - 32px));
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  color: white;
  backdrop-filter: blur(22px) saturate(160%);
}

.hero-panel span {
  color: #ffd69b;
  font-size: 12px;
  font-weight: 800;
}

.hero-panel strong {
  display: block;
  margin: 7px 0;
  font-size: 22px;
}

.hero-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.55;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 18px 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.trust-strip div {
  padding: 20px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
}

.trust-strip strong {
  display: block;
  color: var(--green-strong);
  font-size: 28px;
  line-height: 1;
}

.trust-strip span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.section {
  padding: clamp(56px, 8vw, 98px) 0 0;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-head h2 {
  max-width: 12ch;
}

.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.segmented button {
  min-height: 38px;
  min-width: 64px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.segmented button.active {
  background: var(--ink);
  color: white;
}

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

.product-card {
  display: grid;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 12px 35px rgba(20, 35, 33, 0.08);
}

.product-art {
  position: relative;
  min-height: 210px;
  background:
    linear-gradient(135deg, rgba(27, 127, 104, 0.06), rgba(228, 105, 75, 0.16)),
    var(--image);
  background-size: cover;
  background-position: center;
}

.product-art::after {
  content: "";
  position: absolute;
  inset: auto 12px 12px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  filter: blur(8px);
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--green-strong);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

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

.product-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.product-title h3 {
  margin: 0;
  line-height: 1.25;
}

.price {
  color: var(--coral);
  font-size: 20px;
  font-weight: 900;
  white-space: nowrap;
}

.product-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.product-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.product-meta span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}

.add-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  cursor: pointer;
  font-weight: 800;
}

.origin-section {
  display: grid;
  grid-template-columns: 0.95fr 1.2fr;
  gap: clamp(22px, 5vw, 64px);
  align-items: center;
}

.origin-copy p:not(.eyebrow) {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.origin-list {
  align-items: stretch;
}

.origin-list span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--green-strong);
  font-weight: 750;
}

.origin-photo-wrap {
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.origin-photo-wrap img {
  display: block;
  width: 100%;
  aspect-ratio: 1.22;
  object-fit: cover;
}

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

.pay-grid article {
  min-height: 230px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(16px);
}

.pay-grid svg {
  width: 28px;
  height: 28px;
  color: var(--green);
  margin-bottom: 18px;
}

.pay-grid p {
  color: var(--muted);
  line-height: 1.65;
}

.bottom-bar {
  position: fixed;
  z-index: 45;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  width: min(520px, calc(100% - 24px));
  min-height: 68px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 55px rgba(20, 35, 33, 0.18);
  transform: translateX(-50%);
  backdrop-filter: blur(26px) saturate(175%);
}

.bag-preview {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.bag-preview span {
  display: grid;
  line-height: 1.2;
}

.bag-preview small {
  color: var(--muted);
}

.checkout-btn {
  min-width: 128px;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(8, 19, 18, 0.32);
  backdrop-filter: blur(5px);
}

.sheet {
  position: fixed;
  z-index: 70;
  left: 50%;
  bottom: 0;
  display: grid;
  gap: 18px;
  width: min(560px, 100%);
  max-height: min(84vh, 760px);
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
  overflow-y: auto;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: rgba(251, 250, 246, 0.94);
  box-shadow: 0 -24px 55px rgba(20, 35, 33, 0.18);
  transform: translate(-50%, 110%);
  transition: transform 0.34s cubic-bezier(0.2, 0.9, 0.2, 1);
  backdrop-filter: blur(26px) saturate(170%);
}

.sheet.open {
  transform: translate(-50%, 0);
}

.sheet-handle {
  justify-self: center;
  width: 42px;
  height: 5px;
  border-radius: 999px;
  background: rgba(20, 35, 33, 0.2);
}

.sheet-head {
  justify-content: space-between;
}

.sheet-head h2 {
  font-size: 30px;
}

.cart-items {
  display: grid;
  gap: 10px;
}

.cart-empty {
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

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

.cart-thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: var(--image);
  background-size: cover;
  background-position: center;
}

.cart-row strong,
.cart-row small {
  display: block;
}

.cart-row small {
  color: var(--muted);
}

.qty {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.qty button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  cursor: pointer;
}

.sheet-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 18px;
}

.sheet-total strong {
  color: var(--coral);
  font-size: 26px;
}

.pay-route {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(27, 127, 104, 0.24);
  border-radius: 8px;
  background: rgba(27, 127, 104, 0.08);
}

.route-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: white;
}

.pay-route strong,
.pay-route span {
  display: block;
}

.pay-route span {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.55;
}

.pay-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.7;
}

.payment-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.payment-methods button {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.payment-methods button.active {
  border-color: rgba(27, 127, 104, 0.5);
  background: rgba(27, 127, 104, 0.08);
  box-shadow: inset 0 0 0 1px rgba(27, 127, 104, 0.16);
}

.payment-methods svg {
  width: 24px;
  height: 24px;
  color: var(--green);
}

.payment-methods strong,
.payment-methods small {
  display: block;
}

.payment-methods small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.checkout-form {
  display: grid;
  gap: 10px;
}

.checkout-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.checkout-form input,
.checkout-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  outline: none;
}

.checkout-form input {
  min-height: 46px;
  padding: 0 12px;
}

.checkout-form textarea {
  min-height: 82px;
  padding: 11px 12px;
  resize: vertical;
}

.checkout-form input:focus,
.checkout-form textarea:focus {
  border-color: rgba(27, 127, 104, 0.58);
  box-shadow: 0 0 0 4px rgba(27, 127, 104, 0.1);
}

.pay-result {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
}

.pay-result strong,
.pay-result span {
  display: block;
}

.pay-result span {
  color: var(--muted);
  line-height: 1.55;
}

.pay-result.pending {
  border-color: rgba(35, 109, 143, 0.28);
  background: rgba(35, 109, 143, 0.08);
}

.pay-result.warning {
  border-color: rgba(199, 147, 58, 0.4);
  background: rgba(199, 147, 58, 0.12);
}

.pay-result.success {
  border-color: rgba(27, 127, 104, 0.36);
  background: rgba(27, 127, 104, 0.1);
}

.toast {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: calc(94px + env(safe-area-inset-bottom));
  max-width: min(360px, calc(100% - 32px));
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(20, 35, 33, 0.92);
  color: white;
  box-shadow: 0 16px 38px rgba(20, 35, 33, 0.18);
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

@media (max-width: 1040px) {
  .product-grid,
  .pay-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .origin-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding: 10px 10px 132px;
  }

  .topbar {
    top: 8px;
    grid-template-columns: 1fr auto;
  }

  .nav-pills {
    display: none;
  }

  .brand strong {
    max-width: 46vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero {
    min-height: 820px;
  }

  .hero-shade {
    background:
      linear-gradient(180deg, rgba(6, 31, 29, 0.28), rgba(6, 31, 29, 0.84) 72%),
      linear-gradient(90deg, rgba(6, 31, 29, 0.42), transparent);
  }

  .hero-copy {
    align-self: end;
    padding: 26px 18px 356px;
  }

  h1 {
    max-width: 12ch;
    font-size: clamp(40px, 12vw, 56px);
    line-height: 1.06;
  }

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

  .hero-panel {
    right: 12px;
    bottom: 168px;
    width: calc(100% - 24px);
  }

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

  .product-grid,
  .pay-grid {
    grid-template-columns: 1fr;
  }

  .payment-methods {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
  }

  .segmented {
    width: 100%;
  }

  .segmented button {
    flex: 1;
  }

  .bottom-bar {
    grid-template-columns: 1fr auto;
    border-radius: 8px;
  }

  .checkout-btn {
    min-width: 112px;
  }
}
