/* категория (чип под ником) */
.category-chip {
  margin-top: 6px;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: #e6f9f3;
  font-size: 12px;
  color: #717171;
  font-weight: 500;
  max-width: fit-content;
  position: relative;
  border: none;
}
.category-chip::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
  background: #6b7280;
}

/* бейджи "Канал" / "RU" как в каталоге */
.badges {
  display: flex;
  align-items: center;
  gap: 6px;
}
.badge {
  background: #20DD9D;
  color: #ffffff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 10px;
  line-height: 1;
}

/* общая обёртка страницы */
.resource-page {
  max-width: 1600px;
  margin: 0 auto;
  padding: 32px 16px;
}

/* хлебная крошка */
.breadcrumb {
  font-size: 13px;
  color: #9ca3af;
  margin-top: 0;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 0;
}
.breadcrumb a {
  color: #111827;
  text-decoration: none;
  transition: color 0.2s ease;
}
.breadcrumb a:hover {
  color: #000000;
}
.breadcrumb-sep {
  color: #d1d5db;
  margin: 0 8px;
}
.breadcrumb-current {
  color: #20dd9d;
  font-weight: 500;
}

.resource-card {
  display: grid;
  grid-template-columns: 2.5fr 1fr;
  gap: 24px;
  align-items: start;
}

/* левая часть */
.left {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}
.left-layout {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  align-items: flex-start;
}

/* аватар + теги */
.left-avatar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.left-avatar img {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
}

.resource-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.resource-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 999px;
  background: #f3f4f6;
}
.resource-tag img {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  object-fit: cover;
}

/* правая колонка внутри left */
.left-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* заголовок + бейджи */
.title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.left-main h2 {
  margin: 0;
  font-size: 20px;
}

/* ник */
.tg-link {
  margin-top: 4px;
  color: #1DDD9D;
  font-size: 14px;
}
.tg-link a {
  color: #1DDD9D;
  text-decoration: none;
}
.tg-link a:hover { text-decoration: underline; }

/* описание и ограничения (ПК как было) */
.description {
  margin-top: 20px;
  background: #f9fafb;
  padding: 16px;
  border-radius: 12px;
  font-size: 14px;
  color: #374151;
}
.restrictions {
  margin-top: 16px;
  background: #fee2e2;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #fecaca;
  font-size: 13px;
  color: #b91c1c;
}

/* правая часть */
.right {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  align-self: start;
  position: sticky;
  top: 16px;
  margin-top: -1px;
}

/* статистика */
.stats-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .06);
  overflow: hidden;
  position: relative;
}
.stats-card .row {
  display: grid;
  text-align: center;
  font-size: 13px;
  color: #9ca3af;
}
.stats-card .row.top { 
  grid-template-columns: 1fr 1fr; 
}
.stats-card .row.bottom { grid-template-columns: repeat(3, 1fr); }

.stats-card .row.top .cell,
.stats-card .row.bottom .cell {
  padding: 16px 12px;
}
.stats-card .row.top .cell:not(:last-child),
.stats-card .row.bottom .cell:not(:last-child) {
  border-right: 1px solid #f1f3f8;
}
.stats-card .row.top .cell {
  border-bottom: 1px solid #f1f3f8;
}

.stats-card .cell.gender {
  display: flex;
  align-items: center;
  justify-content: center;
}

