/* Блок Z20: витрина «Товары в наличии» на главной (бенто, вариант A).
   Все классы с префиксом tkb-, чтобы не пересекаться с глобальными .products/.product
   (строчная раскладка каталога, site.css). Цвета — токены site.css. */
.tkb { --tkb-gap: 16px; --tkb-r: 14px; }
.tkb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px;
            margin: -4px 0 18px; flex-wrap: wrap; }
.tkb-sub { margin: 0; color: var(--muted, #67707e); font-size: 14px; }
.tkb-ctrl { display: flex; gap: 8px; align-items: center; }
.tkb-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
           height: 38px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line, #e3e7ec); background: #fff;
           color: var(--text, #1f2530); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.tkb-btn:hover { border-color: #c9d0d8; background: #fbfcfd; }
.tkb-btn:focus-visible, .tkb-card:focus-visible, .tkb-cta-btn:focus-visible {
  outline: 3px solid var(--accent, #f5c518); outline-offset: 2px; }
.tkb-btn-icon { width: 38px; padding: 0; overflow: hidden; }
.tkb-btn-icon svg { fill: currentColor; }
.tkb-btn .tkb-i-play { display: none; }
.tkb-btn[aria-pressed="true"] .tkb-i-play { display: block; }
.tkb-btn[aria-pressed="true"] .tkb-i-pause { display: none; }
.tkb-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }
.tkb-prog i { display: block; height: 100%; width: 0; background: var(--accent, #f5c518); transition: width .25s linear; }

/* сетка: 4 колонки; большая 2×2, справа 3 квадрата + плитка каталога, снизу 2 широких */
.tkb-grid { display: grid; gap: var(--tkb-gap); grid-template-columns: repeat(4, minmax(0, 1fr));
            grid-template-areas: "big big s1 s2" "big big s3 cta" "r1 r1 r2 r2"; }
.tkb-slot[data-slot="big"] { grid-area: big; }
.tkb-slot[data-slot="s1"] { grid-area: s1; }
.tkb-slot[data-slot="s2"] { grid-area: s2; }
.tkb-slot[data-slot="s3"] { grid-area: s3; }
.tkb-slot[data-slot="cta"] { grid-area: cta; }
.tkb-slot[data-slot="r1"] { grid-area: r1; }
.tkb-slot[data-slot="r2"] { grid-area: r2; }
.tkb-slot { position: relative; min-width: 0; background: #fff; border: 1px solid var(--line, #e3e7ec);
            border-radius: var(--tkb-r); overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.tkb-slot:hover { border-color: #cfd6de; box-shadow: 0 10px 28px rgba(20, 28, 38, .09); }
.tkb-slot.k-sq, .tkb-slot.k-cta { aspect-ratio: 1 / 1; }
.tkb-slot.k-wide { height: 236px; }

/* карточка-слой: для плавной смены в слоте лежат 1–2 слоя */
.tkb-card { position: absolute; inset: 0; display: flex; flex-direction: column; color: inherit; text-decoration: none;
            background: #fff; opacity: 1; transition: opacity .7s ease, transform .7s ease; }
.tkb-card.tkb-enter { opacity: 0; transform: scale(.985); }
.tkb-media { position: relative; flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center;
             padding: 14px; background: #fff; }
.tkb-media img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block;
                 transition: transform .45s ease; }
.tkb-card:hover .tkb-media img { transform: scale(1.035); }
.tkb-body { flex: 0 0 auto; padding: 12px 14px 14px; min-width: 0; }
.tkb-cat { color: var(--muted, #67707e); font-size: 12px; line-height: 1.3; white-space: nowrap; overflow: hidden;
           text-overflow: ellipsis; margin-bottom: 4px; }
.tkb-name { font-weight: 600; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2;
            -webkit-box-orient: vertical; overflow: hidden; }
.tkb-desc { color: #48505c; font-size: 13px; line-height: 1.4; margin: 8px 0 0; display: -webkit-box;
            -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tkb-attrs { margin: 8px 0 0; display: grid; gap: 2px; font-size: 13px; line-height: 1.35; }
.tkb-attrs div { display: flex; gap: 6px; min-width: 0; }
.tkb-attrs dt { color: var(--muted, #67707e); flex: 0 0 auto; max-width: 55%; white-space: nowrap; overflow: hidden;
                text-overflow: ellipsis; }
.tkb-attrs dt::after { content: ":"; }
.tkb-attrs dd { margin: 0; font-weight: 600; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tkb-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.tkb-price { font-weight: 800; font-size: 16px; line-height: 1.15; white-space: nowrap; }
.tkb-price small { display: block; font-size: 11px; font-weight: 500; color: var(--muted, #67707e); }
.tkb-stock { display: inline-flex; align-items: center; gap: 5px; color: var(--green, #0f7a34); font-weight: 600;
             font-size: 12.5px; white-space: nowrap; }
.tkb-stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green, #0f7a34); }
.tkb-more { display: none; }

/* большая плитка */
.k-big .tkb-media { padding: 26px 26px 6px; }
.k-big .tkb-body { padding: 16px 22px 20px; border-top: 1px solid #f0f2f5; }
.k-big .tkb-cat { font-size: 13px; }
.k-big .tkb-name { font-size: 21px; line-height: 1.25; font-weight: 700; }
.k-big .tkb-attrs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.k-big .tkb-attrs div { flex-direction: column; gap: 0; background: #f6f8fa; border-radius: 8px; padding: 7px 10px; }
.k-big .tkb-attrs dt { max-width: 100%; font-size: 12px; }
.k-big .tkb-attrs dt::after { content: ""; }
.k-big .tkb-foot { margin-top: 14px; }
.k-big .tkb-price { font-size: 26px; }
.k-big .tkb-more { display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: 8px;
                   background: var(--accent, #f5c518); color: #1b1b1b; font-weight: 700; font-size: 15px; }
.k-big .tkb-card:hover .tkb-more { background: var(--accent-dark, #d9a900); }
.k-big .tkb-badge { position: absolute; left: 18px; top: 16px; background: var(--graphite, #232a33); color: #fff;
                    font-size: 12px; font-weight: 600; border-radius: 999px; padding: 4px 10px; }

/* малые квадраты: фото, название, цена */
.k-sq .tkb-attrs, .k-sq .tkb-desc, .k-sq .tkb-price small { display: none; }
.k-sq .tkb-body { padding: 10px 14px 13px; }
.k-sq .tkb-cat { font-size: 11.5px; margin-bottom: 2px; }
.k-sq .tkb-foot { margin-top: 6px; }

/* широкие: фото слева, текст справа */
.k-wide .tkb-card { flex-direction: row; }
.k-wide .tkb-media { flex: 0 0 42%; padding: 16px; border-right: 1px solid #f0f2f5; }
.k-wide .tkb-body { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; padding: 16px 20px; }
.k-wide .tkb-name { font-size: 16px; font-weight: 700; }
.k-wide .tkb-attrs div:nth-child(n+3) { display: none; }
.k-wide .tkb-price { font-size: 19px; }

/* плитка каталога */
.tkb-cta { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 22px;
           background: var(--graphite, #232a33); color: #dfe5ec; }
.tkb-slot.k-cta { border-color: var(--graphite, #232a33); }
.tkb-cta-num { color: var(--accent, #f5c518); font-weight: 800; font-size: 40px; line-height: 1; white-space: nowrap; }
.tkb-cta-t { color: #fff; font-weight: 700; font-size: 17px; margin-top: 6px; }
.tkb-cta-p { font-size: 12.5px; line-height: 1.45; margin: 10px 0 16px; color: #b9c2cd; }
.tkb-cta-btn { align-self: flex-start; display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 8px;
               background: var(--accent, #f5c518); color: #1b1b1b; font-weight: 700; font-size: 14px; text-decoration: none;
               white-space: nowrap; }
.tkb-cta-btn:hover { background: var(--accent-dark, #d9a900); }

/* планшет: 3 колонки */
@media (max-width: 1099px) {
  .tkb-grid { grid-template-columns: repeat(3, minmax(0, 1fr));
              grid-template-areas: "big big s1" "big big s2" "s3 r1 r1" "cta r2 r2"; }
  .tkb-slot.k-wide { height: auto; }
  .k-big .tkb-name { font-size: 19px; }
  .k-big .tkb-price { font-size: 23px; }
}

/* телефон: 2 колонки */
@media (max-width: 699px) {
  .tkb { --tkb-gap: 10px; }
  .tkb-grid { grid-template-columns: repeat(2, minmax(0, 1fr));
              grid-template-areas: "big big" "s1 s2" "s3 cta" "r1 r1" "r2 r2"; }
  .tkb-slot.k-big { aspect-ratio: 3 / 4; }
  .k-big .tkb-badge { display: none; }
  .tkb-slot.k-sq, .tkb-slot.k-cta { aspect-ratio: 3 / 4; }
  .tkb-slot.k-wide { height: 168px; }
  .k-big .tkb-media { padding: 14px 14px 2px; }
  .k-big .tkb-body { padding: 12px 14px 14px; }
  .k-big .tkb-name { font-size: 17px; }
  .k-big .tkb-attrs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .k-big .tkb-attrs div:nth-child(3) { display: none; }
  .k-big .tkb-price { font-size: 21px; }
  .k-big .tkb-more { height: 36px; padding: 0 14px; font-size: 14px; }
  .k-sq .tkb-body { padding: 8px 10px 10px; }
  .k-sq .tkb-name { font-size: 13px; }
  .k-sq .tkb-price { font-size: 15px; }
  .k-sq .tkb-stock { display: none; }
  .k-wide .tkb-media { flex-basis: 38%; padding: 10px; }
  .k-wide .tkb-body { padding: 10px 12px; }
  .k-wide .tkb-name { font-size: 14px; }
  .k-wide .tkb-attrs div:nth-child(n+2) { display: none; }
  .k-wide .tkb-price { font-size: 16px; }
  .tkb-cta { padding: 14px; }
  .tkb-cta-num { font-size: 28px; }
  .tkb-cta-t { font-size: 14px; }
  .tkb-cta-p { display: none; }
  .tkb-cta-btn { align-self: stretch; justify-content: center; height: 34px; padding: 0 8px; font-size: 12.5px; margin-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .tkb-card, .tkb-media img, .tkb-prog i { transition: none !important; }
  .tkb-card:hover .tkb-media img { transform: none; }
}
