/* ===== Палитра и базовые ===== */
:root{
  --accent:#C2181F;
  --accentDark:#22d3ee;
  --light:#fff;
  --dark:#0f172a;
  --muted:#6b7280;
  --border:#e5e7eb;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
img{display:block;max-width:100%;height:auto}

body{
  font-family:'Roboto Condensed',system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  line-height:1.5;
  color:#000;
  background:#fff;
  -webkit-font-smoothing:antialiased;
}

/* ===== Контейнер страницы ===== */
.article-detail-container{
  max-width:1160px;
  margin:40px auto;
  position:relative;
  padding:0 12px;
}
@media (max-width:1279px){ .article-detail-container{max-width:944px} }
@media (max-width:1023px){ .article-detail-container{max-width:96%} }

/* ===== Hero-блок (как «карточка» с градиентной вуалью) ===== */
.banner-image{
  position:relative;
  width:100%;
  height:480px;
  border-radius:12px;
  overflow:hidden;
}

/* Градиент поверх картинки без доп. разметки */
.banner-image::after{
  content:"";
  position:absolute; inset:0;
  background:linear-gradient(to bottom,rgba(0,0,0,0) 0%, rgba(15,23,42,0.9) 100%);
  pointer-events:none;
  z-index:1;
}

.banner-image img{
  width:100%; height:100%;
  object-fit:cover; object-position:center;
  transition:transform .3s ease;
}
.banner-image:hover img{ transform:scale(1.05) }

/* Кнопка «назад» поверх hero */
.back-button{
  position:absolute; top:16px; left:16px; z-index:3;
  display:flex; align-items:center; gap:10px;
  color:var(--light); text-decoration:none;
}
.back-circle{
  width:40px; height:40px; border:1px solid var(--light);
  border-radius:50%; display:grid; place-items:center; font-size:20px;
}

/* Инфо внизу hero */
.banner-info{
  position:absolute; left:20px; right:20px; bottom:18px; z-index:2;
  color:var(--light);
}
.banner-date{ font-size:16px; margin-bottom:10px; opacity:.95 }

/* Заголовок с «чернильным» подчёркиванием как в примере */
.banner-title{ font-size:26px; font-weight:700; max-width:900px; }
.banner-title-ink{
  background-image:linear-gradient(90deg, orange, orange);
  background-repeat:no-repeat;
  background-position:left bottom;
  background-size:0 6px;
  transition:background-size .5s ease;
  padding-bottom:2px;
}
/* Подчёркивание при ховере по всему hero */
.banner-image:hover .banner-title-ink{ background-size:100% 6px; }

/* ===== Контентная зона ===== */
.article-content-wrapper{
  margin-top:28px;
  display:flex; justify-content:space-between; align-items:flex-start; gap:16px;
}
.article-text{ width:92% }
@media (max-width:1023px){
  .article-content-wrapper{ flex-direction:column-reverse }
  .article-text{ width:100% }
}

/* Типографика «prose» */
.article-text h1{
  font-size:32px; font-weight:700; margin:0 0 12px 0;
}
.article-text .lead{ font-size:1.1em; margin:0 0 8px 0 }

.article-text p{ font-size:17px; line-height:1.6; margin:0 0 18px 0 }
.article-text p:first-of-type::first-letter{
  font-size:1.875rem; line-height:1;
}
@media (min-width:640px){
  .article-text p:first-of-type::first-letter{ font-size:3rem }
}

/* blockquote с правым скруглением и бордером слева */
.article-text blockquote{
  margin:16px 0;
  padding:.5rem 1.5rem;
  background:rgba(245,158,11,.2);
  border-left:4px solid var(--accent);
  border-radius:0 .5rem .5rem 0;
  font-style:normal;
}
.article-text figure{ margin:20px 0; }
.article-text figcaption{
  margin-top:4px; margin-bottom:8px; color:var(--muted); font-size:.9em;
}
.article-text a{ color:#2563eb; text-decoration:underline }
.article-text code{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  background:#f3f4f6; padding:.1em .35em; border-radius:4px;
}

/* ===== Фикс-иконки соцсетей ===== */
.social-icons-fixed{
  width:8%;
  position:sticky; top:150px;
  display:flex; flex-direction:column; gap:20px; align-items:flex-end;
}
.social-icons-fixed a img{ width:40px; height:40px }
@media (max-width:1023px){ .social-icons-fixed{ position:static; width:100%; flex-direction:row; justify-content:flex-end } }

/* ===== Сетка товаров под статьёй (приятная сетка) ===== */
.article-products{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
  margin:28px 0 12px 0;
}
@media (min-width:768px){ .article-products{ grid-template-columns:repeat(3,minmax(0,1fr)) } }

.article-product-card{
  border:1px solid var(--border);
  border-radius:12px; overflow:hidden; background:#fff;
  transition:transform .2s ease, box-shadow .2s ease;
}
.article-product-card:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 24px rgba(0,0,0,.08);
}

.apc-image img{ width:100%; height:180px; object-fit:cover }
.apc-body{ padding:10px 12px 12px }
.apc-title{
  display:inline-block; font-weight:700; margin:0 0 6px 0; color:inherit; text-decoration:none;
}
.apc-title:hover{ text-decoration:underline }
.apc-desc{ color:#111827; font-size:14px; margin:0 0 6px 0 }
.apc-sku{ color:var(--muted); font-size:13px }

@media (max-width: 1279px) {
    .article-detail-container {
        max-width: 944px;
    }
}

@media (max-width: 1023px) {
    .article-detail-container {
        max-width: 96%;
    }
}


@media (max-width: 1279px) {
    .container {
        max-width: 944px;
        margin: 0 auto;
    }
}

@media (max-width: 1023px) {
    .container {
        max-width: 96%;
        margin: 0 auto;
    }
}

@media (max-width: 767px) {
    .container {
        max-width: 96%;
        margin: 0 auto;
    }
}

@media (max-width: 479px) {
    .container {
        margin: 0 auto;
        padding: 0 10px;
    }
}


/* ================================
   Prose / типографика для .article-text
   ================================ */

.article-text {
  /* базовый ритм отступов */
  --prose-mb: 18px;
  --prose-color: #0f172a;
  --prose-muted: #6b7280;
  --prose-border: #e5e7eb;
  --prose-bg: #ffffff;
  --prose-accent: var(--accent, #C2181F);
  color: var(--prose-color);
  font-size: 17px;
  line-height: 1.65;
}

/* убираем лишние зазоры по краям */
.article-text > *:first-child { margin-top: 0 !important; }
.article-text > *:last-child  { margin-bottom: 0 !important; }

/* Заголовки */
.article-text h1,
.article-text h2,
.article-text h3,
.article-text h4,
.article-text h5,
.article-text h6 {
  font-weight: 700;
  line-height: 1.25;
  margin: 28px 0 12px;
  color: var(--prose-color);
}
.article-text h1 { font-size: 34px; }
.article-text h2 { font-size: 28px; }
.article-text h3 { font-size: 22px; }
.article-text h4 { font-size: 18px; }
.article-text h5 { font-size: 16px; }
.article-text h6 { font-size: 15px; letter-spacing: .02em; text-transform: none; }

/* Абзацы, ведущий абзац и мелкий текст */
.article-text p { margin: 0 0 var(--prose-mb); }
.article-text .lead { font-size: 1.1em; margin-bottom: calc(var(--prose-mb) * .75); }
.article-text small, .article-text .small { font-size: .875em; color: var(--prose-muted); }

/* Первая буква первого абзаца крупнее (дропкэп) */
.article-text p:first-of-type::first-letter {
  font-size: 1.875rem;
  line-height: 1;
}
@media (min-width: 640px) {
  .article-text p:first-of-type::first-letter { font-size: 3rem; }
}

/* Ссылки */
.article-text a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.article-text a:hover { text-decoration-thickness: 2px; }

/* Списки */
.article-text ul,
.article-text ol {
  margin: 0 0 var(--prose-mb);
  padding-left: 1.25rem;
}
.article-text ul { list-style: disc; }
.article-text ol { list-style: decimal; }
.article-text li { margin: .25rem 0; }
.article-text li > ul,
.article-text li > ol { margin-top: .25rem; }

/* Цитаты */
.article-text blockquote {
  margin: 16px 0;
  padding: .5rem 1.5rem;
  background: rgba(245,158,11,.18); /* тёплый фоновый акцент */
  border-left: 4px solid var(--prose-accent);
  border-radius: 0 .5rem .5rem 0;
  font-style: normal;
  color: inherit;
}
.article-text blockquote p { margin: 0; }

/* Изображения */
.article-text img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
.article-text .full-bleed { /* опциональный класс для растяжки */
  width: 100vw; margin-left: 50%; transform: translateX(-50%);
}

/* Figure / Figcaption */
.article-text figure { margin: 20px 0; }
.article-text figure img { margin-bottom: 8px; }
.article-text figcaption {
  color: var(--prose-muted);
  font-size: .9em;
  margin-top: 2px;
}

/* Горизонтальная линия */
.article-text hr {
  border: 0;
  border-top: 1px solid var(--prose-border);
  margin: 24px 0;
}

/* Встроенный код и преформатированный */
.article-text code {
  font-family: ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  background: #f3f4f6;
  color: #111827;
  padding: .12em .35em;
  border-radius: 4px;
}
.article-text pre {
  margin: 16px 0;
  padding: 12px 14px;
  background: #0b1020;
  color: #e5e7eb;
  border-radius: 8px;
  overflow: auto;
  line-height: 1.5;
  font-size: .95em;
}
.article-text pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

/* Таблицы */
.article-text table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: .95em;
}
.article-text th,
.article-text td {
  border: 1px solid var(--prose-border);
  padding: 10px 12px;
  vertical-align: top;
}
.article-text thead th {
  background: #f8fafc;
  font-weight: 700;
}
.article-text tbody tr:hover { background: #f9fafb; }

/* Кнопки, метки и выделения, если вдруг попадут из редактора */
.article-text mark {
  background: #fef08a;
  padding: 0 .2em;
  border-radius: 2px;
}
.article-text kbd {
  background: #111827;
  color: #e5e7eb;
  border-radius: 4px;
  padding: .1em .4em;
  font-family: ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  border: 1px solid #374151;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.1);
}

/* Встраиваемое видео: адаптив */
.article-text .video,
.article-text iframe {
  max-width: 100%;
}
.article-text .video {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
}
.article-text .video > iframe,
.article-text .video > video {
  position: absolute; top:0; left:0; width:100%; height:100%;
}

/* Выравнивания, если редактор добавляет классы */
.article-text .align-left   { text-align: left; }
.article-text .align-center { text-align: center; }
.article-text .align-right  { text-align: right; }

/* Дарк-тема (body.dark) */
body.dark .article-text {
  --prose-color: #e5e7eb;
  --prose-muted: #9ca3af;
  --prose-border: #273244;
  --prose-bg: #0b1020;
}
body.dark .article-text a { color: #93c5fd; }
body.dark .article-text pre { background: #0a0f1f; color: #e5e7eb; }
body.dark .article-text table thead th { background: #0f172a; }
body.dark .article-text tbody tr:hover { background: #0d1426; }
body.dark .article-text code { background: #111827; color: #e5e7eb; }

/* Микро-ритм между соседними элементами одного типа */
.article-text h2 + h3,
.article-text h3 + h4,
.article-text h4 + h5 { margin-top: 10px; }