/* card-blocks.css — нижние блоки карточки товара zhbi77.ru (задача #530, версия 1).
   Подключается ПОСЛЕ shop-step1.css и card-step1.css (берёт их токены --sh-*). Эти два файла не меняются.
   Каждая секция — <section class="cb-sec" id="cb-…">; все правила начинаются с .cb-sec (специфичность выше, чем у .page h2 / .item-page ul li сайта).
   Новых цветов и шрифтов нет: шрифт наследуется от .page, цвета — токены шага 1 + три цвета макета (--cb-*, уже есть на сайте).
   Нет: теней, градиентов, узоров, анимаций появления, автопрокрутки. Переходы 120 мс (цвет/рамка), отключаются при prefers-reduced-motion.
   Все блоки работают без JavaScript.
   Оглавление: 0 основа и сброс · 1 общие элементы · 2 преимущества · 3 производство · 4 объекты · 5 клиенты и партнёры · 6 отзыв · 7 офис
               · 8 ПОРЯДОК РАБОТЫ (шаги — отдельный раздел, при замене оформления правится только он) · 9 адаптив · 10 motion. */

/* ---------- 0. Основа и сброс (защита от глобальных стилей сайта) ---------- */
.cb-sec { --cb-tint: #f7f9f9; --cb-y: #ffb90f; --cb-ybg: #ffefc9;
  padding: 36px 0; border-top: 1px solid var(--sh-line); scroll-margin-top: 70px;
  font-size: 16px; line-height: 1.5; font-weight: 400; color: var(--sh-text); text-align: left; }
