/* PwPay / Forward. Taste storefront 6/3/5; UI/UX Pro Max accessible workflows. */

/* Manrope, self-hosted (SIL OFL 1.1, see fonts/OFL.txt). Two subsets, 38 KB total:
   no third-party request, no extra CSP origin, full Cyrillic. */
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
:root {
  color-scheme: light;
  --bg: #f3f5fa;
  --panel: #ffffff;
  --raised: #e9eef9;
  --text: #15203b;
  --muted: #53617b;
  --line: #c2cce0;
  --accent: #244cdb;
  --on-accent: #ffffff;
  --error: #a02c36;
  font-family:
    Manrope,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-synthesis: none;
  /* Prices and counts line up column to column instead of dancing. */
  font-variant-numeric: tabular-nums;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --cover-glow: 0.78;
    --bg: #0c1120;
    --panel: #151d30;
    --raised: #1e2940;
    --text: #f5f7ff;
    --muted: #b2bfd8;
    --line: #42516e;
    --accent: #9ab4ff;
    --on-accent: #0c1838;
    --error: #ffabb2;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --cover-glow: 0.78;
  --bg: #0c1120;
  --panel: #151d30;
  --raised: #1e2940;
  --text: #f5f7ff;
  --muted: #b2bfd8;
  --line: #42516e;
  --accent: #9ab4ff;
  --on-accent: #0c1838;
  --error: #ffabb2;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f5fa;
  --panel: #ffffff;
  --raised: #e9eef9;
  --text: #15203b;
  --muted: #53617b;
  --line: #c2cce0;
  --accent: #244cdb;
  --on-accent: #ffffff;
  --error: #a02c36;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
}
button:hover,
.button:hover {
  border-color: var(--accent);
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}
.quiet {
  background: transparent;
}
a:hover {
  color: var(--accent);
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
.skip {
  position: absolute;
  top: -80px;
  left: 16px;
  padding: 12px;
  background: var(--raised);
  z-index: 2;
}
.skip:focus {
  top: 8px;
}
.header {
  max-width: 1400px;
  margin: auto;
  min-height: 80px;
  display: flex;
  gap: 36px;
  align-items: center;
  padding: 16px 40px;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-size: 24px;
  font-weight: 850;
  letter-spacing: -1px;
  white-space: nowrap;
}
.brand span {
  color: var(--accent);
}
nav {
  display: flex;
  gap: 28px;
  align-items: center;
}
nav a {
  font-size: 14px;
  font-weight: 600;
}
.actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
}
/* Поиск живёт в шапке, а не только на главной: искать товар нужно с любой страницы. */
.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 260px;
  max-width: 420px;
  min-width: 0;
  padding: 0 8px 0 14px;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
}
/* Кольцо рисуется вокруг всего поля: подсвечивать один input внутри рамки нечего. */
.header-search:focus-within {
  border-color: var(--accent);
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
.header-search .search-glyph {
  flex: none;
  width: 18px;
  height: 18px;
  opacity: 0.6;
}
.header-search input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}
.header-search input:focus-visible {
  outline: none;
}
.header-search button {
  flex: none;
  min-height: 40px;
  padding: 0 14px;
}
main {
  max-width: 1400px;
  min-height: 65vh;
  margin: auto;
  padding: 40px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(34px, 4.8vw, 66px);
  line-height: 1.04;
  letter-spacing: -2.4px;
  font-weight: 800;
  margin-bottom: 24px;
  max-width: 750px;
  text-wrap: balance;
}
h2 {
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.18;
  letter-spacing: -0.9px;
  font-weight: 750;
  text-wrap: balance;
}
h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 10px;
  text-wrap: balance;
}
/* Заголовок принадлежит тому, что под ним: сверху воздуха больше, чем снизу. */
main :is(p, dl, ul, ol, figure, aside, .price, .offer-list, .region-block) + :is(h2, h3) {
  margin-top: 36px;
}
p {
  max-width: 65ch;
  text-wrap: pretty;
}
.muted,
small {
  color: var(--muted);
}
small {
  font-size: 13px;
}
.hero {
  padding: 32px 0 48px;
  max-width: 1000px;
}
.hero p {
  font-size: 18px;
  color: var(--muted);
  max-width: 600px;
}
.eyebrow {
  font-size: 13px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}
