/*
  Раскладка Kassa. Подключается после app.css и только на витрине Kassa
  (templates/layouts/_head.html, тема с собственной раскладкой).

  Источник — утверждённые макеты витрины (03.10.2026) в стиле kassa.cc:
  тёплый светлый фон, белые плоские карточки без теней, жёлтые кнопки
  с тёмным текстом, номера шагов «1.» тонким крупным начертанием.
  Палитра — в apps/brands/themes/kassa.py; здесь размеры и то, чего нет
  в токенах темы. Шрифт — Nunito Sans (свой, static/fonts).
*/

:root {
  --ks-wrap: 1140px;
  --ks-yellow: #ffd900;       /* кнопки и выбранное; текст на нём только тёмный */
  --ks-ink: #1c1c1c;
  --ks-muted: #6b6b6b;        /* мелкий серый: 5:1 на фоне, 5.3:1 на белом */
  --ks-soft: #4a4a4a;
  --ks-ground: #f5f3f1;       /* фон страницы и подложка полей */
  --ks-panel: #faf9f7;
  --ks-line: #ece8e3;
  --ks-chip-line: #e3dfda;
  --ks-pale: #fff6c2;         /* бледно-жёлтый: примечание, подсветка */
  --ks-off: #8a8784;          /* номинал, которого нет в наличии */
  --ks-shade: rgba(28, 28, 28, 0.42);
}

.ks-wrap { width: 100%; max-width: calc(var(--ks-wrap) + 48px); margin: 0 auto; padding: 0 24px; }
body.skin-kassa { display: flex; flex-direction: column; }
.skin-kassa main.ks-main { flex: 1 0 auto; padding-top: 24px; }
.skin-kassa a { color: var(--ks-ink); }
.skin-kassa a:focus-visible, .skin-kassa button:focus-visible,
.skin-kassa summary:focus-visible, .skin-kassa select:focus-visible {
  outline: 2px solid var(--ks-ink); outline-offset: 2px;
}

/* --- шапка ---------------------------------------------------------------
   Строка доверия, под ней белая строка. Под открытым меню «Каталог»
   затемняется страница, а белая строка шапки остаётся над затемнением:
   её фон — отдельный слой (::before) между затемнением и кнопками. */
.ks-trust {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 32px; font-size: 12px; color: var(--ks-muted);
}
.ks-trust > span:first-child { display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; }
.ks-trust-links { display: flex; align-items: center; gap: 22px; }
.ks-trust-item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.skin-kassa a.ks-trust-item { color: var(--ks-muted); text-decoration: none; }
.skin-kassa a.ks-trust-item:hover { color: var(--ks-ink); }

