/* ==========================================================================
   ОАО «Универмаг «Центральный» — бонусные карты
   Файл: templates/section/css/bonus.css
   Файл самодостаточный: свои переменные, зависимостей от других файлов нет.
   ========================================================================== */

.tsm-bc {
  --tsm-brand: #57071a;
  --tsm-brand-deep: #3d0413;
  --tsm-accent: #b94a24;
  --tsm-accent-deep: #96381a;
  --tsm-accent-wash: rgba(185, 74, 36, .09);
  --tsm-ink: #201a1c;
  --tsm-muted: #6f6469;
  --tsm-line: #e7e1e2;
  --tsm-paper: #f6f4f5;
  --tsm-white: #fff;

  --tsm-radius: 14px;

  color: var(--tsm-ink);
  font-size: 15px;
  line-height: 1.5;
}

.tsm-bc *,
.tsm-bc *::before,
.tsm-bc *::after { box-sizing: border-box; }

.tsm-bc p { margin: 0; }

/* --- вступление ------------------------------------------------------------------ */

.tsm-bc__eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--tsm-accent);
}

.tsm-bc__title {
  margin: 0 0 10px;
  font-family: inherit;
  font-size: clamp(22px, 1.25rem + 1vw, 30px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--tsm-ink);
}

.tsm-bc__lead {
  max-width: 64ch;
  font-size: 16px;
  line-height: 1.5;
  color: var(--tsm-muted);
}

/* --- карточка ------------------------------------------------------------------------ */

.tsm-bc__card {
  display: grid;
  gap: 16px;
  clear: both;
  margin-top: clamp(16px, 2.5vw, 22px);
  padding: 16px;
  border: 1px solid var(--tsm-line);
  border-left: 3px solid var(--tsm-accent);
  border-radius: 3px var(--tsm-radius) var(--tsm-radius) 3px;
  background: var(--tsm-white);
}

@media (min-width: 720px) {
  .tsm-bc__card {
    grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
    gap: 22px;
    padding: 18px;
    align-items: start;
  }
}

/* Изображения карт заданы фоном, а не тегом <img>: текстовые фильтры Joomla
   вырезают <img> из статьи, а до CSS они не дотягиваются. */
.tsm-bc__pic {
  aspect-ratio: 325 / 206;
  border-radius: 10px;
  background-color: var(--tsm-paper);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.tsm-bc__pic--barhat   { background-image: url("/images/karti_bonus/barhat.jpg"); }
.tsm-bc__pic--kashalot { background-image: url("/images/karti_bonus/kashalot.jpg"); }
.tsm-bc__pic--halva    { background-image: url("/images/karti_bonus/halva_plus.jpg"); }

.tsm-bc__body { min-width: 0; }

.tsm-bc__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.tsm-bc__name {
  margin: 0;
  font-family: inherit;
  font-size: clamp(18px, 1.05rem + .4vw, 21px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--tsm-ink);
}

/* размер возврата — главный ориентир при выборе карты */
.tsm-bc__value {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--tsm-brand);
  color: var(--tsm-white);
  font-size: 13.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tsm-bc__bank {
  margin-bottom: 10px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--tsm-accent-deep);
}

.tsm-bc__text {
  max-width: 72ch;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--tsm-muted);
}

.tsm-bc__note {
  max-width: 72ch;
  margin-top: 12px;
  padding-left: 12px;
  border-left: 2px solid var(--tsm-line);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--tsm-muted);
}

/* --- работает ли карта на акционный товар ------------------------------------------- */

.tsm-bc__flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 5px 12px 5px 9px;
  border-left: 3px solid currentColor;
  border-radius: 3px 9px 9px 3px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
}

.tsm-bc__flag--yes {
  background: rgba(31, 122, 77, .08);
  color: #1f7a4d;
}

.tsm-bc__flag--no {
  background: var(--tsm-paper);
  color: var(--tsm-muted);
}

/* --- что нужно знать -------------------------------------------------------------------- */

.tsm-bc__rules {
  clear: both;
  margin-top: clamp(24px, 4vw, 34px);
  padding: clamp(18px, 3vw, 24px);
  border-radius: var(--tsm-radius);
  background: var(--tsm-paper);
}

.tsm-bc__subtitle {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--tsm-line);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--tsm-muted);
}

.tsm-bc__limits {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tsm-bc__limits li {
  position: relative;
  padding-left: 24px;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--tsm-muted);
}

.tsm-bc__limits li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .62em;
  width: 11px;
  height: 2px;
  border-radius: 1px;
  background: var(--tsm-accent);
}

@media (max-width: 480px) {
  .tsm-bc__card { padding: 14px; }
}

@media print {
  .tsm-bc__card { break-inside: avoid; }
}

/* ==========================================================================
   ЗАЩИТА ОТ СТИЛЕЙ ШАБЛОНА
   style.css и os_pages.css бьют по #contentBox и .item-page, их специфичность
   выше наших классов. Блок должен оставаться последним в файле.
   ========================================================================== */

.tsm-bc h2, .tsm-bc h3 {
  display: block !important;
  float: none !important;
  padding-left: 0 !important;
  background: none !important;
  text-align: left !important;
}

.tsm-bc h2 { text-transform: none !important; }
.tsm-bc .tsm-bc__name { text-transform: none !important; }
.tsm-bc .tsm-bc__subtitle { text-transform: uppercase !important; }

.tsm-bc__eyebrow,
.tsm-bc__lead,
.tsm-bc__bank,
.tsm-bc__text,
.tsm-bc__note,
.tsm-bc__alert-title,
.tsm-bc__alert-text {
  display: block !important;
  float: none !important;
  text-align: left !important;
  text-indent: 0 !important;
}

.tsm-bc .tsm-bc__card { display: grid !important; float: none !important; }
.tsm-bc .tsm-bc__head { display: flex !important; }
.tsm-bc .tsm-bc__value { display: inline-block !important; }
.tsm-bc .tsm-bc__flag { display: inline-flex !important; float: none !important; }

.tsm-bc .tsm-bc__limits li {
  list-style: none !important;
  background-image: none !important;
  margin: 0 !important;
}

.tsm-bc .tsm-bc__limits li { padding-left: 24px !important; }

.tsm-bc .tsm-bc__pic {
  display: block !important;
  float: none !important;
  width: 100% !important;
  min-height: 120px;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
