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

.tsm-dc {
  --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-dc *
.tsm-dc *::before
.tsm-dc *::after { box-sizing: border-box; }

.tsm-dc p { margin: 0; }

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

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

.tsm-dc__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-dc__lead {
  max-width: 64ch;
  font-size: 16px;
  line-height: 1.5;
  color: var(--tsm-muted);
}

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

.tsm-dc .tsm-card {
  display: grid;
  gap: 16px;
  clear: both;
  margin-top: clamp(18px, 3vw, 26px);
  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-dc .tsm-card {
    grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
    gap: 22px;
    padding: 18px;
    align-items: start;
  }
}

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

.tsm-dc .tsm-card__pic--pensioner { background-image: url("/images/karti_discont/pensioner.jpg"); }
.tsm-dc .tsm-card__pic--family { background-image: url("/images/karti_discont/sem.jpg"); }
.tsm-dc .tsm-card__pic--favorite { background-image: url("/images/karti_discont/pok.jpg"); }
.tsm-dc .tsm-card__pic--sale { background-image: url("/images/karti_discont/skidki_325x206-min.jpg"); }
.tsm-dc .tsm-card__pic--club { background-image: url("/images/karti_discont/club_325x213-min.jpg"); }

.tsm-dc .tsm-card__body { min-width: 0; }

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

.tsm-dc .tsm-card__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-dc .tsm-card__rate {
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--tsm-brand);
  color: var(--tsm-white);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

.tsm-dc .tsm-card__status {
  padding: 4px 11px 4px 9px;
  border-left: 3px solid #b0a7aa;
  border-radius: 3px 9px 9px 3px;
  background: var(--tsm-paper);
  color: var(--tsm-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.tsm-dc .tsm-card--off {
  border-left-color: #b0a7aa;
  background: var(--tsm-paper);
}

.tsm-dc .tsm-card--off .tsm-card__pic { filter: grayscale(1); opacity: .8; }

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

.tsm-dc .tsm-card__label {
  margin-top: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tsm-accent);
}

/* шаги пронумерованы: порядок здесь важен --------------------------------------------- */

.tsm-dc .tsm-card__steps {
  counter-reset: tsmstep;
  display: grid;
  gap: 7px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

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

.tsm-dc .tsm-card__steps li::before {
  counter-increment: tsmstep;
  content: counter(tsmstep);
  position: absolute;
  left: 0;
  top: .1em;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--tsm-accent-wash);
  color: var(--tsm-accent-deep);
  font-size: 12px;
  font-weight: 700;
}

.tsm-dc .tsm-card__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-dc__rules {
  clear: both;
  margin-top: clamp(24px, 4vw, 34px);
  padding: clamp(18px, 3vw, 24px);
  border-radius: var(--tsm-radius);
  background: var(--tsm-paper);
}

.tsm-dc__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-dc__rules-lead {
  max-width: 70ch;
  margin-bottom: 10px;
  font-size: 14.5px;
  color: var(--tsm-ink);
}

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

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

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

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

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

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

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

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

.tsm-dc h2 { text-transform: none !important; }
.tsm-dc .tsm-card__name { text-transform: none !important; }
.tsm-dc .tsm-dc__subtitle { text-transform: uppercase !important; }

.tsm-dc__eyebrow,
.tsm-dc__lead,
.tsm-dc__note,
.tsm-dc__rules-lead,
.tsm-dc .tsm-card__text,
.tsm-dc .tsm-card__label,
.tsm-dc .tsm-card__note {
  display: block !important;
  float: none !important;
  text-align: left !important;
  text-indent: 0 !important;
}

.tsm-dc .tsm-card { display: grid !important; float: none !important; }
.tsm-dc .tsm-card__head { display: flex !important; }
.tsm-dc .tsm-card__rate
.tsm-dc .tsm-card__status { display: inline-block !important; }

.tsm-dc .tsm-card__steps li,
.tsm-dc .tsm-dc__limits li {
  list-style: none !important;
  background-image: none !important;
  margin: 0 !important;
}

.tsm-dc .tsm-card__steps li { padding-left: 30px !important; }
.tsm-dc .tsm-dc__limits li { padding-left: 24px !important; }

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