/* Кликабельная картинка в слайдере страницы товара — открывает
 * lightbox в overlay'е. Логика в assets/js/card-zoom.js, стили
 * lightbox'а общие — .city-lightbox в assets/css/kontakti.css. */

.js-store-prod-slider .t-slds__imgwrapper {
    cursor: zoom-in;
}

/* Выравнивание кнопок "Подробнее" в карточках листинга.
 * Tilda по умолчанию: .t-store__card-list — flex-row с align-items:stretch,
 * сами карточки .t-store__stretch-col — display:inline-block (не flex).
 * Из-за этого карточки одного ряда не получают одинаковую высоту,
 * и кнопки скачут.
 * Перебиваем: .t-store__card в flex-column на полную высоту flex-родителя,
 * текст-блок растягиваем (flex:1), кнопки прибиваем к низу. */
.t-store__card-list {
    align-items: stretch !important;
}
.t-store__card.t-store__stretch-col {
    display: flex !important;
    flex-direction: column !important;
    align-self: stretch !important;
    height: auto !important;
    vertical-align: top !important;
}
.t-store__card .t-store__card__wrap_txt-and-btns {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    height: auto !important;
}
.t-store__card .store__card__wrap_txt-and-opts {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
}
.t-store__card .t-store__card__btns-wrapper {
    margin-top: auto !important;
    padding-top: 16px;
}

/* Картинки в карточках листинга — фиксированная высота (одно соотношение
 * на категорию). Tilda по умолчанию для класса _original-ratio обнуляет
 * padding-bottom и ставит img position:static — высота карточки берётся
 * из реальной высоты картинки, поэтому двери разной высоты дают карточки
 * разной высоты и весь нижний блок плывёт. Возвращаем фикс. */
.t-store__card .t-store__card__imgwrapper_original-ratio.t-store__card__imgwrapper_3-4 {
    padding-bottom: 180% !important;
}
.t-store__card .t-store__card__imgwrapper_original-ratio.t-store__card__imgwrapper_4-3 {
    padding-bottom: 75% !important;
}
.t-store__card .t-store__card__imgwrapper_original-ratio.t-store__card__imgwrapper_1-1 {
    padding-bottom: 100% !important;
}
.t-store__card .t-store__card__imgwrapper_original-ratio .t-store__card__img {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
}

/* Выравниваем цены между карточками: title резервирует место под 2 строки.
 * У товара с короткой однострочной названия добавится пустая вторая строка,
 * цена опустится на тот же уровень что у двух-строчной — линия цен ровная. */
.t-store__card .js-store-prod-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}
