
/* =========================================================
   КАРТОЧКА ЗЕМЕЛЬНОГО УЧАСТКА
========================================================= */
.land-card-enhanced {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
}

/* Изображение 16:9 */
.land-card-enhanced .t-catalog__card__imgwrapper {
    height: 0 !important;
    padding-bottom: 56.25% !important;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
}

.land-card-enhanced .t-catalog__card__wrap_txt-and-btns {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.land-card-enhanced .t-catalog__card__wrap_txt-and-opts {
    flex-grow: 1;
}

/* =========================================================
   ЗАГОЛОВОК И ЦЕНА
========================================================= */

.land-card-enhanced .t-catalog__card__textwrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 20px;
    row-gap: 0;
    margin: 0 !important;
}

.land-card-enhanced .t-catalog__card__title {
    grid-column: 1;
    grid-row: 1;

    margin: 0 !important;

    color: #272524;
    font-size: 24px !important;
    font-weight: 500 !important;
    line-height: 1.05 !important;
    letter-spacing: -0.7px;
    text-transform: uppercase;
}

/* Цена */
.land-card-enhanced .t-catalog__card__price-wrapper {
    grid-column: 2;
    grid-row: 1;

    display: flex !important;
    flex-direction: column;
    align-items: flex-end;

    margin: 0 !important;
}

.land-card-enhanced .t-catalog__card__price {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;

    color: #272524 !important;
    font-size: 24px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    white-space: nowrap;
}

.land-card-enhanced .t-catalog__card__price-value,
.land-card-enhanced .t-catalog__card__price-currency {
    font-size: inherit !important;
    font-weight: inherit !important;
}

.land-card-enhanced .t-catalog__card__price_old {
    display: flex !important;
    justify-content: flex-end;

    margin-top: 4px;

    color: #b8b8b8 !important;
    font-size: 14px !important;
    line-height: 1 !important;
    text-decoration: line-through;
    white-space: nowrap;
}

/* Скрываем исходное описание */
.land-card-enhanced
.t-catalog__card__descr.land-card__source-hidden {
    display: none !important;
}

/* =========================================================
   СГЕНЕРИРОВАННОЕ ОПИСАНИЕ
========================================================= */

.land-card-enhanced .land-card__meta {
    grid-column: 1 / -1;
    width: 100%;
}

/* Inter для описания */
.land-card-enhanced .land-card__meta,
.land-card-enhanced .land-card__meta * {
    font-family: "Inter", Arial, sans-serif !important;
}

.land-card-enhanced .land-card__subtitle {
    margin-top: 2px;

    color: #999999;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.3;
    text-transform: uppercase;
}

/* Теги */
.land-card-enhanced .land-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;

    margin-top: 10px;
}

.land-card-enhanced .land-card__tag {
    display: inline-flex;
    align-items: center;

    min-height: 24px;
    padding: 3px 10px;
    box-sizing: border-box;

    border-radius: 999px;
    background: #eeeeee;
    color: #555555;

    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
}

.land-card-enhanced .land-card__tag:first-child {
    background: #d9f2ff;
    color: #1673a4;
}

/* Характеристики: по умолчанию одна колонка */
.land-card-enhanced .land-card__specs {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;

    margin-top: 22px;
}

/* От 1200px до 1920px — две одинаковые колонки */
@media screen and (min-width: 1200px) and (max-width: 1920px) {
    .land-card-enhanced .land-card__specs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 12px;
    }
}

/* Выше 1920px — четыре колонки: 40% / 20% / 20% / 20% */
@media screen and (min-width: 1921px) {
    .land-card-enhanced .land-card__specs {
        grid-template-columns:
            minmax(0, 2fr)
            repeat(3, minmax(0, 1fr));
        gap: 10px;
    }
}

.land-card-enhanced .land-card__spec {
    min-width: 0;
}

.land-card-enhanced .land-card__spec-label {
    display: block;

    margin-bottom: 3px;

    color: #b0b0b0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.2;
}

