/* ttshop-desc-design v2 (19.11.2026, Э4). Оформление описания товара по ОБЫЧНЫМ тегам внутри контейнера .tt-d
   (контейнер добавляет шаблон product.blade.php: class="… idesc tt-d"; в редакторе TinyMCE то же даёт body_class: 'idesc tt-d').
   Админ пишет обычными кнопками редактора (абзац, заголовок, список, цитата, код); редкие блоки — меню «Стили» (классы .tt-*).
   Основа — макет товара 143 (v1, C:\project\ttshop-desc-design_2026-11-13). Все цвета с запасными значениями var(--x, #…),
   чтобы файл работал и внутри iframe редактора, где переменных сайта нет. Селекторы начинаются с .idesc.tt-d — перебивают общие .idesc ul/ol/p/a. */

.idesc.tt-d {font-size: 14px; line-height: 1.55; color: var(--text, #0e0e10); overflow-wrap: anywhere;}
.idesc.tt-d > :first-child {margin-top: 0;}
.idesc.tt-d p {margin: 0 0 10px;}
.idesc.tt-d > p:first-child {font-size: 15px; line-height: 1.58;}          /* лид: первый абзац описания */
.idesc.tt-d strong, .idesc.tt-d b {font-weight: 700;}

/* заголовки разделов (h2/h3/h4 — одинаково, админу не нужно выбирать) */
.idesc.tt-d h2, .idesc.tt-d h3, .idesc.tt-d h4 {clear: both; margin: 24px 0 10px; font-size: 12px; font-weight: 700; line-height: 1.3; letter-spacing: .07em; text-transform: uppercase; color: var(--muted, #6c6c75);}

/* маркированный список = галочки в один столбец; класс tt-cols («Список колонками») — для коротких пунктов */
.idesc.tt-d ul {display: grid; grid-template-columns: 1fr; gap: 9px 22px; margin: 0 0 10px; padding: 0; overflow: visible; line-height: 1.45; list-style: none;}
.idesc.tt-d ul.tt-cols {grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));}
.idesc.tt-d ul > li {position: relative; display: block; margin: 0; padding: 0 0 0 27px; list-style: none;}
.idesc.tt-d ul > li::before {content: ''; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; margin: 0; display: block; background: center / 18px 18px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");}
.idesc.tt-d ul ul {margin: 8px 0 0; grid-template-columns: 1fr;}

/* нумерованный список = шаги */
.idesc.tt-d ol {counter-reset: ttstep; margin: 0 0 10px; padding: 0; overflow: visible; line-height: 1.5; list-style: none;}
.idesc.tt-d ol > li {position: relative; display: block; margin: 0 0 11px; padding: 1px 0 0 36px; list-style: none; min-height: 24px;}
.idesc.tt-d ol > li:last-child {margin-bottom: 0;}
.idesc.tt-d ol > li::before {counter-increment: ttstep; content: counter(ttstep); position: absolute; left: 0; top: 0; float: none; width: 24px; height: 24px; margin: 0; border-radius: 50%; background: var(--text, #0e0e10); color: #fff; font-size: 12px; font-weight: 700; line-height: 24px; text-align: center;}

/* цитата = «Важно знать»: мягкая янтарная карточка вместо красно-жёлтого маркера */
.idesc.tt-d blockquote {clear: both; margin: 24px 0 0; padding: 16px 18px; border: 1px solid #f0dcae; border-radius: 12px; background: #fff8ea;}
.idesc.tt-d blockquote > :first-child {margin-top: 0;}
.idesc.tt-d blockquote > :last-child {margin-bottom: 0;}
.idesc.tt-d blockquote h2, .idesc.tt-d blockquote h3, .idesc.tt-d blockquote h4 {color: #8a5a00;}
/* текст в карточке чуть крупнее обычного (15 px против 14), а примечание «не является основанием для замены» — мельче (13 px) */
.idesc.tt-d blockquote ul > li, .idesc.tt-d blockquote > p {font-size: 15px; line-height: 1.5;}
.idesc.tt-d blockquote ul > li::before {top: 2px;}
.idesc.tt-d .tt-note {font-size: 13px; font-weight: 700; line-height: 1.45;}
.idesc.tt-d blockquote ul > li::before {background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b7791f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M12 7.5v5.5'/%3E%3Cpath d='M12 16.6v.01'/%3E%3C/svg%3E");}

/* код: блок = «Формат выдачи» (выделяется одним кликом), строчный = подсветка */
.idesc.tt-d pre {display: flow-root; margin: 0 0 10px; padding: 11px 13px; border: 1px solid var(--line, #e7e7eb); border-radius: 10px; background: #fafafb; font: 12.5px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; user-select: all;}
.idesc.tt-d code {padding: 1px 5px; border-radius: 5px; background: var(--chip, #f2f2f4); font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;}
.idesc.tt-d pre code {padding: 0; background: none;}

/* картинки: по умолчанию аккуратные (не на всю ширину); ряд превью = абзац с классом tt-gallery (клик открывает оригинал);
   значки-смайлики внутри строки = img.tt-ico; таблицы, которые вставил админ */
.idesc.tt-d img {display: block; max-width: min(100%, 520px); max-height: 420px; width: auto; height: auto; margin: 10px 0; border: 1px solid var(--line, #e7e7eb); border-radius: 10px;}
.idesc.tt-d img.tt-ico {display: inline; max-width: none; max-height: none; height: 1.15em; width: auto; margin: 0 1px; vertical-align: -0.2em; border: 0; border-radius: 0;}
.idesc.tt-d p.tt-gallery {display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0;}
.idesc.tt-d p.tt-gallery a {display: block; max-width: 100%; line-height: 0; overflow: hidden; border: 1px solid var(--line, #e7e7eb); border-radius: 10px; background: #f7f7f9; cursor: zoom-in;}
.idesc.tt-d p.tt-gallery img {display: block; height: 150px; width: auto; max-width: 100%; max-height: none; margin: 0; border: 0; border-radius: 0; object-fit: contain;}
.idesc.tt-d table {display: block; max-width: 100%; margin: 0 0 10px; overflow-x: auto; border-collapse: collapse; font-size: 13px;}
.idesc.tt-d td, .idesc.tt-d th {padding: 6px 10px; border: 1px solid var(--line, #e7e7eb);}

/* ───── редкие блоки: применяются кнопкой «Стили» в редакторе (классы .tt-*) ───── */
/* «Чипы»: маркированный список с классом tt-chips → ряд плашек (под лидом) */
.idesc.tt-d ul.tt-chips {display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0;}
.idesc.tt-d ul.tt-chips > li {display: inline-block; padding: 5px 11px; border-radius: 999px; background: var(--chip, #f2f2f4); font-size: 12.5px; font-weight: 600; line-height: 1.25; white-space: nowrap;}
.idesc.tt-d ul.tt-chips > li::before {display: none;}
/* «Подсказка»: серая карточка */
.idesc.tt-d p.tt-hint {display: flow-root; margin: 14px 0 0; padding: 11px 14px; border-radius: 10px; background: var(--chip, #f2f2f4); font-size: 13px; line-height: 1.5; color: #3a3a42;}
/* «Мелкий текст» */
.idesc.tt-d p.tt-small {margin: 10px 0 0; font-size: 13px; color: var(--muted, #6c6c75);}
/* «Ссылки-кнопки»: абзац, где только ссылки */
.idesc.tt-d p.tt-links {display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0;}
.idesc.tt-d p.tt-links br {display: none;}
.idesc.tt-d p.tt-links a {display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border: 1px solid var(--line, #e7e7eb); border-radius: 10px; background: var(--card, #fff); color: var(--text, #0e0e10); font-size: 13px; font-weight: 600; line-height: 1.2; text-decoration: none;}
.idesc.tt-d p.tt-links a::after {content: '\2197'; font-size: 12px; color: var(--muted, #6c6c75);}
.idesc.tt-d p.tt-links a:hover {border-color: var(--text, #0e0e10);}
/* «Подпись»: нижняя строка */
.idesc.tt-d p.tt-sign {clear: both; margin: 24px 0 0; padding-top: 14px; border-top: 1px solid var(--line, #e7e7eb); font-size: 12.5px; color: var(--muted, #6c6c75);}
.idesc.tt-d p.tt-sign a {color: var(--muted, #6c6c75); text-decoration: underline;}
/* ───── просмотр картинки поверх сайта (desc_lightbox.js) ───── */
html.tt-lb-open {overflow: hidden;}
.tt-lb {position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 60px 72px; opacity: 0; transition: opacity .18s ease;}
.tt-lb[hidden] {display: none;}
.tt-lb.is-open {opacity: 1;}
.tt-lb__bg {position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: rgba(14, 14, 16, .86); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);}
.tt-lb__fig {position: relative; display: flex; align-items: center; justify-content: center; max-width: 100%; max-height: 100%; margin: 0;}
.tt-lb__img {display: block; width: auto; height: auto; max-width: min(100%, 1400px); max-height: calc(100vh - 120px); border-radius: 12px; background: #fff; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); opacity: 1; transition: opacity .15s ease;}
.tt-lb.is-loading .tt-lb__img {opacity: 0;}
.tt-lb__load {position: absolute; top: 50%; left: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff; border-radius: 50%; opacity: 0; animation: ttlb-spin .8s linear infinite;}
.tt-lb.is-loading .tt-lb__load {opacity: 1;}
@keyframes ttlb-spin {to {transform: rotate(360deg);}}
.tt-lb__btn {position: absolute; z-index: 2; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; transition: background .15s ease;}
.tt-lb__btn[hidden] {display: none;}
.tt-lb__btn:hover {background: rgba(255, 255, 255, .28);}
.tt-lb__btn:focus-visible {outline: 2px solid #fff; outline-offset: 2px;}
.tt-lb__close {top: 14px; right: 14px;}
.tt-lb__prev {top: 50%; left: 14px; margin-top: -22px;}
.tt-lb__next {top: 50%; right: 14px; margin-top: -22px;}
.tt-lb__count {position: absolute; right: 0; bottom: 16px; left: 0; z-index: 2; text-align: center; font-size: 13px; color: rgba(255, 255, 255, .8);}
.tt-lb__count[hidden] {display: none;}

@media (max-width: 760px) {
    .tt-lb {padding: 64px 10px 52px;}
    .tt-lb__img {max-height: calc(100vh - 130px); border-radius: 10px;}
    .tt-lb__prev {top: auto; bottom: 6px; left: 12px; margin-top: 0;}
    .tt-lb__next {top: auto; right: 12px; bottom: 6px; margin-top: 0;}
    .tt-lb__count {bottom: 18px;}
}
@media (max-width: 760px) {
    .idesc.tt-d > p:first-child {font-size: 14.5px;}
    .idesc.tt-d blockquote {padding: 14px;}
    .idesc.tt-d blockquote ul > li, .idesc.tt-d blockquote > p {font-size: 14.5px;}
    .idesc.tt-d .tt-note {font-size: 12.5px;}
    .idesc.tt-d ul.tt-chips > li {white-space: normal;}
    .idesc.tt-d ul.tt-cols {grid-template-columns: 1fr;}
    .idesc.tt-d p.tt-gallery img {height: 120px;}
}
