:root {
  --paper: #f4f0e8;
  --paper-soft: #faf8f3;
  --paper-warm: #ebe3d7;
  --ink: #1e241f;
  --muted: #6f746e;
  --green: #1f3c31;
  --green-deep: #162c24;
  --copper: #a36f4c;
  --copper-soft: #d9b493;
  --line: rgba(30, 36, 31, .14);
  --line-strong: rgba(30, 36, 31, .24);
  --white-line: rgba(255, 255, 255, .2);
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "Times New Roman", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --max-width: 1240px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button, input { color: inherit; font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 4px;
}

.mall-topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 248, 243, .88);
  backdrop-filter: blur(14px);
}

.mall-topbar__inner {
  display: grid;
  width: min(calc(100% - 48px), 1400px);
  min-height: 80px;
  align-items: center;
  margin-inline: auto;
  grid-template-columns: 1fr auto 1fr;
  gap: 26px;
}

.mall-brand {
  display: inline-flex;
  width: max-content;
  flex-direction: column;
  line-height: 1;
}

.mall-brand__cn {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: .2em;
}

.mall-brand__en {
  margin-top: 7px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .28em;
}

.mall-topbar__title {
  color: var(--green);
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: .14em;
  text-align: center;
}

.mall-topbar__nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.mall-topbar__link {
  position: relative;
  padding: 10px 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .1em;
}

.mall-topbar__link::after {
  position: absolute;
  right: 0;
  bottom: 4px;
  left: 0;
  height: 1px;
  background: var(--green);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s var(--ease);
}

.mall-topbar__link:hover { color: var(--green); }
.mall-topbar__link:hover::after { transform: scaleX(1); transform-origin: left; }

.mall-topbar__button,
.xd-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 18px;
  border: 1px solid transparent;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  transition: background .3s ease, color .3s ease, border-color .3s ease, transform .3s var(--ease);
}

.mall-topbar__button::after,
.xd-button::after {
  width: 7px;
  height: 7px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  content: "";
  transform: rotate(45deg);
  transition: transform .3s var(--ease);
}

.mall-topbar__button:hover,
.xd-button:hover {
  background: var(--green-deep);
  transform: translateY(-1px);
}

.mall-topbar__button:hover::after,
.xd-button:hover::after { transform: translateX(4px) rotate(45deg); }

.xd-button--ghost {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--green);
}

.xd-button--ghost:hover { border-color: var(--green); color: #fff; }

.mall-main {
  width: min(calc(100% - 48px), var(--max-width));
  margin: 0 auto;
  padding: 62px 0 120px;
}

.xd-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  color: var(--copper);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .22em;
  line-height: 1.4;
  text-transform: uppercase;
}

.xd-eyebrow::before {
  width: 28px;
  height: 1px;
  background: currentColor;
  content: "";
}

.xd-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 400;
  letter-spacing: .03em;
  line-height: 1.28;
}

.xd-copy {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: .04em;
  line-height: 2;
}

.mall-footer {
  padding: 46px 0 28px;
  background: #111a16;
  color: #fff;
}

.mall-footer__inner {
  display: flex;
  width: min(calc(100% - 48px), var(--max-width));
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
}

.mall-footer__copy {
  color: rgba(255, 255, 255, .48);
  font-size: 10px;
  letter-spacing: .1em;
  line-height: 1.8;
}

.mall-footer__back {
  color: rgba(255, 255, 255, .72);
  font-size: 11px;
  letter-spacing: .1em;
}

.select-hero {
  display: grid;
  min-height: 410px;
  align-items: stretch;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr);
}

.select-hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(38px, 6vw, 82px);
}

.select-hero__note {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 9px;
  margin-top: 34px;
  padding: 10px 14px;
  border-left: 2px solid var(--copper);
  color: var(--green);
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: .08em;
}

.select-hero__visual {
  position: relative;
  min-height: 410px;
  overflow: hidden;
  background: var(--green-deep);
}

.select-hero__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.select-hero__visual::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(22, 44, 36, .24), transparent 50%, rgba(22, 44, 36, .12));
  content: "";
  pointer-events: none;
}

.select-hero__stamp {
  position: absolute;
  z-index: 1;
  right: 24px;
  bottom: 22px;
  display: grid;
  width: 98px;
  height: 98px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 50%;
  background: rgba(22, 44, 36, .18);
  color: #fff;
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: .16em;
  line-height: 1.8;
  text-align: center;
  backdrop-filter: blur(8px);
}

.select-block { margin-top: 74px; }

.select-block__head,
.catalog-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.select-block__head h2,
.catalog-section__head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 400;
  letter-spacing: .04em;
}

.select-block__head p,
.catalog-section__head p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .08em;
  line-height: 1.7;
  text-align: right;
}

.tag-grid {
  display: grid;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  grid-template-columns: repeat(3, 1fr);
}

