:root {
  --ink: #171717;
  --muted: #6b6862;
  --line: #dedbd4;
  --paper: #ffffff;
  --wash: #f5f3ee;
  --soft: #faf9f6;
  --accent: #7e2735;
  --ozon: #1457ff;
  --wildberries: #b51ba7;
  --page: min(1500px, calc(100vw - 64px));
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); }
button, select, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
svg { display: block; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: white;
  background: var(--ink);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.announcement {
  display: grid;
  min-height: 34px;
  place-items: center;
  padding: 7px 20px;
  color: #fff;
  background: var(--ink);
  font-size: 11px;
  letter-spacing: .11em;
  text-align: center;
  text-transform: uppercase;
}
.announcement p { margin: 0; }
.announcement span { margin: 0 10px; color: #b8b5af; }

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 78px;
  padding: 0 max(32px, calc((100vw - 1500px) / 2));
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, white 94%, transparent);
  backdrop-filter: blur(14px);
}

.brand { display: inline-flex; width: max-content; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 21px;
  font-style: italic;
}
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-size: 12px; letter-spacing: .14em; }
.brand-copy small { color: var(--muted); font-size: 9px; letter-spacing: .25em; }

.desktop-nav { display: flex; align-items: center; gap: 34px; }
.desktop-nav a { position: relative; padding: 28px 0 25px; font-size: 13px; text-decoration: none; }
.desktop-nav a::after { position: absolute; right: 0; bottom: 21px; left: 0; height: 1px; background: var(--ink); content: ""; transform: scaleX(0); transition: transform .2s ease; }
.desktop-nav a:hover::after, .desktop-nav a.active::after { transform: scaleX(1); }

.header-tools { display: flex; align-items: center; justify-self: end; gap: 16px; }
.header-meta {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.language-toggle { min-width: 42px; padding: 8px 9px; border: 1px solid var(--line); color: var(--ink); background: white; font-size: 10px; letter-spacing: .06em; cursor: pointer; }
.language-toggle:hover { border-color: var(--ink); }

.collection-hero {
  width: var(--page);
  margin: 0 auto;
  padding: 76px 0 48px;
  border-bottom: 1px solid var(--line);
}
.eyebrow { margin: 0 0 18px; color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .18em; }
.collection-hero h1 { max-width: 900px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(44px, 6vw, 86px); font-weight: 400; letter-spacing: -.045em; line-height: .98; }
.collection-lead { max-width: 670px; margin: 26px 0 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 12px 36px; margin-top: 38px; font-size: 12px; }
.hero-facts span { display: inline-flex; align-items: center; gap: 10px; }
.hero-facts span::before { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); content: ""; }

.collection { width: var(--page); margin: 0 auto; padding: 28px 0 100px; }
.collection-layout { display: block; }
.facets-heading-row { display: flex; align-items: baseline; justify-content: space-between; min-height: 42px; border-bottom: 1px solid var(--ink); }
.facets-heading-row h2, .drawer-header h2 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: .02em; }
.text-button { padding: 2px 0; border: 0; border-bottom: 1px solid currentColor; color: var(--muted); background: transparent; font-size: 11px; cursor: pointer; }
.text-button:hover { color: var(--ink); }

