:root {
  color-scheme: dark;
  --page: #100d16;
  --surface: #191424;
  --field: #120e1b;
  --line: #342942;
  --text: #faf6ff;
  --muted: #c4b8cf;
  --accent: #d2a8ff;
  --price: #ffd477;
}

:root[data-theme='light'] {
  color-scheme: light;
  --page: #f7f3fc;
  --surface: #fff;
  --field: #faf7ff;
  --line: #ded1ec;
  --text: #241632;
  --muted: #645371;
  --accent: #6f2eab;
  --price: #805107;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 1rem/1.55 system-ui, sans-serif;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { width: min(74rem, calc(100% - 4rem)); margin-inline: auto; }

.skip-link {
  position: fixed;
  inset: 0.75rem auto auto 0.75rem;
  z-index: 5;
  transform: translateY(-180%);
  border-radius: 0.5rem;
  padding: 0.6rem 0.9rem;
  background: var(--surface);
}

.skip-link:focus { transform: translateY(0); }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  min-height: 4.5rem;
  align-items: center;
  gap: 1rem;
}

.brand { display: flex; width: fit-content; align-items: center; gap: 0.7rem; font-size: 1.18rem; font-weight: 820; white-space: nowrap; }
.brand img { width: 2.75rem; height: 2.75rem; border-radius: 50%; }
.brand-mark { color: var(--accent); }
nav { display: flex; gap: 1.75rem; color: var(--muted); font-weight: 650; white-space: nowrap; }
nav a:hover { color: var(--text); }

.theme-toggle {
  display: grid;
  width: 2.65rem;
  height: 2.65rem;
  place-items: center;
  justify-self: end;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--field);
  color: var(--accent);
}

.theme-toggle:hover { border-color: var(--accent); }
.theme-icon::before { content: '☀'; font-size: 1.25rem; }
[data-theme='light'] .theme-icon::before { content: '☾'; }

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 25.5rem;
  margin-top: 1.65rem;
  overflow: hidden;
  align-items: center;
  border: 1px solid #4b3565;
  border-radius: 1.35rem;
  background: #140d22;
  color: #fcf7ff;
}

