.text-cards-price {
    padding: 60px 0;
    background: var(--bg-gray);
}

.text-cards-price__grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
}

.text-cards-price__cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
}

/*
 * Отступы внутри карточки — margin-bottom у элементов, а не общий gap:
 * перед стоимостью нужен другой отступ, и gap пришлось бы из него вычитать.
 */
.text-cards-price__card {
    display: flex;
    flex-direction: column;
    padding: 32px;
    border: 1px solid var(--border-on-light);
    border-radius: 16px;
    background: var(--bg);
}

.text-cards-price__label {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.text-cards-price__media {
    margin-bottom: 16px;
}

.text-cards-price__img {
    width: 100%;
    height: 96px;
    object-fit: contain;
}

.text-cards-price__content {
    margin-bottom: 50px;
}

/* Обе части в :where(): вес нулевой, поэтому цвет из «Форматов» перебивает этот. */
:where(.text-cards-price__content) :where(p) {
    color: var(--text-tertiary);
}

.text-cards-price__price {
    margin-top: auto;
}

.text-cards-price__price-label {
    margin-bottom: 8px;
}

.text-cards-price__price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.text-cards-price__amounts {
    display: inline-grid;
}

.text-cards-price__amount {
    grid-area: 1 / 1;
    color: var(--brand-primary);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

/* visibility, а не display: иначе переход не с чего начинать. */
.text-cards-price__amount--hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
}

@media (prefers-reduced-motion: reduce) {

    .text-cards-price__amount {
        transition: none;
    }
}

.text-cards-price__switch {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    height: 32px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--bg-cards);
}

.text-cards-price__currency {
    padding: 3.5px 8px;
    border-radius: 6px;
    color: var(--text-on-dark);
    cursor: pointer;
}

.text-cards-price__currency.is-active {
    background: var(--brand-secondary);
    color: var(--text-white);
}

@media (max-width: 1080px) {

    .text-cards-price {
        padding: 30px 0;
    }

    .text-cards-price__grid {
        grid-template-columns: 1fr;
    }

    .text-cards-price__cards {
        gap: 16px;
    }

    .text-cards-price__card {
        padding: 16px;
    }

    .text-cards-price__label,
    .text-cards-price__media {
        margin-bottom: 12px;
    }

    .text-cards-price__content {
        margin-bottom: 24px;
    }
}

@media (max-width: 768px) {

    .text-cards-price__cards {
        grid-template-columns: 1fr;
    }
}
