:root {
  color-scheme: light;
  --ink: #241f1b;
  --muted: #746c62;
  --line: #ddd4c8;
  --paper: #fbfaf6;
  --panel: #ffffff;
  --wool: #e8ddcf;
  --sage: #667762;
  --berry: #8c4b52;
  --camel: #b48257;
  --charcoal: #313438;
  --shadow: 0 18px 45px rgba(36, 31, 27, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(221, 212, 200, 0.8);
  background: rgba(251, 250, 246, 0.92);
  backdrop-filter: blur(18px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  min-height: 72px;
  margin: 0 auto;
  padding: 0 22px;
  gap: 18px;
}

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--charcoal);
  color: #fff;
  font-weight: 700;
}

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

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  min-height: calc(100svh - 72px);
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 22px 48px;
  gap: 36px;
  align-items: center;
}

.hero-media {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--wool);
  box-shadow: var(--shadow);
}

.hero-media video,
.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media img {
  display: none;
}

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

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

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

h1 {
  margin-bottom: 20px;
  font-size: clamp(44px, 8vw, 96px);
  line-height: 0.95;
  letter-spacing: 0;
}

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

.hero-copy p:not(.eyebrow),
.section-heading p,
.contact-section p,
.dialog-copy p {
  color: var(--muted);
  line-height: 1.8;
}

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

.primary-button,
.ghost-button,
.text-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 700;
}

.primary-button {
  background: var(--charcoal);
  color: #fff;
}

.ghost-button {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

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

.category-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px 44px;
  gap: 12px;
}

.category-card,
.collection-grid button {
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.category-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
}

.category-card:hover,
.category-card.is-active,
.collection-grid button:hover {
  transform: translateY(-2px);
  border-color: rgba(140, 75, 82, 0.45);
  box-shadow: 0 12px 30px rgba(36, 31, 27, 0.08);
}

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

.category-card strong {
  font-size: 32px;
}

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 22px;
}

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

.section-heading p {
  max-width: 460px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(140px, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.toolbar label {
  display: grid;
  gap: 7px;
}

.toolbar span {
  color: var(--muted);
  font-size: 13px;
}

.toolbar input,
.toolbar select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  padding: 0 12px;
}

.result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
}

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

.product-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  cursor: pointer;
  text-align: left;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

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

.product-image {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--wool);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease;
}

.product-card:hover .product-image img {
  transform: scale(1.035);
}

.badge {
  position: absolute;
  left: 10px;
  top: 10px;
  border-radius: 999px;
  background: rgba(36, 31, 27, 0.78);
  color: #fff;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.product-info {
  display: grid;
  gap: 9px;
  padding: 14px;
}

.product-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.product-title strong {
  line-height: 1.35;
}

.product-title span {
  flex: none;
  color: var(--berry);
  font-size: 13px;
  font-weight: 700;
}

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

.empty-state {
  padding: 40px 0;
  color: var(--muted);
  text-align: center;
}

.collections {
  padding-top: 24px;
}

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

.collection-grid button {
  display: grid;
  align-content: space-between;
  padding: 18px;
}

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

.collection-grid strong {
  font-size: 20px;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  max-width: 1180px;
  margin: 24px auto 64px;
  padding: 44px 22px;
  gap: 28px;
  align-items: start;
  border-top: 1px solid var(--line);
}

.contact-panel {
  display: grid;
  gap: 12px;
}

.contact-panel div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
}

.contact-panel a {
  color: var(--ink);
  text-align: right;
  text-decoration: underline;
  text-decoration-color: rgba(140, 75, 82, 0.35);
  text-underline-offset: 4px;
}

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

.wechat-card {
  align-items: center;
}

.wechat-card img {
  width: 118px;
  height: 118px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  object-fit: cover;
}

.wechat-card div {
  display: grid;
  min-height: auto;
  justify-items: end;
  gap: 8px;
  border: 0;
  padding: 0;
}

.product-dialog {
  width: min(1060px, calc(100vw - 28px));
  max-height: calc(100svh - 28px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.product-dialog::backdrop {
  background: rgba(36, 31, 27, 0.45);
  backdrop-filter: blur(6px);
}

.close-button {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.dialog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  gap: 0;
}

.dialog-gallery {
  min-width: 0;
  padding: 18px;
  background: #efe7dc;
}

#dialogImage {
  display: block;
  width: 100%;
  max-height: 72svh;
  aspect-ratio: 4 / 5;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}

.thumb-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
}

.thumb-row button {
  flex: 0 0 64px;
  width: 64px;
  height: 76px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0;
  background: #fff;
  cursor: pointer;
}

.thumb-row button.is-active {
  border-color: var(--berry);
}

.thumb-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dialog-copy {
  min-width: 0;
  padding: 34px;
  overflow-y: auto;
}

.status-pill {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  background: rgba(102, 119, 98, 0.13);
  color: var(--sage);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
}

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

.detail-list div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.detail-list dt {
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
}

.care-note {
  margin: 18px 0 0;
  font-size: 14px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 40;
  transform: translate(-50%, 18px);
  border-radius: 999px;
  background: var(--charcoal);
  color: #fff;
  padding: 10px 16px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

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

@media (max-width: 920px) {
  .hero,
  .contact-section,
  .dialog-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-media {
    min-height: 62svh;
  }

  .section-heading {
    display: block;
  }

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

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

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

  .dialog-copy {
    padding: 24px;
  }
}

@media (max-width: 640px) {
  .nav {
    min-height: 64px;
    padding: 0 14px;
  }

  .nav-links {
    gap: 12px;
    font-size: 13px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .hero,
  .section,
  .contact-section,
  .category-band {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero {
    gap: 22px;
    padding-top: 16px;
  }

  .hero-media {
    min-height: 56svh;
  }

  h1 {
    font-size: 52px;
  }

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

  .category-band {
    gap: 8px;
  }

  .category-card {
    min-height: 92px;
    padding: 14px;
  }

  .product-grid {
    gap: 14px;
  }

  .product-image {
    aspect-ratio: 3 / 4;
  }

  .contact-panel div {
    display: grid;
    justify-content: start;
  }

  .contact-panel a {
    text-align: left;
  }

  .wechat-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .wechat-card div {
    justify-items: start;
  }

  .product-dialog {
    width: 100vw;
    max-height: 100svh;
    border-radius: 0;
  }

  .dialog-gallery {
    padding: 12px;
  }

  #dialogImage {
    max-height: 58svh;
  }
}
