:root {
  color-scheme: light;
  --bg: #f3f0e9;
  --ink: #14231d;
  --muted: #5e6b64;
  --line: rgba(20, 35, 29, 0.12);
  --card: #fffdf8;
  --accent: #0f766e;
  --shadow: 0 18px 40px rgba(28, 43, 36, 0.10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(15, 118, 110, 0.10), transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(37, 99, 235, 0.08), transparent 40%),
    var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.page {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 40px 0 32px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, #173c32, #0f766e);
  color: #f4fffb;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.24);
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-size: clamp(22px, 3.2vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.masthead-note {
  margin: 0;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.7);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.intro {
  padding: 34px 0 26px;
}

.intro-title {
  margin: 0 0 10px;
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.intro-note {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
}

.product {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.product::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--accent);
}

.product:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
  box-shadow: 0 24px 50px rgba(28, 43, 36, 0.14);
}

.product-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.product-mark {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: color-mix(in srgb, var(--accent) 12%, #ffffff);
  color: var(--accent);
  font-size: 20px;
  font-weight: 700;
}

.product-title {
  margin: 2px 0 6px;
  font-size: 18px;
  line-height: 1.35;
}

.product-tagline {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}

.badge {
  margin-left: auto;
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, #ffffff);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.product-desc {
  margin: 18px 0 0;
  color: #3d4b44;
  font-size: 14px;
  line-height: 1.75;
}

.caps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.caps li {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 11.5px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 24px;
}

.primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  background: var(--accent);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: filter 140ms ease;
}

.primary:hover { filter: brightness(0.94); }

.primary .arrow {
  font-size: 13px;
  opacity: 0.85;
}

.secondary {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-size: 13px;
  text-decoration: none;
  background: #fff;
}

.secondary:hover { border-color: var(--accent); color: var(--accent); }

.ghost {
  margin-left: auto;
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}

.ghost:hover { background: rgba(20, 35, 29, 0.06); color: var(--ink); }

.disabled {
  display: inline-flex;
  padding: 11px 18px;
  border-radius: 10px;
  background: rgba(20, 35, 29, 0.08);
  color: var(--muted);
  font-size: 14px;
}

.last-seen {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.product.has-last .badge { margin-right: 74px; }

.empty {
  grid-column: 1 / -1;
  padding: 40px 24px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: auto;
  padding-top: 40px;
  color: var(--muted);
  font-size: 11.5px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  padding: 10px 16px;
  border-radius: 10px;
  background: #14231d;
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

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

@media (max-width: 720px) {
  .page {
    width: calc(100% - 32px);
    padding-top: 28px;
  }
  .masthead {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .intro { padding: 26px 0 20px; }
  .product { padding: 22px; }
  .ghost { margin-left: 0; }
}
