/* Хорека — оформление SEO-текстов категорий (29.09.2026).
   Те же правила, что у текста карточки (horeka-seo.css → .sc-product-content-text), под блок описания
   категории темы oct_showcase + обтекание картинки раздела. Подключается событием horeka_faq_schema
   (catalog/controller/extension/horeka/faq_schema.php) с ?v=<время файла> — style.min.css кешируется на месяц. */

:root {
  --horeka-primary: rgb(199, 50, 35);
  --horeka-primary-dark: rgb(160, 38, 26);
  --horeka-primary-soft: rgba(199, 50, 35, 0.08);
  --horeka-text: #2b2b2b;
  --horeka-muted: #555;
  --horeka-border: #e6e6e6;
}

/* --- Раскладка: картинка слева, текст обтекает её и идёт под ней --- */
.sc-category-description > .d-flex {
  display: block !important;
}
.sc-category-description > .d-flex::after {
  content: "";
  display: block;
  clear: both;
}
.sc-category-description .sc-category-description-img {
  float: left;
  clear: left;
  width: 228px;
  margin: 4px 28px 16px 0;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--horeka-border);
  border-radius: 10px;
}
.sc-category-description .sc-category-description-img img {
  display: block;
  width: 100%;
  height: auto;
}
.sc-category-description .sc-category-description-text {
  padding: 0 !important;
}

/* Картинку событие переносит внутрь .sc-category-description-text — текст обтекает её и идёт под ней.
   Блоки с фоном и линиями не подлезают под картинку, а встают рядом */
.sc-category-description-text h2,
.sc-category-description-text h3,
.sc-category-description-text ul,
.sc-category-description-text ol,
.sc-category-description-text blockquote {
  display: flow-root;
}

/* --- Текст --- */
.sc-category-description-text {
  color: var(--horeka-text);
  font-size: 16px;
  line-height: 1.7;
}
.sc-category-description-text p {
  margin: 0 0 16px;
}

.sc-category-description-text h2 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--horeka-text);
  margin: 32px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--horeka-primary);
}
.sc-category-description-text h2:first-child {
  margin-top: 0;
}

.sc-category-description-text h3 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--horeka-primary-dark);
  margin: 24px 0 12px;
}

/* --- Списки --- */
.sc-category-description-text ul,
.sc-category-description-text ol {
  margin: 0 0 18px;
  padding-left: 0;
  list-style: none;
}
.sc-category-description-text ul li,
.sc-category-description-text ol li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 10px;
}
.sc-category-description-text ul li::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 10px;
  width: 8px;
  height: 8px;
  background: var(--horeka-primary);
  border-radius: 50%;
}
.sc-category-description-text ol {
  counter-reset: horeka-cat-counter;
}
.sc-category-description-text ol li {
  counter-increment: horeka-cat-counter;
}
.sc-category-description-text ol li::before {
  content: counter(horeka-cat-counter);
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  background: var(--horeka-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
  border-radius: 50%;
}

.sc-category-description-text strong {
  color: var(--horeka-primary-dark);
  font-weight: 600;
}

/* --- Цитата --- */
.sc-category-description-text blockquote {
  position: relative;
  margin: 24px 0;
  padding: 20px 26px 20px 58px;
  background: var(--horeka-primary-soft);
  border-left: 4px solid var(--horeka-primary);
  border-radius: 0 8px 8px 0;
  font-size: 17px;
  font-style: italic;
  line-height: 1.6;
  color: var(--horeka-text);
}
.sc-category-description-text blockquote p:last-child {
  margin-bottom: 0;
}
.sc-category-description-text blockquote::before {
  content: "\201C";
  position: absolute;
  left: 16px;
  top: 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 56px;
  line-height: 1;
  color: var(--horeka-primary);
  opacity: 0.5;
}

/* --- Частые вопросы --- */
.sc-category-description-text .horeka-faq {
  clear: both;
  margin: 20px 0 24px;
}
.sc-category-description-text .horeka-faq h3 {
  position: relative;
  padding: 14px 16px 14px 50px;
  margin: 10px 0 0;
  background: #fafafa;
  border: 1px solid var(--horeka-border);
  border-left: 3px solid var(--horeka-primary);
  border-radius: 6px;
  font-size: 17px;
  color: var(--horeka-text);
}
.sc-category-description-text .horeka-faq h3::before {
  content: "?";
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  background: var(--horeka-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
  border-radius: 50%;
}
.sc-category-description-text .horeka-faq p {
  margin: 0 0 4px;
  padding: 12px 16px 12px 50px;
  color: var(--horeka-muted);
}
/* Заключение после вопросов — отдельным абзацем, не сливается с последним ответом */
.sc-category-description-text .horeka-faq + p {
  margin-top: 20px;
}

/* Наши тексты: внизу показываем целиком (событие убирает кнопку «Развернуть» и затемнение) */
.sc-category-description-text.horeka-open {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Первый абзац нашего текста — под заголовком раздела, над товарами */
.horeka-cat-intro {
  max-width: 980px;
  margin-top: 10px;
}
.horeka-cat-intro p {
  margin: 0;
  color: #555;
  font-size: 16px;
  line-height: 1.6;
}
.horeka-cat-intro a {
  color: rgb(160, 38, 26);
  text-decoration: underline;
  text-decoration-color: rgba(199, 50, 35, 0.4);
  text-underline-offset: 3px;
}
@media (max-width: 767px) {
  .horeka-cat-intro p { font-size: 15px; }
}

/* Первый заголовок рядом с картинкой — без верхнего отступа */
.sc-category-description-img + h2 {
  margin-top: 0;
}

/* --- Перелинковка: ссылки в тексте и блок «Смотрите также» (links.py) --- */
.sc-category-description-text a.horeka-ilink {
  color: var(--horeka-primary-dark);
  text-decoration: underline;
  text-decoration-color: rgba(199, 50, 35, 0.4);
  text-underline-offset: 3px;
}
.sc-category-description-text a.horeka-ilink:hover {
  color: var(--horeka-primary);
  text-decoration-color: var(--horeka-primary);
}
.sc-category-description-text .horeka-links {
  clear: both;
  margin: 28px 0 8px;
  padding: 18px 20px 12px;
  background: #fafafa;
  border: 1px solid var(--horeka-border);
  border-radius: 10px;
}
.sc-category-description-text .horeka-links h3 {
  margin: 0 0 12px;
  font-size: 17px;
  color: var(--horeka-text);
}
.sc-category-description-text .horeka-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}
.sc-category-description-text .horeka-links li {
  padding: 0;
  margin: 0;
}
.sc-category-description-text .horeka-links li::before {
  display: none;
}
.sc-category-description-text .horeka-links a {
  display: inline-block;
  padding: 7px 14px;
  background: #fff;
  border: 1px solid var(--horeka-border);
  border-radius: 20px;
  color: var(--horeka-text);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  transition: border-color .15s, color .15s;
}
.sc-category-description-text .horeka-links a:hover {
  border-color: var(--horeka-primary);
  color: var(--horeka-primary);
}

/* --- Телефон и планшет --- */
@media (max-width: 767px) {
  .sc-category-description .sc-category-description-img {
    float: none;
    width: 180px;
    margin: 0 auto 16px;
  }
  .sc-category-description-text { font-size: 15px; }
  .sc-category-description-text h2 { font-size: 21px; }
  .sc-category-description-text h3 { font-size: 17px; }
  .sc-category-description-text blockquote {
    padding: 16px 16px 16px 46px;
    font-size: 16px;
  }
  .sc-category-description-text blockquote::before { left: 10px; }
}