.land-card-enhanced .land-card__spec-value {
    display: block;

    color: #292929;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

/* Красное количество участков */
.land-card-enhanced
.land-card__spec--remaining
.land-card__spec-value {
    color: #ff1e12;
}

/* =========================================================
   ВЕРХНИЕ ПЛАШКИ
========================================================= */

.land-card-enhanced .t-catalog__card__mark-wrapper {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    left: 8px !important;
    z-index: 5;

    display: block !important;

    width: auto !important;
    margin: 0 !important;

    pointer-events: none;
}

.land-card-enhanced .land-card__marks {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;

    width: 100%;
}

.land-card-enhanced .land-card__marks-left {
    display: flex;
    flex-shrink: 0;
}

.land-card-enhanced .land-card__marks-right {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;

    margin-left: auto;
}

.land-card-enhanced .land-card__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 34px;
    padding: 5px 12px;
    box-sizing: border-box;

    border-radius: 999px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);

    font-family: "Inter", Arial, sans-serif !important;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.05;
    white-space: nowrap;
}

/* Осталось участков */
.land-card-enhanced .land-card__mark--remaining {
    flex-direction: column;
    align-items: flex-start;

    min-width: 120px;
    padding-left: 20px;
    padding-right: 20px;

    background: #292929;
    color: #ffffff;
    text-transform: uppercase;
}

.land-card-enhanced .land-card__mark--remaining span {
    font-size: 11px;
    font-weight: 700;
}

.land-card-enhanced .land-card__mark--remaining strong {
    font-size: 12px;
    font-weight: 700;
}

/* Информационная плашка */
.land-card-enhanced .land-card__mark--info {
    background: #ffffff;
    color: #333333;
}

/* Скидка */
.land-card-enhanced .land-card__mark--discount {
    min-width: 82px;

    background: #ff2118;
    color: #ffffff;

    font-size: 19px;
    font-style: italic;
    font-weight: 700;
}

/* Иконка внутри обычной плашки */
.land-card-enhanced .land-card__mark-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    width: 24px;
    height: 24px;
    margin-right: 7px;

    border-radius: 0;
    background: transparent;
}

.land-card-enhanced .land-card__mark-icon svg {
    display: block;
    width: 18px;
    height: 18px;
}

/* Грант и Сбер — готовые SVG-плашки */
.land-card-enhanced .land-card__mark--icon-only {
    min-width: 0;
    min-height: 0;
    padding: 0;

    background: transparent !important;
    border-radius: 0;
    box-shadow: none;
}

.land-card-enhanced
.land-card__mark--icon-only
.land-card__mark-icon {
    width: auto;
    height: 34px;
    margin: 0;

    background: transparent;
}

.land-card-enhanced
.land-card__mark--icon-only
.land-card__mark-icon img {
    display: block;

    width: auto;
    height: 34px;
    max-width: 190px;

    object-fit: contain;
}

/* =========================================================
   КНОПКИ
========================================================= */

.land-card-enhanced .t-catalog__card__btns-wrapper {
    display: flex !important;
    flex-wrap: wrap;
    align-items: stretch;

    gap: 8px;

    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    margin-top: 22px !important;
}

.land-card-enhanced .land-card__btn {
    position: relative;

    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;

    min-width: 0;
    min-height: 44px !important;
    height: 44px !important;
    max-height: 44px !important;

    padding: 5px 14px !important;
    margin: 0 !important;
    box-sizing: border-box;

    border-radius: 999px !important;
    box-shadow: none !important;

    font-family: "Inter", Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    text-transform: uppercase;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease !important;
}

.land-card-enhanced .land-card__btn:hover {
    transform: translateY(-1px);
}

/* Одинаковая базовая ширина */
.land-card-enhanced .land-card__btn--details,
.land-card-enhanced .land-card__btn--video,
.land-card-enhanced .land-card__btn--map {
    flex: 1 1 160px;
}

/* Подробнее */
.land-card-enhanced .land-card__btn--details {
    border: 1px solid #ff2118 !important;
    background: #ff2118 !important;
    color: #ffffff !important;
}

.land-card-enhanced .land-card__btn--details:hover {
    background: #e91a11 !important;
}

/* Видео */
.land-card-enhanced .land-card__btn--video {
    padding-left: 42px !important;
    padding-right: 42px !important;

    border: 1px solid #ff2118 !important;
    background: #ffffff !important;
    color: #ff2118 !important;
}