.facet-group { margin: 0; padding: 26px 0 24px; border: 0; border-bottom: 1px solid var(--line); }
.facet-group legend { width: 100%; margin-bottom: 17px; padding: 0; font-size: 12px; font-weight: 650; letter-spacing: .04em; }
.check-row { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 10px; margin: 13px 0; color: #393733; font-size: 13px; cursor: pointer; }
.check-row input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.custom-check { display: grid; width: 17px; height: 17px; place-items: center; border: 1px solid #aaa69e; transition: border .15s ease, background .15s ease; }
.custom-check::after { width: 7px; height: 4px; border-bottom: 1.5px solid white; border-left: 1.5px solid white; content: ""; opacity: 0; transform: rotate(-45deg) translateY(-1px); }
.check-row input:checked + .custom-check { border-color: var(--ink); background: var(--ink); }
.check-row input:checked + .custom-check::after { opacity: 1; }
.check-row input:focus-visible + .custom-check { outline: 2px solid var(--accent); outline-offset: 3px; }
.facet-total { color: #8b8881; font-size: 11px; }

.source-note { display: grid; grid-template-columns: 18px 1fr; gap: 10px; padding-top: 24px; color: var(--muted); }
.source-note svg { width: 17px; height: 17px; }
.source-note p { margin: 0; font-size: 11px; line-height: 1.5; }

.collection-toolbar { display: flex; min-height: 52px; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.toolbar-start { display: flex; min-width: 0; align-items: center; gap: 22px; }
.filter-trigger { display: inline-flex; min-height: 38px; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--ink); color: var(--ink); background: white; font-size: 12px; cursor: pointer; transition: color .2s ease, background .2s ease; }
.filter-trigger:hover { color: white; background: var(--ink); }
.filter-trigger svg { width: 17px; height: 17px; }
.product-count { margin: 0; color: var(--muted); font-size: 12px; white-space: nowrap; }
.sort-control { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.sort-control select { max-width: 260px; padding: 2px 26px 4px 3px; border: 0; border-bottom: 1px solid #8c8982; border-radius: 0; color: var(--ink); background: white; cursor: pointer; }
.sort-control select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.active-filters { display: flex; flex-wrap: wrap; gap: 8px; min-height: 24px; margin: 16px 0 8px; }
.filter-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 20px; background: white; font-size: 11px; cursor: pointer; }
.filter-chip::after { font-size: 14px; line-height: .8; content: "×"; }

.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 22px; }
.product-card { min-width: 0; animation: card-in .35s ease both; }
.product-media { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 5; background: var(--soft); }
.product-media img { width: 100%; height: 100%; object-fit: contain; transition: transform .5s cubic-bezier(.2,.6,.2,1); }
.product-media:hover img { transform: scale(1.025); }
.platform-badge { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 9px; background: rgba(255,255,255,.92); font-size: 9px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; backdrop-filter: blur(6px); }
.platform-badge::before { width: 6px; height: 6px; border-radius: 50%; background: var(--platform-color); content: ""; }
.platform-ozon { --platform-color: var(--ozon); }
.platform-wildberries { --platform-color: var(--wildberries); }
.product-rank { position: absolute; top: 12px; right: 12px; padding: 7px 9px; color: #514e49; background: rgba(255,255,255,.92); font-size: 9px; backdrop-filter: blur(6px); }
.product-info { padding: 16px 2px 0; }
.sku { margin: 0 0 8px; color: #8a867f; font-size: 9px; letter-spacing: .09em; }
.product-title { display: -webkit-box; min-height: 42px; margin: 0; overflow: hidden; font-size: 14px; font-weight: 450; line-height: 1.48; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.product-data { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 12px; }
.product-price { font-size: 14px; font-weight: 650; white-space: nowrap; }
.product-price.missing { color: #8c8982; font-size: 11px; font-weight: 400; }
.product-rating { color: #5d5953; font-size: 11px; white-space: nowrap; }
.product-rating .star { color: #a35d20; }
.product-evidence { min-height: 16px; margin: 8px 0 0; color: var(--muted); font-size: 10px; }
.source-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding-bottom: 3px; border-bottom: 1px solid #aaa69f; font-size: 11px; text-decoration: none; }
.source-link:hover { border-color: var(--ink); }

.load-more-wrap { display: flex; justify-content: center; padding-top: 62px; }
.load-more, .outline-button, .solid-button { min-height: 45px; padding: 0 28px; border: 1px solid var(--ink); background: white; font-size: 12px; cursor: pointer; transition: color .2s ease, background .2s ease; }
.load-more:hover, .outline-button:hover, .solid-button { color: white; background: var(--ink); }
.solid-button:hover { background: var(--accent); border-color: var(--accent); }
.empty-state { padding: 80px 20px; text-align: center; }
.empty-state h2 { margin: 0; font-family: Georgia, serif; font-size: 32px; font-weight: 400; }
.empty-state p { margin: 12px 0 24px; color: var(--muted); font-size: 13px; }

footer { display: flex; width: var(--page); justify-content: space-between; gap: 24px; margin: auto; padding: 30px 0 44px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; letter-spacing: .04em; }

.filter-dialog { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; }
.filter-dialog::backdrop { background: rgba(19, 18, 17, .48); }
.drawer { display: grid; width: min(430px, 92vw); height: 100%; margin-left: auto; grid-template-rows: auto 1fr auto; background: white; box-shadow: -20px 0 50px rgba(0,0,0,.14); animation: drawer-in .25s ease; }
.drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 25px 24px; border-bottom: 1px solid var(--line); }
.drawer-header .eyebrow { margin-bottom: 7px; }
.icon-button { display: grid; width: 40px; height: 40px; place-items: center; border: 0; background: transparent; cursor: pointer; }
.icon-button svg { width: 22px; height: 22px; }
.drawer-body { overflow: auto; padding: 0 24px; }
.drawer-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 24px; border-top: 1px solid var(--line); background: white; }
.drawer-footer .solid-button { flex: 1; }
.filter-count { display: inline-grid; min-width: 18px; height: 18px; place-items: center; margin-left: 5px; border-radius: 50%; color: white; background: var(--ink); font-size: 9px; }

@keyframes card-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: translateX(0); } }

@media (min-width: 1500px) {
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 701px) and (max-width: 1366px) {
  .collection-hero { padding: 44px 0 32px; }
  .collection-hero h1 { font-size: clamp(54px, 7vw, 76px); }
  .collection-lead { margin-top: 20px; }
  .hero-facts { margin-top: 26px; }
  .collection { padding-top: 22px; }
  .product-grid { gap: 42px 18px; }
}

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

@media (max-width: 960px) {
  :root { --page: calc(100vw - 40px); }
  .site-header { grid-template-columns: 1fr auto; padding: 0 20px; }
  .desktop-nav { display: none; }
}

@media (max-width: 700px) {
  :root { --page: calc(100vw - 28px); }
  .announcement { font-size: 9px; }
  .site-header { min-height: 66px; padding: 0 14px; }
  .brand-mark { width: 33px; height: 33px; }
  .brand-copy strong { font-size: 10px; }
  .brand-copy small { font-size: 8px; }
  .header-meta { display: none; }
  .collection-hero { padding: 40px 0 34px; }
  .collection-hero h1 { font-size: clamp(40px, 14vw, 58px); }
  .collection-lead { font-size: 14px; }
  .hero-facts { display: grid; gap: 10px; margin-top: 28px; }
  .collection { padding-top: 22px; }
  .collection-toolbar { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; }
  .toolbar-start { gap: 12px; }
  .product-count { font-size: 10px; }
  .filter-trigger { min-height: 36px; padding: 0 11px; }
  .sort-control { display: grid; gap: 5px; }
  .sort-control select { max-width: 178px; font-size: 11px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 35px 12px; }
  .product-media { aspect-ratio: 4 / 5; }
  .platform-badge { top: 8px; left: 8px; padding: 5px 6px; font-size: 8px; }
  .product-rank { top: 8px; right: 8px; padding: 5px 6px; font-size: 8px; }
  .product-info { padding-top: 12px; }
  .product-title { min-height: 38px; font-size: 12px; }
  .product-data { display: grid; gap: 6px; }
  .product-rating { grid-row: 2; }
  .source-link { font-size: 10px; }
  footer { display: grid; }
}

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