/* Скидариум. Shared visual language for the public catalogue and account. */
:root, html:root[data-theme="light"] {
  --edition-pine: #143c30;
  --edition-lime: #d4ef71;
  --edition-serif: Georgia, "Times New Roman", serif;
  --edition-sans: "Segoe UI Variable Text", "Segoe UI", Arial, sans-serif;
  --edition-mono: "Cascadia Mono", Consolas, "Courier New", monospace;
  --bg: #f6f4ed;
  --surface: #fffef8;
  --surface-soft: #efeee4;
  --surface-hover: #edf0df;
  --line: #d6d9c9;
  --line-strong: #abb4a0;
  --line-soft: #e5e6db;
  --text: #1c2620;
  --muted: #4f5d53;
  --subtle: #58645a;
  --accent: #24553f;
  --accent-hover: #153f2f;
  --accent-soft: #e4edd7;
  --accent-ink: #fffef8;
  --positive: #23613d;
  --positive-bg: #e4efda;
  --positive-line: #afca9f;
  --negative: #8b3424;
  --negative-bg: #f8ebe4;
  --negative-line: #dcb4a2;
  --shadow: none;
  --scrim: #12251f80;
  --edition-header: #fbfaf2;
  --edition-title: #143c30;
  --edition-nav-active: #e3ebd3;
  --edition-nav-ink: #234b36;
  font-family: var(--edition-sans);
}
html:root[data-theme="dark"] {
  --bg: #16221c;
  --surface: #1d2c24;
  --surface-soft: #23362a;
  --surface-hover: #304436;
  --line: #394a3d;
  --line-strong: #536953;
  --line-soft: #334337;
  --text: #f4f2e5;
  --muted: #c3caba;
  --subtle: #b3c0ae;
  --accent: #cae697;
  --accent-hover: #e0f6ba;
  --accent-soft: #354a32;
  --accent-ink: #162c1d;
  --positive: #bee4a9;
  --positive-bg: #263f2c;
  --positive-line: #476f49;
  --negative: #ffc0a3;
  --negative-bg: #462b21;
  --negative-line: #795241;
  --shadow: none;
  --scrim: #07120cd1;
  --edition-header: #1a291f;
  --edition-title: #f2f4d9;
  --edition-nav-active: #334831;
  --edition-nav-ink: #d7edb3;
}
html:root {
  --border: var(--line);
  --accent-dim: var(--accent-soft);
  --on-accent: var(--accent-ink);
  --green: var(--positive);
  --green-dim: var(--positive-bg);
  --green-line: var(--positive-line);
}
body:is(.public-site, .dashboard-legacy) {
  background: var(--bg);
  color: var(--text);
  font-family: var(--edition-sans);
}
body :is(a, button, input, select, summary, textarea):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
body .dashboard-sidebar {
  gap: 15px;
  background: var(--surface);
  border-inline-end-color: var(--line);
}
body .dashboard-sidebar .brand {
  gap: 10px;
  min-height: 41px;
  color: var(--edition-title);
}
.dashboard-sidebar .brand .brand-copy, body.legacy-shared-shell .dashboard-sidebar .brand-copy {
  font: 650 21px / 1.1 var(--edition-sans);
  letter-spacing: -.055em;
}
body .brand .brand-caption {
  margin-top: 4px;
  font: 400 11px / 1.4 var(--edition-sans);
  letter-spacing: 0;
  color: var(--subtle);
}
.brand .brand-symbol, .topbar .mobile-brand::before, .site-brand-mark {
  display: inline-block;
  flex: none;
  width: 31px;
  height: 32px;
  border-radius: 0;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 31 32'%3E%3Crect x='1' y='8' width='18' height='22' rx='2' transform='translate(0 2.87) skewY(-16)' fill='%2377994e'/%3E%3Crect x='8' y='4' width='21' height='23' rx='2' transform='translate(0 5.3) skewY(-16)' fill='%23bad858'/%3E%3Crect x='17' y='10' width='5' height='13' rx='2' transform='rotate(29 19.5 16.5)' fill='%2317392a'/%3E%3C/svg%3E") center / contain no-repeat;
}
.brand .brand-symbol > svg { display: none; }
body .sidebar-label, body.legacy-shared-shell .sidebar-label {
  margin-bottom: 5px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .015em;
  text-transform: none;
}
body .sidebar-nav { gap: 2px; }
body .sidebar-nav a {
  min-height: 39px;
  border-radius: 7px;
  color: var(--text);
  font-weight: 550;
}
body .sidebar-nav a[aria-current="page"],
body .sidebar-categories a[aria-current="page"] {
  background: var(--edition-nav-active);
  color: var(--edition-nav-ink);
}
body .sidebar-nav a[href="/dnslab/"] { color: var(--accent); }
body .sidebar-categories a { border-radius: 5px; }
body .sidebar-categories small, .category-count {
  font-family: var(--edition-mono);
  font-weight: 500;
}
body .topbar {
  gap: clamp(12px, 1.8vw, 26px);
  min-height: 67px;
  background: var(--edition-header);
  border-bottom-color: var(--line);
  box-shadow: none;
}
body .header-context {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}
.edition-cross-link {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 4px;
  min-height: 40px;
  padding: 2px 3px;
  color: var(--edition-title);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  text-decoration: none;
}
.edition-cross-link span { color: var(--accent); }
body .edition-cross-link:hover { text-decoration: underline; text-underline-offset: 4px; }
body .header-catalog-link { color: var(--muted); font-weight: 500; }
body .topbar .header-search input {
  background: var(--surface);
  border-color: var(--line);
  border-radius: 7px;
}
body .topbar :is(.theme-toggle, .legacy-theme-toggle, .mobile-menu-toggle) {
  color: var(--edition-title);
  background: transparent;
  border-color: var(--line);
  border-radius: 8px;
}
body .topbar .account-link, html[data-theme] body.account-redesign .topbar .account-link {
  background: var(--edition-pine);
  color: #fffef8;
  border-color: var(--edition-pine);
  border-radius: 8px;
}
body .topbar .account-link:hover, html[data-theme] body.account-redesign .topbar .account-link:hover {
  background: var(--edition-nav-active);
  border-color: var(--line-strong);
  color: var(--edition-title);
}
body .seo-breadcrumbs { margin-bottom: 18px; }
body .page-heading .eyebrow { display: none; }
body .page-heading { margin-bottom: 22px; }
body .page-heading h1, body.account-redesign :is(.account-heading, .account-guest) h1,
.dashboard-legacy .seo-landing h1 {
  color: var(--edition-title);
  font: 400 clamp(35px, 3.8vw, 60px) / 1.08 var(--edition-serif);
  letter-spacing: -.045em;
  text-wrap: balance;
}
body .page-description {
  max-width: 74ch;
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.58;
}
body .public-main h2,
body.account-redesign :is(.account-panel, .settings-card, .account-section-heading) h2 {
  color: var(--edition-title);
  font-family: var(--edition-serif);
  font-weight: 400;
  letter-spacing: -.025em;
}
body .panel-title h2, body .product-section h2 { font-size: 25px; }
body :is(.category-chip, .city-directory-card, .public-prose, .guide-cards,
         .catalog-panel, .product-section, .product-purchase, .quick-view-dialog,
         .account-panel, .settings-card, .stat-card) {
  box-shadow: none;
}
body .catalog-panel, body .product-section, body .public-prose, body .guide-cards {
  border-radius: 12px;
  background: var(--surface);
}
body .panel-title { padding-top: 20px; }
body .catalog-panel > .panel-title .panel-kicker { display: none; }
body .catalog-tabs { gap: clamp(12px, 2vw, 26px); }
body .catalog-tabs a[aria-current="page"] {
  color: var(--edition-title);
  border-bottom-color: var(--accent);
}
body .category-shortcuts a, body .type-shortcuts a { border-radius: 20px; background: var(--surface); }
body .type-shortcuts a[aria-current="page"] {
  background: var(--edition-pine);
  color: #fffef8;
  border-color: var(--edition-pine);
}
body .catalog-summary-line strong, body .stat-card strong, body .data-table .price-now,
body .public-price, body .offer-choice-price, body .account-metric, body .category-count,
body .public-pagination :is(span, a) {
  font-family: var(--edition-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.035em;
}
body .public-filters .control-label { color: var(--text); }
body .public-filters :is(input, select) {
  background: var(--surface);
  border-color: var(--line-strong);
  border-radius: 7px;
}
.public-site .settings-primary, html[data-theme] body.account-redesign .settings-primary {
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--edition-lime);
  color: var(--edition-pine);
  font-weight: 700;
}
.public-site .settings-primary:hover, html[data-theme] body.account-redesign .settings-primary:hover:not(:disabled) {
  background: #c0df59;
  color: #102d20;
}
body .data-table th { background: var(--surface-soft); color: var(--muted); }
body .data-table .price-now { color: var(--edition-title); font-weight: 700; }
body .discount-chip {
  background: var(--edition-lime);
  color: var(--edition-pine);
  font-family: var(--edition-mono);
  font-size: 12px;
  border-radius: 4px 4px 4px 0;
}
body .product-name { line-height: 1.45; }
body .quick-view-button { border-radius: 50%; }
body .product-purchase {
  border: 1px solid var(--line);
  border-top: 4px solid var(--edition-lime);
  background: var(--surface);
}
body .product-purchase .public-price { color: var(--edition-title); }
body .product-section .public-details dt { font-size: 13px; }
body .category-chip, body .city-directory-card { border-radius: 10px; }
body .category-symbol, body .stat-icon { background: var(--accent-soft); color: var(--accent); }
body .seo-breadcrumbs a:hover, body .site-footer a:hover { text-decoration: underline; }
body .site-footer { background: var(--surface-soft); }
body .quick-view-header h2 {
  color: var(--edition-title);
  font: 400 27px / 1.2 var(--edition-serif);
}
:root[data-theme="light"] .delivery-badge {
  border-color: #b8cab2;
  background: #eaf0e1;
  color: #375c3b;
}
:root[data-theme="dark"] .delivery-badge {
  border-color: #496449;
  background: #263e2c;
  color: #c0dcaf;
}
body.account-redesign .account-nav a[aria-current="page"] {
  background: var(--edition-nav-active);
  color: var(--edition-nav-ink);
}
body.account-redesign :is(.account-avatar, .account-guest-mark) {
  background: var(--edition-lime);
  color: var(--edition-pine);
}
body.account-redesign .account-guest-features {
  background: var(--surface-soft);
  border: 0;
  border-radius: 9px;
}
@media (min-width: 1051px) {
  body .dashboard-sidebar { padding: 19px 14px; }
  body .dashboard-sidebar .brand { padding: 0 6px 13px; border-bottom: 1px solid var(--line); }
  body .public-main { padding-inline: clamp(24px, 3vw, 60px); }
  body .topbar { padding-inline: clamp(24px, 3vw, 60px); }
}
@media (max-width: 1050px) {
  body .topbar .mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--edition-title);
    font: 650 20px / 1.15 var(--edition-sans);
    letter-spacing: -.055em;
    text-decoration: none;
  }
  .topbar .mobile-brand::before { content: ""; width: 23px; height: 24px; }
}
@media (min-width: 601px) and (max-width: 1050px) {
  body.legacy-shared-shell .topbar { flex-wrap: nowrap; }
  body .topbar .header-search { flex: 1 1 0; min-width: 0; }
  body .topbar .header-catalog-link { white-space: nowrap; }
}
@media (min-width: 601px) and (max-width: 850px) {
  body .topbar, body.legacy-shared-shell .topbar { padding-inline: 16px; gap: 8px; }
  body .topbar .account-link, html[data-theme] body.legacy-shared-shell .topbar .account-link {
    width: 42px; min-width: 42px; height: 42px; padding: 8px;
  }
  body .topbar .account-link > span { display: none; }
}
@media (max-width: 600px) {
  body .topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 7px;
    min-height: 57px;
    padding: 8px 12px;
  }
  body.legacy-shared-shell .topbar { justify-content: flex-start; }
  body .topbar .mobile-brand { min-height: 40px; }
  body .topbar :is(.header-search, .header-catalog-link) {
    order: 5;
    flex: 1 0 100%;
    max-width: none;
  }
  body .topbar .header-catalog-link { min-height: 32px; padding: 3px 2px; }
  body .topbar .topbar-actions, body.legacy-shared-shell .topbar .topbar-actions { gap: 5px; margin-left: auto; }
  body .topbar :is(.theme-toggle, .mobile-menu-toggle, .account-link), html[data-theme] body.legacy-shared-shell .topbar :is(.legacy-theme-toggle,.account-link) {
    width: 37px; min-width: 37px; height: 40px; min-height: 40px; padding: 8px;
  }
  body .public-main { padding: 18px 14px 26px; }
  body .seo-breadcrumbs { margin-bottom: 14px; }
  body .page-heading h1 { font-size: clamp(31px, 8.5vw, 42px); }
  body .page-heading { margin-bottom: 16px; }
  body .page-description { font-size: 14px; }
  body .catalog-panel .product-table tbody tr { background: var(--surface); border-color: var(--line-strong); }
}
@media (max-width: 380px) {
  body .topbar .mobile-brand { font-size: 17px; gap: 5px; }
  .topbar .mobile-brand::before { width: 18px; height: 19px; }
  body .topbar { padding-inline: 8px; gap: 4px; }
}
@media (max-width: 345px) {
  body .topbar, body.legacy-shared-shell .topbar { padding-inline: 6px; column-gap: 2px; }
  body .topbar .topbar-actions, body.legacy-shared-shell .topbar .topbar-actions { gap: 2px; }
  body .topbar :is(.theme-toggle, .mobile-menu-toggle, .account-link),
  html[data-theme] body.legacy-shared-shell .topbar :is(.legacy-theme-toggle, .account-link) {
    width: 34px; min-width: 34px;
  }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .edition-cross-link span {
    transition: transform 140ms cubic-bezier(.23,1,.32,1);
  }
  .edition-cross-link:hover span { transform: translate(2px,-2px); }
}
@media (prefers-reduced-motion: reduce) {
  body:is(.public-site, .dashboard-legacy) { scroll-behavior: auto; }
  .edition-cross-link span { transition: none; transform: none; }
}

/* The former-price column also carries the text «По предложениям». */
@media (min-width: 851px) {
  .catalog-panel .data-table.product-table:not(.catalog-offer-table) { min-width: 47.5rem; }
  .catalog-panel .product-table:not(.catalog-offer-table) th:first-child { width: auto; }
  .catalog-panel .product-table:not(.catalog-offer-table) th:nth-child(4) { width: 9.25rem; }
}
@media (min-width: 851px) and (max-width: 1280px) {
  .catalog-panel .product-table:not(.catalog-offer-table) :is(th,td) { padding-inline: 8px; }
}
