/* ================================
   Палитра и базовые
   ================================ */
:root{
  --accent:#C2181F;
  --accentDark:#22d3ee;
  --light:#fff;
  --dark:#0f172a;
  --muted:#6b7280;
  --border:#e5e7eb;

  /* prose tokens */
  --prose-mb: 18px;
  --prose-color: #0f172a;
  --prose-muted: #6b7280;
  --prose-border: #e5e7eb;
  --prose-bg: #ffffff;
  --prose-accent: var(--accent);
}

*{ 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;
  margin:0;
}
.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;
}
.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
   ================================ */
.article-text{
  color: var(--prose-color);
  font-size: 17px;
  line-height: 1.65;
  overflow-wrap:anywhere; /* страховка от длинных строк */
}

/* убираем лишние зазоры по краям */
.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; margin-top:0; }
.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; }

/* Абзацы */
.article-text p{
  margin:0 0 var(--prose-mb);
}
.article-text .lead{
  font-size:1.1em;
  margin:0 0 calc(var(--prose-mb) * .75);
}

/* Дропкэп */
.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; }
}

/* Важно: strong НЕ является "подзаголовком" */
.article-text strong{
  font-weight:700;
  display:inline;
  font-size:inherit;
  line-height:inherit;
}
.article-text strong::after{ content:none; }

/* Ссылки */
.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;
}

/* inline-иконки (не ломают текст) */
.article-text img.inline-icon{
  display:inline-block;
  width:18px;
  height:18px;
  max-width:none;
  border-radius:0;
  vertical-align:-3px;
  margin-right:8px;
}

/* 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;
}

/* HR */
.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 18px;
  font-size:15px;
}
.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;
}

/* На телефонах: таблица скроллится горизонтально */
@media (max-width:767.98px){
  .article-text table{
    display:block;
    max-width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    min-width:620px;
  }
  .article-text th,
  .article-text td{
    white-space:nowrap;
  }
}
@media (max-width:479px){
  .article-text table{ min-width:560px; }
}

/* Видео (YouTube) */
.article-text .video,
.article-text iframe{
  max-width:100%;
}
.article-text .video{
  position:relative;
  padding-bottom:56.25%;
  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 .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 thead th{ background:#0f172a; }
body.dark .article-text code{ background:#111827; color:#e5e7eb; }

/* ================================
   Соц.иконки справа
   ================================ */
.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;
}
@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;
  color:inherit;
  text-decoration:none;
}
.apc-title:hover{ text-decoration:underline; }
.apc-desc{
  color:#111827;
  font-size:14px;
  margin:0 0 6px;
}
.apc-sku{
  color:var(--muted);
  font-size:13px;
}

/* ================================
   Примечание:
   Удалены дубляжи .container @media из этого файла.
   Если они нужны глобально — держи их в общем layout CSS.
   ================================ */
