:root {
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #201a2b;
  background: #fbfafc;
  --page: #fbfafc;
  --white: #fff;
  --ink: #201a2b;
  --quiet: #655d71;
  --line: #e8e3ee;
  --accent: #5c37bb;
  --accent-dark: #4b299e;
  --accent-soft: #f1ebfd;
  --shadow: 0 14px 42px #28174921;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
body:has(dialog[open]) { overflow: hidden; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
p, h1, h2, h3, dl, dd { margin: 0; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
[id] { scroll-margin-top: 1rem; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wrap { width: min(1176px, calc(100% - 80px)); margin-inline: auto; }
.skip-link {
  z-index: 2;
  position: fixed;
  inset: 0 auto auto 0;
  color: var(--white);
  background: var(--accent);
  padding: 12px 16px;
  clip-path: inset(50%);
  transform: translateY(-125%);
}
.skip-link:focus { clip-path: none; transform: translateY(0); }

.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner {
  min-height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 10px;
  font-size: .92rem;
  font-weight: 780;
  letter-spacing: .14em;
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  color: var(--white);
  background: var(--accent);
}
.brand-mark .icon { width: 23px; height: 23px; stroke-width: 1.9; }
.main-nav { display: flex; gap: 34px; align-self: stretch; }
.main-nav a {
  position: relative;
  display: grid;
  place-items: center;
  color: var(--quiet);
  font-size: .9rem;
  font-weight: 600;
}
.main-nav a:hover, .main-nav a[aria-current] { color: var(--accent); }
.main-nav a[aria-current]::after {
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
  content: "";
}
.header-cart {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 5px 10px 5px 13px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--white);
  color: var(--ink);
  font-size: .875rem;
  font-weight: 650;
  white-space: nowrap;
}
.header-cart:hover { border-color: var(--accent); }
.header-cart .icon { width: 18px; height: 18px; }
.cart-count {
  display: grid;
  min-width: 23px;
  height: 23px;
  align-items: center;
  padding-inline: 5px;
  border-radius: 100px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: .8125rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.breadcrumb {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 66px;
  color: var(--quiet);
  font-size: .875rem;
}
.breadcrumb span:last-child { color: var(--ink); font-weight: 650; }
.crumb-divider { color: #8a8099; }

.product {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: start;
  gap: clamp(32px, 5vw, 76px);
}
.hero-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.16;
  border-radius: 24px;
  background: #e5dff5;
}
.hero-image > img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 44%; }
.icon-button {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 50%;
}
.icon-button:hover { color: var(--accent); border-color: var(--accent); }
.zoom-button { position: absolute; top: 17px; right: 17px; box-shadow: 0 4px 20px #24163d13; }
.thumbnails { display: flex; align-items: center; gap: 10px; margin-top: 13px; }
.thumbnail {
  width: 72px;
  height: 63px;
  padding: 3px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--white);
}
.thumbnail:hover { border-color: var(--accent); }
.thumbnail[aria-pressed="true"] { border: 2px solid var(--accent); padding: 2px; }
.thumbnail img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.gallery-caption { margin-left: 5px; font-size: .875rem; color: var(--quiet); }

.product-info { padding-top: 10px; }
h1 { font-size: clamp(2.8rem, 5vw, 4.35rem); letter-spacing: -.065em; line-height: 1.06; font-weight: 790; }
h1 span { letter-spacing: -.075em; }
.product-type { margin-top: 12px; font-size: clamp(1.375rem, 2.4vw, 1.75rem); font-weight: 650; }
.product-description { margin-top: 14px; color: var(--quiet); line-height: 1.75; max-width: 26em; }
.price {
  display: flex;
  align-items: baseline;
  margin-top: 20px;
  font-size: 2.55rem;
  font-weight: 760;
  line-height: 1.12;
  letter-spacing: -.06em;
  font-variant-numeric: lining-nums tabular-nums;
}
.currency { margin-right: 4px; font-size: 1.35rem; letter-spacing: 0; }
.cents { margin-left: 2px; font-size: 1.45rem; letter-spacing: -.045em; }
.purchase-form { margin-top: 24px; padding-top: 21px; border-top: 1px solid var(--line); }
.field-label, .color-field legend { padding: 0; font-size: .925rem; font-weight: 700; }
.color-options { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 11px; }
.color-option { position: relative; cursor: pointer; }
.color-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.color-tile {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  min-width: 100px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  font-size: .875rem;
  font-weight: 600;
}
.color-option:hover .color-tile { border-color: var(--accent); }
.color-option input:checked + .color-tile {
  color: var(--accent-dark);
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.color-option input:focus-visible + .color-tile { outline: 3px solid var(--accent); outline-offset: 3px; }
.swatch { width: 15px; height: 15px; border-radius: 50%; border: 1px solid #22143122; }
.swatch-lavender { background: #bfb0e7; }
.swatch-graphite { background: #47454d; }
.quantity-line { display: flex; align-items: center; gap: 20px; margin-top: 19px; }
.stepper {
  display: inline-grid;
  grid-template-columns: 36px minmax(30px, auto) 36px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
}
.stepper button {
  display: grid;
  place-items: center;
  min-height: 38px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
}
.stepper button .icon { width: 16px; height: 16px; }
.stepper button:enabled:hover { background: var(--accent-soft); color: var(--accent); }
.stepper button:disabled { opacity: .38; }
.stepper output { font-size: .9rem; text-align: center; font-variant-numeric: tabular-nums; }
.purchase-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 11px;
  margin-top: 22px;
}
.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}
.button-primary { color: var(--white); background: var(--accent); }
.button-primary:enabled:hover { background: var(--accent-dark); }
.button-secondary { color: var(--accent-dark); background: var(--white); border-color: #d9cdee; }
.button-secondary:enabled:hover { background: var(--accent-soft); border-color: var(--accent); }
.button:active { transform: translateY(1px); }
.service-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 19px;
  color: var(--quiet);
  font-size: .875rem;
}
.service-notes span { display: inline-flex; gap: 7px; align-items: center; }
.service-notes .icon { width: 18px; height: 18px; color: var(--accent); }

.specifications { margin-top: 47px; padding-block: 28px 52px; border-top: 1px solid var(--line); }
.specifications h2 { font-size: 1.6rem; letter-spacing: -.035em; }
.spec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-top: 16px; }
.spec {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 3px 13px;
  min-height: 92px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}
.spec .icon {
  grid-row: span 2;
  width: 42px;
  height: 42px;
  padding: 10px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.spec dt { align-self: end; color: var(--quiet); font-size: .875rem; }
.spec dd { align-self: start; font-size: 1rem; font-weight: 720; }
.site-footer { border-top: 1px solid var(--line); background: var(--white); }
.footer-inner { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.footer-inner strong { font-size: .875rem; letter-spacing: .13em; }
.footer-inner p { color: var(--quiet); font-size: .875rem; }

dialog { color: var(--ink); border: 0; padding: 0; }
dialog::backdrop { background: #22193280; }
.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(100%, 452px);
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  background: var(--page);
  box-shadow: var(--shadow);
}
.drawer[open] { animation: drawer-in 180ms ease-out; }
@keyframes drawer-in { from { transform: translateX(100%); } }
.drawer-panel { display: flex; flex-direction: column; height: 100%; }
.drawer-header, .drawer-footer { padding-inline: 22px; background: var(--white); }
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 75px;
  border-bottom: 1px solid var(--line);
}
.drawer-header h2 { font-size: 1.375rem; }
.drawer-header h2:focus { outline: none; }
.drawer-body { flex: 1; padding: 22px; overflow-y: auto; overscroll-behavior: contain; }
.drawer-footer { padding-block: 17px max(19px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.drawer-footer:empty { display: none; }
.drawer-footer .button { width: 100%; margin-top: 12px; }
.drawer-footer > .button:only-child { margin-top: 0; }
.cart-items { margin: 0; padding: 0; list-style: none; }
.cart-item { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; align-items: start; gap: 6px 12px; }
.cart-item + .cart-item { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.line-photo { grid-row: span 2; width: 70px; height: 70px; border-radius: 11px; object-fit: cover; }
.line-name { font-weight: 700; line-height: 1.4; }
.line-meta { margin-top: 3px; color: var(--quiet); font-size: .875rem; }
.line-price { white-space: nowrap; font-size: .925rem; font-weight: 750; }
.line-remove {
  justify-self: end;
  align-self: center;
  min-height: 36px;
  border: 0;
  padding: 3px 0 3px 8px;
  color: var(--accent-dark);
  background: transparent;
  font-size: .875rem;
}
.line-remove:hover { text-decoration: underline; }
.line-stepper { justify-self: start; grid-template-columns: 35px 28px 35px; }
.line-stepper button { min-height: 35px; }
.summary-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: .925rem; }
.summary-row + .summary-row { margin-top: 9px; }
.summary-total { font-size: 1.1rem; font-weight: 750; }
.summary-total strong { font-size: 1.45rem; }
.checkout-note { margin: 20px 0 0; padding: 13px 15px; border-radius: 11px; color: var(--accent-dark); background: var(--accent-soft); line-height: 1.55; }
.message-state { padding-top: 34px; text-align: center; }
.message-state > .icon { width: 52px; height: 52px; padding: 13px; color: var(--accent); background: var(--accent-soft); border-radius: 17px; }
.message-state h3 { margin-top: 11px; font-size: 1.25rem; }
.message-state p { margin-top: 7px; color: var(--quiet); line-height: 1.6; }
.lightbox { overflow: visible; max-width: calc(100% - 28px); max-height: calc(100% - 28px); border-radius: 16px; background: transparent; }
.lightbox-panel { position: relative; }
.lightbox-panel img { width: auto; height: auto; max-height: calc(100dvh - 28px); border-radius: 16px; }
.toast {
  position: fixed;
  z-index: 2;
  inset: auto auto max(20px, env(safe-area-inset-bottom)) 50%;
  width: max-content;
  max-width: calc(100% - 28px);
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  font-weight: 650;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 160ms, transform 160ms;
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 900px) {
  .wrap { width: min(100% - 48px, 1176px); }
  .product { gap: 28px; }
  .product-info { padding-top: 2px; }
  .hero-image { aspect-ratio: 1; }
  .spec { padding-inline: 12px; gap: 3px 8px; }
}
@media (max-width: 680px) {
  .wrap { width: calc(100% - 34px); }
  .header-inner { min-height: 62px; grid-template-columns: 1fr auto; gap: 8px; }
  .main-nav { display: none; }
  .breadcrumb { min-height: 47px; gap: 9px; }
  .product { grid-template-columns: 1fr; gap: 24px; }
  .hero-image { border-radius: 17px; aspect-ratio: 1.13; }
  .zoom-button { inset: 11px 11px auto auto; }
  .thumbnails { margin-top: 9px; }
  .thumbnail { width: 64px; height: 54px; }
  .product-type { margin-top: 8px; }
  .product-description { margin-top: 9px; }
  .price { margin-top: 16px; }
  .purchase-form { margin-top: 19px; padding-top: 16px; }
  .specifications { margin-top: 30px; padding-block: 20px 30px; }
  .spec-grid { grid-template-columns: 1fr; gap: 8px; }
  .spec { min-height: 75px; }
  .footer-inner { flex-wrap: wrap; justify-content: flex-start; padding-block: 13px; min-height: 62px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