.stats-card .label { 
  font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 12px; 
  color: #9ca3af;
  font-weight: 400;
  line-height: 1.45;
}
.stats-card .value {
  font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  line-height: 1.45;
}
.stats-card .value.dual { 
  font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 12px; 
  font-weight: 700;
  line-height: 1.45;
}
.stats-card .blue { color: #0ea5e9; }
.stats-card .pink { color: #ec4899; }
.stats-card .gray { color: #9ca3af; }

/* размещение рекламы */
.action-card {
  background: #fff;
  border-radius: 16px;
  padding: 18px 20px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
  overflow: hidden;
  position: relative;
}
.action-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.action-card .field-label {
  font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 12px;
  color: #9ca3af;
  font-weight: 400;
  margin-bottom: 4px;
  line-height: 1.45;
}
.action-card .field-control select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  font-size: 16px;
  background-color: #ffffff;
  outline: none;
}
.action-bottom {
  display: grid;
  grid-template-columns: auto 52px 145px;
  align-items: center;
  gap: 8px;
}
.price { 
  display: flex; 
  align-items: baseline; 
  margin-left: 12px; 
}
.price-main { 
  font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 26px; 
  font-weight: 700;
  line-height: 1.2;
}
.price-currency { 
  font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  margin-left: 2px; 
  font-size: 20px; 
  font-weight: 700;
  line-height: 1.2;
}

/* избранное (сердце) */
.fav-btn{
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0;
}
.heart-icon{
  width: 18px;
  height: 18px;
  background-color: #E11D48;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  position: absolute;
  inset: 0;
  margin: auto;
  display: block;
  transition: opacity .2s ease;
}
.heart-outline { -webkit-mask-image: url("/static/img/heart.4f6de9f50bca.svg"); mask-image: url("/static/img/heart.4f6de9f50bca.svg"); opacity: 1; }
.heart-filled  { -webkit-mask-image: url("/static/img/heart-filled.84a7f98bfbdb.svg"); mask-image: url("/static/img/heart-filled.84a7f98bfbdb.svg"); opacity: 0; }
.fav-btn.active .heart-outline { opacity: 0; }
.fav-btn.active .heart-filled  { opacity: 1; }

/* кнопка */
.btns { display: flex; align-items: center; justify-content: flex-end; }
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  gap: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  width: 100%;
}
.btn-accent {
  background: linear-gradient(90deg,#1DDD9D,#34d399);
  border-color: #1DDD9D;
  color: #fff;
}
.btn-ico-wrap { position: relative; width: 22px; height: 22px; flex-shrink: 0; display: inline-block; }
.btn-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity .2s ease, filter .2s ease;
  filter: brightness(0) invert(1);
}
.cart-icon { opacity: 1; }
.done-icon { opacity: 0; }
.js-cart-btn.is-in-cart .cart-icon { opacity: 0; }
.js-cart-btn.is-in-cart .done-icon { opacity: 1; }
.btn-text { overflow: hidden; text-overflow: ellipsis; }

.rating-row {
  font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  margin-top: 6px;
  font-size: 11px;
  color: #9ca3af;
  font-weight: 400;
  text-align: right;
  line-height: 1.45;
}
.rating-text { white-space: nowrap; }

/* --- аналитика ресурса: графики + лента --- */
.resource-analytics { margin-top: 32px; }
.ra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}
.ra-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .04);
  padding: 18px 20px;
}
.ra-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
}
.ra-chart {
  height: 200px;
  border-radius: 16px;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ra-chart svg,
.ra-line { width: 100%; height: 100%; }

/* лента постов */
.ra-feed-title { margin: 0 0 16px; font-size: 20px; font-weight: 600; }
.ra-feed {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.ra-post-card {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, .05);
  padding: 16px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ra-post-head { display: flex; gap: 10px; align-items: center; }
.ra-post-avatar { width: 36px; height: 36px; border-radius: 999px; overflow: hidden; flex-shrink: 0; }
.ra-post-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ra-post-meta { display: flex; flex-direction: column; }
.ra-post-name { font-size: 14px; font-weight: 600; }
.ra-post-label { font-size: 11px; color: var(--muted); }
.ra-post-body p {
  margin: 0;
  font-size: 13px;
  color: #374151;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ra-post-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.ra-post-more {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #1DDD9D;
  color: #1DDD9D;
  text-decoration: none;
  white-space: nowrap;
}
.ra-post-more--disabled { opacity: 0.6; border-style: dashed; }
.ra-post-submeta { font-size: 11px; color: var(--muted); display: flex; gap: 4px; white-space: nowrap; }
.ra-feed-empty { font-size: 14px; color: var(--muted); }
.ra-post-media {
  margin-top: 10px;
  border-radius: 14px;
  background: #f3f4f6;
  height: 120px;
  position: relative;
  overflow: hidden;
}
.ra-post-media--has { background: #eef2ff; cursor: pointer; }
.ra-post-media--empty { opacity: 0.6; }
.ra-post-media a { position: absolute; inset: 0; display: block; }

/* Рекомендованные ресурсы */
.recommended-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.recommended-card {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, .05);
  padding: 16px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.recommended-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .1);
}

.rec-link-header {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: opacity 0.2s ease;
}

.rec-link-header:hover .rec-title {
  color: #1DDD9D;
}

.rec-header {
  display: flex;
  gap: 12px;
  align-items: center;
}

.rec-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

.rec-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rec-info {
  flex: 1;
  min-width: 0;
}

.rec-title {
  font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  line-height: 1.4;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rec-username {
  font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 12px;
  color: #1DDD9D;
  line-height: 1.3;
}

.rec-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px 0;
  margin: 12px 0;
  border-top: 1px solid #f1f3f8;
  border-bottom: 1px solid #f1f3f8;
}

.rec-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rec-stat-label {
  font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 11px;
  color: #9ca3af;
  font-weight: 400;
  line-height: 1.3;
}

.rec-stat-value {
  font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 13px;
  color: #6b7280;
  font-weight: 600;
  line-height: 1.3;
}

.rec-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 0;
}

.rec-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex: 1;
}

.rec-price-value {
  font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
}

.rec-price-currency {
  font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #6b7280;
  line-height: 1.2;
}

