/* Top-100 feed card (homepage) — scoped copy from ks-auto new-style.css for AP vitrine gallery. */

.ap-home-top100-gallery {
    --main-red-clr: #E23737;
    --main-dark-clr: #353433;
}

.ap-home-top100-gallery .third-title {
    font-family: Inter-SemiBold, sans-serif;
    font-size: 16px;
}

.ap-home-top100-gallery .link_btn {
    font-family: Inter-Regular, sans-serif;
    font-size: 14px;
    text-align: center;
    text-decoration: none;
    border: none;
    padding: 8px 12px;
    border-radius: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-sizing: border-box;
}

.ap-home-top100-gallery .link_btn__dark {
    background: #E23737;
    color: #FFFFFF;
}

.ap-home-top100-gallery .link_btn__dark:hover {
    background: #e54d4d;
    color: #FFFFFF;
}

.ap-home-top100-gallery .ks-top100-feed-card.catalog__items {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 100%;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    max-height: none;
    background: #FFFFFF;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.ap-home-top100-gallery .ks-top100-feed-card .catalog__items-link {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 100%;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
}

.ap-home-top100-gallery .catalog__items-block-btn,
.ap-home-top100-gallery .ks-top100-feed-card__cta {
    margin-top: auto;
    cursor: pointer;
}

.ap-home-top100-gallery .catalog__items-block {
    padding: 10px 12px 12px;
    background-color: white;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.ap-home-top100-gallery .catalog__items-block-title {
    display: block;
    text-decoration: none;
    color: inherit;
    min-width: 0;
    max-width: 100%;
}

.ap-home-top100-gallery .catalog__items-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: Inter-SemiBold, sans-serif !important;
    font-size: 1.35rem;
    line-height: 1.3;
    margin: 0;
    color: #353433;
}

.ap-home-top100-gallery .catalog__items-price {
    font-size: 15px;
    font-family: Inter-SemiBold, sans-serif;
    margin: 0;
    color: #353433;
}

.ap-home-top100-gallery .catalog__items-picture {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: var(--ap-t100-photo, 148px);
    max-height: var(--ap-t100-photo, 148px);
    flex: 0 0 auto;
    display: block;
    overflow: hidden;
    background: #E6E6E6;
    box-sizing: border-box;
}

.ap-home-top100-gallery .catalog__items-picture::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    background-color: rgba(0, 0, 0, 0.16);
}

.ap-home-top100-gallery .catalog__items-picture img,
.ap-home-top100-gallery .catalog__items-picture-image {
    object-fit: cover;
    object-position: center;
    position: absolute;
    inset: 0;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    background: #E6E6E6;
    display: block;
    z-index: 0;
}

.ap-home-top100-gallery .catalog__items-location {
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 2px;
}

.ap-home-top100-gallery .catalog__items-location p {
    color: #6B6661;
    font-size: 1.35rem;
    font-family: Inter-Regular, sans-serif;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    margin: 0;
}

/* --- ks-top100-feed-card (from new-style.css) --- */

.ap-home-top100-gallery .ks-top100-feed-card {
    position: relative;
    border: 1px solid rgba(226, 55, 55, 0.14);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    background: #FFFFFF;
}

.ap-home-top100-gallery .ks-top100-feed-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.ap-home-top100-gallery .ks-top100-feed-card__picture-link {
    position: relative;
    display: block;
    flex: 0 0 auto;
    width: 100%;
}

.ap-home-top100-gallery .ks-top100-feed-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(53, 52, 51, 0.88);
    color: #FFFFFF;
    font-family: Inter-SemiBold, sans-serif;
    font-size: 1.35rem;
    line-height: 1;
}

.ap-home-top100-gallery .ks-top100-feed-card__text-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ap-home-top100-gallery .ks-top100-feed-card__eyebrow {
    display: inline-block;
    box-sizing: border-box;
    align-self: flex-start;
    max-width: 100%;
    margin: 0;
    padding: 2px 4px;
    font-family: Inter-Medium, Inter-Regular, sans-serif;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: 0;
    text-transform: none;
    text-align: center;
    color: #E23737;
    background: #fff;
    border: 1px solid #E23737;
    border-radius: 6px;
    white-space: nowrap;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.ap-home-top100-gallery .ks-top100-feed-card__title-link {
    display: block;
}

.ap-home-top100-gallery .ks-top100-feed-card__title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
    line-height: 1.3;
}

.ap-home-top100-gallery .ks-top100-feed-card__price {
    margin: 0;
}

.ap-home-top100-gallery .ks-top100-feed-card__location {
    margin-top: 0;
}

.ap-home-top100-gallery .ks-top100-feed-card__location p {
    color: #6B6661;
}

.ap-home-top100-gallery .ks-top100-feed-card__cta {
    width: 100%;
    justify-content: center;
    margin-top: auto;
    flex: 0 0 auto;
}

.ap-home-top100-gallery--wide .ks-top100-feed-card__cta {
    margin-top: auto;
}

.ap-home-top100-gallery .ks-top100-feed-card--homepage .catalog__items-link {
    display: flex;
    flex-direction: column;
    grid-template-rows: none;
}

.ap-home-top100-gallery .ks-top100-feed-card--homepage .catalog__items-picture {
    margin-bottom: 0 !important;
    box-shadow: none;
}

.ap-home-top100-gallery .ks-top100-feed-card--homepage .ks-top100-feed-card__picture::before {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.28) 100%);
}

.ap-home-top100-gallery .ks-top100-feed-card--homepage .ks-top100-feed-card__body {
    gap: 6px;
    flex: 1 1 auto;
    min-height: 0;
    background: #FFFFFF;
}

/* Wide coverflow: карточка тянется на высоту слайда, фото фиксировано */
.ap-home-top100-gallery--wide .ks-top100-feed-card.catalog__items,
.ap-home-top100-gallery--wide .ks-top100-feed-card .catalog__items-link {
    height: 100%;
}

.ap-home-top100-gallery--wide .ks-top100-feed-card .catalog__items-link {
    display: flex;
    flex-direction: column;
}

.ap-home-top100-gallery--wide .ks-top100-feed-card__body {
    flex: 1 1 auto;
}

.ap-home-top100-gallery--wide .ks-top100-feed-card {
    border-radius: 24px;
    box-shadow: 0 12px 30px rgba(53, 52, 51, 0.08);
}
