/* ===== Б2БТАРА — карточка товара (single product). Компоненты tv-* под .bt-root.
   Переиспользует токены/кнопки/карточки из styles.css. Подключать ПОСЛЕ styles.css. ===== */

/* верхний блок: галерея | инфо | buy-box */
.bt-root .tv-top{display:grid;grid-template-columns:minmax(0,.86fr) minmax(0,1fr) 328px;gap:30px;align-items:start;margin-top:6px}

/* ---------- ГАЛЕРЕЯ ---------- */
.bt-root .tv-gal{position:sticky;top:16px}
.bt-root .tv-gal__main{position:relative;background:#fff;border:1px solid var(--line);border-radius:16px;
  aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;padding:26px;overflow:hidden}
.bt-root .tv-gal__main img{max-width:100%;max-height:100%;object-fit:contain}
.bt-root .tv-badge{position:absolute;left:16px;top:16px;display:inline-flex;align-items:center;gap:7px;
  background:#fff;border:1px solid var(--line);border-radius:8px;padding:6px 11px;font:700 12.5px 'Onest';color:var(--green)}
.bt-root .tv-badge i{width:8px;height:8px;border-radius:50%;background:var(--green);flex:0 0 auto}
.bt-root .tv-badge--top{position:absolute;right:16px;top:16px;left:auto;color:var(--red);border-color:var(--red-050);background:var(--red-050)}
.bt-root .tv-gal__thumbs{display:flex;gap:10px;margin-top:12px;flex-wrap:wrap}
.bt-root .tv-th{width:74px;height:74px;border-radius:11px;border:1.5px solid var(--line);background:#fff;padding:6px;cursor:pointer;
  display:flex;align-items:center;justify-content:center;overflow:hidden}
.bt-root .tv-th img{max-width:100%;max-height:100%;object-fit:contain}
.bt-root .tv-th.is-active{border-color:var(--red)}
.bt-root .tv-th:focus-visible{outline:2px solid var(--red);outline-offset:2px}
.bt-root .tv-th--ph{color:#C6CDD6;cursor:default}
.bt-root .tv-th--ph svg{width:24px;height:24px}

/* ---------- ИНФО ---------- */
.bt-root .tv-info h1{font-size:26px;line-height:1.16;letter-spacing:-.01em}
.bt-root .tv-meta{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;margin:14px 0 0;font-size:13px;color:var(--muted)}
.bt-root .tv-meta b{color:var(--ink);font-weight:700}
.bt-root .tv-meta .dot{width:4px;height:4px;border-radius:50%;background:#C6CDD6}
.bt-root .tv-usp{display:flex;gap:10px;align-items:flex-start;margin:16px 0 0;font-size:14.5px;line-height:1.5;color:var(--body)}
.bt-root .tv-usp svg{width:19px;height:19px;color:var(--green);flex:0 0 auto;margin-top:1px}

/* быстрые характеристики */
.bt-root .tv-specs{margin:18px 0 0;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:#fff}
.bt-root .tv-specs__h{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 16px;border-bottom:1px solid var(--line)}
.bt-root .tv-specs__h b{font-family:'Onest';font-weight:800;font-size:15px;color:var(--ink)}
.bt-root .tv-specs__h a{font:700 13px 'Onest';color:var(--red);display:inline-flex;align-items:center;gap:6px}
.bt-root .tv-specs__h a svg{width:15px;height:15px}
.bt-root .tv-specs dl{margin:0;padding:6px 16px 10px}
.bt-root .tv-specs dl>div{display:flex;align-items:baseline;gap:10px;padding:7px 0;border-bottom:1px dashed var(--line)}
.bt-root .tv-specs dl>div:last-child{border-bottom:0}
.bt-root .tv-specs dt{flex:0 0 45%;font-size:13.5px;color:var(--muted)}
.bt-root .tv-specs dd{margin:0;font:600 13.5px 'Golos';color:var(--ink)}

/* чипы объёмов/вариантов */
.bt-root .tv-vars{margin:18px 0 0}
.bt-root .tv-vars__l{font:600 11px 'Onest';letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin-bottom:9px}
.bt-root .tv-chips{display:flex;flex-wrap:wrap;gap:8px}
.bt-root .tv-chip{border:1.5px solid var(--line);background:#fff;border-radius:9px;padding:7px 13px;font:600 13.5px 'Golos';color:var(--body)}
.bt-root .tv-chip:hover{border-color:var(--red);color:var(--red)}
.bt-root .tv-chip.is-current{border-color:var(--red);background:var(--red-050);color:var(--red)}
.bt-root .tv-chip--all{display:inline-flex;align-items:center;gap:6px;color:var(--red);border-style:dashed}
.bt-root .tv-chip--all svg{width:14px;height:14px}

/* ---------- BUY-BOX ---------- */
.bt-root .tv-buy{position:sticky;top:16px;background:#fff;border:1px solid var(--line);border-radius:16px;padding:20px;box-shadow:var(--sh-1)}
.bt-root .tv-buy__price{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.bt-root .tv-buy__price b{font-family:'Onest';font-weight:800;font-size:34px;color:var(--ink);letter-spacing:-.01em}
.bt-root .tv-buy__tag{font:700 11px 'Onest';letter-spacing:.04em;text-transform:uppercase;color:var(--muted);
  background:var(--base);border:1px solid var(--line);border-radius:6px;padding:3px 8px}
.bt-root .tv-buy__unit{margin:6px 0 0;font-size:13px;color:var(--muted)}
.bt-root .tv-buy__unit b{color:var(--ink);font-weight:700}
.bt-root .tv-stockline{display:flex;align-items:center;gap:8px;margin:12px 0 0;font:600 13.5px 'Golos';color:var(--green)}
.bt-root .tv-stockline i{width:8px;height:8px;border-radius:50%;background:var(--green)}

.bt-root .tv-qty{margin:16px 0 0}
.bt-root .tv-qty__l{font:600 11px 'Onest';letter-spacing:.05em;text-transform:uppercase;color:var(--muted);margin-bottom:8px;display:block}
.bt-root .tv-qty__row{display:flex;gap:10px}
.bt-root .tv-qty__ctrl{display:flex;align-items:center;border:1.5px solid var(--line);border-radius:var(--r);overflow:hidden;flex:0 0 auto}
.bt-root .tv-qty__ctrl button{width:42px;height:48px;border:0;background:#fff;color:var(--ink);font-size:20px;cursor:pointer;line-height:1}
.bt-root .tv-qty__ctrl button:hover{background:var(--base);color:var(--red)}
.bt-root .tv-qty__ctrl input{width:52px;height:48px;border:0;border-left:1.5px solid var(--line);border-right:1.5px solid var(--line);
  text-align:center;font:700 16px 'Onest';color:var(--ink);-moz-appearance:textfield}
.bt-root .tv-qty__ctrl input::-webkit-outer-spin-button,.bt-root .tv-qty__ctrl input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.bt-root .tv-qty__row .btn{flex:1}
.bt-root .tv-buy__hint{font-size:12px;color:var(--muted);margin:9px 0 0;line-height:1.4}

.bt-root .tv-buy__sep{height:1px;background:var(--line);margin:16px 0}
.bt-root .tv-opt-row{display:flex;align-items:center;gap:12px;background:var(--red-050);border:1px solid #F3D6D8;border-radius:12px;padding:12px 14px}
.bt-root .tv-opt-row .ci{width:38px;height:38px;border-radius:10px;background:#fff;color:var(--red);display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.bt-root .tv-opt-row .ci svg{width:20px;height:20px}
.bt-root .tv-opt-row b{display:block;font:800 14px 'Onest';color:var(--ink);line-height:1.15}
.bt-root .tv-opt-row span{display:block;font-size:12px;color:var(--red-d);font-weight:600;margin-top:2px}
.bt-root .tv-buy__pl{width:100%;margin-top:12px}
.bt-root .tv-buy__pl.btn-line{border-radius:var(--r)}

.bt-root .tv-terms{list-style:none;margin:16px 0 0;padding:0;display:flex;flex-direction:column;gap:11px}
.bt-root .tv-terms li{display:flex;gap:10px;align-items:flex-start;font-size:12.8px;line-height:1.4;color:var(--body)}
.bt-root .tv-terms svg{width:18px;height:18px;color:var(--red);flex:0 0 auto;margin-top:1px}
.bt-root .tv-terms b{color:var(--ink);font-weight:700}
.bt-root .tv-terms__more{display:inline-flex;align-items:center;gap:6px;margin-top:12px;font:700 13px 'Onest';color:var(--red)}
.bt-root .tv-terms__more svg{width:15px;height:15px}

/* ---------- ЛИПКИЕ ЯКОРЯ ---------- */
.bt-root .tv-anchors{position:sticky;top:0;z-index:20;background:rgba(255,255,255,.92);backdrop-filter:blur(6px);
  border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin-top:34px}
.bt-root .tv-anchors__row{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none}
.bt-root .tv-anchors__row::-webkit-scrollbar{display:none}
.bt-root .tv-anchors a{white-space:nowrap;padding:15px 14px;font:600 14px 'Onest';color:var(--body);border-bottom:2px solid transparent}
.bt-root .tv-anchors a:hover{color:var(--red)}
.bt-root .tv-anchors a.is-active{color:var(--red);border-bottom-color:var(--red)}

/* ---------- СЕКЦИИ ---------- */
.bt-root .tv-sec{margin-top:40px;scroll-margin-top:64px}
.bt-root .tv-sec>h2{font-size:23px;margin-bottom:18px}
.bt-root .tv-card{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:26px 28px}

/* описание */
.bt-root .tv-desc{display:grid;grid-template-columns:1.15fr .85fr;gap:32px}
.bt-root .tv-desc__text p{font-size:15px;line-height:1.68;color:var(--body);margin:0 0 13px}
.bt-root .tv-desc__text p:last-child{margin-bottom:0}
.bt-root .tv-desc__list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:11px}
.bt-root .tv-desc__list li{display:flex;gap:10px;align-items:flex-start;font-size:14px;line-height:1.45;color:var(--body)}
.bt-root .tv-desc__list svg{width:19px;height:19px;color:var(--green);flex:0 0 auto;margin-top:1px}

/* характеристики (полная таблица) */
.bt-root .tv-chars{display:grid;grid-template-columns:1fr 1fr;gap:0 40px}
.bt-root .tv-chars>div{display:flex;align-items:baseline;gap:12px;padding:11px 0;border-bottom:1px dashed var(--line)}
.bt-root .tv-chars dt{flex:0 0 46%;font-size:14px;color:var(--muted);margin:0}
.bt-root .tv-chars dd{margin:0;font:600 14px 'Golos';color:var(--ink)}
.bt-root .tv-trust{display:flex;flex-wrap:wrap;gap:14px;margin-top:22px}
.bt-root .tv-trust__i{display:flex;gap:11px;align-items:center;flex:1 1 260px;background:var(--base);border:1px solid var(--line);border-radius:12px;padding:14px 16px;font-size:13.5px;line-height:1.4;color:var(--body)}
.bt-root .tv-trust__i svg{width:24px;height:24px;color:var(--red);flex:0 0 auto}
.bt-root .tv-trust__i b{color:var(--ink)}
.bt-root a.tv-trust__i:hover{border-color:var(--red);color:var(--ink)}

/* оптовикам (тёмная секция) */
.bt-root .tv-opt{margin-top:40px;background:var(--graphite);border-radius:var(--r-lg);padding:36px 38px;color:#AEB4BD;scroll-margin-top:64px}
.bt-root .tv-opt .eyebrow{color:#B7BDC6}
.bt-root .tv-opt h2{color:#fff;font-size:24px;margin:10px 0 0}
.bt-root .tv-opt h2 .u{color:#fff;box-shadow:inset 0 -.5em 0 var(--red)}
.bt-root .tv-opt__grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:24px 0 0}
.bt-root .tv-opt__c{background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1);border-radius:14px;padding:18px}
.bt-root .tv-opt__c .ic{width:42px;height:42px;border-radius:11px;background:rgba(207,0,13,.16);color:#FF6B72;display:flex;align-items:center;justify-content:center;margin-bottom:13px}
.bt-root .tv-opt__c .ic svg{width:21px;height:21px}
.bt-root .tv-opt__c h3{color:#fff;font-size:15.5px;margin:0 0 6px}
.bt-root .tv-opt__c p{font-size:13px;line-height:1.5;color:#9AA1AB;margin:0}
.bt-root .tv-opt__cta{display:flex;gap:12px;flex-wrap:wrap;margin-top:24px}

/* вопрос-ответ */
.bt-root .tv-faq{display:flex;flex-direction:column;gap:10px}
.bt-root .tv-faq details{border:1px solid var(--line);border-radius:12px;background:#fff;overflow:hidden}
.bt-root .tv-faq summary{list-style:none;cursor:pointer;padding:16px 18px;font:700 15px 'Onest';color:var(--ink);
  display:flex;align-items:center;justify-content:space-between;gap:14px}
.bt-root .tv-faq summary::-webkit-details-marker{display:none}
.bt-root .tv-faq summary svg{width:20px;height:20px;color:var(--red);flex:0 0 auto;transition:transform .2s}
.bt-root .tv-faq details[open] summary svg{transform:rotate(180deg)}
.bt-root .tv-faq details[open] summary{border-bottom:1px solid var(--line)}
.bt-root .tv-faq__a{padding:14px 18px 17px;font-size:14px;line-height:1.6;color:var(--body)}
.bt-root .tv-faq__a a{color:var(--red);font-weight:600}

/* отзывы-мост */
.bt-root .tv-rev{display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap}
.bt-root .tv-rev__t h2{font-size:22px;margin:0 0 6px}
.bt-root .tv-rev__t p{font-size:14px;color:var(--body);margin:0;max-width:560px;line-height:1.55}

/* SEO-теги */
.bt-root .tv-tags{display:flex;flex-wrap:wrap;gap:8px}
.bt-root .tv-tags a{border:1px solid var(--line);background:#fff;border-radius:8px;padding:7px 12px;font:600 13px 'Golos';color:#5D6570}
.bt-root .tv-tags a:hover{border-color:var(--red);color:var(--red)}

/* общий «подробнее» */
.bt-root .tv-more{display:inline-flex;align-items:center;gap:8px;margin-top:16px;font:700 14px 'Onest';color:var(--red)}
.bt-root .tv-more svg{width:16px;height:16px}

/* сетка карточек товара (переиспользует .pc из styles.css) */
.bt-root .tv-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}

/* липкая моб. панель покупки */
.bt-root .tv-sticky{display:none;position:fixed;left:0;right:0;bottom:0;z-index:60;background:#fff;border-top:1px solid var(--line);
  box-shadow:0 -8px 30px rgba(20,26,35,.1);padding:10px 16px calc(10px + env(safe-area-inset-bottom));
  align-items:center;gap:12px;transition:transform .2s}
/* скрытое состояние: уводим и из tab-порядка/дерева доступности (не только визуально) */
.bt-root .tv-sticky.is-hidden{transform:translateY(120%);visibility:hidden;pointer-events:none}
.bt-root .tv-sticky__p b{font-family:'Onest';font-weight:800;font-size:20px;color:var(--ink);display:block;line-height:1}
.bt-root .tv-sticky__p span{font-size:11px;color:var(--muted)}
.bt-root .tv-sticky .btn{flex:1;padding:13px}

/* ================= АДАПТИВ ================= */
@media(max-width:1180px){
 .bt-root .tv-top{grid-template-columns:minmax(0,.92fr) minmax(0,1fr);gap:26px}
 .bt-root .tv-buy{grid-column:1/-1;position:static;display:grid;grid-template-columns:1fr 1fr;gap:8px 26px;align-items:start}
 .bt-root .tv-buy__price,.bt-root .tv-buy__unit,.bt-root .tv-stockline{grid-column:1}
 .bt-root .tv-qty{grid-column:1;margin-top:14px}
 .bt-root .tv-buy__sep{grid-column:1/-1}
 .bt-root .tv-opt-row{grid-column:2;grid-row:1/5;align-self:stretch}
 .bt-root .tv-buy__pl{grid-column:2}
 .bt-root .tv-terms{grid-column:1/-1}
}
@media(max-width:960px){
 .bt-root .tv-desc{grid-template-columns:1fr;gap:22px}
 .bt-root .tv-opt__grid{grid-template-columns:repeat(2,1fr)}
 .bt-root .tv-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:760px){
 /* флекс-колонка => строгий порядок DOM: галерея → инфо → покупка (без grid-артефактов) */
 .bt-root .tv-top{display:flex;flex-direction:column;gap:20px}
 .bt-root .tv-gal{position:static}
 .bt-root .tv-buy{display:block;grid-column:auto;order:0}/* перебиваем общий .bt-root aside{order:-1} из styles.css */
 .bt-root .tv-buy__pl{margin-top:12px}
 .bt-root .tv-chars{grid-template-columns:1fr}
 .bt-root .tv-sticky{display:flex}
 /* липкая моб-панель фикс-снизу перекрывала подвал → компенсируем отступом (только на карточке) */
 .bt-root .foot{padding-bottom:calc(72px + env(safe-area-inset-bottom))}
}
@media(max-width:560px){
 .bt-root .tv-card{padding:20px}
 .bt-root .tv-opt{padding:26px 20px}
 .bt-root .tv-opt__grid{grid-template-columns:1fr}
 .bt-root .tv-grid{grid-template-columns:1fr}
 .bt-root .tv-buy__price b{font-size:30px}
 .bt-root .tv-specs dt{flex-basis:52%}
}
/* сверхузкие экраны: кнопка «В корзину» переносится под степпер, чтобы строка не давала горизонтальный скролл */
@media(max-width:400px){
 .bt-root .tv-qty__row{flex-wrap:wrap}
 .bt-root .tv-qty__row .btn{flex:1 1 100%}
}
