/* Блог по макету дизайнера: список статей 3 в ряд и страница статьи (текст слева, товары справа). */
:root {
  --bl-ink: #222;
  --bl-text: #444;
  --bl-gray: #9a9a9a;
  --bl-line: #dcdcdc;
  --bl-orange: #ff7e28;
  --bl-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ── список: 3 карточки в ряд ── */
html body div.blog-list div.grid-list.grid-list {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin: 0 !important;
}
html body div.blog-list div.grid-list > div.tm-bcard-wrap {
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.tm-bcard {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 7px;
  border: 1px solid var(--bl-line);
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
  text-decoration: none !important;
  transition: border-color 0.74s ease, box-shadow 0.74s ease;
}
/* заливка при наведении: светлый персик под фото → фирменный оранжевый внизу */
.tm-bcard::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, #fdf1e9 0%, #f8d3b9 48%, #ff7e28 100%);
  opacity: 0;
  transition: opacity 0.74s var(--bl-ease);
}
.tm-bcard__img {
  display: block;
  aspect-ratio: 434 / 259;
  border-radius: 14px;
  overflow: hidden;
  background: #eee;
}
.tm-bcard__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.02s var(--bl-ease);
}
.tm-bcard__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  align-items: flex-start;
  padding: 28px 36px 30px;
}
.tm-bcard__tag {
  padding: 3px 8px;
  border: 1px solid var(--bl-line);
  border-radius: 3px;
  font: 400 12px / 1.3 "Montserrat", Arial, sans-serif;
  font-style: normal;
  color: #666;
  transition: background-color 0.74s ease, border-color 0.74s ease, color 0.74s ease;
}
.tm-bcard__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  max-width: 300px;
  margin-top: 24px;
  font: 500 18px / 1.35 "Montserrat", Arial, sans-serif;
  color: var(--bl-ink);
  transition: color 0.74s ease;
}
.tm-bcard__date {
  margin-top: auto;
  padding-top: 30px;
  font: 400 13px / 1 "Montserrat", Arial, sans-serif;
  color: var(--bl-gray);
  transition: color 0.74s ease;
}
.tm-bcard:hover,
.tm-bcard:focus-visible {
  border-color: transparent;
  box-shadow: 0 18px 40px rgba(255, 126, 40, 0.22);
  outline: none;
}
.tm-bcard:hover::before,
.tm-bcard:focus-visible::before {
  opacity: 1;
}
.tm-bcard:hover .tm-bcard__img img {
  transform: scale(1.04);
}
.tm-bcard:hover .tm-bcard__tag,
.tm-bcard:focus-visible .tm-bcard__tag {
  background: #2c2c2c;
  border-color: #2c2c2c;
  color: #fff;
}
.tm-bcard:hover .tm-bcard__title,
.tm-bcard:hover .tm-bcard__date,
.tm-bcard:focus-visible .tm-bcard__title,
.tm-bcard:focus-visible .tm-bcard__date {
  color: #fff;
}
.tm-bcard:hover .tm-bcard__date {
  font-weight: 600;
}
@media (max-width: 991px) {
  html body div.blog-list div.grid-list.grid-list,
  html body .container.blog-page .blog-list.blog-list-template .grid-list.grid-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 600px) {
  html body div.blog-list div.grid-list.grid-list,
  html body .container.blog-page .blog-list.blog-list-template .grid-list.grid-list {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .tm-bcard__body {
    padding: 22px 22px 24px;
  }
}

/* ── страница статьи ── */
.tm-art {
  padding-bottom: 80px;
}
.tm-art__section {
  display: inline-block;
  margin: 56px 0 44px;
  font: 600 clamp(34px, 3.2vw, 60px) / 1.1 "Montserrat", Arial, sans-serif;
  letter-spacing: -0.01em;
  color: var(--bl-ink) !important;
  text-decoration: none !important;
}
.tm-art__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 64px;
  align-items: start;
}
.tm-art__cover {
  margin: 0;
  aspect-ratio: 970 / 390;
  border-radius: 10px;
  overflow: hidden;
  background: #eee;
}
.tm-art__cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tm-art__meta,
.tm-art__title,
.tm-art__body {
  padding-left: 35px;
}
.tm-art__meta {
  display: flex;
  align-items: center;
  gap: 56px;
  margin-top: 46px;
}
.tm-art__tag {
  padding: 7px 58px;
  border: 1px solid #e5e5e5;
  border-radius: 3px;
  background: #f7f7f7;
  font: 400 12px / 1.3 "Montserrat", Arial, sans-serif;
  color: #555 !important;
  text-decoration: none !important;
  transition: background-color 0.74s ease, border-color 0.74s ease, color 0.74s ease;
}
.tm-art__tag:hover {
  background: #2c2c2c;
  border-color: #2c2c2c;
  color: #fff !important;
}
.tm-art__meta time {
  font: 400 13px / 1 "Montserrat", Arial, sans-serif;
  color: var(--bl-gray);
}
.tm-art .tm-art__title {
  max-width: 720px;
  margin: 36px 0 0 !important;
  font: 500 clamp(30px, 2.6vw, 48px) / 1.25 "Montserrat", Arial, sans-serif !important;
  letter-spacing: -0.01em;
  color: var(--bl-ink) !important;
  text-wrap: balance;
}