/* Карта */
.land-card-enhanced .land-card__btn--map {
    padding-left: 42px !important;
    padding-right: 42px !important;

    border: 1px solid #0098ee !important;
    background: #ffffff !important;
    color: #0098ee !important;
}

/* Обёртка иконки */
.land-card-enhanced .land-card__btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.land-card-enhanced .land-card__btn-icon svg {
    display: block;
}

/* Иконки у левого края */
.land-card-enhanced
.land-card__btn--video
.land-card__btn-icon--round,
.land-card-enhanced
.land-card__btn--map
.land-card__btn-icon--round {
    position: absolute;
    top: 50%;
    left: 2px;

    width: 38px;
    height: 38px;
    margin: 0;

    border-radius: 50%;
    color: #ffffff;

    transform: translateY(-50%);
}

.land-card-enhanced
.land-card__btn--video
.land-card__btn-icon--round {
    background: #ff2118;
}

.land-card-enhanced
.land-card__btn--map
.land-card__btn-icon--round {
    background: #0098ee;
}

.land-card-enhanced
.land-card__btn--video
.land-card__btn-icon--round svg,
.land-card-enhanced
.land-card__btn--map
.land-card__btn-icon--round svg {
    width: 16px;
    height: 16px;
}

/* Стрелка */
.land-card-enhanced .land-card__details-arrow {
    margin-left: 2px;

    font-size: 24px;
    font-weight: 300;
    line-height: 0;
}

/* =========================================================
   ЭКРАНЫ НИЖЕ 1200 PX
========================================================= */

@media screen and (max-width: 1199px) {

    .land-card-enhanced .t-catalog__card__textwrapper {
        grid-template-columns: minmax(0, 1fr);
        column-gap: 0;
        row-gap: 0;
    }

    .land-card-enhanced .t-catalog__card__title {
        grid-column: 1;
        grid-row: 1;

        font-size: 20px !important;
        line-height: 1.1 !important;
        letter-spacing: -0.4px;
    }

    /* Цена под заголовком */
    .land-card-enhanced .t-catalog__card__price-wrapper {
        grid-column: 1;
        grid-row: 2;

        align-items: flex-start;

        margin-top: 5px !important;
    }

    .land-card-enhanced .t-catalog__card__price {
        justify-content: flex-start;

        font-size: 20px !important;
    }

    .land-card-enhanced .t-catalog__card__price_old {
        justify-content: flex-start;

        margin-top: 3px;

        font-size: 12px !important;
    }

    /* Описание после цены */
    .land-card-enhanced .land-card__meta {
        grid-column: 1;
        grid-row: 3;
    }

    /* Текст описания 13px */
    .land-card-enhanced .land-card__subtitle,
    .land-card-enhanced .land-card__tag,
    .land-card-enhanced .land-card__spec-label,
    .land-card-enhanced .land-card__spec-value {
        font-size: 13px !important;
    }

    .land-card-enhanced .land-card__subtitle {
        margin-top: 3px;
    }

    .land-card-enhanced .land-card__tags {
        gap: 5px;
        margin-top: 9px;
    }

    .land-card-enhanced .land-card__tag {
        min-height: 24px;
        padding: 3px 9px;
    }

    /* Ниже 1200px характеристики в одну колонку */
    .land-card-enhanced .land-card__specs {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;

        margin-top: 18px;
    }

    /* =====================================================
       ПЛАШКИ УМЕНЬШАЮТСЯ НА 20%
       Размер составляет 80% от десктопного
    ===================================================== */

    .land-card-enhanced .t-catalog__card__mark-wrapper {
        top: 6px !important;
        right: 6px !important;
        left: 6px !important;
    }

    .land-card-enhanced .land-card__marks {
        gap: 8px;
    }

    .land-card-enhanced .land-card__marks-right {
        gap: 5px;
    }

    .land-card-enhanced .land-card__mark {
        min-height: 27px;
        padding: 4px 10px;

        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);

        font-size: 10px;
    }

    /* Осталось участков */
    .land-card-enhanced .land-card__mark--remaining {
        min-width: 96px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .land-card-enhanced .land-card__mark--remaining span {
        font-size: 9px;
    }

    .land-card-enhanced .land-card__mark--remaining strong {
        font-size: 10px;
    }

    /* Скидка */
    .land-card-enhanced .land-card__mark--discount {
        min-width: 66px;

        font-size: 15px;
    }

    /* Иконка в обычной плашке */
    .land-card-enhanced .land-card__mark-icon {
        width: 19px;
        height: 19px;
        margin-right: 6px;
    }

    .land-card-enhanced .land-card__mark-icon svg {
        width: 14px;
        height: 14px;
    }

    /* SVG Гранта и Сбера */
    .land-card-enhanced .land-card__mark--icon-only {
        min-width: 0;
        min-height: 0;
        padding: 0;

        box-shadow: none;
    }

    .land-card-enhanced
    .land-card__mark--icon-only
    .land-card__mark-icon {
        width: auto;
        height: 27px;
        margin: 0;
    }

    .land-card-enhanced
    .land-card__mark--icon-only
    .land-card__mark-icon img {
        width: auto;
        height: 27px;
        max-width: 152px;
    }
}

