:root {
  color-scheme: light;
  --paper: #ffffff;
  --wash: #f8f4ec;
  --surface: #fffdf9;
  --ink: #2b2118;
  --soft-ink: #3c3127;
  --muted: #76695b;
  --line: #e8dcc8;
  --line-strong: #d8bd83;
  --gold: #d4af6a;
  --gold-deep: #6b4e2e;
  --jade: #6b604f;
  --shadow: 0 8px 24px rgba(80, 60, 30, 0.08);
  --shadow-strong: 0 18px 48px rgba(80, 60, 30, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family:
    "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  background-color: #f8f4ec;
  background-image:
    linear-gradient(rgba(248, 244, 236, 0.78), rgba(248, 244, 236, 0.78)),
    url("./assets/ui/bg-warm-white-marble-gold.svg");
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.42), rgba(248, 244, 236, 0.2)),
    radial-gradient(ellipse at 50% -18%, rgba(255, 255, 255, 0.55), transparent 58%);
}

button,
input {
  font: inherit;
}

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

.shell {
  position: relative;
  width: min(1340px, calc(100% - 40px));
  margin: 0 auto;
  padding: 14px 0 64px;
}

.hero {
  position: sticky;
  top: 10px;
  z-index: 5;
  width: min(990px, 75%);
  margin: 0 auto;
  overflow: hidden;
  padding: 10px 14px 12px;
  border: 1px solid rgba(216, 189, 131, 0.88);
  border-radius: 10px;
  background: rgba(255, 252, 247, 0.88);
  box-shadow: 0 10px 28px rgba(80, 60, 30, 0.08);
  backdrop-filter: blur(8px);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  border-color: rgba(212, 175, 106, 0.5);
  border-style: solid;
  pointer-events: none;
}

.hero::before {
  top: 7px;
  left: 7px;
  border-width: 1px 0 0 1px;
}

.hero::after {
  right: 7px;
  bottom: 7px;
  border-width: 0 1px 1px 0;
}

.ornament-line {
  position: absolute;
  inset: 0;
  opacity: 0.34;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(212, 175, 106, 0.18) 14%, transparent 34%, transparent 68%, rgba(212, 175, 106, 0.1) 84%, transparent),
    radial-gradient(ellipse at 30% 0%, rgba(216, 189, 131, 0.12), transparent 46%);
  mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
}

.hero-mark {
  position: absolute;
  right: 22px;
  top: -15px;
  color: rgba(185, 145, 70, 0.05);
  font-family: "Bodoni MT", "Didot", "Baskerville", Georgia, serif;
  font-size: 74px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  pointer-events: none;
}

.brand-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.brand-lockup {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-width: 0;
}

.eyebrow {
  margin: 0;
  color: var(--gold-deep);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

h1,
.wordmark {
  margin: 0;
  font-family: "Bodoni MT", "Didot", "Baskerville", Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 3.1vw, 44px);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: 0;
  color: transparent;
  background: linear-gradient(92deg, #2b2118 0%, #3b2c1e 46%, #b98a34 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 12px 24px rgba(21, 18, 13, 0.08);
}

.wordmark::after {
  content: "";
  display: block;
  width: 66px;
  height: 1px;
  margin-top: 5px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.stats {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  min-width: 86px;
}

.stats span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.stats strong {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 600;
}

.search-wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 34px 1fr 32px;
  align-items: center;
  min-height: 40px;
  border: 1px solid #e2d5bd;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 6px 16px rgba(80, 60, 30, 0.05);
}

.search-wrap:focus-within {
  border-color: #d4af6a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 0 0 3px rgba(212, 175, 106, 0.14),
    0 8px 22px rgba(80, 60, 30, 0.08);
}

.search-icon {
  color: var(--gold-deep);
  text-align: center;
  font-size: 18px;
}

.search-wrap input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
}

.search-wrap input::placeholder {
  color: #969086;
}

#clearSearch,
.close-btn {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

#clearSearch:hover,
.close-btn:hover {
  color: var(--ink);
  background: #f2eee5;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: min(990px, 75%);
  margin: 0 auto;
  padding: 16px 0 18px;
}

.toolbar p {
  display: none;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

#upcomingEntry,
#resetView {
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--soft-ink);
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
}