.hero::after, .hero-art { position: absolute; inset: 0; z-index: -1; }
.hero-art { width: 100%; height: 100%; object-fit: cover; object-position: 50% 8%; }
.hero::after { content: ''; background: linear-gradient(90deg, #120b1df7 0%, #120b1de6 27%, #120b1d43 60%, transparent 83%); }
.hero-copy { max-width: 34rem; padding: clamp(1.5rem, 4.9vw, 3.8rem); }
.hero-marker { margin: 0 0 0.75rem; color: #dfbeff; font-size: 0.87rem; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase; }
.hero h1 { margin: 0; font-size: clamp(3rem, 7.4vw, 5.8rem); font-weight: 900; letter-spacing: -0.065em; line-height: 0.98; }
.hero h1 span { display: block; color: #ffd37d; }
.hero-copy > p:not(.hero-marker) { margin: 1.05rem 0 1.45rem; color: #e4d7ef; }
.hero :focus-visible { outline-color: #dfbeff; }

.button {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 0.72rem;
  padding: 0.55rem 1rem;
  font-size: 0.94rem;
  font-weight: 750;
  white-space: nowrap;
}

.button-primary { background: #ffd37d; color: #291828; }
.button-primary:hover { background: #ffe19e; }
.button-quiet { border-color: var(--line); background: var(--field); color: var(--text); }
.button-quiet:hover { border-color: var(--accent); }

.catalog { padding-block: 2.55rem 3.5rem; scroll-margin-top: 1rem; }
.catalog-title-row { display: flex; align-items: end; justify-content: space-between; gap: 0.6rem 1rem; margin-bottom: 1.15rem; }
.catalog h2 { margin: 0; font-size: clamp(1.65rem, 4vw, 2.35rem); line-height: 1.2; letter-spacing: -0.04em; }
.catalog-notice { margin: 0.35rem 0 0; color: var(--muted); }
.catalog-notice:empty { display: none; }
.results { margin: 0; color: var(--accent); font-size: 0.93rem; font-weight: 650; white-space: nowrap; }

.filters {
  display: grid;
  grid-template-columns: minmax(12rem, 2fr) minmax(9rem, 1fr) minmax(9rem, 1fr) auto;
  align-items: end;
  gap: 0.7rem;
  margin: 0 0 1.15rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: var(--surface);
}

.filters label { display: grid; gap: 0.3rem; min-width: 0; color: var(--muted); font-size: 0.88rem; font-weight: 650; }
.filters input, .filters select {
  width: 100%;
  min-height: 2.8rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  padding: 0.45rem 0.7rem;
  background: var(--field);
  color: var(--text);
  font-size: 1rem;
  font-weight: 450;
}

.filters input::placeholder { color: var(--muted); opacity: 0.86; }

.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.9rem; }
.product-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); }
.product-card:is(:hover, :focus-within) { border-color: var(--accent); }
.product-link { display: flex; height: 100%; flex-direction: column; }
.product-link:focus-visible { outline-offset: -3px; }
.product-image { position: relative; background: var(--field); }
.product-image img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }

.product-badge {
  position: absolute;
  inset: 0.65rem 0.65rem auto auto;
  border: 1px solid #b284e0;
  border-radius: 0.4rem;
  padding: 0.2rem 0.45rem;
  background: #1d102d;
  color: #f3dfff;
  font-size: 0.81rem;
  font-weight: 700;
}

.product-copy { display: flex; flex: 1; flex-direction: column; padding: 0.85rem 0.95rem 1rem; }
.product-code { margin: 0; color: var(--accent); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em; }
.product-copy h3 { margin: 0.18rem 0 0.22rem; font-size: 1.1rem; line-height: 1.3; }
.product-meta { margin: 0 0 0.7rem; color: var(--muted); font-size: 0.91rem; }
.product-footer { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.2rem 0.6rem; margin-top: auto; }
.product-price { color: var(--price); font-size: 1.24rem; font-weight: 790; }
.product-action { color: var(--accent); font-size: 0.87rem; font-weight: 700; }
.product-link:is(:hover, :focus-visible) .product-action { text-decoration: underline; text-underline-offset: 0.2em; }

.empty-state { border: 1px dashed var(--line); border-radius: 0.9rem; padding: 1.5rem; text-align: center; }
.empty-state h3 { margin: 0 0 0.25rem; }
.empty-state p { margin: 0; color: var(--muted); }
.site-footer { border-top: 1px solid var(--line); padding-block: 1.1rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.35rem 1.25rem; }
.footer-inner a { color: var(--text); font-weight: 750; }
.footer-inner p { margin: 0; font-size: 0.92rem; }

.detail { padding-block: 1.55rem 3.35rem; }
.breadcrumbs { flex-wrap: wrap; gap: 0.65rem; font-size: 0.94rem; }
.breadcrumbs a { color: var(--accent); }
.breadcrumbs a:hover { text-decoration: underline; }
.detail-heading h1 { margin: 0 0 0.3rem; font-size: clamp(1.8rem, 4vw, 2.75rem); line-height: 1.1; letter-spacing: -0.035em; }
.detail-heading p { margin: 0; color: var(--muted); }
.detail-panel { min-width: 0; border: 1px solid var(--line); border-radius: 1rem; padding: clamp(0.85rem, 2vw, 1.35rem); background: var(--surface); }
.detail-panel h2 { margin: 0 0 0.6rem; font-size: 1.2rem; }
.detail-sheet { margin-top: 0.85rem; padding: clamp(0.95rem, 2.6vw, 1.75rem); }
.detail-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem 1rem; }
.detail-summary { margin-top: 1.05rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.detail-summary h2 { margin-bottom: 0.25rem; }
.detail-description { margin: 0 0 0.7rem; color: var(--muted); overflow-wrap: anywhere; }
.detail-header h1 { overflow-wrap: anywhere; }
.detail-facts { display: flex; flex-wrap: wrap; gap: 0.35rem 1.5rem; margin: 0; font-size: 0.94rem; }
.detail-facts div { display: flex; align-items: baseline; gap: 0.45rem; }
.detail-facts dt { color: var(--muted); }
.detail-facts dd { margin: 0; font-weight: 680; overflow-wrap: anywhere; }
.detail-order { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.65rem 1.5rem; margin-block: 1rem; border-block: 1px solid var(--line); padding-block: 0.85rem; }
.detail-price { line-height: 1.25; }
.detail-price p { margin: 0 0 0.2rem; color: var(--muted); font-size: 0.83rem; }
.detail-price data { color: var(--price); font-size: 1.65rem; font-weight: 800; }
.sold-note { flex-basis: 100%; margin: 0; color: var(--muted); font-size: 0.9rem; text-align: center; }
.detail-footer { margin-top: 1.25rem; }

.gallery-stage, .zoom-stage { position: relative; overflow: hidden; border-radius: 0.75rem; background: var(--field); touch-action: pan-y pinch-zoom; }
.gallery-stage img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: contain; }
[data-crop='portrait'] { transform: scale(1.55); transform-origin: 52% 22%; }
[data-crop='outfit'] { transform: scale(1.55); transform-origin: 45% 76%; }
.gallery-open { position: absolute; inset: 0; display: flex; align-items: end; justify-content: end; border: 0; padding: 0.75rem; background: transparent; cursor: zoom-in; }
.gallery-open:focus-visible { outline-offset: -3px; }
.gallery-open span, .gallery-count, .gallery-arrow { border: 1px solid #bba1d785; background: #160d25e8; color: #faf2ff; }
.gallery-open span, .gallery-count { border-radius: 0.55rem; padding: 0.4rem 0.65rem; font-size: 0.88rem; font-weight: 700; }
.gallery-count { position: absolute; inset: auto auto 0.75rem 0.75rem; margin: 0; pointer-events: none; }
.gallery-arrow { position: absolute; top: 50%; display: grid; width: 2.75rem; height: 2.75rem; place-items: center; transform: translateY(-50%); border-radius: 50%; }
.gallery-prev { left: 0.75rem; }
.gallery-next { right: 0.75rem; }
.gallery-arrow::before { width: 0.65rem; height: 0.65rem; border: solid currentColor; border-width: 0 2px 2px 0; content: ''; }
.gallery-prev::before { transform: translateX(0.1rem) rotate(135deg); }
.gallery-next::before { transform: translateX(-0.1rem) rotate(-45deg); }
.gallery-open:hover span, .gallery-arrow:hover { background: #32204c; }
.gallery-arrow:focus-visible { outline-color: #ead9ff; }

.gallery-thumbnails { display: flex; gap: 0.55rem; margin-top: 0.65rem; overflow-x: auto; padding: 0.2rem; }
.gallery-thumbnails button { flex: 0 0 clamp(3.75rem, 14vw, 6.5rem); overflow: hidden; border: 2px solid var(--line); border-radius: 0.55rem; padding: 0; background: var(--field); }
.gallery-thumbnails button:hover, .gallery-thumbnails [aria-pressed='true'] { border-color: var(--accent); }
.gallery-thumbnails img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: contain; }

.contact-code-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem; }
.contact-code-row code { border: 1px solid var(--line); border-radius: 0.6rem; padding: 0.4rem 0.6rem; background: var(--field); color: var(--accent); font-size: 0.95rem; font-weight: 650; }
.contact-copy-status { margin: 0.5rem 0 0; color: var(--accent); font-size: 0.9rem; }
.contact-copy-status:empty { margin: 0; }
.contact-channels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(100%, 20rem); gap: 0.55rem; }
.contact-channel { display: grid; align-content: center; min-height: 3.25rem; border: 1px solid var(--line); border-radius: 0.65rem; padding: 0.45rem 0.55rem; background: var(--field); font-size: 0.88rem; text-align: center; }
.contact-channel span { color: var(--muted); }
.contact-link { color: var(--accent); }
.contact-link:hover { border-color: var(--accent); }

.zoom-dialog { width: min(54rem, calc(100% - 2rem)); max-width: none; max-height: calc(100dvh - 2rem); border: 1px solid var(--line); border-radius: 1rem; padding: 0.85rem; background: var(--surface); color: var(--text); }
.zoom-dialog::backdrop { background: #08050de0; }
.zoom-heading { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem 0.75rem; margin-bottom: 0.7rem; }
.zoom-heading h2 { margin: 0; font-size: 1rem; }
.zoom-stage img { width: 100%; height: auto; max-height: calc(100dvh - 8rem); object-fit: contain; }

@media (max-width: 53rem) {
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 46rem) {
  .detail { padding-block: 1.15rem 2.25rem; }
}

@media (max-width: 34rem) {
  .detail-order { justify-content: start; }
  .contact-channels { width: 100%; }
  .sold-note { text-align: start; }
}

@media (max-width: 39rem) {
  .wrap { width: calc(100% - 2rem); }
  .header-inner { grid-template-columns: minmax(0, 1fr) auto auto; min-height: 4rem; gap: 0.7rem; }
  .brand { gap: 0.48rem; font-size: 1rem; }
  .brand img { width: 2.2rem; height: 2.2rem; }
  nav { font-size: 0.87rem; }
  .home-link { display: none; }
  .theme-toggle { width: 2.3rem; height: 2.3rem; }
  .hero { min-height: 28rem; margin-top: 1rem; align-items: end; border-radius: 1rem; }
  .hero-art { object-position: 72% 14%; }
  .hero::after { background: linear-gradient(0deg, #120b1d 1%, #120b1de8 35%, #120b1d00 76%); }
  .hero h1 { font-size: clamp(3rem, 11vw, 4.15rem); }
  .hero-copy > p:not(.hero-marker) { margin-block: 0.68rem 1rem; }
  .catalog { padding-block: 1.8rem 2.2rem; }
  .catalog-title-row { flex-wrap: wrap; align-items: start; }
  .filters { gap: 0.55rem; padding: 0.75rem; }
  .filter-search { grid-column: 1 / -1; }
  .button-quiet { grid-column: 1 / -1; }
  .product-grid { gap: 0.65rem; }
  .product-copy { padding: 0.7rem; }
  .product-copy h3 { font-size: 1rem; }
  .product-meta { font-size: 0.86rem; }
}

@media (max-width: 22rem) {
  .filters, .product-grid { grid-template-columns: minmax(0, 1fr); }
}
