/* Волна 13.9 — фон страницы /savings */
body:has(#tab-prices) {
  background-image: url('/static/assets/savings/savings-bg.png');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Чтобы фон был виден — контейнер на savings делаем прозрачным */
body:has(#tab-prices) .container {
  background: transparent;
}

/* Волна 13.8 — расширение .container только когда активен таб «Поиск» */
body:has(#tab-search[style*="block"]) .container {
  max-width: min(1760px, 96vw);
}

/* Волна 13.3 — панель «Поиск» на /savings */
.sv-panel {
  max-width: min(1760px, 96vw);
  margin: 0 auto;
  padding: 24px 0;
}

/* Шапка */
.sv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}
.sv-header__left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.sv-header__cube {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(16,185,129,0.35));
}
.sv-header__title {
  font-family: 'Playfair Display', serif;
  font-size: 34px;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 4px;
  line-height: 1.1;
}
.sv-header__spark {
  color: #34D399;
  font-size: 22px;
}
.sv-header__subtitle {
  margin: 0;
  font-size: 14px;
  color: #6B7280;
}
.sv-header__badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: 16px;
  font-size: 13px;
  color: #065F46;
}
.sv-header__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 4px rgba(16,185,129,0.15);
}
.sv-header__now {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #10B981;
  margin-left: 4px;
}
.sv-header__now-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #10B981;
}

/* Поиск */
.sv-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 20px;
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,0.08);
  box-shadow: 0 8px 24px rgba(16,185,129,0.08);
  margin-bottom: 16px;
}
.sv-search__icon {
  font-size: 16px;
  color: #9CA3AF;
}
.sv-search__input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  padding: 12px 0;
  background: transparent;
  font-family: inherit;
}
.sv-search__input::placeholder { color: #9CA3AF; }
.sv-search__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: #0F172A;
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.sv-search__btn-spark { color: #34D399; }

/* Теги */
.sv-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.sv-tags__label {
  font-size: 13px;
  color: #6B7280;
  margin-right: 4px;
}
.sv-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(15,23,42,0.08);
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  font-family: inherit;
}
.sv-tag__x { color: #9CA3AF; font-size: 14px; }

/* Сетка 3 колонки */
.sv-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

/* Сайдбар категорий */
.sv-sidebar {
  background: #fff;
  border-radius: 20px;
  padding: 18px 16px;
  border: 1px solid rgba(15,23,42,0.06);
  box-shadow: 0 8px 24px rgba(16,185,129,0.06);
}
.sv-sidebar__title {
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 12px;
}
.sv-cats { list-style: none; margin: 0; padding: 0; }
.sv-cat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 12px;
  text-decoration: none;
  color: #374151;
  font-size: 14px;
  transition: background 0.15s;
}
.sv-cat:hover { background: rgba(16,185,129,0.07); }
.sv-cat__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.sv-cat__icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
}
.sv-cat__name { flex: 1; }
.sv-cat__chev { color: #9CA3AF; font-size: 18px; }

.sv-sidebar__divider {
  height: 1px;
  background: rgba(15,23,42,0.08);
  margin: 14px 4px;
}
.sv-sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 12px;
  text-decoration: none;
  color: #374151;
  font-size: 14px;
}
.sv-sidebar__link:hover { background: rgba(16,185,129,0.07); }
.sv-sidebar__link-icon { font-size: 16px; color: #10B981; }

/* Заглушки — пока пустые, но не сжимаются в ноль */
.sv-main { min-height: 40px; }
.sv-premium { min-height: 40px; }
.sv-exclusive { margin-top: 28px; }

/* Мобильный */
@media (max-width: 1100px) {
  .sv-grid { grid-template-columns: 220px minmax(0, 1fr); }
  .sv-premium { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .sv-grid { grid-template-columns: 1fr; }
  .sv-header { flex-direction: column; align-items: flex-start; }
  .sv-header__title { font-size: 26px; }
  .sv-header__cube { width: 56px; height: 56px; }
  .sv-search { flex-direction: column; align-items: stretch; padding: 12px; gap: 8px; }
  .sv-search__btn { justify-content: center; }
}


/* Волна 13.4 — Топ выгод сегодня */
.sv-top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.sv-top-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 22px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
}
.sv-top-title__spark { color: #10B981; }
.sv-top-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #6B7280;
}
.sv-top-status__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 4px rgba(16,185,129,0.15);
}

.sv-top-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 28px;
}