.rec-cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(90deg, #1DDD9D, #34d399);
  border: 1px solid #1DDD9D;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.rec-cart-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(29, 221, 157, 0.3);
}

.rec-btn-ico-wrap {
  position: relative;
  width: 18px;
  height: 18px;
  display: inline-block;
}

.rec-btn-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.2s ease;
  filter: brightness(0) invert(1);
}

.rec-cart-icon {
  opacity: 1;
}

.rec-done-icon {
  opacity: 0;
}

.rec-cart-btn.is-in-cart .rec-cart-icon {
  opacity: 0;
}

.rec-cart-btn.is-in-cart .rec-done-icon {
  opacity: 1;
}

.rec-cart-btn.is-in-cart {
  background: #20DD9D;
  border-color: #20DD9D;
}

/* чтобы контент не перекрывался плашкой */
.layout { padding-bottom: 96px; }

/* Плашка предпросмотра корзины */
.cart-preview-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 16px;
  width: 100%;
  max-width: 1200px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  z-index: 50;
}

/* ===== Cart preview inner ===== */
.cart-preview-main { display: flex; align-items: center; }
.cart-stats { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.cart-stat { font-size: 14px; }
.cart-stat + .cart-stat { padding-left: 24px; border-left: 1px solid #eef1f5; }
.cart-label { display: block; margin-bottom: 2px; color: #9ca3af; }
.cart-value { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: #111827; }
.cart-currency { opacity: 0.8; }
.cart-actions { display: flex; align-items: center; gap: 10px; }

.btn-primary { background: #23da9b; border-color: #23da9b; color: #ffffff; }
.btn-primary:hover { background: #1bc18a; border-color: #1bc18a; }

.btn-ghost { background: #ffffff; border-color: #fecaca; color: #ef4444; }
.btn-ghost:hover { background: #fef2f2; }

.cart-shortfall { color: #dc2626; }
.cart-shortfall.is-hidden { display: none; }
.cart-value-alert { display: inline-flex; align-items: center; gap: 4px; }

.cart-alert {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ef4444;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  border: 1px solid #dc2626;
}
.cart-preview-bar.is-hidden { display: none; }

/* убрать подчёркивание у текста в кнопке */
.btn,
.btn:link,
.btn:visited,
.btn:hover,
.btn:active { text-decoration: none; }
.btn .btn-text { text-decoration: none; }

/* ===================== DESC SPOILER: ПК без изменений ===================== */
/* На ПК хедер скрыт, тело видно */
.desc-spoiler__head { display: none; }
.desc-spoiler__body { display: block; }

/* ===================== MOBILE ONLY ===================== */
@media (max-width: 992px){
  .ra-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px){

  .resource-card { grid-template-columns: 1fr; }
  .left { padding: 16px; border-radius: 16px; }

  /* GRID */
  .left-layout{
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    column-gap: 14px;
    row-gap: 8px;
    align-items: start;
    justify-items: start;
  }

  /* ЛЕВАЯ КОЛОНКА: фиксируем, чтобы не растягивала сетку вниз */
  .left-avatar{
    grid-column: 1;
    grid-row: 1 / span 4;      /* держим слева "столбиком" */
    align-self: start;
  }
  .left-avatar img { width: 84px; height: 84px; border-radius: 12px; }

  .resource-tags { gap: 6px; margin-top: 8px; }
  .resource-tag { padding: 4px 6px; border-radius: 10px; }
  .resource-tag img { width: 16px; height: 16px; display: block; }

  /* КЛЮЧ: даём растяжение на 1/-1 через grid, но управляем строками */
  .left-main{ display: contents; }

  /* ПРАВАЯ КОЛОНКА: закрепляем строки, чтобы ссылка/категория не уезжали вниз */
  .left-main .title-row{
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    text-align: left;
  }

  .left-main .tg-link{
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    margin-top: 2px;
    margin-bottom: 2px;
    line-height: 1.2;
    text-align: left;
  }

  .left-main .category-chip{
    grid-column: 2;
    grid-row: 3;
    margin-top: 2px;
    max-width: fit-content;
  }

  .title-row{
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0;
  }

  .left-main h2{
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
  }

  /* если где-то остался старый .description вне спойлера — прячем */
  .left-main > .description{ display: none !important; }

  /* ОПИСАНИЕ + ОГРАНИЧЕНИЯ: во всю ширину */
  .left-main .desc-spoiler,
  .left-main .restrictions{
    grid-column: 1 / -1;
    width: 100%;
    justify-self: stretch;
    min-width: 0;
  }

  /* ===== СПОЙЛЕР ===== */
  .left-main .desc-spoiler{
    margin-top: 12px;
    background: #f9fafb;
    border-radius: 12px;
    padding: 12px;
  }

  .desc-spoiler__head{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    cursor: pointer;
  }

  .desc-spoiler__preview{
    font-weight: 600;
    font-size: 13px;
    color: #9ca3af;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .desc-spoiler__chev{
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: #9ca3af;
    padding: 0;
    line-height: 1;
    transition: transform .16s ease;
  }

  .desc-spoiler__body{
    display: block;
    margin-top: 10px;
    width: 100%;
    min-width: 0;
  }

  .desc-spoiler__body .description{
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    font-size: 14px;
    color: #374151;

    /* 1 строка по умолчанию */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
  }

  .desc-spoiler.is-open .desc-spoiler__body .description{
    -webkit-line-clamp: unset;
    display: block;
    overflow: visible;
  }
  .desc-spoiler.is-open .desc-spoiler__chev{ transform: rotate(180deg); }

  /* ОГРАНИЧЕНИЯ */
  .left-main .restrictions{
    margin-top: 12px;
    padding: 12px 14px;
  }

  /* прочее (как было) */
  .stats-card{ border-radius: 16px; }
  .stats-card .row.top{ grid-template-columns: 1fr 1fr; }
  .stats-card .row.bottom{ grid-template-columns: repeat(3, 1fr); }
  .stats-card .row.top .cell,
  .stats-card .row.bottom .cell{ padding: 10px 8px; }
  .stats-card .label{ font-size: 12px; }
  .stats-card .value{ font-size: 13px; margin-top: 2px; }

  .action-card{ padding: 14px; border-radius: 16px; }
  .action-header{ grid-template-columns: 1fr; gap: 10px; }
  .action-card .field-control select{ font-size: 15px; }

  .action-card .action-bottom{
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "price fav"
      "btn   btn";
    gap: 10px 12px;
    align-items: center;
  }
  .action-card .price{ grid-area: price; }
  .action-card .fav-btn{ grid-area: fav; justify-self: end; margin: 0; }
  .action-card .btns{ grid-area: btn; justify-content: stretch; }
  .action-card .btns .btn{ width: 100%; }

  .action-card .rating-row{
    text-align: center;
    margin-top: 10px;
  }

  .cart-preview-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px 16px;
    max-width: calc(100% - 24px);
  }
  .cart-actions { width: 100%; justify-content: space-between; }
  .cart-actions .btn { flex: 1 1 auto; }
  .cart-stat + .cart-stat { border-left: none; padding-left: 0; }
  .restrictions {
    font-size: 12px;
  }
  .description {
    font-size: 12px !important;
  }
  
  /* Рекомендованные ресурсы на мобильных */
  .recommended-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .recommended-card {
    padding: 14px 16px 12px;
  }
  
  .rec-avatar {
    width: 44px;
    height: 44px;
  }
  
  .rec-title {
    font-size: 13px;
  }
  
  .rec-username {
    font-size: 11px;
  }
  
  .rec-price-value {
    font-size: 18px;
  }
  
  .rec-price-currency {
    font-size: 14px;
  }
  
  .rec-cart-btn {
    width: 34px;
    height: 34px;
  }
  
  .rec-btn-ico-wrap {
    width: 16px;
    height: 16px;
  }
}

/* Блок статистики внутри action-card */
.action-card .stats-card {
  margin-top: 0;
}

.stats-section {
  padding: 8px 0 12px 0;
}

.stats-section + .stats-section {
  border-top: 1px solid #e5e7eb;
}

.stats-header {
  font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 8px;
  line-height: 1.45;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-label {
  font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #9ca3af;
  line-height: 1.45;
}

.stat-value {
  font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  display: flex;
  align-items: baseline;
  gap: 2px;
  line-height: 1.45;
  margin-top: 4px;
}

.stat-positive {
  color: #20DD9D;
}

.stat-negative {
  color: #ef4444;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
  
  .stat-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}
/* избранное на рекомендованных ресурсах */
.rec-fav-btn{
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0;
}
.rec-fav-btn .heart-icon{
  width: 18px;
  height: 18px;
  background-color: #E11D48;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  position: absolute;
  inset: 0;
  margin: auto;
  display: block;
  transition: opacity .2s ease;
}
.rec-fav-btn .heart-outline { -webkit-mask-image: url("/static/img/heart.4f6de9f50bca.svg"); mask-image: url("/static/img/heart.4f6de9f50bca.svg"); opacity: 1; }
.rec-fav-btn .heart-filled  { -webkit-mask-image: url("/static/img/heart-filled.84a7f98bfbdb.svg"); mask-image: url("/static/img/heart-filled.84a7f98bfbdb.svg"); opacity: 0; }
.rec-fav-btn.active .heart-outline { opacity: 0; }
.rec-fav-btn.active .heart-filled  { opacity: 1; }