.tag-card {
  position: relative;
  display: flex;
  min-height: 162px;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 24px 22px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-soft);
  transition: background .3s ease, color .3s ease, transform .3s var(--ease);
}

.tag-card:hover {
  z-index: 1;
  background: var(--green);
  color: #fff;
  transform: translateY(-3px);
}

.tag-card.all { background: var(--paper-warm); }
.tag-card.all:hover { background: var(--green); }

.tag-card__number {
  color: var(--copper);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: .08em;
}

.tag-card:hover .tag-card__number { color: var(--copper-soft); }

.tag-card__title {
  margin-top: 20px;
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: .06em;
}

.tag-card__sub {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .04em;
}

.tag-card:hover .tag-card__sub { color: rgba(255, 255, 255, .66); }

.tag-card__arrow {
  position: absolute;
  right: 22px;
  bottom: 21px;
  font-size: 19px;
  line-height: 1;
  transition: transform .3s var(--ease);
}

.tag-card:hover .tag-card__arrow { transform: translateX(5px); }

.select-error {
  margin-top: 22px;
  padding: 13px 16px;
  border-left: 2px solid var(--copper);
  background: rgba(163, 111, 76, .1);
  color: #8e4b2f;
  font-size: 13px;
}

.catalog-hero {
  display: grid;
  align-items: end;
  gap: 30px;
  grid-template-columns: 1fr auto;
  margin-bottom: 70px;
}

.catalog-hero__context {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
  color: var(--green);
  font-size: 11px;
  letter-spacing: .1em;
}

.catalog-hero__context::before {
  width: 30px;
  height: 1px;
  background: var(--copper);
  content: "";
}

.catalog-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.catalog-section { margin-top: 62px; }
.catalog-section.hidden { display: none; }

.catalog-section__title-wrap { display: flex; align-items: baseline; gap: 14px; }

.catalog-count {
  color: var(--copper);
  font-family: var(--serif);
  font-size: 14px;
}

.catalog-switch {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--green);
  font-size: 11px;
  letter-spacing: .08em;
}

.catalog-switch:hover { color: var(--copper); }

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

.product-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-soft);
  transition: transform .4s var(--ease), border-color .3s ease, box-shadow .4s ease;
}

.product-card:hover {
  border-color: rgba(163, 111, 76, .48);
  box-shadow: 0 18px 34px rgba(30, 36, 31, .1);
  transform: translateY(-5px);
}

.product-card__image {
  position: relative;
  display: grid;
  aspect-ratio: 1 / 1;
  place-items: center;
  overflow: hidden;
  background: var(--paper-warm);
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .65s var(--ease), filter .65s ease;
}

.product-card:hover .product-card__image img {
  filter: saturate(.92);
  transform: scale(1.025);
}

.product-card__placeholder {
  color: rgba(30, 36, 31, .42);
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .12em;
}

.product-card__body {
  display: flex;
  min-height: 138px;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 18px 18px 16px;
}

.product-card__index {
  color: var(--copper);
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: .08em;
}

.product-card__name {
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: .04em;
  line-height: 1.45;
}

.product-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.product-card__price {
  color: var(--copper);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .04em;
}

.product-card__price::before {
  margin-right: 3px;
  content: "¥";
  font-size: 11px;
}

.product-card__category {
  padding: 5px 8px;
  border: 1px solid rgba(31, 60, 49, .18);
  color: var(--green);
  font-size: 10px;
  letter-spacing: .04em;
}

.product-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.product-card__tag {
  padding: 3px 7px;
  border-bottom: 1px solid rgba(163, 111, 76, .38);
  color: var(--muted);
  font-size: 10px;
}

.catalog-empty {
  padding: 58px 20px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: .08em;
  text-align: center;
}

.mall-dock {
  position: fixed;
  z-index: 50;
  right: 22px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  background: rgba(250, 248, 243, .93);
  box-shadow: 0 16px 36px rgba(21, 30, 25, .14);
  backdrop-filter: blur(14px);
}

.mall-dock a,
.mall-dock button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--green);
  font-size: 11px;
  letter-spacing: .08em;
  line-height: 1;
}

.mall-dock a:hover { border-color: var(--line-strong); }

.mall-dock .price-btn {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.mall-dock .price-btn:hover { background: var(--green-deep); }
.mall-dock .price-btn.unlocked { border-color: var(--copper); background: var(--copper); }

.detail-layout {
  display: grid;
  align-items: start;
  gap: clamp(36px, 7vw, 96px);
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, .96fr);
}

.detail-gallery__main {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-soft);
}

.detail-gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-gallery__placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--muted);
  font-family: var(--serif);
  letter-spacing: .1em;
}

.detail-gallery__count {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 7px 10px;
  background: rgba(22, 44, 36, .72);
  color: #fff;
  font-size: 10px;
  letter-spacing: .08em;
}

.detail-gallery__thumbs {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.detail-gallery__thumb {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--paper-soft);
}

.detail-gallery__thumb.is-active { border-color: var(--copper); }