.sv-top-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(15,23,42,0.06);
  border-radius: 18px;
  padding: 12px;
  box-shadow: 0 8px 24px rgba(16,185,129,0.08);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.sv-top-card:hover {
  box-shadow: 0 12px 32px rgba(16,185,129,0.16);
  transform: translateY(-2px);
}

/* Медиа-зона: заглушка + бейдж маркетплейса + сердечко + бейдж промо */
.sv-top-card__media {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
  aspect-ratio: 1 / 1;
}
.sv-top-card__img-ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sv-top-card__img-ph-icon {
  font-size: 42px;
  color: #9CA3AF;
  opacity: 0.6;
}
.sv-top-card__mp {
  position: absolute;
  top: 10px; left: 10px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.95);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #0F172A;
  text-transform: uppercase;
}
.sv-top-card__fav {
  position: absolute;
  top: 8px; right: 8px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.9);
  color: #6B7280;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
}
.sv-top-card__fav:hover { color: #E11D48; background: #fff; }

.sv-top-card__promo {
  position: absolute;
  left: 10px; bottom: 10px;
  padding: 4px 10px;
  background: rgba(16,185,129,0.14);
  color: #065F46;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.sv-top-card__name {
  font-size: 13px;
  font-weight: 500;
  color: #0F172A;
  margin: 0 0 10px;
  line-height: 1.35;
  min-height: 2.7em;
}
.sv-top-card__prices { margin-bottom: 12px; }
.sv-top-card__old {
  font-size: 13px;
  color: #9CA3AF;
  text-decoration: line-through;
  display: block;
  margin-bottom: 4px;
}
.sv-top-card__row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sv-top-card__price {
  font-size: 17px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.1;
}
.sv-top-card__savings-badge {
  display: inline-flex;
  padding: 4px 10px;
  background: rgba(16,185,129,0.14);
  color: #065F46;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.sv-top-card__cart {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  background: #0F172A;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  margin-top: auto;
}
.sv-top-card__cart:hover { background: #1F2937; }
.sv-top-card__cart-icon { font-size: 15px; }

/* Мобильный */
@media (max-width: 900px) {
  .sv-top-grid { grid-template-columns: 1fr; }
  .sv-top-header { flex-direction: column; align-items: flex-start; }
}


/* Волна 13.5 — Эксклюзивные промокоды */
.sv-exclusive { margin-top: 32px; }

.sv-exc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.sv-exc-header__left { min-width: 0; }
.sv-exc-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  color: #0F172A;
}
.sv-exc-title__badge {
  display: inline-flex;
  width: 26px; height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(16,185,129,0.14);
  color: #10B981;
  font-size: 13px;
}
.sv-exc-subtitle {
  margin: 0;
  font-size: 13px;
  color: #6B7280;
}
.sv-exc-header__right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.sv-exc-timer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #0F172A;
}
.sv-exc-timer__icon { color: #10B981; font-size: 14px; }

.sv-exc-arrow {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(15,23,42,0.08);
  cursor: pointer;
  font-size: 20px;
  color: #0F172A;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: background 0.15s;
}
.sv-exc-arrow:hover { background: rgba(16,185,129,0.08); }

.sv-exc-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 8px;
  scrollbar-width: thin;
}
.sv-exc-track::-webkit-scrollbar { height: 6px; }
.sv-exc-track::-webkit-scrollbar-thumb {
  background: rgba(15,23,42,0.12);
  border-radius: 999px;
}

.sv-exc-card {
  flex: 0 0 280px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(15,23,42,0.06);
  border-radius: 18px;
  padding: 12px;
  box-shadow: 0 8px 24px rgba(16,185,129,0.08);
  transition: box-shadow 0.2s;
}
.sv-exc-card:hover { box-shadow: 0 12px 32px rgba(16,185,129,0.16); }

