/* =========================================================
   ОБЩИЕ ПЕРЕМЕННЫЕ СТРАНИЦ
   ========================================================= */

:root {
  --discount-green: #16785f;
  --discount-green-dark: #0d624d;
  --discount-green-light: #effaf6;
  --discount-green-border: #b9e5d8;
  --discount-ad-color: #718078;
  --discount-ad-bg: #f5fbf8;
}

/* =========================================================
   СТРАНИЦЫ СКИДОК
   ========================================================= */

.discounts-hero {
  margin-top: 24px;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(74, 190, 158, 0.18),
      transparent 35%
    ),
    linear-gradient(135deg, #effcf7, #ffffff);
}

.discounts-hero h1 {
  max-width: 800px;
  margin: 10px 0 14px;
}

.discounts-hero p {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.discount-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.discount-categories a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--discount-green-border);
  border-radius: 999px;
  background: var(--discount-green-light);
  color: var(--discount-green);
  font-weight: 700;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.discount-categories a:hover {
  border-color: #8ed5bd;
  background: #dff6ed;
  color: var(--discount-green-dark);
  text-decoration: none;
}

.discounts-list-section {
  margin-top: 30px;
}

.discounts-list-section > h2 {
  margin-bottom: 18px;
}

.discount-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

/* =========================================================
   КАРТОЧКА ТОВАРА
   ========================================================= */

.discount-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.discount-card-image-link {
  display: block;
  overflow: hidden;
  background: #f7f8fb;
}

.discount-card-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  padding: 0;
  transition: transform 0.25s ease;
}

.discount-card:hover .discount-card-image {
  transform: scale(1.04);
}