.ks-top { position: relative; z-index: 40; }
.ks-top::before { content: ""; position: absolute; inset: 0; z-index: 2; background: #ffffff; }
.ks-bar {
  position: relative;
  display: grid; align-items: center; gap: 16px; height: 74px;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  grid-template-areas: "logo catalog search actions";
}
.ks-bar > .ks-logo, .ks-bar > .ks-head-search, .ks-bar > .ks-actions { position: relative; z-index: 3; }

.ks-logo { grid-area: logo; display: inline-flex; align-items: center; gap: 14px; text-decoration: none; white-space: nowrap; }
.ks-logo img { display: block; height: 40px; width: auto; }
.ks-logo-bar { display: block; width: 1px; height: 24px; background: #d9d5d0; }
.ks-logo-market { font-weight: 700; font-size: 13px; letter-spacing: 0.24em; color: var(--ks-ink); }

.ks-catalog { grid-area: catalog; margin-left: 18px; }
.ks-catalog-btn {
  position: relative; z-index: 3;
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 20px;
  border-radius: 6px; background: var(--ks-yellow); color: var(--ks-ink);
  font-size: 16px; font-weight: 600; cursor: pointer; list-style: none; user-select: none;
}
.ks-catalog-btn::-webkit-details-marker { display: none; }
.ks-catalog-btn:hover { filter: brightness(0.96); }
.ks-ico-close { display: none; }
.ks-catalog[open] .ks-catalog-btn { background: var(--ks-ink); color: #ffffff; }
.ks-catalog[open] .ks-ico-open { display: none; }
.ks-catalog[open] .ks-ico-close { display: block; }
.ks-shade { position: fixed; inset: 0; z-index: 1; background: var(--ks-shade); }

.ks-head-search { grid-area: search; min-width: 0; margin: 0; }
.ks-search-field {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px;
  border-radius: 6px; background: var(--ks-ground); color: var(--ks-muted);
}
.ks-search-field:focus-within { box-shadow: inset 0 0 0 2px var(--ks-yellow); }
.ks-search-field svg { flex: none; }
.ks-search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ks-ink); font: inherit; font-size: 15px; }
.ks-search-field input::placeholder { color: var(--ks-muted); opacity: 1; }

.ks-actions { grid-area: actions; display: flex; align-items: center; gap: 8px; }
.ks-login { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 6px 0 4px; border-radius: 6px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.skin-kassa .ks-login:hover, .ks-login[aria-current] { color: #6b5a00; }
.ks-login-ico { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ks-ground); color: var(--ks-ink); }
.ks-icon-btn {
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border: 0; border-radius: 6px; background: var(--ks-ground); color: var(--ks-ink); cursor: pointer;
}
.ks-icon-btn:hover { background: #ebe7e2; }

/* Строка разделов: плашки в одну линию, лишнее прячет storefront.js. */
.ks-links {
  display: flex; align-items: center; align-content: flex-start; flex-wrap: wrap; gap: 24px 8px;
  height: 52px; overflow: hidden; padding-top: 16px; font-size: 14px;
}
.ks-links a { display: inline-flex; align-items: center; gap: 8px; height: 36px; white-space: nowrap; text-decoration: none; }
.ks-links a[hidden] { display: none; }
.skin-kassa .ks-links .ks-links-back { padding-right: 12px; gap: 10px; color: var(--ks-muted); }
.skin-kassa .ks-links .ks-links-back:hover { color: var(--ks-ink); }
.ks-chip { padding: 0 14px 0 10px; border-radius: 6px; background: #ffffff; font-weight: 600; }
.ks-chip:hover { box-shadow: inset 0 0 0 1px var(--ks-chip-line); }
.ks-chip[aria-current] { background: var(--ks-yellow); font-weight: 700; }

/* Значки разделов — тонкий тёмный контур, без плашки. */
.skin-kassa .cat-icon { width: 18px; height: 18px; background: transparent; border-radius: 0; }
.skin-kassa .cat-icon svg { width: 18px; height: 18px; stroke: var(--ks-ink); stroke-width: 1.8; }

/* --- меню «Каталог» -------------------------------------------------------- */
.ks-mega {
  position: absolute; z-index: 5; top: calc(100% + 8px); left: 24px; right: 24px;
  display: grid; grid-template-columns: 280px minmax(0, 1fr);
  max-height: calc(100vh - 140px); max-height: calc(100dvh - 140px); overflow: hidden;
  border-radius: 8px; background: #ffffff; box-shadow: 0 24px 60px rgba(28, 28, 28, 0.22);
}
.ks-mega-head, .ks-mega-search, .ks-mega-extra, .ks-mega-back { display: none; }
.ks-mega-nav { margin: 0; padding: 12px; list-style: none; overflow-y: auto; background: var(--ks-panel); display: flex; flex-direction: column; gap: 2px; }
.ks-mega-tab { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 12px; border-radius: 6px; font-weight: 600; text-decoration: none; }
.ks-mega-tab > span:not(.cat-icon) { flex: 1; min-width: 0; }
.ks-mega-tab .cat-icon { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 6px; background: #ffffff; }
.ks-chevron { display: block; flex: none; color: var(--ks-off); }
.ks-mega-tab:hover { background: #ffffff; }
.ks-mega-tab[aria-current] { background: #ffffff; box-shadow: inset 3px 0 0 var(--ks-yellow); font-weight: 800; }
.ks-mega-tab[aria-current] .cat-icon { background: var(--ks-yellow); }
.ks-mega-body { min-width: 0; overflow-y: auto; }
.ks-mega-section {
  display: grid; gap: 20px 36px; padding: 28px 32px 32px;
  grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: auto 1fr;
  grid-template-areas: "head head" "groups popular";
}
.ks-mega-section[hidden] { display: none; }
.ks-mega-sechead { grid-area: head; display: flex; align-items: center; gap: 16px; }
.ks-mega-sechead h2 { flex: 1; min-width: 0; margin: 0; font-size: 26px; line-height: 32px; font-weight: 800; }
.ks-mega-all { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.ks-mega-groups { grid-area: groups; align-content: start; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 24px; }
.ks-mega-group h3 { margin: 0 0 6px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ks-muted); }
.ks-mega-group ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.ks-mega-group a { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 10px; border-radius: 6px; font-weight: 600; text-decoration: none; }
.ks-mega-group a:hover { background: var(--ks-ground); }
.ks-mega-group a > span:not(.ks-mega-price) { flex: 1; min-width: 0; }
.ks-mega-group img { display: block; flex: none; border-radius: 8px; }
.ks-mega-price { font-size: 13px; font-weight: 400; color: var(--ks-muted); white-space: nowrap; }
.ks-mega-empty { margin: 0; color: var(--ks-muted); font-size: 14px; }
.ks-mega-popular { grid-area: popular; display: flex; flex-direction: column; gap: 10px; }
.ks-mega-caption { font-size: 13px; color: var(--ks-muted); }
.ks-mega-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ks-mini-tile { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 8px; background: var(--ks-ground); text-decoration: none; }
.ks-mini-tile:hover { box-shadow: inset 0 0 0 1px var(--ks-chip-line); }
.ks-mini-tile img { display: block; border-radius: 14px; }
.ks-mini-name { font-weight: 800; font-size: 14px; line-height: 18px; }
.ks-mini-price { font-size: 12px; color: var(--ks-muted); }

/* --- главная ------------------------------------------------------------- */
.ks-home { display: flex; flex-direction: column; gap: 64px; }
.ks-section-title { margin: 0; font-size: 30px; line-height: 36px; font-weight: 800; }

/* Ряд крупных плиток: семь на ширину, остальные — прокруткой. */
.ks-tiles-row { position: relative; }
.ks-tiles {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; padding-bottom: 4px;
}
.ks-tiles::-webkit-scrollbar { display: none; }
.ks-tile {
  flex: 0 0 calc((100% - 72px) / 7); min-width: 0; scroll-snap-align: start;
  display: flex; flex-direction: column; gap: 10px; text-decoration: none;
}
.ks-tile img, .ks-tile-emoji { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; border-radius: 28px; transition: transform .2s ease; }
.ks-tile-emoji { display: grid; place-items: center; background: #ffffff; font-size: 56px; }
@media (hover: hover) { .ks-tile:hover img { transform: translateY(-3px); } }
.ks-tile-name { padding: 0 4px; font-weight: 800; font-size: 17px; line-height: 22px; }
.ks-tile-price { margin-top: -8px; padding: 0 4px; font-size: 13px; color: var(--ks-muted); }
.ks-tiles-next {
  position: absolute; right: -18px; top: 56px;
  display: flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: #ffffff; color: var(--ks-ink);
  box-shadow: 0 4px 14px rgba(28, 28, 28, 0.16); cursor: pointer;
}
.ks-tiles-next[hidden] { display: none; }

/* Жёлтый баннер с заголовком страницы. */
.ks-tiles-row + .ks-banner { margin-top: -32px; }
.ks-banner {
  position: relative; overflow: hidden; min-height: 230px; padding: 36px 48px;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 14px;
  border-radius: 8px; background: var(--ks-yellow); color: var(--ks-ink);
}
.ks-banner h1 { position: relative; z-index: 1; margin: 0; max-width: 620px; font-size: 38px; line-height: 44px; font-weight: 800; }
.ks-banner p { position: relative; z-index: 1; margin: 0; max-width: 560px; font-size: 17px; }
.skin-kassa .ks-banner-cta {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 24px;
  border-radius: 8px; background: var(--ks-ink); color: #ffffff; font-weight: 700; text-decoration: none;
}
.skin-kassa .ks-banner-cta:hover { background: #000000; color: #ffffff; }
.ks-banner-art img { position: absolute; display: block; box-shadow: 0 16px 40px rgba(28, 28, 28, 0.25); }
.ks-banner-art-1 { right: 230px; top: 30px; width: 120px; height: 120px; border-radius: 28px; transform: rotate(-8deg); }
.ks-banner-art-2 { right: 80px; top: 54px; width: 132px; height: 132px; border-radius: 30px; transform: rotate(7deg); }
.ks-banner-art-3 { right: 360px; top: 110px; width: 96px; height: 96px; border-radius: 24px; transform: rotate(5deg); }

/* Хиты продаж: белые карточки, жёлтая кнопка. */
.skin-kassa .hits { gap: 20px; }
.skin-kassa .hit-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.skin-kassa .hit { gap: 0; padding: 12px; border-radius: 8px; background: #ffffff; color: var(--ks-ink); }
.skin-kassa .hit:hover { box-shadow: inset 0 0 0 1px var(--ks-chip-line); }
.skin-kassa .hit-media { border-radius: 16px; background: var(--ks-ground); }
.skin-kassa .hit-badge { display: none; }
.skin-kassa .hit-kind { margin-top: 12px; font-size: 13px; line-height: 20px; color: var(--ks-muted); }
.skin-kassa .hit-price { margin-top: 2px; font-family: var(--font); font-weight: 800; font-size: 22px; line-height: 28px; }
.skin-kassa .hit-price .from { font-family: var(--font); font-size: 22px; font-weight: 800; color: var(--ks-ink); }
.skin-kassa .hit-name { margin-top: 4px; font-size: 14px; line-height: 20px; min-height: 40px; color: var(--ks-ink); -webkit-line-clamp: 3; }
.skin-kassa .hit-meta { margin-top: 2px; margin-bottom: 14px; font-size: 13px; line-height: 20px; color: var(--ks-muted); }
.skin-kassa .hit-name + .hit-cta { margin-top: 14px; }
.skin-kassa .hit-cta { height: 40px; margin-top: auto; border-radius: 6px; background: var(--ks-yellow); color: var(--ks-ink); font-size: 15px; font-weight: 700; }
.skin-kassa .hit:hover .hit-cta { filter: brightness(0.96); }
.skin-kassa .hit-cta.out { background: var(--ks-ground); color: var(--ks-muted); }
.skin-kassa .more-btn { height: 48px; border-radius: 6px; background: #ffffff; box-shadow: none; color: var(--ks-ink); font-size: 15px; font-weight: 700; }
.skin-kassa .more-btn:hover { box-shadow: inset 0 0 0 1px var(--ks-chip-line); }

/* Оплата сервисов: белая карточка, шаги «1.», жёлтая кнопка. */
.ks-service {
  display: grid; grid-template-columns: minmax(270px, 1fr) minmax(0, 2fr) auto; align-items: center; gap: 40px;
  padding: 36px 40px; border-radius: 8px; background: #ffffff;
}
.ks-service-intro { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.ks-service-intro h2 { margin: 0; font-size: 30px; line-height: 36px; font-weight: 800; }
.ks-service-intro p { margin: 0; color: var(--ks-muted); }
.ks-service .ks-eyebrow { padding: 2px 8px; border-radius: 4px; background: var(--ks-yellow); font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.ks-steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.ks-steps li { display: flex; flex-direction: column; gap: 4px; }
.ks-steps b { font-weight: 700; }
.ks-steps li > span:last-child { font-size: 14px; color: var(--ks-muted); }
.ks-step-num { font-size: 36px; line-height: 40px; font-weight: 300; }

.ks-cta {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 28px;
  border: 0; border-radius: 8px; background: var(--ks-yellow); color: var(--ks-ink);
  font: inherit; font-size: 18px; font-weight: 700; text-decoration: none; cursor: pointer;
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.ks-cta:hover { filter: brightness(0.96); }
.ks-service-cta { font-size: 17px; }

.ks-about h2 { margin: 0 0 8px; font-size: 16px; font-weight: 700; }
.ks-about p { margin: 0; max-width: 110ch; font-size: 14px; color: var(--ks-muted); }

/* --- раздел и поиск ------------------------------------------------------ */
.ks-page-title { margin: 0 0 20px; font-size: 30px; line-height: 36px; font-weight: 800; }
.skin-kassa .lede { margin-top: -8px; margin-bottom: 24px; color: var(--ks-muted); }

/* --- карточка товара ----------------------------------------------------- */
.ks-crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 16px; padding: 0; list-style: none; font-size: 14px; color: var(--ks-muted); }
.ks-crumbs li + li::before { content: "/"; margin-right: 8px; }
.skin-kassa .ks-crumbs a { color: var(--ks-muted); text-decoration: none; }
.skin-kassa .ks-crumbs a:hover { color: var(--ks-ink); }
.ks-crumbs [aria-current] { color: var(--ks-ink); }

.ks-product {
  display: grid; gap: 0 32px; padding: 24px;
  grid-template-columns: 300px minmax(0, 1fr) 380px; grid-template-rows: auto 1fr;
  grid-template-areas: "media head buy" "media about buy";
  border-radius: 6px; background: #ffffff;
}
.ks-product-media { grid-area: media; position: relative; align-self: start; }
.ks-product-media img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; border-radius: 24px; }
.ks-product-emoji { display: grid; place-items: center; aspect-ratio: 1 / 1; border-radius: 24px; background: var(--ks-ground); font-size: 96px; }
.ks-product-region {
  position: absolute; left: 14px; top: 14px; height: 26px; padding: 0 10px; display: flex; align-items: center;
  border-radius: 999px; background: #ffffff; font-size: 12px; font-weight: 800; box-shadow: 0 2px 6px rgba(28, 28, 28, 0.18);
}
.ks-product-head { grid-area: head; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ks-product-head .ks-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ks-muted); }
.ks-product-head h1 { margin: 0; font-size: 34px; line-height: 40px; font-weight: 800; }
.ks-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.ks-facts span { height: 30px; padding: 0 10px; display: flex; align-items: center; border-radius: 6px; background: var(--ks-ground); font-size: 13px; }
.ks-product-about { grid-area: about; min-width: 0; padding-top: 20px; }
.ks-lead { margin: 0 0 16px; max-width: 520px; color: var(--ks-soft); }
.ks-checks { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; font-size: 15px; }
.ks-checks li { display: flex; align-items: flex-start; gap: 10px; line-height: 22px; }
.ks-check { display: flex; flex: none; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ks-yellow); color: var(--ks-ink); }

/* Покупка: номиналы, «К оплате», способ оплаты, кнопка. */
.ks-buy { grid-area: buy; align-self: start; }
.ks-buy-form, .ks-buy > :where(.ks-cta, p) { margin: 0; }
.ks-buy-form, .ks-buy:not(:has(.ks-buy-form)) {
  display: flex; flex-direction: column; gap: 14px; padding: 20px;
  border: 1px solid var(--ks-line); border-radius: 6px; background: #ffffff;
}
.ks-buy-title { margin: 0; font-size: 20px; font-weight: 800; }
.ks-buy-text { margin: 0; font-size: 14px; color: var(--ks-soft); }
.ks-variants { margin: 0; padding: 0; border: 0; min-width: 0; }
.ks-buy-label { padding: 0; margin-bottom: 10px; font-size: 14px; color: var(--ks-muted); }
.ks-buy-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.ks-chip-sub { color: var(--ks-muted); font-weight: 400; font-size: 13px; }
.ks-buy-grid .ks-chip {
  order: 0; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px;
  border: 1px solid var(--ks-chip-line); border-radius: 6px; background: #ffffff; color: var(--ks-ink);
  font-size: 15px; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums;
}
.ks-buy-grid .ks-chip:hover { border-color: var(--ks-ink); box-shadow: none; }
.ks-variant-input:checked + .ks-chip { background: var(--ks-yellow); border-color: var(--ks-yellow); font-weight: 800; }
.ks-variant-input:checked + .ks-chip .ks-chip-sub { color: var(--ks-ink); }
.ks-variant-input:focus-visible + .ks-chip { outline: 2px solid var(--ks-ink); outline-offset: 2px; }
.ks-buy-grid .ks-chip.out { color: var(--ks-off); text-decoration: line-through; cursor: not-allowed; }
.ks-buy-grid .ks-chip.out:hover { border-color: var(--ks-chip-line); }
.ks-total { display: none; }
.ks-variant-input:checked + .ks-chip + .ks-total {
  order: 1; flex: 0 0 100%; display: flex; flex-direction: column; gap: 2px; margin-top: 6px; padding: 14px 16px;
  border-radius: 6px; background: var(--ks-ground);
}
.ks-total-label { font-size: 13px; color: var(--ks-muted); }
.ks-total-variant { display: none; }
.ks-total-sum { font-weight: 800; font-size: 30px; line-height: 36px; font-variant-numeric: tabular-nums; }
.ks-total-note { font-size: 12px; color: var(--ks-muted); }
.ks-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 4px; border: 0; border-radius: 6px; background: var(--ks-ground); min-width: 0; }
.ks-buy-grid .ks-methods { order: 2; flex: 0 0 100%; }
.ks-method { display: block; cursor: pointer; }
.ks-method span { display: flex; align-items: center; justify-content: center; height: 38px; border-radius: 4px; font-size: 14px; font-weight: 600; color: var(--ks-muted); }
.ks-method input:checked + span { background: #ffffff; box-shadow: 0 1px 3px rgba(28, 28, 28, 0.12); color: var(--ks-ink); font-weight: 700; }
.ks-method input:focus-visible + span { outline: 2px solid var(--ks-ink); outline-offset: 2px; }
.ks-buy-cta { display: none; }
.ks-variant-input:checked + .ks-chip + .ks-total + .ks-buy-cta { order: 3; flex: 0 0 100%; display: flex; }
.ks-cta-short { display: none; }
.ks-buy-note { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--ks-muted); }
.ks-buy-note svg { flex: none; }

/* Подробности: вкладки, шаги, примечание, вопросы. */
.ks-details { display: flex; flex-direction: column; gap: 24px; margin-top: 12px; padding: 24px 32px 28px; border-radius: 6px; background: #ffffff; }
.ks-tabs { display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; box-shadow: inset 0 -1px 0 var(--ks-line); }
.ks-tabs::-webkit-scrollbar { display: none; }
.skin-kassa .ks-tab { padding-bottom: 12px; font-weight: 600; color: var(--ks-muted); text-decoration: none; white-space: nowrap; }
.skin-kassa .ks-tab:hover { color: var(--ks-ink); }
.skin-kassa .ks-tab[aria-selected="true"] { color: var(--ks-ink); font-weight: 800; box-shadow: inset 0 -3px 0 var(--ks-yellow); }
.ks-panel { display: flex; flex-direction: column; gap: 22px; }
.ks-panel[hidden] { display: none; }
.ks-panel + .ks-panel { margin-top: 8px; }
.ks-details .ks-steps { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.ks-note { display: flex; align-items: center; gap: 12px; margin: 0; padding: 14px 16px; border-radius: 6px; background: var(--ks-pale); font-size: 15px; }
.ks-dot { display: flex; flex: none; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ks-ink); color: var(--ks-yellow); font-size: 13px; font-weight: 800; }
.ks-faq details { border-top: 1px solid var(--ks-line); }
.ks-faq details:last-child { border-bottom: 1px solid var(--ks-line); }
.ks-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 14px 0; font-weight: 700; cursor: pointer; list-style: none; }
.ks-faq summary::-webkit-details-marker { display: none; }
.ks-faq summary svg { flex: none; transition: transform .2s ease; }
.ks-faq details[open] summary svg { transform: rotate(180deg); }
.ks-faq-body { padding-bottom: 16px; font-size: 15px; line-height: 22px; color: var(--ks-soft); }
.ks-faq-body p { margin: 0 0 8px; }
.ks-prose { max-width: 72ch; color: var(--ks-soft); }

.ks-similar { display: flex; flex-direction: column; gap: 20px; margin-top: 48px; }
.ks-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ks-section-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; white-space: nowrap; }

/* --- подвал: две белые карточки, как на kassa.cc --------------------------- */
.ks-foot { display: flex; flex-direction: column; gap: 10px; margin-top: 72px; padding-bottom: 24px; }
.ks-foot-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; padding: 32px 40px; border-radius: 6px; background: #ffffff; }
.ks-foot-col summary {
  margin-bottom: 12px; font-size: 16px; font-weight: 700; list-style: none;
  pointer-events: none;   /* на широком экране колонки не сворачиваются */
}
.ks-foot-col summary::-webkit-details-marker { display: none; }
.ks-foot-links { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-size: 14px; }
.skin-kassa .ks-foot-links a { color: var(--ks-muted); text-decoration: none; overflow-wrap: anywhere; }
.skin-kassa .ks-foot-links a:hover { color: var(--ks-ink); }
.ks-foot-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 40px; border-radius: 6px; background: #ffffff; }
.ks-foot-brand { display: inline-flex; align-items: center; gap: 14px; }
.ks-foot-brand img { display: block; height: 34px; width: auto; }
.ks-foot-brand .ks-logo-bar { height: 20px; }
.ks-foot-brand .ks-logo-market { font-size: 12px; }
.ks-foot-copy { font-size: 14px; color: var(--ks-muted); }
.ks-foot-tg { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ks-ground); }
.ks-foot-tg:hover { background: var(--ks-yellow); }

/* --- планшет -------------------------------------------------------------- */
@media (max-width: 1100px) {
  .ks-mega { grid-template-columns: 240px minmax(0, 1fr); }
  .ks-mega-section { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "groups"; }
  .ks-mega-popular { display: none; }
  .ks-tile { flex-basis: calc((100% - 48px) / 5); }
  .ks-banner-art .ks-banner-art-3 { display: none; }
  .ks-service { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .ks-service-cta { justify-self: start; }
  .ks-product {
    grid-template-columns: 240px minmax(0, 1fr); grid-template-rows: auto auto auto;
    grid-template-areas: "media head" "media about" "buy buy"; row-gap: 20px;
  }
  .ks-product-about { padding-top: 0; }
  .ks-foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ks-trust > span:first-child { display: none; }
  .ks-trust { justify-content: flex-end; }
}

/* --- телефон ------------------------------------------------------------- */
@media (max-width: 760px) {
  .ks-wrap { padding: 0 16px; }
  .skin-kassa main.ks-main { padding-top: 16px; }
  .ks-trust { display: none; }

  .ks-bar {
    height: auto; grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "catalog logo actions" "search search search";
    gap: 12px 10px; padding-top: 12px; padding-bottom: 14px;
  }
  .ks-catalog { margin-left: 0; }
  .ks-catalog-btn { width: 44px; padding: 0; justify-content: center; }
  .ks-catalog-label { display: none; }
  .ks-logo { gap: 10px; }
  .ks-logo img { height: 32px; }
  .ks-logo-bar { height: 18px; }
  .ks-logo-market { font-size: 11px; letter-spacing: 0.22em; }
  .ks-login { padding: 0 12px; background: var(--ks-ground); font-size: 14px; }
  .ks-login-ico { display: none; }
  .ks-search-field input { font-size: 16px; }   /* мельче — iPhone увеличит страницу при фокусе */

  /* Разделы: на главной — лентой плашек, на остальных страницах их нет. */
  .ks-links { display: none; }
  body:has(.ks-home) .ks-links {
    display: flex; flex-wrap: nowrap; height: auto; overflow-x: auto; padding-top: 12px; padding-right: 0;
    scrollbar-width: none;
  }
  body:has(.ks-home) .ks-links::-webkit-scrollbar { display: none; }
  .ks-links .ks-links-back { display: none; }
  .ks-chip { flex: none; padding: 0 12px; }
  .ks-chip .cat-icon { display: none; }

  /* Меню — на весь экран; крестик — сама кнопка меню (summary) в углу. */
  .ks-shade { display: none; }
  body:has(.ks-catalog[open]) { overflow: hidden; }
  .ks-catalog[open] .ks-catalog-btn { position: fixed; z-index: 7; top: 16px; right: 16px; }
  .ks-mega {
    position: fixed; inset: 0; z-index: 6; display: flex; flex-direction: column; gap: 0;
    max-height: none; padding: 16px 16px 32px; overflow-y: auto; border-radius: 0; box-shadow: none; background: #ffffff;
  }
  .ks-mega-head { display: flex; align-items: center; min-height: 44px; margin-bottom: 14px; padding-right: 56px; }
  .ks-mega-title { font-size: 28px; line-height: 34px; font-weight: 800; }
  .ks-mega-search { display: block; margin: 0 0 6px; }
  .ks-mega-nav { padding: 0; background: none; overflow: visible; gap: 0; }
  .ks-mega-nav li { border-bottom: 1px solid var(--ks-line); }
  .ks-mega-tab { min-height: 60px; padding: 0; border-radius: 0; font-weight: 700; }
  .ks-mega-tab .cat-icon { width: 36px; height: 36px; background: var(--ks-ground); }
  .ks-mega-tab:hover, .ks-mega-tab[aria-current] { background: none; box-shadow: none; font-weight: 700; }
  .ks-mega-tab[aria-current] .cat-icon { background: var(--ks-ground); }
  .ks-mega-body { display: none; overflow: visible; }
  .ks-mega-extra { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 20px; }
  .ks-mega-chips { display: flex; flex-wrap: wrap; gap: 8px; }
  .ks-mega-chips a { height: 36px; padding: 0 12px; display: flex; align-items: center; border-radius: 6px; background: var(--ks-ground); font-size: 14px; font-weight: 600; text-decoration: none; }
  .skin-kassa .ks-back { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ks-muted); text-decoration: none; }
  .ks-mega.is-drilled .ks-mega-body { display: block; }
  .ks-mega.is-drilled .ks-mega-head,
  .ks-mega.is-drilled .ks-mega-search,
  .ks-mega.is-drilled .ks-mega-nav,
  .ks-mega.is-drilled .ks-mega-extra { display: none; }
  .ks-mega-section { display: block; padding: 0; }
  .ks-mega-sechead { flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
  .ks-mega-back {
    display: flex; align-items: center; justify-content: center; width: 44px; height: 44px;
    border: 0; border-radius: 6px; background: var(--ks-ground); color: var(--ks-ink); cursor: pointer;
  }
  .ks-mega-sechead h2 { padding-right: 56px; font-size: 24px; }
  .ks-mega-all { order: 3; flex: 0 0 100%; justify-content: space-between; min-height: 48px; padding: 0 16px; border-radius: 6px; background: var(--ks-yellow); }
  .ks-mega-groups { display: block; }
  .ks-mega-group + .ks-mega-group { margin-top: 20px; }
  .ks-mega-group li + li { border-top: 1px solid var(--ks-line); }
  .ks-mega-group a { min-height: 60px; padding: 0; border-radius: 0; }
  .ks-mega-group a:hover { background: none; }

  /* Главная */
  .ks-home { gap: 40px; }
  .ks-section-title { font-size: 22px; line-height: 28px; }
  .ks-tiles { margin-right: -16px; padding-right: 16px; gap: 10px; }
  .ks-tile { flex: 0 0 120px; gap: 8px; }
  .ks-tile img, .ks-tile-emoji { border-radius: 26px; }
  .ks-tile-name { font-size: 15px; line-height: 20px; }
  .ks-tile-price { font-size: 12px; }
  .ks-tiles-next { display: none; }
  .ks-tiles-row + .ks-banner { margin-top: -24px; }
  .ks-banner { min-height: 0; padding: 24px 20px 26px; gap: 10px; }
  .ks-banner h1 { max-width: 260px; font-size: 26px; line-height: 31px; }
  .ks-banner p { max-width: 280px; font-size: 15px; }
  .skin-kassa .ks-banner-cta { align-self: stretch; justify-content: center; margin-top: 6px; }
  .ks-banner-art-1 { right: -14px; top: 18px; width: 92px; height: 92px; border-radius: 22px; transform: rotate(10deg); }
  .ks-banner-art .ks-banner-art-2, .ks-banner-art .ks-banner-art-3 { display: none; }
  .skin-kassa .hit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .skin-kassa .hit { padding: 10px; }
  .skin-kassa .hit-media { border-radius: 14px; }
  .skin-kassa .hit-price, .skin-kassa .hit-price .from { font-size: 19px; line-height: 24px; }
  .skin-kassa .hit-name { font-size: 13px; line-height: 18px; min-height: 36px; }
  .ks-service { padding: 22px 18px; gap: 16px; }
  .ks-service-intro h2 { font-size: 22px; line-height: 28px; }
  .ks-steps { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .ks-steps li { flex-direction: row; align-items: baseline; gap: 10px; }
  .ks-steps li > span:last-child { display: none; }
  .ks-step-num { width: 26px; flex: none; font-size: 24px; line-height: 28px; }
  .ks-service-cta { justify-self: stretch; }

  .ks-page-title { font-size: 24px; line-height: 30px; }

  /* Карточка товара — одна колонка; «К оплате» и кнопка — полосой внизу экрана. */
  .ks-crumbs ol { margin-bottom: 10px; font-size: 12px; }
  .ks-product {
    grid-template-columns: minmax(0, 1fr); grid-template-rows: none;
    grid-template-areas: "media" "head" "buy" "about"; gap: 14px; padding: 16px;
  }
  .ks-product-media img, .ks-product-emoji { border-radius: 22px; }
  .ks-product-head h1 { font-size: 26px; line-height: 32px; }
  .ks-buy-form { padding: 0; border: 0; }
  .ks-variant-input:checked + .ks-chip + .ks-total {
    position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; margin: 0;
    padding: 12px 212px calc(18px + env(safe-area-inset-bottom, 0px)) 16px;
    border-radius: 0; background: #ffffff; box-shadow: 0 -8px 24px rgba(28, 28, 28, 0.10);
  }
  .ks-total-variant { display: inline; }
  .ks-total-sum { font-size: 22px; line-height: 26px; }
  .ks-total-note { display: none; }
  .ks-variant-input:checked + .ks-chip + .ks-total + .ks-buy-cta {
    position: fixed; z-index: 31; right: 16px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); width: 180px; min-height: 52px; font-size: 17px;
  }
  .ks-cta-long { display: none; }
  .ks-cta-short { display: inline; }
  body:has(.ks-variant-input:checked) .ks-foot { padding-bottom: 110px; }
  .ks-details { margin-top: 10px; padding: 18px 16px; }
  .ks-details .ks-steps { gap: 12px; }
  .ks-details .ks-steps li { display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 8px; row-gap: 0; align-items: start; }
  .ks-details .ks-step-num { grid-row: 1 / span 2; font-size: 26px; line-height: 28px; }
  .ks-details .ks-steps li > span:last-child { display: inline; grid-column: 2; font-size: 13px; }
  .ks-details .ks-steps b { grid-column: 2; }
  .ks-note { font-size: 14px; }
  .ks-similar { margin-top: 32px; }

  /* Подвал — аккордеон в белой карточке. */
  .ks-foot { margin-top: 48px; padding-bottom: 20px; gap: 8px; }
  .ks-foot-cols { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 4px 18px; }
  .ks-foot-col { border-bottom: 1px solid var(--ks-line); }
  .ks-foot-col:last-child { border-bottom: 0; }
  .ks-foot-col summary {
    display: flex; align-items: center; justify-content: space-between; min-height: 54px; margin: 0;
    cursor: pointer; pointer-events: auto;
  }
  .ks-foot-col summary::after {
    content: ""; width: 8px; height: 8px; margin-right: 4px;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg);
  }
  .ks-foot-col[open] summary::after { transform: translateY(2px) rotate(225deg); }
  .ks-foot-links { padding-bottom: 16px; }
  .ks-foot-bottom { flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px; }
  .ks-foot-brand img { height: 30px; }
  .ks-foot-copy { font-size: 13px; }
  .ks-foot-tg { display: none; }
}
