:root {
  --bg: #f4f1ea;
  --ink: #141414;
  --muted: #68645d;
  --line: #d8d0c4;
  --panel: #fffdf8;
  --accent: #186a63;
  --accent-strong: #0f4e49;
  --gold: #c67921;
  --red: #b23824;
  --shadow: 0 18px 45px rgba(34, 28, 18, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

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

button,
input,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 40px;
  background: rgba(244, 241, 234, 0.88);
  border-bottom: 1px solid rgba(216, 208, 196, 0.78);
  backdrop-filter: blur(18px);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: white;
  background: var(--ink);
  border-radius: 8px;
  font-size: 13px;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-size: 15px;
}

main {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 28px 40px 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.68fr);
  min-height: 340px;
  overflow: hidden;
  background:
    linear-gradient(110deg, rgba(11, 37, 35, 0.88), rgba(11, 37, 35, 0.2)),
    url("./assets/products/patagonia-official-30306-CASG-m-s-powslayer-jacket.jpg");
  background-position: center;
  background-size: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-copy {
  align-self: end;
  max-width: 720px;
  padding: 44px;
  color: white;
}

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

.hero h1 {
  margin: 0;
  font-size: 56px;
  line-height: 1.02;
  letter-spacing: 0;
}

.hero p:not(.eyebrow) {
  max-width: 590px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 17px;
  line-height: 1.55;
}

.hero-panel {
  align-self: end;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 0 24px 24px 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  backdrop-filter: blur(16px);
}

.hero-panel > div {
  min-width: 0;
  padding: 20px;
  background: rgba(9, 20, 19, 0.42);
}

.metric {
  display: block;
  color: white;
  font-size: 30px;
  font-weight: 900;
}

.metric-label {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.controls {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) 180px 150px 170px;
  gap: 18px;
  align-items: end;
  margin: 34px 0;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  min-width: 320px;
  padding: 4px;
  background: #e8e0d3;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.segment {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.segment.active {
  color: white;
  background: var(--accent);
  font-weight: 800;
}

.search-box,
.select-box {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.search-box input,
.select-box select {
  width: 100%;
  height: 52px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.search-box input {
  padding: 0 18px;
}

.select-box select {
  padding: 0 14px;
}

.content-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.summary {
  position: sticky;
  top: 100px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

.brand-stat {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.brand-stat p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.dot {
  width: 13px;
  height: 13px;
  margin-top: 4px;
  border-radius: 50%;
}

.arcteryx-dot {
  background: var(--ink);
}

.patagonia-dot {
  background: var(--red);
}

.rei-dot {
  background: #2f7d32;
}

.evo-dot {
  background: #265c9f;
}

.freshness {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding: 14px;
  color: var(--muted);
  background: #f5eee3;
  border-radius: 8px;
}

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

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

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

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

.product-card {
  display: grid;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

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

.image-wrap {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1.04;
  overflow: hidden;
  background:
    linear-gradient(150deg, rgba(20, 20, 20, 0.08), rgba(20, 20, 20, 0)),
    #ece5d9;
}

.image-wrap img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-fallback {
  display: grid;
  place-items: center;
  width: 74%;
  aspect-ratio: 1 / 1.08;
  color: rgba(20, 20, 20, 0.52);
  border: 2px solid rgba(20, 20, 20, 0.18);
  border-radius: 8px;
  font-size: 46px;
  font-weight: 900;
}

.product-fallback::after {
  content: "图片待同步";
  display: block;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 800;
}

.badge {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 14px;
  padding: 8px 10px;
  color: white;
  background: var(--red);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
}

.card-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.source-pill {
  max-width: 48%;
  padding: 5px 8px;
  overflow: hidden;
  color: white;
  background: var(--accent);
  border-radius: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-rei {
  background: #2f7d32;
}

.source-evo {
  background: #265c9f;
}

.source-official {
  background: var(--ink);
}

.product-title {
  min-height: 58px;
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.sale-price {
  color: var(--accent-strong);
  font-size: 28px;
  font-weight: 950;
}

.original-price {
  color: var(--muted);
  text-decoration: line-through;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 30px;
}

.color-line {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.tag {
  padding: 6px 8px;
  color: #51483f;
  background: #eee6da;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
}

.size-row {
  display: grid;
  gap: 8px;
  padding-top: 2px;
}

.size-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.size-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.size-chip {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  min-height: 30px;
  padding: 5px 8px;
  color: var(--ink);
  background: #f6efe5;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 900;
}

.size-status {
  display: inline-grid;
  place-items: center;
  min-height: 30px;
  padding: 5px 9px;
  color: var(--muted);
  background: #f7f3ec;
  border: 1px dashed var(--line);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 900;
}

.size-status.needs-review {
  color: var(--red);
  background: #fff2ef;
  border-color: rgba(178, 56, 36, 0.35);
}

.buy-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  color: white;
  background: var(--ink);
  border-radius: 8px;
  font-weight: 900;
}

.buy-link:hover {
  background: var(--accent-strong);
}

.empty-state {
  padding: 32px;
  text-align: center;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sources {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 38px;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
}

.sources h2 {
  margin-right: 8px;
  font-size: 18px;
}

.sources a {
  padding: 10px 12px;
  color: var(--accent-strong);
  background: rgba(24, 106, 99, 0.1);
  border-radius: 8px;
  font-weight: 800;
}

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

  .hero-panel {
    margin-left: 28px;
  }

  .controls,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .summary {
    position: static;
  }

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

@media (max-width: 720px) {
  .topbar {
    height: auto;
    padding: 16px 20px;
  }

  .topnav {
    display: none;
  }

  main {
    padding: 18px 16px 42px;
  }

  .hero-copy {
    padding: 34px 24px;
  }

  .hero {
    min-height: 0;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-panel,
  .segmented {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    margin: 0 18px 18px;
  }

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