/* текст статьи: читаемая мера строки, ритм по базе 17/1.7 */
.tm-art__body {
  max-width: 860px;
  margin-top: 40px;
  font: 400 17px / 1.7 "Montserrat", Arial, sans-serif;
  color: var(--bl-text);
}
.tm-art__body > :first-child {
  margin-top: 0;
}
.tm-art__body .introtext {
  margin-bottom: 28px;
  font-size: 19px;
  line-height: 1.6;
  color: var(--bl-ink);
}
.tm-art__body p,
.tm-art__body ul,
.tm-art__body ol {
  margin: 0 0 18px;
}
.tm-art__body h2 {
  margin: 48px 0 18px;
  font: 600 30px / 1.25 "Montserrat", Arial, sans-serif;
  color: var(--bl-ink);
  scroll-margin-top: 110px;
}
.tm-art__body h3 {
  margin: 32px 0 12px;
  font: 600 21px / 1.3 "Montserrat", Arial, sans-serif;
  color: var(--bl-ink);
  scroll-margin-top: 110px;
}
.tm-art__body li {
  margin-bottom: 8px;
}
.tm-art__body a {
  color: var(--bl-orange);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.tm-art__body img {
  max-width: 100%;
  height: auto;
}
.tm-art__body blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 24px;
  border-left: 3px solid var(--bl-orange);
  font-size: 19px;
  font-style: italic;
  color: var(--bl-ink);
}
.tm-art__body table {
  display: block;
  width: 100%;
  margin: 24px 0 28px;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 15px;
}
.tm-art__body th,
.tm-art__body td {
  padding: 12px 16px;
  border-bottom: 1px solid #ececec;
  text-align: left;
  vertical-align: top;
}
.tm-art__body th {
  font-weight: 600;
  color: var(--bl-ink);
  background: #f7f7f7;
}
/* блоки контент-завода (стили у них инлайновые) — в цвета сайта */
.tm-art__body .tm-toc {
  padding: 22px 26px !important;
  border: 1px solid #ececec !important;
  border-radius: 16px !important;
  background: #f7f7f7 !important;
}
.tm-art__body .tm-toc ol {
  margin: 8px 0 0;
}
.tm-art__body .tm-toc a,
.tm-art__body .tm-related a {
  color: var(--bl-ink);
  text-decoration: none;
  transition: color 0.3s ease;
}
.tm-art__body .tm-toc a:hover,
.tm-art__body .tm-related a:hover {
  color: var(--bl-orange);
}
.tm-art__body .tm-related {
  padding: 22px 26px !important;
  border-left: 3px solid var(--bl-orange) !important;
  border-radius: 0 16px 16px 0 !important;
  background: #f7f7f7 !important;
}
.tm-art__body .tm-product-card {
  border-color: #ececec !important;
  border-radius: 16px !important;
  transition: box-shadow 0.74s ease;
}
.tm-art__body .tm-product-card:hover {
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.07);
}
.tm-art__body .tm-product-card a {
  text-decoration: none;
}