.discount-card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.discount-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.discount-category {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.discount-badge {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e3f8ef;
  color: #08745e;
  font-size: 12px;
  font-weight: 900;
}

.discount-card-title {
  margin: 15px 0 8px;
  font-size: 21px;
  line-height: 1.2;
}

.discount-card-description {
  flex: 1;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* Рекламная пометка */

.discount-card-advertising {
  margin: 16px 0 0;
  padding: 8px 10px 8px 12px;
  border-left: 3px solid var(--discount-green-border);
  border-radius: 0 8px 8px 0;
  background: var(--discount-ad-bg);
  color: var(--discount-ad-color);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.discount-card-prices {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 18px;
}

.discount-card-prices del {
  color: var(--muted);
  font-size: 14px;
}

.discount-card-prices strong {
  color: var(--primary-dark);
  font-size: 23px;
}

.discount-card-button {
  width: 100%;
  margin-top: 18px;
  text-align: center;
}

/* Состояния без товаров и ошибки */

.discount-empty,
.discount-error {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.discount-empty p,
.discount-error p {
  color: var(--muted);
}

/* Хлебные крошки */

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumbs a {
  color: var(--primary);
}

/* =========================================================
   СТРАНИЦА ИДЕЙ ПОДАРКОВ
   ========================================================= */

.gift-hero {
  position: relative;
  overflow: hidden;
  margin: 42px 0 36px;
  padding: 76px 32px 82px;
  border-radius: 32px;
  color: #fff;
  text-align: center;
  background:
    radial-gradient(
      circle at 15% 20%,
      rgba(255, 255, 255, 0.28),
      transparent 28%
    ),
    radial-gradient(
      circle at 88% 10%,
      rgba(255, 218, 161, 0.42),
      transparent 30%
    ),
    linear-gradient(135deg, #5b3cc4, #8b4bd8 48%, #e86b9a);
  box-shadow: 0 24px 60px rgba(89, 55, 170, 0.22);
}

.gift-hero::before,
.gift-hero::after {
  position: absolute;
  border: 30px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  content: "";
}

.gift-hero::before {
  right: 8%;
  bottom: -85px;
  width: 220px;
  height: 220px;
  border-width: 34px;
}

.gift-hero::after {
  top: -80px;
  left: 8%;
  width: 180px;
  height: 180px;
}

.gift-hero > * {
  position: relative;
  z-index: 1;
}

.gift-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gift-hero h1 {
  margin: 18px 0 16px;
  color: #fff;
  font-size: clamp(38px, 7vw, 74px);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.gift-hero p {
  max-width: 620px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.55;
}

/* Выбор категории подарка */

.gift-choice {
  margin: 0 0 82px;
}

.gift-choice-heading {
  max-width: 680px;
  margin: 0 auto 28px;
  text-align: center;
}

.gift-choice-heading h2 {
  margin: 10px 0 12px;
  color: #171923;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.gift-choice-heading p {
  margin: 0;
  color: #737887;
  font-size: 17px;
  line-height: 1.55;
}

.gift-choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.gift-choice-card {
  position: relative;
  display: flex;
  min-height: 285px;
  overflow: hidden;
  flex-direction: column;
  padding: 25px;
  border: 1px solid transparent;
  border-radius: 26px;
  color: #20222c;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(25, 28, 40, 0.07);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    filter 0.25s ease;
}

.gift-choice-card::before,
.gift-choice-card::after {
  position: absolute;
  content: "";
}

.gift-choice-card::before {
  right: -42px;
  bottom: -58px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
}

.gift-choice-card::after {
  top: 24px;
  right: 28px;
  width: 58px;
  height: 58px;
  border: 8px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
}

.gift-choice-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 42px rgba(25, 28, 40, 0.15);
}

.gift-choice-card-man {
  border-color: #d8e8ff;
  background: linear-gradient(145deg, #eaf4ff, #cfe5ff);
}

.gift-choice-card-woman {
  border-color: #ffd8e7;
  background: linear-gradient(145deg, #fff0f6, #ffd8e8);
}

.gift-choice-card-universal {
  border-color: #ffe3b8;
  background: linear-gradient(145deg, #fff7e9, #ffe5b8);
}

.gift-choice-card-child {
  border-color: #cdeedc;
  background: linear-gradient(145deg, #edfff4, #c9f0d8);
}

.gift-choice-icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  margin-bottom: 30px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 18px rgba(65, 56, 85, 0.08);
  font-size: 37px;
}

.gift-choice-label,
.gift-choice-description,
.gift-choice-link {
  position: relative;
  z-index: 1;
}

.gift-choice-label {
  max-width: 190px;
  color: #20222c;
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.gift-choice-description {
  max-width: 210px;
  margin-top: 12px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.45;
}

.gift-choice-link {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 22px;
  color: #20222c;
  font-size: 14px;
  font-weight: 800;
}

.gift-choice-link span {
  font-size: 20px;
  line-height: 12px;
  transition: transform 0.2s ease;
}

.gift-choice-card:hover .gift-choice-link span {
  transform: translateX(5px);
}

/* Блоки подборок */

.gifts-section {
  scroll-margin-top: 100px;
  margin-bottom: 88px;
}

.section-heading {
  margin-bottom: 25px;
}

.section-heading h2 {
  margin: 8px 0 10px;
  color: #171923;
  font-size: clamp(27px, 4vw, 40px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.section-heading p {
  margin: 0;
  color: #737887;
  font-size: 16px;
  line-height: 1.5;
}

.gifts-grid {
  min-height: 80px;
}

.gifts-section .section-heading {
  position: relative;
  padding-top: 20px;
}

.gifts-section .section-heading::before {
  display: block;
  width: 54px;
  height: 5px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, #8055d8, #ec739e);
  content: "";
}

/* =========================================================
   ТЁМНАЯ ТЕМА
   ========================================================= */

:is(
  html[data-theme="dark"],
  html.dark-theme,
  html.theme-dark,
  body[data-theme="dark"],
  body.dark,
  body.dark-theme
) {
  color: #f8fafc;
}

:is(
  html[data-theme="dark"],
  html.dark-theme,
  html.theme-dark,
  body[data-theme="dark"],
  body.dark,
  body.dark-theme
) .discounts-hero {
  border-color: #315e54;
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(49, 166, 133, 0.22),
      transparent 38%
    ),
    #173d37;
}

:is(
  html[data-theme="dark"],
  html.dark-theme,
  html.theme-dark,
  body[data-theme="dark"],
  body.dark,
  body.dark-theme
) .discounts-hero p {
  color: #afd7ca;
}

:is(
  html[data-theme="dark"],
  html.dark-theme,
  html.theme-dark,
  body[data-theme="dark"],
  body.dark,
  body.dark-theme
) .discount-categories a {
  border-color: #39806b;
  background: #20594b;
  color: #a4eed4;
}

:is(
  html[data-theme="dark"],
  html.dark-theme,
  html.theme-dark,
  body[data-theme="dark"],
  body.dark,
  body.dark-theme
) .discount-card,
:is(
  html[data-theme="dark"],
  html.dark-theme,
  html.theme-dark,
  body[data-theme="dark"],
  body.dark,
  body.dark-theme
) .discount-empty,
:is(
  html[data-theme="dark"],
  html.dark-theme,
  html.theme-dark,
  body[data-theme="dark"],
  body.dark,
  body.dark-theme
) .discount-error {
  border-color: #3b4657;
  background: #202631;
  color: #fff;
}

:is(
  html[data-theme="dark"],
  html.dark-theme,
  html.theme-dark,
  body[data-theme="dark"],
  body.dark,
  body.dark-theme
) :is(
  .discount-card-title,
  .discount-card-prices,
  .discount-card-prices strong,
  .discount-empty h2,
  .discount-empty h3
) {
  color: #fff;
}

:is(
  html[data-theme="dark"],
  html.dark-theme,
  html.theme-dark,
  body[data-theme="dark"],
  body.dark,
  body.dark-theme
) :is(
  .discount-card-description,
  .discount-empty p
) {
  color: #d7dee9;
}

:is(
  html[data-theme="dark"],
  html.dark-theme,
  html.theme-dark,
  body[data-theme="dark"],
  body.dark,
  body.dark-theme
) .discount-category {
  color: #cbd5e1;
}

:is(
  html[data-theme="dark"],
  html.dark-theme,
  html.theme-dark,
  body[data-theme="dark"],
  body.dark,
  body.dark-theme
) .discount-card-prices del {
  color: #aeb8c7;
}

:is(
  html[data-theme="dark"],
  html.dark-theme,
  html.theme-dark,
  body[data-theme="dark"],
  body.dark,
  body.dark-theme
) .discount-card-button {
  border-color: #9278ed;
  background: #7657d9;
  color: #fff;
}

:is(
  html[data-theme="dark"],
  html.dark-theme,
  html.theme-dark,
  body[data-theme="dark"],
  body.dark,
  body.dark-theme
) .discount-card-button:hover {
  background: #8a6bea;
  color: #fff;
}

:is(
  html[data-theme="dark"],
  html.dark-theme,
  html.theme-dark,
  body[data-theme="dark"],
  body.dark,
  body.dark-theme
) .discount-badge {
  background: #d94f79;
  color: #fff;
}

:is(
  html[data-theme="dark"],
  html.dark-theme,
  html.theme-dark,
  body[data-theme="dark"],
  body.dark,
  body.dark-theme
) .discount-card-advertising {
  border-left-color: #4d9d85;
  background: #263b38;
  color: #b4c8c2;
}

/* Заголовки и текст страницы подарков */

:is(
  html[data-theme="dark"],
  html.dark-theme,
  html.theme-dark,
  body[data-theme="dark"],
  body.dark,
  body.dark-theme
) :is(
  .gift-choice-heading h2,
  .section-heading h2
) {
  color: #fff !important;
}

:is(
  html[data-theme="dark"],
  html.dark-theme,
  html.theme-dark,
  body[data-theme="dark"],
  body.dark,
  body.dark-theme
) :is(
  .gift-choice-heading p,
  .section-heading p
) {
  color: #d7dce5 !important;
}

/* Карточки выбора подарков */

:is(
  html[data-theme="dark"],
  html.dark-theme,
  html.theme-dark,
  body[data-theme="dark"],
  body.dark,
  body.dark-theme
) .gift-choice-card {
  color: #fff !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
}

:is(
  html[data-theme="dark"],
  html.dark-theme,
  html.theme-dark,
  body[data-theme="dark"],
  body.dark,
  body.dark-theme
) .gift-choice-card-man {
  border-color: #4775a8 !important;
  background: linear-gradient(145deg, #1d3552, #244c73) !important;
}

:is(
  html[data-theme="dark"],
  html.dark-theme,
  html.theme-dark,
  body[data-theme="dark"],
  body.dark,
  body.dark-theme
) .gift-choice-card-woman {
  border-color: #a35376 !important;
  background: linear-gradient(145deg, #522b40, #743653) !important;
}

:is(
  html[data-theme="dark"],
  html.dark-theme,
  html.theme-dark,
  body[data-theme="dark"],
  body.dark,
  body.dark-theme
) .gift-choice-card-universal {
  border-color: #a27d3e !important;
  background: linear-gradient(145deg, #4d3a1e, #725420) !important;
}

:is(
  html[data-theme="dark"],
  html.dark-theme,
  html.theme-dark,
  body[data-theme="dark"],
  body.dark,
  body.dark-theme
) .gift-choice-card-child {
  border-color: #4b956b !important;
  background: linear-gradient(145deg, #214232, #2c6445) !important;
}

:is(
  html[data-theme="dark"],
  html.dark-theme,
  html.theme-dark,
  body[data-theme="dark"],
  body.dark,
  body.dark-theme
) :is(
  .gift-choice-label,
  .gift-choice-link
) {
  color: #fff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

:is(
  html[data-theme="dark"],
  html.dark-theme,
  html.theme-dark,
  body[data-theme="dark"],
  body.dark,
  body.dark-theme
) .gift-choice-description {
  color: #f1f5f9 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

:is(
  html[data-theme="dark"],
  html.dark-theme,
  html.theme-dark,
  body[data-theme="dark"],
  body.dark,
  body.dark-theme
) .gift-choice-icon {
  color: #fff !important;
  background: rgba(0, 0, 0, 0.22) !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

:is(
  html[data-theme="dark"],
  html.dark-theme,
  html.theme-dark,
  body[data-theme="dark"],
  body.dark,
  body.dark-theme
) .gift-choice-card::before {
  background: rgba(255, 255, 255, 0.08);
}

:is(
  html[data-theme="dark"],
  html.dark-theme,
  html.theme-dark,
  body[data-theme="dark"],
  body.dark,
  body.dark-theme
) .gift-choice-card::after {
  border-color: rgba(255, 255, 255, 0.14);
}

:is(
  html[data-theme="dark"],
  html.dark-theme,
  html.theme-dark,
  body[data-theme="dark"],
  body.dark,
  body.dark-theme
) .gift-choice-card:hover {
  filter: brightness(1.12);
}

/* =========================================================
   АДАПТИВНОСТЬ
   ========================================================= */

@media (max-width: 1050px) {
  .gift-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 850px) {
  .discount-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .gift-hero {
    margin-top: 24px;
    padding: 54px 22px 60px;
    border-radius: 24px;
  }

  .gift-hero h1 {
    font-size: 44px;
  }

  .gift-choice {
    margin-bottom: 58px;
  }

  .gift-choice-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .gift-choice-card {
    min-height: 215px;
    padding: 22px;
  }

  .gift-choice-icon {
    width: 58px;
    height: 58px;
    margin-bottom: 22px;
    border-radius: 18px;
    font-size: 31px;
  }

  .gift-choice-label {
    font-size: 22px;
  }

  .gift-choice-description {
    max-width: 260px;
  }

  .gifts-section {
    margin-bottom: 62px;
  }

  .discounts-hero {
    padding: 28px 20px;
    border-radius: 21px;
  }

  .discounts-hero p {
    font-size: 16px;
  }

  .discount-categories {
    display: grid;
  }

  .discount-categories a {
    justify-content: center;
  }

  .discount-grid {
    grid-template-columns: 1fr;
  }

  .discount-card-content {
    padding: 14px;
  }
}
.discount-card-advertisement {
  position: relative;
  display: block;
  margin-top: auto;
  padding: 9px 10px 9px 26px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.025),
    rgba(0, 0, 0, 0.05)
  );
  color: #858585;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.discount-card-advertisement::before {
  content: "ⓘ";
  position: absolute;
  top: 9px;
  left: 10px;
  color: #999;
  font-size: 12px;
  line-height: 1;
}