#upcomingEntry {
  min-width: 112px;
  border-color: rgba(216, 189, 131, 0.86);
  color: var(--gold-deep);
  background: rgba(255, 252, 247, 0.86);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

#upcomingEntry:hover,
#resetView:hover {
  border-color: rgba(185, 145, 70, 0.6);
  color: var(--ink);
}

.upcoming-dialog {
  width: min(620px, calc(100% - 28px));
  padding: 0;
  border: 1px solid rgba(185, 145, 70, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 252, 247, 0.92), rgba(255, 252, 247, 0.98)),
    url("./assets/ui/bg-warm-white-marble-gold.svg") center / cover no-repeat,
    #fffdf9;
  box-shadow: var(--shadow-strong);
}

.upcoming-dialog::backdrop {
  background: rgba(34, 30, 25, 0.46);
  backdrop-filter: blur(4px);
}

.upcoming-gate,
.upcoming-panel {
  padding: 44px;
}

.upcoming-gate h2,
.upcoming-panel h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-family: "Bodoni MT", "Didot", Georgia, "Times New Roman", "Microsoft YaHei", serif;
  font-size: 38px;
  font-weight: 600;
  line-height: 1.05;
}

.upcoming-gate p,
.upcoming-panel p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.7;
}

.password-field {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--gold-deep);
  font-size: 13px;
  font-weight: 700;
}

.password-field input {
  height: 42px;
  width: 100%;
  border: 1px solid #e2d5bd;
  border-radius: 6px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  outline: none;
}

.password-field input:focus {
  border-color: #d4af6a;
  box-shadow: 0 0 0 3px rgba(212, 175, 106, 0.14);
}

.password-error {
  color: #9d3f2f !important;
  font-size: 13px;
}

.primary-button {
  min-height: 40px;
  padding: 8px 18px;
  border: 1px solid #c59b4a;
  border-radius: 6px;
  color: #fff;
  background: linear-gradient(135deg, #d4af6a, #b98a34);
  cursor: pointer;
  font-weight: 700;
}

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

.upcoming-card {
  border: 1px solid #e6d7bd;
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 252, 247, 0.92);
}

.upcoming-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

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

.product-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #e6d7bd;
  border-radius: 10px;
  background: rgba(255, 252, 247, 0.96);
  box-shadow: 0 8px 24px rgba(80, 60, 30, 0.08);
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.product-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(185, 145, 70, 0.16);
  border-radius: 3px;
  pointer-events: none;
  z-index: 1;
}

.product-card:hover {
  transform: translateY(-4px);
  transform: translateY(-2px);
  border-color: #d4af6a;
  box-shadow: 0 12px 32px rgba(80, 60, 30, 0.12);
}

.image-box {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.98), rgba(255, 252, 247, 0.78) 54%, rgba(248, 244, 236, 0.38) 84%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 252, 247, 0.92));
}

.image-box::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-top: 1px solid rgba(185, 145, 70, 0.2);
  border-bottom: 1px solid rgba(185, 145, 70, 0.2);
  pointer-events: none;
}

.image-box img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 18px rgba(38, 31, 22, 0.16));
}

.gallery-count {
  position: absolute;
  right: 16px;
  bottom: 14px;
  z-index: 2;
  padding: 5px 8px;
  border: 1px solid rgba(185, 145, 70, 0.32);
  border-radius: 4px;
  color: var(--gold-deep);
  background: rgba(255, 250, 241, 0.92);
  font-size: 12px;
  font-weight: 700;
}

.card-copy {
  position: relative;
  z-index: 2;
  padding: 14px 16px 16px;
  border-top: 1px solid rgba(21, 18, 13, 0.08);
  background: linear-gradient(180deg, #ffffff, #fbfdfc);
}

.card-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  color: var(--gold-deep);
  font-size: 11px;
  font-weight: 700;
}

.card-topline span:last-child {
  color: var(--jade);
}

.card-copy h2,
.product-model {
  margin: 0 0 8px;
  color: var(--ink);
  font-family: "Bodoni MT", "Didot", Georgia, "Times New Roman", "Microsoft YaHei", serif;
  font-size: 23px;
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: 0;
}