.sv-exc-card__media {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
  aspect-ratio: 1 / 1;
}
.sv-exc-card__img-ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; color: #9CA3AF; opacity: 0.6;
}
.sv-exc-card__mp {
  position: absolute; top: 8px; left: 8px;
  padding: 4px 8px;
  background: rgba(255,255,255,0.95);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  max-width: 110px;
  height: 22px;
}
.sv-exc-card__mp-logo {
  height: 12px; width: auto;
  max-width: 100%;
  object-fit: contain;
}
.sv-exc-card__mp-text {
  font-size: 10px; font-weight: 700; color: #0F172A;
  letter-spacing: 0.03em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sv-exc-card__fav {
  position: absolute; top: 6px; right: 6px;
  width: 28px; height: 28px;
  border-radius: 50%; border: none;
  background: rgba(255,255,255,0.9);
  color: #6B7280; font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.sv-exc-card__fav:hover { color: #E11D48; background: #fff; }
.sv-exc-card__badge {
  position: absolute;
  left: 8px; bottom: 8px;
  padding: 3px 10px;
  background: rgba(16,185,129,0.16);
  color: #065F46;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

.sv-exc-card__bonus {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  font-size: 11px;
  color: #10B981;
  font-weight: 600;
}
.sv-exc-card__bonus-icon { font-size: 12px; }

.sv-exc-card__name {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 500;
  color: #0F172A;
  line-height: 1.35;
  min-height: 2.7em;
}
.sv-exc-card__old {
  font-size: 12px;
  color: #9CA3AF;
  text-decoration: line-through;
  display: block;
  margin-bottom: 4px;
}
.sv-exc-card__row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.sv-exc-card__price {
  font-size: 17px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.1;
}
.sv-exc-card__savings {
  padding: 3px 8px;
  background: rgba(16,185,129,0.14);
  color: #065F46;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
}

.sv-exc-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}
.sv-exc-card__cart {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 14px;
  background: #0F172A;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  min-width: 0;
}
.sv-exc-card__cart:hover { background: #1F2937; }

.sv-exc-card__copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 12px;
  background: rgba(16,185,129,0.14);
  color: #065F46;
  border: none;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Мобильный */
@media (max-width: 900px) {
  .sv-exc-header { flex-direction: column; align-items: flex-start; }
  .sv-exc-header__right { flex-wrap: wrap; }
  .sv-exc-card { flex: 0 0 200px; }
}


/* Волна 13.6 — Premium-блок Уменьшато (правый сайдбар) */
.sv-premium { position: sticky; top: 20px; }

.sv-prem-card {
  position: relative;
  background: linear-gradient(160deg, rgba(236,253,245,0.85) 0%, 
                                       rgba(255,255,255,0.95) 55%, 
                                       rgba(219,234,254,0.5) 100%);
  border: 1px solid rgba(16,185,129,0.18);
  border-radius: 22px;
  padding: 20px 18px 18px;
  box-shadow: 0 12px 32px rgba(16,185,129,0.10);
  overflow: hidden;
}
.sv-prem-card::before {
  content: "";
  position: absolute;
  right: -30px; top: -30px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(52,211,153,0.20) 0%, 
                                        rgba(52,211,153,0) 70%);
  pointer-events: none;
}

.sv-prem-card__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #0F172A;
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 14px;
}
.sv-prem-card__tag-crown { color: #FCD34D; }

.sv-prem-card__cube {
  position: absolute;
  right: 4px; top: 42px;
  width: 96px;
  height: 96px;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(16,185,129,0.35));
  pointer-events: none;
}

.sv-prem-card__title {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 4px;
  line-height: 1.1;
}
.sv-prem-card__subtitle {
  font-size: 13px;
  color: #6B7280;
  margin: 0 0 18px;
  max-width: 200px;
  line-height: 1.35;
}

.sv-prem-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sv-prem-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(16,185,129,0.10);
  border-radius: 12px;
}
.sv-prem-item__icon {
  flex-shrink: 0;
  width: 30px; height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(16,185,129,0.12);
  color: #10B981;
}
.sv-prem-item__text {
  font-size: 12.5px;
  color: #0F172A;
  line-height: 1.3;
}

.sv-prem-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: #fff;
  color: #10B981;
  border: 1px solid rgba(16,185,129,0.35);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: default;
}
.sv-prem-cta:disabled { opacity: 1; }
.sv-prem-cta__check {
  display: inline-flex;
  width: 18px; height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #10B981;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.sv-prem-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 0;
  font-size: 11px;
  color: #6B7280;
  justify-content: center;
  width: 100%;
}
.sv-prem-note__icon { color: #10B981; }

/* Мобильный */
@media (max-width: 1100px) {
  .sv-premium { position: static; }
  .sv-prem-card__cube { width: 76px; height: 76px; top: 36px; right: 4px; }
}

/* Волна 13.9 — блок «Эксклюзивные промокоды» скрыт по запросу Team Lead.
   HTML и JS оставлены как есть, чтобы легко вернуть блок обратно, если
   понадобится. */
#svExclusive { display: none !important; }