.detail-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .72;
  transition: opacity .25s ease;
}

.detail-gallery__thumb.is-active img,
.detail-gallery__thumb:hover img { opacity: 1; }

.detail-info { padding-top: 8px; }

.detail-info__category {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--copper);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.detail-info__category::before {
  width: 28px;
  height: 1px;
  background: currentColor;
  content: "";
}

.detail-info h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 62px);
  font-weight: 400;
  letter-spacing: .04em;
  line-height: 1.25;
}

.detail-info__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 26px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.detail-info__price {
  color: var(--copper);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .04em;
}

.detail-info__price::before {
  margin-right: 4px;
  content: "¥";
  font-size: 13px;
}

.detail-info__category-pill {
  color: var(--green);
  font-size: 12px;
  letter-spacing: .06em;
}

.detail-info__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 20px;
}

.detail-info__tag {
  padding: 5px 9px;
  background: var(--paper-warm);
  color: var(--green);
  font-size: 10px;
  letter-spacing: .06em;
}

.detail-panel {
  margin-top: 30px;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
}

.detail-panel h2 {
  margin: 0;
  color: var(--green);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: .08em;
}

.detail-panel p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: .03em;
  line-height: 2;
  white-space: pre-wrap;
}

.detail-panel.is-empty p { color: rgba(111, 116, 110, .7); }

.detail-contact {
  display: grid;
  margin-top: 34px;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--paper-soft);
  gap: 8px;
}

.detail-contact strong {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: .08em;
}

.detail-contact span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.price-modal {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  padding: 18px;
  place-items: center;
  background: rgba(22, 44, 36, .48);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.price-modal.show { opacity: 1; pointer-events: auto; }

.price-card {
  position: relative;
  width: min(100%, 410px);
  padding: 36px 30px 30px;
  border: 1px solid rgba(255, 255, 255, .4);
  background: var(--paper-soft);
  box-shadow: 0 22px 60px rgba(14, 28, 23, .24);
}

.price-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: .08em;
}

.price-card p {
  margin: 14px 0 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.price-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

.price-close:hover { border-color: var(--green); color: var(--green); }

.price-input {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: #fff;
  font-size: 16px;
  letter-spacing: .18em;
}

.price-input:focus { border-color: var(--green); outline: 2px solid rgba(31, 60, 49, .12); }

.price-submit {
  width: 100%;
  min-height: 52px;
  margin-top: 12px;
  border: 0;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1em;
}

.price-submit:hover { background: var(--green-deep); }
.price-submit:disabled { cursor: wait; opacity: .65; }

.price-error {
  min-height: 20px;
  margin-top: 10px;
  color: #9a4932;
  font-size: 12px;
}

.xd-fade-up { animation: xd-fade-up .65s var(--ease) both; }

@keyframes xd-fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 980px) {
  .mall-topbar__inner { grid-template-columns: 1fr auto; }
  .mall-topbar__title { display: none; }
  .select-hero { grid-template-columns: 1fr; }
  .select-hero__visual { min-height: 320px; }
  .tag-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-info { max-width: 760px; }
}

@media (max-width: 680px) {
  .mall-topbar__inner,
  .mall-main,
  .mall-footer__inner { width: calc(100% - 32px); }
  .mall-topbar__inner { min-height: 72px; }
  .mall-brand__cn { font-size: 19px; }
  .mall-brand__en { font-size: 7px; }
  .mall-topbar__link { display: none; }
  .mall-topbar__button { min-height: 40px; padding-inline: 13px; font-size: 10px; }
  .mall-main { padding-top: 34px; padding-bottom: 106px; }
  .select-hero__copy { padding: 42px 24px 48px; }
  .select-hero__visual { min-height: 260px; }
  .select-hero__stamp { right: 18px; bottom: 16px; width: 82px; height: 82px; font-size: 10px; }
  .select-block { margin-top: 52px; }
  .select-block__head,
  .catalog-section__head { align-items: flex-start; flex-direction: column; }
  .select-block__head p,
  .catalog-section__head p { text-align: left; }
  .tag-grid { grid-template-columns: 1fr; }
  .tag-card { min-height: 132px; }
  .catalog-hero { display: block; margin-bottom: 48px; }
  .catalog-hero__actions { justify-content: flex-start; margin-top: 28px; }
  .catalog-section { margin-top: 48px; }
  .product-grid { gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-card__body { min-height: 130px; padding: 14px 13px 13px; }
  .product-card__name { font-size: 16px; }
  .product-card__meta { align-items: flex-start; flex-direction: column; }
  .product-card__category { width: max-content; }
  .mall-dock { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); left: 12px; justify-content: space-between; }
  .mall-dock a, .mall-dock button { flex: 1; padding-inline: 8px; }
  .detail-gallery__thumbs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .detail-info h1 { font-size: 38px; }
  .detail-contact { margin-top: 26px; }
  .mall-footer__inner { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
