/* ==== COST SECTION ==== */
.cost-section {
    background: #A3D2F4;
    padding: 60px 0;
}

.cost-intro p {
    max-width: 925px;
}

/* обёртка для двух режимов (desktop + mobile) */
.cost-nav-wrapper {
    position: relative;
}

/* ==== ДЕСКТОПНЫЙ ФИЛЬТР ==== */
.cost-nav-buttons {
    margin: 40px 0;
}

.cost-nav-buttons .btn {
    display: inline-block;
    padding: 13.5px 40px;
    margin: 0 8px 8px;
    background: #0787E3;
    color: #FFF;
    text-decoration: none;
    border-radius: 999px;
    transition: background .3s;
    min-width: 160px;
    text-align: center;
}

.cost-nav-buttons .btn--light {
    background: #D6EDFF;
    color: #000;
}

.cost-nav-buttons .btn--light:hover {
    background: #FCFCFC;
}

/* ==== МОБИЛЬНЫЙ СЕЛЕКТ ==== */
.cost-nav-select {
    display: none;              /* включается только на mobile */
    margin: 40px 0;
    position: relative;
    max-width: 100%;
}

.cost-select-toggle {
    width: 100%;
    padding: 15px 20px;
    background: #D6EDFF;
    border-radius: 20px;
    text-align: left;
    line-height: 1;
    color: #000;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
  padding-left: 40px;
}

.cost-select-arrow {
    float: right;
    transition: transform .3s ease;
    width: 20px;
    height: 20px;
}

.cost-select-list {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: #D6EDFF;
    border-radius: 20px;
    padding: 10px 0;
    z-index: 10;
}

.cost-select-list .btn {
    display: block;
    padding: 4px 40px !important;
    margin: 0;
    color: #000;
    background: none;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}

/* открытое состояние */
.cost-nav-select.open .cost-select-list {
    display: block;
}
.cost-nav-select.open .cost-select-arrow {
    transform: rotate(180deg);
}

/* ==== БЛОКИ РАЗДЕЛОВ ==== */
.cost-section-block {
    margin-bottom: 60px;
}

.cost-section-title {
    margin-bottom: 8px;
}

.cost-section-desc {
    max-width: 925px;
    margin-bottom: 24px;
}

/* ==== ТАБЛИЦА СТОИМОСТЕЙ ==== */
.cost-table {
    width: 100%;
    border-collapse: collapse;
}

.cost-table tr {
    border-bottom: 1px solid #D6EDFF;
}

.cost-name {
  padding: 12px 0;
  display: flex;
  align-items: center;       /* вертикально по центру */
  justify-content: space-between; /* название слева, бейдж справа */
}

.cost-price {
    padding: 12px 0;
    text-align: right !important;
}
.cost-new {
  display: inline-block;
  width: 110px;         /* фиксированная ширина */
  text-align: right;
}
.cost-old {
    text-decoration: line-through;
    opacity: 0.6;
    padding-right: 38px;
}

.badge {
    display: inline-block;
    padding: 8px 15px;
    margin-left: 8px;
    background: #F285BE;
    color: #fff;
    border-radius: 999px;
}

/* ==== COST SECTION: Mobile prices layout ==== */
@media (max-width: 768px) {
  /* Скрываем десктопный фильтр, включаем мобильный селект */
  .cost-nav-buttons {
    display: none;
  }
  .cost-nav-select {
    display: block;
  }

  /* Стиль кнопки селекта: текст по центру по вертикали, стрелка справа */
  .cost-select-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    line-height: normal;
  }

  /* Список селекта: в потоке, вытесняет контент вниз */
  .cost-select-list {
    display: none;
    position: static;
    margin-top: 8px;
    width: 100%;
    background: #D6EDFF;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 10px 0;
  }
  .cost-nav-select.open .cost-select-list {
    display: block;
  }
  .cost-nav-select.open .cost-select-arrow {
    transform: rotate(180deg);
  }

  /* Ссылки внутри списка: текст по центру по вертикали */
  .cost-select-list .btn {
    display: flex;
    align-items: center;
    padding: 12px 20px;
  }

  /* Таблица превращаем в блочный список */
  .cost-table {
    width: 100%;
    border-collapse: collapse;
  }
  .cost-table tr {
    display: block;
    margin-bottom: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #D6EDFF;
  }

  .cost-table td {
    padding: 20px 0 0;
  }

  /* Первая строка (название + акция) */
  .cost-name {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
  }
  .cost-name .subtitle {
    margin: 0;
    flex: 1;
    line-height: 1.2;
  }
  .cost-name .badge {
    flex: 0 0 auto;
    padding: 4px 10px;
    line-height: 1;
    white-space: nowrap;
    margin: 0;
  }

  /* Вторая строка (цены) */
  .cost-price {
    display: flex;
    align-items: flex-end !important;
    gap: 12px;
    padding: 8px 0;
    white-space: nowrap;
    text-align: right !important;
    width: 100%;
  }
  .cost-new {
    width: 83px;
  }
  .cost-old {
    opacity: 0.6;
    padding: 0;
    margin: 0;
  }
  .cost-table tr > td.cost-price {
    display: flex;
    justify-content: flex-end;
    width: 100%;
  }
}