.banner {
  background: color-mix(in srgb, var(--accent) 8%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  padding: 18px 22px;
  border-radius: var(--radius-control);
  margin: 0 0 32px;
}
.banner strong {
  display: block;
  margin-bottom: 2px;
}
.banner p {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.toolbar {
  display: flex;
  gap: 16px;
  margin: 24px 0;
  align-items: end;
  flex-wrap: wrap;
}
.toolbar label {
  flex: 1;
  min-width: 200px;
}
.toolbar button {
  flex: none;
}
/* Категории переносятся, а не прокручиваются: восемь разделов должны быть видны сразу,
   иначе часть каталога прячется за горизонтальной прокруткой, которую мышью не заметить. */
.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 12px;
}
.categories button {
  font-size: 14px;
}
.categories button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}
label {
  display: grid;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
}
input,
select,
textarea {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--bg);
  color: var(--text);
  padding: 12px;
  min-height: 46px;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
}
textarea {
  resize: vertical;
  min-height: 110px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}
.product {
  padding: 24px;
  background: var(--panel);
  border-radius: var(--radius-panel);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.product h3 {
  margin: 0;
}
.product .price {
  margin-top: auto;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.6px;
}
.product .meta {
  color: var(--muted);
  font-size: 14px;
}
.empty {
  padding: 54px 28px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-panel);
  text-align: center;
}
.empty p {
  margin: 12px auto 0;
  color: var(--muted);
}
.empty h3 {
  font-size: 22px;
}
.section {
  margin: 36px 0;
}
.split {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 40px;
}
.side {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.side button {
  justify-content: start;
}
.side button[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 24px 0;
}
.stat {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
.stat strong {
  display: block;
  font-size: 36px;
  font-variant-numeric: tabular-nums;
}
.panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  margin: 20px 0;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.row:last-child {
  border-bottom: 0;
}
.row p {
  margin: 5px 0;
}
.row .actions {
  flex-wrap: wrap;
}
.row > div {
  min-width: 0;
}
.row h3,
.wrap {
  overflow-wrap: anywhere;
}
.form {
  display: grid;
  gap: 18px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.error {
  color: var(--error);
  margin: 10px 0;
  overflow-wrap: anywhere;
}
.loading {
  padding: 40px;
  background: var(--panel);
  border-radius: var(--radius-panel);
}
.tag {
  font-size: 12px;
  border: 1px solid var(--line);
  padding: 4px 8px;
  border-radius: var(--radius-control);
  white-space: nowrap;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th,
td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
th {
  color: var(--muted);
  font-weight: 500;
}
dialog {
  width: min(640px, calc(100% - 32px));
  max-height: 90dvh;
  overflow: auto;
  border: 0;
  border-radius: var(--radius-panel);
  padding: 28px;
  background: var(--bg);
  color: var(--text);
}
dialog::backdrop {
  background: rgb(12 17 32 / 0.78);
}
.dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}
.dialog-head h2 {
  margin: 8px 0;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  background: var(--panel);
  padding: 16px;
  border-radius: var(--radius-control);
}
dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
dt {
  color: var(--muted);
}
dd {
  margin: 0;
  overflow-wrap: anywhere;
}
footer {
  max-width: 1320px;
  margin: 40px auto 0;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 30px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}
footer p {
  margin: 0;
  flex: 1;
}
/* Строка подтверждения для банка: найти её должно быть легко, мешать покупателю — нет. */
.verification {
  flex: 0 0 100%;
  order: 9;
  font-size: 12px;
  opacity: 0.75;
}
.verification code {
  font-weight: 650;
  letter-spacing: 0.04em;
}
#notice:not(:empty) {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(92vw, 560px);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--accent);
  color: var(--on-accent);
  padding: 10px 12px 10px 20px;
  border-radius: var(--radius-control);
  z-index: 3;
}
.notice-text { flex: 1; min-width: 0; }
#notice .notice-action {
  flex: none;
  min-height: 36px;
  padding: 0 14px;
  background: var(--on-accent);
  color: var(--accent);
  border: 0;
  font-weight: 650;
}
#notice .notice-close {
  flex: none;
  width: 36px;
  height: 36px;
  color: var(--on-accent);
  border-color: color-mix(in srgb, var(--on-accent) 40%, transparent);
  background: transparent;
}
#notice .notice-close:hover { background: color-mix(in srgb, var(--on-accent) 18%, transparent); }
.pager {
  display: flex;
  justify-content: space-between;
  margin: 24px 0;
}
.message {
  background: var(--panel);
  padding: 16px;
  border-radius: var(--radius-control);
  margin: 12px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.message small {
  display: block;
}
details {
  margin: 12px 0;
}
summary {
  cursor: pointer;
  padding: 10px 0;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1024px) {
  .header {
    gap: 20px;
    padding: 16px 24px;
    flex-wrap: wrap;
  }
  /* В одном ряду с брендом, навигацией и действиями поле сжимается до трёх пикселей. */
  .header-search {
    order: 2;
    width: 100%;
    flex-basis: 100%;
    max-width: none;
  }
  main {
    padding: 28px 24px;
  }
  .split {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 24px;
  }
  footer {
    margin: 32px 24px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 767px) {
  .header {
    flex-wrap: wrap;
    gap: 14px;
    padding: 16px;
  }
  .header nav {
    order: 3;
    width: 100%;
    gap: 24px;
  }
  .brand {
    font-size: 22px;
  }
  .actions {
    gap: 8px;
  }
  main {
    padding: 24px 16px;
  }
  .hero {
    padding: 20px 0 28px;
  }
  h1 {
    letter-spacing: -1px;
  }
  .hero p {
    font-size: 16px;
  }
  .split {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .side {
    flex-direction: row;
    overflow: auto;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .row {
    align-items: start;
    flex-direction: column;
    gap: 12px;
  }
  .row .actions {
    margin-left: 0;
  }
  .stats {
    gap: 16px;
  }
  .panel {
    padding: 18px;
  }
  .dialog-head {
    gap: 10px;
  }
  dialog {
    padding: 20px;
  }
  footer {
    margin: 24px 16px;
    flex-wrap: wrap;
    gap: 14px;
  }
  footer p {
    flex-basis: 100%;
    order: 3;
  }
  .toolbar {
    gap: 10px;
  }
  .toolbar label {
    min-width: 150px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button,
  a {
    transition:
      background-color 0.15s,
      border-color 0.15s,
      color 0.15s;
  }
}

.split > * {
  min-width: 0;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  max-width: none;
}
.hero img {
  width: 100%;
  height: auto;
  aspect-ratio: 3/2;
  object-fit: cover;
  border-radius: var(--radius-panel);
}
.hero h1 {
  font-size: clamp(32px, 4vw, 56px);
}
@media (max-width: 767px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .hero img {
    max-height: 210px;
    object-fit: cover;
  }
  .hero h1 {
    font-size: 32px;
  }
}

footer {
  flex-wrap: wrap;
}
.legal-links {
  flex-basis: 100%;
  flex-wrap: wrap;
  gap: 16px;
}
.document {
  max-width: 800px;
}
.document-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.8;
}
.document h1 {
  font-size: 40px;
}

.product-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  /* Many supplier logos are dark art on a transparent background: the plate only shows
     through that transparency, so it stays light in both themes. */
  background: #e9eef9;
  color: #46587a;
  isolation: isolate;
}
.cover-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 20px;
  font-size: 14px;
  text-align: center;
  z-index: 0;
}
.cover-icon {
  width: 28px;
  height: 28px;
  opacity: 0.55;
}
/* Что происходит с заказом прямо сейчас — рядом со статусом, а не в поддержке. */
.state-note {
  margin: -4px 0 20px;
  max-width: 60ch;
  font-size: 14px;
  line-height: 1.5;
}
/* Название вместо сообщения об ошибке: плитка без обложки читается как оформление. */
.cover-word {
  font-size: clamp(18px, 3.4vw, 26px);
  font-weight: 750;
  letter-spacing: 0.02em;
  line-height: 1.15;
  text-wrap: balance;
  opacity: 0.75;
}
/* Without artwork the tile follows the page theme instead of the light plate. */
.cover-empty {
  background: var(--raised);
  color: var(--muted);
  border: 1px solid var(--line);
}
.product-cover img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
/* A blurred copy of the same artwork fills the frame: no letterbox bars, no cropped art.
   The backdrop is dimmed on a dark page and left bright on a light one, otherwise pale
   artwork picks up a grey halo against the light plate. */
.cover-blur {
  object-fit: cover;
  transform: scale(1.15);
  filter: blur(22px) saturate(1.2) brightness(var(--cover-glow, 1.04));
  z-index: 1;
}
.cover-art {
  object-fit: contain;
  padding: 2px;
  z-index: 2;
}
.product-cover-detail { width: min(100%, 616px); margin: 24px 0 32px; }
.product > .button { margin-top: auto; }

/* PwPay shared component system */
:root { --radius-control: 10px; --radius-panel: 20px; --brand-blue: #2855f6; --space-unit: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -1.2px; }
.brand img { display: block; flex: 0 0 36px; border-radius: 10px; }
.header { min-height: 88px; }
button, .button, input, textarea, select { border-radius: var(--radius-control); }
.product { border: 1px solid var(--line); border-radius: var(--radius-panel); padding: 24px; gap: 16px; }
.product h3 { letter-spacing: -.4px; line-height: 1.3; }
.product .button { background: transparent; }
.product .button:hover { background: var(--accent); color: var(--on-accent); }
.hero { background: #2855f6; color: #fff; border-radius: 28px; padding: 48px; margin-bottom: 28px; overflow: hidden; }
.hero p { color: #ffffff; }
.hero h1 { font-size: clamp(38px, 4.5vw, 66px); letter-spacing: -2.5px; max-width: 720px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.hero .hero-action { gap: 8px; background: #fff; color: #173ab1; border: 0; }
/* Второе действие — приглушённее первого, но на синем поле держит тот же контраст. */
.hero .hero-second { gap: 8px; background: transparent; color: #fff; border: 1px solid #ffffff; }
.hero .hero-second:hover { background: #ffffff; color: #173ab1; }
.hero .hero-second .icon { width: 18px; height: 18px; }
.hero-emblem { display: grid; place-items: center; min-height: 280px; border-left: 1px solid #6d8afd; position: relative; }
.hero-emblem img { width: 240px; height: 240px; aspect-ratio: 1; border-radius: 0; object-fit: contain; }
.hero-emblem small { color: #ffffff; letter-spacing: .05em; font-size: 12px; }
.categories { gap: 8px; }
.categories button { border-radius: 999px; }
.toolbar { padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-panel); }
.banner { border-radius: 12px; }
@media (max-width: 767px) {
  .header { gap: 14px; }
  .hero { padding: 28px 24px; grid-template-columns: 1fr; }
  .hero h1 { font-size: 38px; letter-spacing: -1.5px; }
  .hero-emblem { display: none; }
  .brand { font-size: 24px; }
  .toolbar { padding: 14px; }
  /* Two half-width fields on a phone leave neither of them readable. */
  .toolbar label { flex: 1 0 100%; min-width: 0; }
  .toolbar .check { flex: 1 0 100%; }
  .toolbar button[type="submit"] { width: 100%; }
}

/* Forward applied to account, administration, documents and dialogs. */
.panel, .empty, dialog { background: var(--panel); }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-panel); padding: 20px; }
.stat strong { letter-spacing: -1.2px; }
.side button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.header nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 2px; }
.legal-links a[aria-current="page"] { color: var(--accent); text-decoration: underline; }
.tag { background: var(--raised); border-radius: 999px; }
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--panel); }
th { background: var(--raised); font-weight: 600; }
.document { max-width: 880px; margin: 0 auto; padding: 32px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-panel); }
.document h1 { font-size: clamp(30px, 4vw, 48px); }
.document-body { line-height: 1.75; }
.document-body a, .document a { color: var(--accent); text-decoration: underline; }
.message {
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 14px 14px 14px 4px;
  max-width: 46ch;
}
.message small { display: block; color: var(--muted); margin-bottom: 4px; }
.message + .message { margin-top: 10px; }
dialog { box-shadow: 0 24px 48px -28px rgb(12 17 32 / .5); }
.dialog-head { border-bottom: 1px solid var(--line); padding-bottom: 16px; }
button:disabled { transform: none; }
@media (max-width: 767px) {
  .document { padding: 22px 18px; }
  .stat { padding: 16px; }
  .stat strong { font-size: 30px; }
}

/* Identical SVG wordmark on the storefront and reference page. */
.brand img { width: 135px; height: 36px; flex: 0 0 135px; border-radius: 0; }
.brand .wordmark-dark { display: none; }
:root[data-theme="dark"] .brand .wordmark-light { display: none; }
:root[data-theme="dark"] .brand .wordmark-dark { display: block; }
@media(max-width:767px) { .brand img { width: 120px; height: 32px; flex-basis: 120px; } }

/* Storefront: price labels, category counts and the offer list on a product page. */
.product .price { font-size: 20px; font-weight: 600; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.product .price small, .product .price .muted { font-size: 14px; font-weight: 500; }
.product .price strong { font-size: 24px; letter-spacing: -.6px; }
.price.lead { font-size: clamp(26px, 4vw, 34px); font-weight: 700; letter-spacing: -1px; margin: 0 0 8px; }
.categories button { display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.categories .count { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.categories button[aria-pressed="true"] .count { color: inherit; opacity: .75; }
.toolbar .check { flex: none; display: flex; flex-direction: row; align-items: center; gap: 10px; min-height: 46px; }
.toolbar .check input { width: 20px; min-width: 20px; min-height: 20px; }
.offer-list { border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--panel); padding: 0 24px; }
.offer .offer-action { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex: none; }
.offer .price { margin: 0; font-size: 18px; text-align: right; }
.offer .price strong { font-size: 22px; letter-spacing: -.5px; }
.form .check { display: flex; flex-direction: row; align-items: center; gap: 12px; font-weight: 500; }
.form .check input { width: 20px; min-width: 20px; min-height: 20px; }
@media (max-width: 767px) {
  .offer-list { padding: 0 16px; }
  .offer { flex-direction: column; align-items: stretch; }
  .offer .offer-action { align-items: stretch; }
  .offer .price { text-align: left; }
  .toolbar .check { width: 100%; }
}

/* Catalogue controls: region picker, page counter, chips and loading skeletons. */
.page-count { color: var(--muted); font-size: 14px; align-self: center; font-variant-numeric: tabular-nums; }
.pager { display: flex; gap: 12px; align-items: center; }
.found { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.chip { font-size: 13px; padding: 4px 12px; border-radius: 999px; min-height: 0; }
.crumbs { font-size: 14px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.crumbs a { color: var(--accent); }
.region-picker { margin: 0 0 20px; flex-wrap: wrap; overflow: visible; }
.region-picker button { font-size: 14px; }
.skeleton { gap: 12px; pointer-events: none; }
.skeleton .bar { display: block; height: 14px; border-radius: 8px; background: var(--raised); animation: pulse 1.4s ease-in-out infinite; }
.skeleton .bar.cover { height: auto; aspect-ratio: 16 / 9; border-radius: 12px; }
.skeleton .bar.tiny { height: 10px; width: 35%; }
.skeleton .bar.short { width: 55%; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .skeleton .bar { animation: none; } }
@media (max-width: 767px) {
  .pager { flex-wrap: wrap; }
  .region-picker { flex-wrap: wrap; }
}

/* Icons in place of words where the control is obvious, with a label kept for the rest. */
.sprite { display: none; }
.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.icon-button { padding-inline: 12px; }
.header nav a { display: inline-flex; align-items: center; gap: 8px; min-height: 28px; }
.header nav a .icon { width: 18px; height: 18px; opacity: .75; }
.header nav a[aria-current="page"] .icon { opacity: 1; }
.chip .icon { width: 14px; height: 14px; }
.hero-action .icon { width: 18px; height: 18px; }
.pager button .icon { width: 16px; height: 16px; }
.product .price { gap: 6px 10px; }
.product .price small { white-space: nowrap; }
@media (max-width: 620px) {
  /* The nav drops to its own row on a phone, so the labels fit: two named pills
     read faster than two bare glyphs, and each keeps a full 44px touch target. */
  .header nav { gap: 8px; }
  .header nav a {
    min-height: 44px;
    padding: 0 14px;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--line);
    text-decoration: none;
  }
  .header nav a .icon { width: 20px; height: 20px; }
  .header nav a[aria-current="page"] {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
    text-decoration: none;
  }
}

/* Product card: a fixed rhythm of category, name, price and offer count. */
.product { gap: 12px; }
.product .tag-kind { color: var(--muted); font-size: 12px; letter-spacing: .6px; text-transform: uppercase; }
.product .price { margin: 4px 0 0; font-size: 24px; font-weight: 700; letter-spacing: -.6px; display: block; }
.product .price .muted { font-size: 17px; font-weight: 600; }
.product .offer-count { margin: 0 0 4px; color: var(--muted); font-size: 13px; }
.product h3 { margin: 0; font-size: 19px; }

/* Offer summary inside the quote dialog. */
.offer-summary { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 4px 0 14px; }
.offer-summary dt { color: var(--muted); font-size: 14px; }
.offer-summary dd { margin: 0; font-weight: 600; }

/* Front page as a shop: departments (bento tiles) and curated shelves. */
.departments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}
.department {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s cubic-bezier(.22, .68, .36, 1), border-color .18s ease-out;
}

.department-icon { width: 26px; height: 26px; color: var(--accent); margin-bottom: 4px; }
.department-name { font-weight: 700; letter-spacing: -.3px; }
.department-count { color: var(--muted); font-size: 13px; }
.department-all { background: var(--raised); }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.shelf-head h2 { margin: 0; }
.shelf-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.shelf-all .icon { width: 15px; height: 15px; }
/* A shelf is a full row, not a scroller: nothing hides past the edge and a mouse needs
   no horizontal scrolling. The row header carries "Смотреть все" for the rest. */
.shelf-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.product { transition: transform .18s cubic-bezier(.22, .68, .36, 1), border-color .18s ease-out; }
.catalog-all { text-align: center; }
.catalog-all .button { min-width: 260px; }
@media (prefers-reduced-motion: reduce) {
  .product, .department { transition: none; }
  .product:hover, .department:hover { transform: none; }
}
@media (max-width: 767px) {
  .departments { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .department { padding: 14px; }
  .shelf-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .catalog-all .button { width: 100%; min-width: 0; }
}

/* Two lines for every product name keeps prices and buttons on one baseline across a row. */
.product h3 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(2 * 1.3em);
}
.product .price { min-height: 30px; }

/* Account: identity block and status badges. */
.account-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 20px;
  margin: 16px 0 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
}
.account-card small { display: block; color: var(--muted); font-size: 13px; }
.account-card strong { font-size: 18px; letter-spacing: -.3px; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--raised);
  color: var(--text);
}
.badge-ok { background: color-mix(in srgb, #12b76a 18%, transparent); border-color: color-mix(in srgb, #12b76a 45%, transparent); }
.badge-warn { background: color-mix(in srgb, #f79009 20%, transparent); border-color: color-mix(in srgb, #f79009 48%, transparent); }
.badge-bad { background: color-mix(in srgb, #f04438 18%, transparent); border-color: color-mix(in srgb, #f04438 45%, transparent); }
.badge-wait { background: var(--raised); }
.order-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.order-line strong { font-size: 17px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.stat .stat-text { font-size: 17px; letter-spacing: -.2px; line-height: 1.35; }
.stat small + small { color: var(--muted); font-size: 12px; }

/* Surfaces: the hero is lit from one corner and carries grain, so it reads as a
   printed panel instead of a flat colour block. The noise is an inline SVG, no request. */
.hero {
  position: relative;
  isolation: isolate;
  /* The light corner is dark enough for #eef2ff body text to clear 4.5:1. */
  background:
    radial-gradient(120% 140% at 12% 0%, #3059f0 0%, #2652e8 45%, #1a3ab8 100%);
  box-shadow: 0 22px 48px -34px rgb(12 17 32 / 0.55);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  opacity: 0.35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}
.hero-emblem { border-left-color: rgb(255 255 255 / 0.28); }

/* A lift on hover belongs to a real pointer: on a touch screen it sticks after the tap. */
@media (hover: hover) and (pointer: fine) {
  .product:hover,
  .department:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 18px 40px -26px rgb(36 76 219 / 0.55);
  }
}
dialog { box-shadow: 0 24px 48px -28px rgb(12 17 32 / 0.5); }
@media (hover: hover) and (pointer: fine) {
  :root[data-theme="dark"] .product:hover,
  :root[data-theme="dark"] .department:hover {
    box-shadow: 0 18px 40px -24px rgb(0 0 0 / 0.65);
  }
}

/* Anchors glide instead of jumping; motion stays optional. */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* The front page arrives in a short cascade. The search grid does not: it re-renders on
   every keystroke, sort and page, and re-animating it there reads as lag, not life. */
@media (prefers-reduced-motion: no-preference) {
  .shelf-row .product,
  .departments .department {
    animation: rise .22s cubic-bezier(.22, .68, .36, 1) backwards;
  }
  .shelf-row .product:nth-child(n + 2),
  .departments .department:nth-child(n + 2) { animation-delay: .03s; }
  .shelf-row .product:nth-child(n + 4),
  .departments .department:nth-child(n + 4) { animation-delay: .06s; }
  .departments .department:nth-child(n + 7) { animation-delay: .09s; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* A pressed control gives way under the finger. */
button:active, .button:active { transform: translateY(1px) scale(.99); }
main { min-height: 65dvh; }
.not-found { max-width: 640px; margin: 48px auto; text-align: center; }
.not-found p { margin-inline: auto; }
.not-found .toolbar { justify-content: center; margin-top: 28px; }
.not-found .toolbar .button { flex: 0 0 auto; }

/* Legal pages are long-form reading: a comfortable measure beats a full-width slab. */
.document { max-width: 820px; }
.document-body { max-width: 68ch; font-size: 16px; line-height: 1.8; }
.document h1 { letter-spacing: -1.6px; }

/* Скидка дня: объявленный процент и код, который забирают в один клик. */
.promo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 24px 28px;
  margin: 0 0 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel);
}
.promo h2 { margin: 4px 0 6px; font-size: 22px; }
.promo p { margin: 0; }
.promo-text { flex: 1 1 320px; min-width: 0; }
.promo-action { flex: none; }
.promo-code {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 10px 10px 16px;
  border-radius: var(--radius-control);
  border: 1px dashed var(--accent);
  background: var(--raised);
}
.promo-code code {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  user-select: all;
}
.promo-code button { gap: 8px; }
.promo-code .icon { width: 16px; height: 16px; }
@media (max-width: 767px) {
  .promo { padding: 18px; }
  .promo-action, .promo button { width: 100%; }
  .promo-code { justify-content: space-between; }
}
.linklike {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
}

/* Web Interface Guidelines pass. */

/* No 300 ms wait after a tap, and a tap highlight we chose rather than inherited. */
button,
.button,
a,
label,
select,
summary,
input[type="checkbox"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: color-mix(in srgb, var(--accent) 18%, transparent);
}

/* A scroll inside the dialog stays inside the dialog. */
dialog {
  overscroll-behavior: contain;
}

/* Notched phones: the header and the page keep clear of the cutouts, the footer of the bar.
   The footer keeps its own centred width, so only its bottom padding changes. */
.header,
main {
  padding-left: max(40px, env(safe-area-inset-left));
  padding-right: max(40px, env(safe-area-inset-right));
}
footer {
  padding-bottom: max(30px, env(safe-area-inset-bottom));
}

/* "Выбрать товар" jumps to the catalogue: leave room under the sticky-free header. */
#catalog-title,
[id^="shelf-"],
#departments-title,
#promo {
  scroll-margin-top: 24px;
}

/* A long offer list renders only what is on screen. Only the block axis gets a placeholder:
   a width placeholder would force grid cards wider than their column and overflow the page. */
.offer-list .offer {
  content-visibility: auto;
  contain-intrinsic-block-size: auto 116px;
}

@media (max-width: 767px) {
  .header,
  main {
    padding-left: max(18px, env(safe-area-inset-left));
    padding-right: max(18px, env(safe-area-inset-right));
  }
}

/* Ссылка ростом в 21 px не проходит минимум 24×24 WCAG 2.5.8 даже под мышью. */
.crumbs a,
.shelf-all,
.legal-links a,
footer > a,
.linklike {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
}
#results { scroll-margin-top: 24px; }

/* Телефон: касания, плотность и то, что резалось краем экрана. */
@media (max-width: 767px) {
  /* Ссылка ростом в 20 px — это промах пальцем. Увеличиваем область, не двигая вёрстку. */
  .crumbs a,
  .shelf-all,
  .legal-links a,
  footer > a,
  .linklike {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
  }
  .crumbs { gap: 4px 10px; }
  .legal-links { gap: 4px 18px; }
  .brand { padding-block: 6px; }

  /* Восемь категорий по одной в строке — это экран прокрутки до поиска. */
  .categories button {
    font-size: 13px;
    padding: 8px 12px;
    min-height: 40px;
  }
  .categories { gap: 6px; }
  .categories .count { font-size: 12px; }

  /* Разделы админки переносятся, а не уезжают за край. */
  .split { grid-template-columns: minmax(0, 1fr); }
  .side {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    overflow: visible;
  }
  .side button {
    flex: 0 0 auto;
    font-size: 13px;
    padding: 8px 12px;
    min-height: 40px;
  }

  /* Плитки показателей на 375 px читаются в одну колонку. */
  .stats { grid-template-columns: minmax(0, 1fr); }

  /* В узкой карточке цена целиком помещается в строку, а не ломается после «от». */
  .product .price strong { font-size: 20px; letter-spacing: -.4px; }
  .product .price { font-size: 18px; }
}

/* Выбор региона: рекомендация отдельно, остальные под раскрытием. */
.region-block { margin: 0 0 22px; }
.region-hint { font-size: 14px; max-width: 62ch; margin: 0 0 14px; }
.region-title { font-size: 13px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.region-picker { margin-bottom: 6px; }
.region-rest #toggle-regions { font-size: 14px; }

/* Финал расчёта: вместо мёртвой кнопки — то, что магазин действительно может дать. */
.waitlist {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--accent) 8%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
}
.waitlist strong { display: block; margin-bottom: 4px; }
.waitlist p { margin: 0 0 14px; font-size: 14px; }
.waitlist p:last-child { margin: 12px 0 0; }
.waitlist-done { margin-top: 18px; padding: 18px 20px; border-radius: var(--radius-control); background: var(--raised); border: 1px solid var(--line); }
.waitlist-done strong { display: block; margin-bottom: 4px; }
.waitlist-done p { margin: 0; font-size: 14px; }