/* =========================================================
   МОБИЛЬНЫЕ ЭКРАНЫ
========================================================= */

@media screen and (max-width: 640px) {

    .land-card-enhanced .t-catalog__card__wrap_txt-and-btns {
        padding: 16px;
    }

    .land-card-enhanced .land-card__specs {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    /*
     * Кнопки строго друг под другом.
     * Все занимают 100% ширины.
     */
    .land-card-enhanced .t-catalog__card__btns-wrapper {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
        justify-content: flex-start !important;

        gap: 5px !important;

        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
    }

    .land-card-enhanced .land-card__btn--details,
    .land-card-enhanced .land-card__btn--video,
    .land-card-enhanced .land-card__btn--map {
        flex: 0 0 44px !important;

        display: flex !important;

        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;

        height: 44px !important;
        min-height: 44px !important;
        max-height: 44px !important;

        margin: 0 !important;
        box-sizing: border-box !important;
    }
}

/* =========================================================
   ЭКРАНЫ НИЖЕ 480 PX
========================================================= */

@media screen and (max-width: 480px) {

    .land-card-enhanced .t-catalog__card__textwrapper {
        grid-template-columns: minmax(0, 1fr);
    }

    .land-card-enhanced .t-catalog__card__title {
        grid-column: 1;
        grid-row: 1;
    }

    /* Цена под заголовком с отступом 10px */
    .land-card-enhanced .t-catalog__card__price-wrapper {
        grid-column: 1;
        grid-row: 2;

        align-items: flex-start;

        margin-top: 10px !important;
    }

    .land-card-enhanced .land-card__meta {
        grid-column: 1;
        grid-row: 3;
    }

    .land-card-enhanced .t-catalog__card__price_old {
        justify-content: flex-start;
    }

    /*
     * Первая характеристика — на всю ширину.
     * Следующие три — в один ряд.
     */
    .land-card-enhanced .land-card__specs {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 13px 8px !important;
    }

    .land-card-enhanced .land-card__spec:first-child {
        grid-column: 1 / -1;
    }

    .land-card-enhanced .land-card__spec:not(:first-child) {
        grid-column: auto;
    }

    .land-card-enhanced .land-card__marks {
        gap: 5px;
    }

    .land-card-enhanced .land-card__marks-right {
        gap: 4px;
    }
}

/* =========================================================
   SOLD OUT CARDS
========================================================= */
.land-card-enhanced.land-card--sold-out {
    filter: grayscale(1);
    opacity: 0.58;
}

.land-card-enhanced.land-card--sold-out,
.land-card-enhanced.land-card--sold-out * {
    cursor: default !important;
}

.land-card-enhanced.land-card--sold-out .js-catalog-prod-sold-out,
.land-card-enhanced.land-card--sold-out .t-catalog__card__sold-out-msg {
    display: none !important;
}

.land-card-enhanced.land-card--sold-out .t-catalog__card__btns-wrapper {
    display: none !important;
}

.land-card-enhanced.land-card--sold-out a {
    pointer-events: none !important;
}

.land-card-enhanced.land-card--sold-out .land-card__mark--remaining {
    background: #777777 !important;
    color: #ffffff !important;
}

.land-card-enhanced.land-card--sold-out .land-card__spec--remaining .land-card__spec-value {
    color: #777777 !important;
}