/* врезка «Мебель Тронос по теме»: длинные подборки переносятся, без подчёркивания ссылок текста */
.tm-art__body .tm-art-cta .tm-tag {
  height: auto;
  min-height: 40px;
  padding: 10px 18px;
  line-height: 1.3;
  white-space: normal;
  text-decoration: none;
}

/* ── правая колонка: товары по теме, прилипает при прокрутке ── */
.tm-art__sticky {
  position: sticky;
  top: 110px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.tm-side {
  position: relative;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  min-height: 193px;
  padding: 18px 56px 18px 18px;
  background: #f7f7f7;
  border-radius: 6px;
  text-decoration: none !important;
  transition: background-color 0.74s ease, box-shadow 0.74s ease, transform 0.74s var(--bl-ease);
}
.tm-side__img {
  display: block;
  height: 157px;
  min-width: 0;
}
.tm-side__img img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  object-fit: contain;
  transition: transform 1.02s var(--bl-ease);
}
.tm-side__info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tm-side__name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  font: 500 14px / 1.4 "Montserrat", Arial, sans-serif;
  color: var(--bl-text);
}
.tm-side__price {
  font: 600 22px / 1.1 "Montserrat", Arial, sans-serif;
  color: var(--bl-ink);
  white-space: nowrap;
  transition: color 0.74s ease;
}
.tm-side__price s {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 400;
  color: var(--bl-gray);
}
.tm-side__go {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1.5px solid #d6d6d6;
  border-radius: 50%;
  color: #8a8a8a;
  transition: background-color 0.74s ease, border-color 0.74s ease, color 0.74s ease;
}
.tm-side__go svg {
  width: 45%;
  height: 45%;
}
.tm-side:hover {
  background: #fff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}
.tm-side:hover .tm-side__img img {
  transform: scale(1.06);
}
.tm-side:hover .tm-side__price {
  color: var(--bl-orange);
}
.tm-side:hover .tm-side__go {
  background: var(--bl-orange);
  border-color: var(--bl-orange);
  color: #fff;
}
.tm-art__all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  font: 600 15px / 1 "Montserrat", Arial, sans-serif;
  color: var(--bl-ink) !important;
  text-decoration: none !important;
}
.tm-art__all span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--bl-orange);
  border-radius: 50%;
  color: var(--bl-orange);
  transition: background-color 0.74s ease, color 0.74s ease;
}
.tm-art__all span svg {
  width: 45%;
  height: 45%;
}
.tm-art__all:hover span {
  background: var(--bl-orange);
  color: #fff;
}

@media (max-width: 1199px) {
  .tm-art__grid {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 36px;
  }
  .tm-side {
    grid-template-columns: 110px minmax(0, 1fr);
    min-height: 150px;
  }
  .tm-side__img {
    height: 120px;
  }

}
@media (max-width: 991px) {
  .tm-art__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .tm-art__sticky {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .tm-art__all {
    grid-column: 1 / -1;
  }
}
@media (max-width: 600px) {
  .tm-art__section {
    margin: 28px 0 24px;
  }
  .tm-art__meta,
  .tm-art__title,
  .tm-art__body {
    padding-left: 0;
  }
  .tm-art__meta {
    gap: 20px;
    margin-top: 24px;
  }
  .tm-art__tag {
    padding: 6px 16px;
  }
  .tm-art .tm-art__title {
    margin-top: 20px !important;
  }
  .tm-art__body {
    margin-top: 24px;
    font-size: 16px;
  }
  .tm-art__body h2 {
    font-size: 24px;
  }
  .tm-art__sticky {
    grid-template-columns: minmax(0, 1fr);
  }
  .tm-art__body .tm-art-cta {
    padding: 22px 18px 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tm-bcard,
  .tm-bcard *,
  .tm-bcard::before,
  .tm-side,
  .tm-side * {
    transition: none !important;
  }
}

/* статья для Дзена — одна колонка */
.tm-art__grid--solo {
  grid-template-columns: minmax(0, 1fr);
  max-width: 1040px;
}
