/* TrueRiders – интерактивните блокове в статиите (KAN-112).
 * Темата е тъмна: фон #000, текст #fff, акцент #ffff00 (бутоните на темата). Всеки текст – контраст ≥ 4.5:1
 * спрямо фона си; всичко, което се натиска, изглежда като бутон и има hover/focus. Правилата – 04-catalog/blog-guidelines.md, т. 10. */
.post_description { --tr-bg: #000; --tr-surface: #141414; --tr-surface-2: #1f1f1f; --tr-line: #3a3a3a;
  --tr-text: #fff; --tr-muted: #c8c8c8; --tr-accent: #ffff00; --tr-on-accent: #000; --tr-ok: #7ee07e; --tr-bad: #ff9a9a; }
.post_description .tr-video, .post_description .tr-gallery, .post_description .tr-profile,
.post_description .tr-size, .post_description .tr-compare, .post_description .tr-product,
.post_description .tr-highlights, .post_description .tr-products { margin: 1.8em 0; }
.post_description .tr-hint { display: block; font-size: 14px; color: var(--tr-muted); margin: 0 0 10px; }

/* ---------- видео */
.tr-video { position: relative; display: block; aspect-ratio: 16 / 9; background: #000; border-radius: 8px; overflow: hidden; cursor: pointer; }
.tr-video img { width: 100%; height: 100%; object-fit: cover; margin: 0; transition: transform .3s; }
.tr-video:hover img { transform: scale(1.02); }
.tr-video::after { content: ''; position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%;
  background: var(--tr-accent, #ffff00) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") 56% 50% / 40px no-repeat;
  box-shadow: 0 4px 24px rgba(0,0,0,.6); transition: transform .2s; }
.tr-video:hover::after, .tr-video:focus-visible::after { transform: scale(1.1); }
.tr-video:focus-visible { outline: 3px solid #ffff00; outline-offset: 3px; }
.tr-video .tr-video-title { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 16px 12px; color: #fff; font-weight: 600; font-size: 15px;
  background: linear-gradient(transparent, rgba(0,0,0,.85)); }
.tr-video.is-playing::after, .tr-video.is-playing .tr-video-title { display: none; }
.tr-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* корицата на статията като плейър */
.post_thumbnail .tr-video-cover { aspect-ratio: auto; }
.post_thumbnail .tr-video-cover picture, .post_thumbnail .tr-video-cover img { display: block; width: 100%; height: auto; }
.post_thumbnail .tr-video-cover.is-playing { aspect-ratio: 16 / 9; }

/* ---------- галерия: голяма снимка + миниатюри */
.tr-gallery { background: var(--tr-surface); border: 1px solid var(--tr-line); border-radius: 8px; padding: 12px; }
.tr-gallery .tr-g-main { position: relative; background: #fff; border-radius: 6px; overflow: hidden; cursor: zoom-in; }
.tr-gallery .tr-g-main img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; margin: 0; }
.tr-gallery .tr-g-main .tr-g-zoom { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.75); color: #fff; font-size: 13px;
  padding: 5px 10px; border-radius: 4px; pointer-events: none; }
.tr-gallery .tr-g-cap { color: var(--tr-text); font-size: 15px; padding: 10px 2px 12px; min-height: 2.6em; }
.tr-gallery .tr-g-thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.tr-gallery .tr-g-thumbs button { flex: 0 0 96px; height: 72px; padding: 0; border: 2px solid transparent; border-radius: 4px; background: #fff; cursor: pointer; overflow: hidden; }
.tr-gallery .tr-g-thumbs button img { width: 100%; height: 100%; object-fit: contain; margin: 0; display: block; }
.tr-gallery .tr-g-thumbs button.on { border-color: var(--tr-accent); }
.tr-gallery .tr-g-thumbs button:hover, .tr-gallery .tr-g-thumbs button:focus-visible { border-color: #fff; outline: none; }
/* без JS: снимките една под друга, в пълен размер */
.tr-gallery:not(.is-live) figure { margin: 0 0 14px; }
.tr-gallery:not(.is-live) img { width: 100%; height: auto; background: #fff; border-radius: 6px; }
.tr-gallery figcaption { color: var(--tr-text); font-size: 15px; padding-top: 6px; }
.tr-gallery.is-live > figure { display: none; }
/* цял екран */
.tr-lb-open, .tr-lb-open body { overflow: hidden; }
.tr-lb { position: fixed; inset: 0; z-index: 99999; background: rgba(0,0,0,.95); display: flex; align-items: center; justify-content: center; }
.tr-lb[hidden] { display: none; }
.tr-lb figure { margin: 0; max-width: 92vw; max-height: 90vh; text-align: center; }
.tr-lb img { max-width: 92vw; max-height: 80vh; object-fit: contain; background: #fff; }
.tr-lb figcaption { color: #fff; font-size: 15px; padding-top: 10px; }
.tr-lb button { position: absolute; background: rgba(255,255,0,.95); border: 0; color: #000; font-size: 34px; line-height: 1; width: 52px; height: 52px; border-radius: 50%; cursor: pointer; }
.tr-lb .tr-lb-x { top: 14px; right: 14px; font-size: 30px; }
.tr-lb .tr-lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.tr-lb .tr-lb-next { right: 12px; top: 50%; transform: translateY(-50%); }

/* ---------- профил */
.tr-profile { background: var(--tr-surface); border: 1px solid var(--tr-line); border-radius: 8px; padding: 16px 18px; }
.tr-profile-name { font-weight: 700; font-size: 18px; color: var(--tr-text); margin-bottom: 2px; }
.tr-profile svg { width: 100%; height: auto; display: block; margin: 6px 0 4px; }
.tr-profile .tr-snow { stroke: #7fb3e6; stroke-width: 3; stroke-dasharray: 8 6; }
.tr-profile .tr-snow-label { fill: #7fb3e6; font-size: 13px; }
.tr-profile .tr-board { fill: none; stroke: #fff; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.tr-profile .tr-foot { fill: var(--tr-accent); }
.tr-profile .tr-zone { fill: rgba(255,255,255,.04); stroke: rgba(255,255,255,.12); stroke-width: 1; cursor: pointer; }
.tr-profile .tr-zone:hover { fill: rgba(255,255,0,.14); }
.tr-profile .tr-zone.on { fill: rgba(255,255,0,.28); }
.tr-profile .tr-zone-no { fill: #fff; font-size: 14px; font-weight: 700; pointer-events: none; }
.tr-profile .tr-zones { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tr-profile .tr-zones li { display: flex; gap: 10px; align-items: baseline; cursor: pointer; padding: 8px 10px; border: 1px solid var(--tr-line);
  border-radius: 6px; color: var(--tr-text); font-size: 15px; margin: 0; }
.tr-profile .tr-zones li b { flex: 0 0 auto; display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--tr-surface-2); color: #fff; font-size: 13px; }
.tr-profile .tr-zones li:hover { border-color: #fff; }
.tr-profile .tr-zones li.on { background: var(--tr-accent); color: var(--tr-on-accent); border-color: var(--tr-accent); }
.tr-profile .tr-zones li.on b { background: #000; color: #ffff00; }
.tr-profile.is-live > .tr-profile-fallback { display: none; }
.tr-profile-fallback { color: var(--tr-text); }

/* ---------- размер */
.tr-size { background: var(--tr-surface); border: 1px solid var(--tr-line); border-radius: 8px; overflow: hidden; }
.tr-size-form { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: flex-end; padding: 16px 18px; border-bottom: 1px solid var(--tr-line); }
.tr-size-form .tr-hint { flex: 1 1 100%; margin: 0; color: var(--tr-text); font-weight: 600; font-size: 16px; }
.tr-size-form label { display: flex; flex-direction: column; font-size: 14px; gap: 6px; color: var(--tr-muted); margin: 0; }
.tr-size-form input { width: 120px; padding: 10px 12px; border: 2px solid #fff; border-radius: 6px; font-size: 17px; color: #000; background: #fff; }
.tr-size-form input:focus { outline: none; border-color: var(--tr-accent); box-shadow: 0 0 0 3px rgba(255,255,0,.35); }
.tr-size-out { flex: 1 1 240px; font-size: 16px; color: var(--tr-text); min-height: 2.6em; }
.tr-size-out b { color: var(--tr-accent); font-size: 19px; }
.tr-size-out .tr-in { color: var(--tr-ok); }
.tr-size-out .tr-out { color: var(--tr-bad); }
.tr-size .tr-table-wrap { overflow-x: auto; }
.tr-size table { width: 100%; margin: 0; border: 0; }
.tr-size tr.on td { background: var(--tr-accent); color: var(--tr-on-accent); font-weight: 700; }

/* ---------- таблици (размери и сравнение) */
.post_description .tr-size table, .post_description .tr-compare table { border-collapse: collapse; font-size: 15px; color: var(--tr-text); background: transparent; }
.post_description .tr-size th, .post_description .tr-size td,
.post_description .tr-compare th, .post_description .tr-compare td { border: 1px solid var(--tr-line); padding: 10px 12px; text-align: left; vertical-align: top; color: var(--tr-text); background: transparent; }
.post_description .tr-size thead th, .post_description .tr-compare thead th { background: var(--tr-surface-2); color: #fff; font-weight: 700; }
.post_description .tr-compare tbody th { background: var(--tr-surface); color: var(--tr-muted); font-weight: 600; white-space: nowrap; }
.post_description .tr-compare td.is-this { background: rgba(255,255,0,.12); color: #fff; font-weight: 600; }
.post_description .tr-compare th.is-this { background: var(--tr-accent); color: var(--tr-on-accent); }
.tr-compare { overflow-x: auto; }
.tr-compare::before { content: var(--tr-compare-hint, ''); /* текстовете – от модула, на езика (trblogseo.php) */ display: block; color: var(--tr-muted, #c8c8c8); font-size: 14px; margin-bottom: 8px; }

/* ---------- карта на продукта (рисува я модулът на сървъра) */
.tr-product { display: flex; gap: 18px; align-items: center; background: var(--tr-surface); border: 1px solid var(--tr-line); border-radius: 8px; padding: 14px; }
.tr-product > a { flex: 0 0 auto; background: #fff; border-radius: 6px; }
.tr-product img { width: 120px; height: 120px; object-fit: contain; display: block; margin: 0; }
.tr-product .tr-p-body { flex: 1 1 auto; min-width: 0; }
.post_description .tr-product .tr-p-name { font-weight: 700; font-size: 17px; color: #fff; display: block; margin-bottom: 6px; text-decoration: none; }
.post_description .tr-product .tr-p-name:hover { color: var(--tr-accent); }
.tr-product .tr-p-price { font-size: 22px; font-weight: 700; color: #fff; }
.tr-product .tr-p-old { text-decoration: line-through; color: #a8a8a8; font-size: 15px; margin-left: 8px; }
.tr-product .tr-p-stock { font-size: 14px; color: var(--tr-ok); margin: 4px 0 10px; }
.tr-product .tr-p-stock.out { color: var(--tr-bad); }
.post_description .tr-product .tr-p-btn { display: inline-block; background: var(--tr-accent); color: var(--tr-on-accent); padding: 9px 20px; border-radius: 4px; font-weight: 700; font-size: 15px; text-decoration: none; }
.post_description .tr-product .tr-p-btn:hover, .post_description .tr-product .tr-p-btn:focus-visible { background: #fff; color: #000; }
.tr-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.tr-products .tr-product { margin: 0; }

/* ---------- технически акценти */
.tr-highlights { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tr-highlights li { border: 1px solid var(--tr-line); background: var(--tr-surface); color: #fff; border-radius: 4px; padding: 6px 12px; font-size: 15px; margin: 0; }
.tr-highlights li b { color: var(--tr-accent); font-weight: 700; }

@media (max-width: 575px) {
  .tr-product { gap: 12px; }
  .tr-product img { width: 88px; height: 88px; }
  .tr-size-form input { width: 104px; }
  .tr-gallery .tr-g-thumbs button { flex-basis: 76px; height: 58px; }
  .post_description .tr-size th, .post_description .tr-size td, .post_description .tr-compare th, .post_description .tr-compare td { padding: 8px; font-size: 14px; }
}

/* поправки срещу стиловете на темата (проверено на DEV, 30.09) */
.post_thumbnail .tr-video-cover .tr-video-title { display: none; } /* корицата на Дойчин вече носи заглавието */
.post_description .tr-size table, .post_description .tr-compare table { width: 100% !important; margin: 0 !important; }
.post_description .tr-size .tr-table-wrap { margin: 0; padding: 0; }
.post_description .tr-product a, .post_description .tr-product a:hover { text-decoration: none !important; }
@media (max-width: 767px) {
  .tr-compare::before { content: var(--tr-compare-hint-m, ''); }
  .tr-compare table { min-width: 560px; }
}

/* ---------- често задавани въпроси: редове, които се разгъват */
.post_description .tr-faq-list { display: flex; flex-direction: column; gap: 8px; margin: 1em 0 2em; }
.post_description .tr-faq { background: var(--tr-surface); border: 1px solid var(--tr-line); border-radius: 8px; overflow: hidden; }
.post_description .tr-faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; }
.post_description .tr-faq summary::-webkit-details-marker { display: none; }
.post_description .tr-faq summary::after { content: '+'; flex: 0 0 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--tr-surface-2); color: #fff; font-size: 22px; font-weight: 400; line-height: 1; }
.post_description .tr-faq[open] summary::after { content: '−'; background: var(--tr-accent); color: var(--tr-on-accent); }
.post_description .tr-faq summary:hover, .post_description .tr-faq summary:focus-visible { background: var(--tr-surface-2); outline: none; }
.post_description .tr-faq summary:focus-visible { box-shadow: inset 0 0 0 2px var(--tr-accent); }
.tv_blog_post_area.single .post_description .tr-faq summary h3 { margin: 0 !important; padding: 0; font-size: 17px; line-height: 1.4; font-weight: 600; color: #fff; }
.post_description .tr-faq[open] summary h3 { color: var(--tr-accent) !important; }
.tv_blog_post_area .post_description .tr-faq > p { margin: 0 !important; padding: 2px 18px 18px !important; color: #fff; font-size: 16px; line-height: 1.6; }
.post_description .tr-faq-list::before { content: var(--tr-faq-hint, ''); color: var(--tr-muted, #c8c8c8); font-size: 14px; }

/* ---------- кутиите „Купи“ (KAN-112, 30.09): под увода, при размера, роднините, лентата долу */
.post_description .tr-p-img { position: relative; flex: 0 0 auto; display: block; background: #fff; border-radius: 6px; overflow: hidden; }
.post_description .tr-p-img img { display: block; width: 100%; height: 100%; object-fit: contain; margin: 0; }
.post_description .tr-p-off { position: absolute; left: 6px; top: 6px; background: #e0002a; color: #fff; font-weight: 700; font-size: 13px; padding: 3px 7px; border-radius: 3px; }
.post_description .tr-p-prices { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 2px 0 8px; }
.post_description .tr-p-kicker { display: block; color: var(--tr-accent); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; }
.post_description .tr-p-sizes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.post_description .tr-p-lbl { color: var(--tr-ok); font-size: 14px; margin-right: 4px; }
.post_description a.tr-p-size { display: inline-block; min-width: 46px; text-align: center; padding: 6px 10px; border: 1px solid #fff; border-radius: 4px; color: #fff; font-weight: 600; font-size: 14px; text-decoration: none !important; }
.post_description a.tr-p-size:hover, .post_description a.tr-p-size:focus-visible { background: var(--tr-accent); color: #000; border-color: var(--tr-accent); }
.post_description .tr-p-cta { display: flex; flex-direction: column; gap: 10px; flex: 0 0 260px; }
.post_description .tr-p-cta .tr-p-btn { text-align: center; padding: 13px 18px; font-size: 16px; }
.post_description .tr-p-trust { list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--tr-muted); }
.post_description .tr-p-trust li { margin: 0 0 3px; padding-left: 18px; position: relative; }
.post_description .tr-p-trust li::before { content: '✓'; position: absolute; left: 0; color: var(--tr-accent); }
.post_description .tr-p-trust a { color: #fff; text-decoration: underline; }

/* под увода и при размера – една широка кутия без празно място */
.post_description .tr-buy, .post_description .tr-product-main { display: flex; align-items: center; gap: 20px; background: var(--tr-surface); border: 1px solid var(--tr-line); border-radius: 8px; padding: 16px; margin: 1.8em 0; }
.post_description .tr-buy { border-color: var(--tr-accent); }
.post_description .tr-buy .tr-p-img, .post_description .tr-product-main .tr-p-img { width: 140px; height: 140px; }
.post_description .tr-buy .tr-p-body, .post_description .tr-product-main .tr-p-body { flex: 1 1 auto; min-width: 0; }
.post_description .tr-product-main .tr-p-name, .post_description .tr-buy .tr-p-name { font-size: 19px; }

/* роднините – компактни вертикални карти на един ред */
.tr-products { display: grid !important; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; }
.post_description .tr-product-mini { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; margin: 0; }
.post_description .tr-product-mini .tr-p-img { width: 100%; height: 150px; }
.post_description .tr-product-mini .tr-p-name { font-size: 15px; min-height: 2.6em; }
.post_description .tr-product-mini .tr-p-price { font-size: 19px; }
.post_description .tr-product-mini .tr-p-stock { font-size: 13px; margin: 0 0 8px; }
.post_description .tr-product-mini .tr-p-btn { display: block; text-align: center; }
.post_description .tr-product-mini .tr-p-body { display: flex; flex-direction: column; flex: 1 1 auto; }
.post_description .tr-product-mini .tr-p-btn { margin-top: auto; }

/* лентата долу – показва се, щом кутията под увода излезе от екрана */
.tr-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990; background: rgba(12,12,12,.97); border-top: 2px solid #ffff00; transform: translateY(110%); transition: transform .25s; }
.tr-sticky.on { transform: none; }
.tr-sticky-in { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 10px 16px; }
.tr-sticky img { width: 52px; height: 52px; object-fit: contain; background: #fff; border-radius: 4px; }
.tr-sticky .tr-s-t { flex: 1 1 auto; min-width: 0; color: #fff; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-sticky .tr-s-p { color: #fff; font-weight: 700; font-size: 18px; white-space: nowrap; }
.tr-sticky a.tr-s-b { background: #ffff00; color: #000 !important; font-weight: 700; padding: 11px 18px; border-radius: 4px; white-space: nowrap; text-decoration: none !important; }
.tr-sticky a.tr-s-b:hover { background: #fff; }

@media (max-width: 767px) {
  .post_description .tr-buy, .post_description .tr-product-main { flex-wrap: wrap; gap: 14px; }
  .post_description .tr-buy .tr-p-img, .post_description .tr-product-main .tr-p-img { width: 96px; height: 96px; }
  .post_description .tr-buy .tr-p-body, .post_description .tr-product-main .tr-p-body { flex: 1 1 60%; }
  .post_description .tr-p-cta { flex: 1 1 100%; }
  .tr-products { grid-auto-columns: 72%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .post_description .tr-product-mini { scroll-snap-align: start; }
  .tr-sticky .tr-s-t { display: none; }
  .tr-sticky img { width: 44px; height: 44px; }
}
/* кутиите „Купи“ – общите части и за .tr-buy (не е .tr-product) */
.post_description .tr-buy .tr-p-name, .post_description .tr-product .tr-p-name { color: #fff !important; font-weight: 700; display: block; margin-bottom: 4px; text-decoration: none !important; }
.post_description .tr-buy .tr-p-name:hover { color: var(--tr-accent) !important; }
.post_description .tr-buy .tr-p-price, .post_description .tr-product .tr-p-price { font-size: 24px; font-weight: 700; color: #fff; white-space: nowrap; }
.post_description .tr-buy .tr-p-old, .post_description .tr-product .tr-p-old { text-decoration: line-through; color: #a8a8a8; font-size: 15px; white-space: nowrap; }
.post_description .tr-buy a.tr-p-btn, .post_description .tr-product a.tr-p-btn { display: inline-block; background: var(--tr-accent); color: #000 !important; padding: 11px 18px; border-radius: 4px; font-weight: 700; font-size: 15px; text-decoration: none !important; text-align: center; }
.post_description .tr-buy a.tr-p-btn:hover, .post_description .tr-product a.tr-p-btn:hover { background: #fff; color: #000 !important; }
.post_description .tr-buy .tr-p-stock, .post_description .tr-product .tr-p-stock { color: var(--tr-ok); font-size: 14px; }
.post_description .tr-buy .tr-p-stock.out, .post_description .tr-product .tr-p-stock.out { color: var(--tr-bad); }
.tr-products { grid-template-columns: none !important; }
.post_description .tr-product-mini .tr-p-price { font-size: 19px; }
.post_description .tr-p-lbl { flex: 1 1 100%; margin: 0 0 2px; }
.post_description .tr-p-trust a.tr-p-tel { white-space: nowrap; font-weight: 600; }