.cb-sec, .cb-sec *, .cb-sec *::before, .cb-sec *::after { box-sizing: border-box; }
.cb-sec h2, .cb-sec h3, .cb-sec p, .cb-sec ul, .cb-sec ol, .cb-sec li, .cb-sec dl, .cb-sec dt, .cb-sec dd, .cb-sec figure, .cb-sec fieldset, .cb-sec legend { margin: 0; padding: 0; }
.cb-sec ul, .cb-sec ol { list-style: none; }
.cb-sec li { background-image: none; }
.cb-sec li::before, .cb-sec li::marker { content: none; }
.cb-sec img { display: block; max-width: 100%; height: auto; border: 0; }
.cb-sec a { color: var(--sh-link); }
.cb-sec a:hover { color: var(--sh-hfg); }
.cb-sec a:focus-visible, .cb-sec button:focus-visible, .cb-sec summary:focus-visible, .cb-sec input:focus-visible, .cb-sec textarea:focus-visible { outline: 2px solid var(--sh-focus); outline-offset: 2px; }
.cb-sec .cb-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- 1. Общие элементы ---------- */
.cb-sec .cb-h2 { margin: 0 0 18px; font-size: 26px; font-weight: 700; line-height: 1.2; color: var(--sh-text); overflow-wrap: anywhere; }
.cb-sec .cb-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 20px; margin-bottom: 18px; }
.cb-sec .cb-head .cb-h2 { margin-bottom: 0; }
.cb-sec .cb-lead { max-width: 640px; margin: -8px 0 20px; font-size: 16px; }
.cb-sec .cb-h3 { margin: 0 0 10px; font-size: 16px; font-weight: 700; line-height: 1.3; }
.cb-sec .cb-more { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; }
.cb-sec .cb-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 18px; border: 1px solid var(--sh-link); border-radius: var(--sh-r); background: #fff; color: var(--sh-link); font: inherit; font-size: 15px; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background-color .12s ease, color .12s ease, border-color .12s ease; }
.cb-sec .cb-btn:hover { background: var(--sh-hbg); color: var(--sh-hfg); }
.cb-sec .cb-btn:active { background: var(--sh-press); }
.cb-sec .cb-btn--p { background: var(--sh-link); color: #fff; }
.cb-sec .cb-btn--p:hover { background: var(--sh-focus); border-color: var(--sh-focus); color: #fff; }
.cb-sec .cb-btn--p:active { background: var(--sh-hfg); border-color: var(--sh-hfg); color: #fff; }
.cb-sec .cb-btn:disabled { opacity: .6; cursor: default; }

/* ---------- 2. Наши преимущества: крупная цифра + короткая подпись (#cb-adv) ---------- */
.cb-sec .cb-adv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cb-sec .cb-adv li { display: flex; flex-direction: column; gap: 8px; padding: 18px 16px 16px; border: 1px solid var(--sh-line); border-radius: var(--sh-r); background: #fff; }
.cb-sec .cb-adv__v { font-size: 30px; font-weight: 700; line-height: 1.05; color: var(--sh-hfg); white-space: nowrap; }
.cb-sec .cb-adv__v small { font-size: 18px; font-weight: 700; }
.cb-sec .cb-adv__v::after { content: ""; display: block; width: 32px; height: 3px; margin-top: 10px; background: var(--cb-y); }
.cb-sec .cb-adv__t { font-size: 15px; line-height: 1.4; }
.cb-sec .cb-adv__t a { white-space: nowrap; }

/* ---------- 3. Собственное производство (#cb-fac): один список, «своё» производство — модификатор .cb-fac--own ----------
   Сервер ставит .cb-fac--own не более чем на один <li> (раздел каталога совпал с производством) и выводит его первым;
   order:-1 страхует, если порядок в разметке другой. Нет совпадения — модификатора нет, все 5 одинаковые. */
.cb-sec .cb-facs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cb-sec .cb-fac { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px; border: 1px solid var(--sh-line); border-radius: var(--sh-r); background: #fff; }
.cb-sec .cb-fac__ph { display: grid; gap: 6px; align-content: start; }
.cb-sec .cb-fac__ph a { display: block; }
.cb-sec .cb-fac__ph img { width: 112px; height: 56px; object-fit: cover; border-radius: 3px; background: var(--cb-tint); }
.cb-sec .cb-fac:not(.cb-fac--own) .cb-fac__ph a:nth-child(n+2) { display: none; }
.cb-sec .cb-fac__h { font-size: 16px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.cb-sec .cb-fac__dl { margin: 0; font-size: 14px; line-height: 1.45; }
.cb-sec .cb-fac__dl dt { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cb-sec .cb-fac__dl dd + dd { margin-top: 2px; }
.cb-sec .cb-fac__dl a { font-weight: 700; }
.cb-sec .cb-fac:not(.cb-fac--own) .cb-fac__dl a { display: inline-block; padding: 3px 0; }
.cb-sec .cb-fac .cb-tag, .cb-sec .cb-fac .cb-fac__btn { display: none; }
.cb-sec .cb-tag { margin-bottom: 6px; padding: 2px 8px; border-radius: 3px; background: var(--cb-ybg); font-size: 14px; font-weight: 700; line-height: 1.4; }
/* модификатор «здесь делают этот товар» */
.cb-sec .cb-fac--own { order: -1; grid-column: 1 / -1; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 16px 20px; padding: 16px; border: 1px solid var(--sh-border); border-left: 4px solid var(--cb-y); }
.cb-sec .cb-fac--own .cb-fac__ph { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cb-sec .cb-fac--own .cb-fac__ph a:first-child { grid-column: 1 / -1; }
.cb-sec .cb-fac--own .cb-fac__ph img { width: 100%; height: auto; aspect-ratio: 2 / 1; }
.cb-sec .cb-fac--own .cb-tag { display: inline-block; }
.cb-sec .cb-fac--own .cb-fac__btn { display: inline-flex; }
.cb-sec .cb-fac--own .cb-fac__h { font-size: 18px; }
.cb-sec .cb-fac--own .cb-fac__dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 10px 0 14px; font-size: 15px; line-height: 1.5; }
.cb-sec .cb-fac--own .cb-fac__dl dt { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; white-space: normal; color: var(--sh-muted); }
.cb-sec .cb-fac--own .cb-fac__dl dd + dd { margin-top: 0; }
.cb-sec .cb-fac-foot { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 14px; font-size: 15px; }
.cb-sec .cb-fac-foot span { color: var(--sh-muted); }

/* ---------- 4. Наши объекты (#cb-obj) ---------- */
.cb-sec .cb-obj { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cb-sec .cb-obj li { display: flex; flex-direction: column; border: 1px solid var(--sh-line); border-radius: var(--sh-r); overflow: hidden; background: #fff; }
.cb-sec .cb-obj img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--cb-tint); }
.cb-sec .cb-obj__b { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; }
.cb-sec .cb-obj__y { align-self: flex-start; padding: 1px 8px; border: 1px solid var(--sh-border); border-radius: 3px; font-size: 14px; font-weight: 700; }
.cb-sec .cb-obj__h { font-size: 17px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.cb-sec .cb-obj__p { font-size: 14px; line-height: 1.45; color: var(--sh-muted); }

/* ---------- 5. Клиенты и партнёры (#cb-cl) ---------- */
.cb-sec .cb-logos { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.cb-sec .cb-logos + .cb-h3 { margin-top: 22px; }
.cb-sec .cb-logos li { height: 88px; padding: 8px; border: 1px solid var(--sh-line); border-radius: var(--sh-r); background: #fff; }
.cb-sec .cb-logos img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- 6. Оставить отзыв (#cb-rv): <details>, без JS раскрывается; отправку делает прежний обработчик ---------- */
.cb-sec .cb-rv { border: 1px solid var(--sh-border); border-radius: var(--sh-r); }
.cb-sec .cb-rv summary { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; min-height: 56px; padding: 12px 48px 12px 16px; cursor: pointer; list-style: none; }
.cb-sec .cb-rv summary::-webkit-details-marker { display: none; }
.cb-sec .cb-rv summary b { font-size: 18px; font-weight: 700; }
.cb-sec .cb-rv summary span { font-size: 14px; color: var(--sh-muted); }
.cb-sec .cb-rv summary::after { content: ""; position: absolute; right: 20px; top: 22px; width: 8px; height: 8px; border-right: 2px solid var(--sh-link); border-bottom: 2px solid var(--sh-link); transform: rotate(45deg); }
.cb-sec .cb-rv[open] summary::after { top: 26px; transform: rotate(-135deg); }
.cb-sec .cb-rv summary:hover b { color: var(--sh-hfg); }
.cb-sec .cb-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin: 0; padding: 4px 16px 18px; border-top: 1px solid var(--sh-line); }
.cb-sec .cb-form > * { min-width: 0; }
.cb-sec .cb-form .cb-full { grid-column: 1 / -1; }
.cb-sec .cb-form label, .cb-sec .cb-form legend { display: block; margin: 0 0 4px; font-size: 14px; font-weight: 700; }
.cb-sec .cb-form fieldset { margin: 12px 0 0; border: 0; }
.cb-sec .cb-form input[type=text], .cb-sec .cb-form input[type=email], .cb-sec .cb-form textarea { display: block; width: 100%; height: 48px; margin: 0; padding: 0 12px; border: 1px solid var(--sh-field); border-radius: var(--sh-r); font: inherit; color: var(--sh-text); background: #fff; box-shadow: none; }
.cb-sec .cb-form textarea { height: 120px; padding: 10px 12px; resize: vertical; }
.cb-sec .cb-stars { display: flex; flex-wrap: wrap; gap: 6px; }
.cb-sec .cb-stars input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.cb-sec .cb-stars label { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; margin: 0; border: 1px solid var(--sh-field); border-radius: var(--sh-r); font-size: 16px; font-weight: 700; cursor: pointer; }
.cb-sec .cb-stars input:checked + label { background: var(--cb-ybg); border: 2px solid var(--sh-text); }
.cb-sec .cb-stars input:focus-visible + label { outline: 2px solid var(--sh-focus); outline-offset: 2px; }
.cb-sec .cb-form small { font-size: 14px; color: var(--sh-muted); }
.cb-sec .cb-send { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
/* состояния (классы и атрибуты ставит обработчик формы) */
.cb-sec .cb-form input[aria-invalid="true"], .cb-sec .cb-form textarea[aria-invalid="true"] { border-color: var(--sh-err); }
.cb-sec .cb-form__e { margin-top: 4px; font-size: 14px; line-height: 1.3; color: var(--sh-err); }
.cb-sec .cb-rv__ok { margin: 0; padding: 16px; border-top: 1px solid var(--sh-line); font-size: 16px; }
.cb-sec .cb-rv__ok b { display: block; font-size: 18px; }

/* ---------- 7. Наш офис (#cb-off): фото, видео-ссылка, карточка адреса. Iframe и карта не встраиваются ---------- */
.cb-sec .cb-off { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 16px 20px; align-items: start; }
.cb-sec .cb-gal { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cb-sec .cb-gal a { display: block; border: 1px solid var(--sh-line); border-radius: var(--sh-r); overflow: hidden; }
.cb-sec .cb-gal a:hover { border-color: var(--sh-link); }
.cb-sec .cb-gal img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--cb-tint); }
.cb-sec .cb-vid { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: center; margin-top: 10px; padding: 12px 14px; border: 1px solid var(--sh-border); border-radius: var(--sh-r); color: var(--sh-text); text-decoration: none; }
.cb-sec .cb-vid:hover { border-color: var(--sh-link); background: var(--sh-hbg); color: var(--sh-text); }
.cb-sec .cb-vid__p { display: grid; place-items: center; width: 56px; height: 56px; border: 2px solid var(--sh-link); border-radius: var(--sh-r); color: var(--sh-link); background: #fff; }
.cb-sec .cb-vid__p svg { width: 20px; height: 20px; fill: currentColor; }
.cb-sec .cb-vid b { display: block; font-size: 16px; }
.cb-sec .cb-vid small { font-size: 14px; color: var(--sh-muted); }
.cb-sec .cb-addr { padding: 16px; border: 1px solid var(--sh-line); border-radius: var(--sh-r); background: var(--cb-tint); font-size: 15px; }
.cb-sec .cb-addr dt { font-size: 14px; color: var(--sh-muted); }
.cb-sec .cb-addr dd + dt { margin-top: 10px; }
.cb-sec .cb-addr dd a[href^="tel"] { font-weight: 700; }
.cb-sec .cb-addr .cb-btn { width: 100%; margin-top: 14px; }

/* ================= 8. ПОРЯДОК РАБОТЫ (#cb-steps) — композиция «этапы заказа», версия 2 (макет от 04.12 11:40, spec 4.2) =================
   Замена оформления шагов = правка ТОЛЬКО этого раздела, «шаговых» строк раздела 9 и blocks/03-steps.html. Другие блоки на .cb-step* не завязаны.
   Контракт шага: li.cb-step > span.cb-step__n (номер-фон, aria-hidden) · div.cb-step__txt (h3.cb-step__h со скрытым «Шаг N.» + p.cb-step__d)
   · [шаг 1: div.cb-step__act с кнопками] · span.cb-step__img > img (декор, alt=""). Модификаторы: cb-step--wide (шаги 1–2), cb-step--truck (шаг 4).
   Модификатор секции .cb-sec--wide: блок выходит из колонки 745 на ширину контейнера сайта 960 (только >=992; ниже колонка и так на всю ширину). */
.cb-sec .cb-steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.cb-sec .cb-step { position: relative; grid-column: span 2; display: flex; flex-direction: column; min-height: 300px; padding: 18px 18px 0; border-radius: var(--sh-r); background: var(--sh-head); overflow: hidden; }
.cb-sec .cb-step__n { position: absolute; left: 10px; top: -10px; font-size: 96px; font-weight: 700; line-height: 1; letter-spacing: -3px; color: #fff; pointer-events: none; user-select: none; }
.cb-sec .cb-step__txt { position: relative; padding-top: 50px; }
.cb-sec .cb-step__h { margin: 0 0 6px; font-size: 20px; font-weight: 700; line-height: 1.2; }
.cb-sec .cb-step__d { font-size: 15px; line-height: 1.45; color: var(--sh-text); }
.cb-sec .cb-step__d a { white-space: nowrap; font-weight: 700; color: var(--sh-hfg); }
.cb-sec .cb-step__act { position: relative; display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 0 18px; }
.cb-sec .cb-step__act .cb-btn { min-width: 132px; }
.cb-sec .cb-step__img { position: relative; display: block; align-self: flex-end; width: 150px; margin: auto -18px 0 0; padding-top: 8px; }
.cb-sec .cb-step__img picture, .cb-sec .cb-step__img img { display: block; width: 100%; height: auto; }
.cb-sec .cb-step--wide { grid-column: span 3; display: grid; grid-template-columns: minmax(0, 1fr) 172px; grid-template-rows: auto 1fr; column-gap: 4px; min-height: 250px; }
.cb-sec .cb-step--wide .cb-step__txt { grid-column: 1; grid-row: 1; }
.cb-sec .cb-step--wide .cb-step__act { grid-column: 1; grid-row: 2; align-self: end; }
.cb-sec .cb-step--wide .cb-step__img { grid-column: 2; grid-row: 1 / span 2; align-self: end; width: auto; margin: 0 -18px 0 0; }
.cb-sec .cb-step--truck .cb-step__img { width: min(100%, 214px); margin: auto 4px 0 auto; padding-top: 8px; } /* v2: машина целиком внутри карточки, без вылета за край (task 640) */
/* широкая подача: от левого края бокового меню до правого края колонки = 745 + 212 = 957 px (в замере 1440 меню начинается на 212 px левее колонки) */
@media (min-width: 992px) { .cb-sec.cb-sec--wide { width: 957px; max-width: none; margin-left: -212px; } }
@media (min-width: 992px) { .cb-sec.cb-sec--wide .cb-step { min-height: 280px; } .cb-sec.cb-sec--wide .cb-step--wide { min-height: 240px; } }

/* ---------- 9. Адаптив ---------- */
@media (max-width: 991px) {
  .cb-sec .cb-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }                      /* шаги */
  .cb-sec .cb-step, .cb-sec .cb-step--wide { grid-column: auto; }                                /* шаги */
  .cb-sec .cb-step:first-child { grid-column: 1 / -1; }                                         /* шаги */
}
@media (max-width: 767px) {
  .cb-sec { padding: 28px 0; }
  .cb-sec .cb-h2 { font-size: 22px; margin-bottom: 14px; }
  .cb-sec .cb-lead { margin: -4px 0 16px; }
  .cb-sec .cb-adv { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .cb-sec .cb-adv li { padding: 14px 12px; }
  .cb-sec .cb-adv__v { font-size: 24px; white-space: normal; }
  .cb-sec .cb-adv__v small { font-size: 16px; }
  .cb-sec .cb-adv__t { font-size: 14px; }
  .cb-sec .cb-facs { grid-template-columns: minmax(0, 1fr); }
  .cb-sec .cb-fac { grid-template-columns: 96px minmax(0, 1fr); }
  .cb-sec .cb-fac__ph img { width: 96px; height: 48px; }
  .cb-sec .cb-fac--own { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .cb-sec .cb-fac--own .cb-fac__ph img { width: 100%; height: auto; }
  .cb-sec .cb-fac--own .cb-fac__btn { width: 100%; }
  .cb-sec .cb-obj { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .cb-sec .cb-obj li { display: grid; grid-template-columns: 120px minmax(0, 1fr); }
  .cb-sec .cb-obj img { height: 100%; aspect-ratio: auto; min-height: 96px; }
  .cb-sec .cb-obj__b { padding: 10px 12px; gap: 4px; }
  .cb-sec .cb-obj__h { font-size: 16px; }
  .cb-sec .cb-logos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .cb-sec .cb-logos li { height: 72px; padding: 6px; }
  .cb-sec .cb-form { grid-template-columns: minmax(0, 1fr); padding: 4px 12px 16px; }
  .cb-sec .cb-send .cb-btn { width: 100%; }
  .cb-sec .cb-off { grid-template-columns: minmax(0, 1fr); }
  /* шаги */
  .cb-sec .cb-steps { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .cb-sec .cb-step, .cb-sec .cb-step--wide, .cb-sec .cb-step:first-child { grid-column: auto; display: grid; grid-template-columns: minmax(0, 1fr) 104px; grid-template-rows: auto 1fr; column-gap: 4px; min-height: 150px; padding: 14px 14px 0; }
  .cb-sec .cb-step__n { left: 8px; top: -8px; font-size: 72px; letter-spacing: -2px; }
  .cb-sec .cb-step__txt { grid-column: 1; grid-row: 1; padding: 36px 0 14px; }
  .cb-sec .cb-step__h { font-size: 18px; }
  .cb-sec .cb-step__act { grid-column: 1; grid-row: 2; padding: 0 0 14px; }
  .cb-sec .cb-step__act .cb-btn { flex: 1 1 130px; }
  .cb-sec .cb-step__img, .cb-sec .cb-step--wide .cb-step__img, .cb-sec .cb-step--truck .cb-step__img { grid-column: 2; grid-row: 1 / span 2; align-self: end; width: auto; margin: 0 -14px 0 0; padding-top: 0; }
  .cb-sec .cb-step--truck { grid-template-columns: minmax(0, 1fr) 138px; }
  .cb-sec .cb-step--truck .cb-step__img { width: 100%; margin: 0 0 0 0; }
  .cb-sec .cb-step:first-child .cb-step__txt { padding-bottom: 8px; }
}

/* ---------- 10. Motion ---------- */
@media (prefers-reduced-motion: reduce) { .cb-sec * { transition: none !important; } }