.card-copy p,
.product-status,
.product-material,
.product-subtitle {
  display: -webkit-box;
  min-height: 32px;
  margin: 12px 0 0;
  overflow: hidden;
  color: #9a8c7a;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.12em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mini-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.mini-specs span,
.tag-row span {
  padding: 5px 8px;
  border: 1px solid #e6d7bd;
  border-radius: 4px;
  color: #6b4e2e;
  background: #fffaf1;
  font-size: 12px;
}

.empty-state {
  padding: 58px 18px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  text-align: center;
  background: rgba(255, 255, 255, 0.8);
}

.empty-state p {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
}

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

.product-dialog {
  width: min(1080px, calc(100% - 28px));
  padding: 0;
  border: 1px solid rgba(185, 145, 70, 0.34);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: var(--shadow-strong);
}

.product-dialog::backdrop {
  background: rgba(34, 30, 25, 0.46);
  backdrop-filter: blur(4px);
}

.close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.82);
}

.dialog-grid {
  display: grid;
  grid-template-columns: minmax(340px, 1.05fr) minmax(320px, 0.95fr);
  min-height: 600px;
}

.dialog-image-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 42px;
  background:
    linear-gradient(rgba(248, 244, 236, 0.84), rgba(255, 252, 247, 0.94)),
    url("./assets/ui/bg-warm-white-marble-gold.svg") center / cover no-repeat,
    #f8f4ec;
}

.dialog-image-panel img {
  max-width: 100%;
  max-height: 470px;
  object-fit: contain;
  filter: drop-shadow(0 24px 24px rgba(40, 31, 20, 0.18));
}

.dialog-image-viewer {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 480px;
}

.image-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 42px;
  height: 58px;
  border: 1px solid rgba(185, 145, 70, 0.32);
  border-radius: 4px;
  color: var(--gold-deep);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 28px rgba(21, 18, 13, 0.12);
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  line-height: 1;
  transform: translateY(-50%);
}

.image-nav:hover {
  border-color: rgba(185, 145, 70, 0.8);
  color: var(--ink);
  background: #ffffff;
}

.image-nav.prev {
  left: 0;
}

.image-nav.next {
  right: 0;
}

.image-counter {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 3;
  padding: 5px 9px;
  border: 1px solid rgba(185, 145, 70, 0.28);
  border-radius: 4px;
  color: var(--gold-deep);
  background: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 700;
}

.thumb-strip {
  display: flex;
  width: 100%;
  max-width: 520px;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: center;
  overflow: visible;
  padding: 4px 2px 2px;
}

.thumb-button {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  padding: 5px;
  border: 1px solid rgba(21, 18, 13, 0.14);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.thumb-button:hover,
.thumb-button.active {
  border-color: rgba(185, 145, 70, 0.86);
  box-shadow: 0 8px 18px rgba(21, 18, 13, 0.12);
  transform: translateY(-1px);
}

.thumb-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}

.dialog-copy {
  padding: 56px 44px 40px;
}

.dialog-category {
  margin: 0 0 10px;
  color: var(--gold-deep);
  font-size: 13px;
  font-weight: 700;
}

.dialog-copy h2 {
  margin: 0 0 16px;
  font-family: "Bodoni MT", "Didot", Georgia, "Times New Roman", "Microsoft YaHei", serif;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 600;
  line-height: 1.08;
}

.dialog-intro {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.8;
}

.spec-list {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.spec-list dt,
.spec-list dd {
  margin: 0;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.spec-list dt {
  color: var(--muted);
  background: #f8f7f3;
}

.spec-list dd {
  color: var(--ink);
}

.spec-list dt:nth-last-of-type(1),
.spec-list dd:nth-last-of-type(1) {
  border-bottom: 0;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

@media (max-width: 1080px) {
  .hero,
  .toolbar {
    width: min(100%, 990px);
  }

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

@media (max-width: 760px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .hero {
    top: 8px;
    padding: 12px;
  }

  .brand-row,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .brand-lockup {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .stats {
    justify-content: flex-start;
    min-width: 0;
  }

  .search-wrap {
    grid-template-columns: 34px 1fr 34px;
    min-height: 44px;
  }

  .search-wrap input {
    font-size: 15px;
  }

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

  .card-copy h2 {
    font-size: 20px;
  }

  .dialog-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .dialog-image-panel {
    padding: 34px 24px 24px;
  }

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

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