/* ============================================================
   Desktop Listing Card — Improved Design
   Overrides for .new-style .singleFeatureCard
   Uses !important on conflicts so main-style.css cannot override
   regardless of CSS load order (both files are async-loaded).
   ============================================================ */

/* ---- Equal-height cards in Slick slider (ana səhifə) ---- */
.featureListing .slider-inner-margin .slick-track,
.new-style .slider-inner-margin .slick-track {
    display: flex !important;
    align-items: stretch !important;
}

.featureListing .slider-inner-margin .slick-slide,
.new-style .slider-inner-margin .slick-slide {
    height: auto !important;
    display: flex !important;
    flex-direction: column;
}

.featureListing .slider-inner-margin .slick-slide > div,
.new-style .slider-inner-margin .slick-slide > div {
    display: flex !important;
    flex-direction: column;
    flex: 1;
    height: 100%;
}

.featureListing .slider-inner-margin .singleFeatureCard,
.new-style .slider-inner-margin .singleFeatureCard {
    height: 100% !important;
}

/* ---- Equal-height cards in Grid/flex-wrap layout (elanlar səhifəsi) ---- */
.new-style .singleFeatureCardWraper {
    align-items: stretch !important;
}

.new-style .singleFeatureCardWraper .singleFeatureCard {
    height: 100% !important;
}

/* ---- Card container: flex column so body stretches ---- */
.new-style .singleFeatureCard {
    display: flex !important;
    flex-direction: column !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
    border: 1px solid transparent !important;
    background: #ffffff !important;
    overflow: hidden !important;
    transition: box-shadow 0.3s ease, transform 0.2s ease, border-color 0.2s ease;
}

.new-style .singleFeatureCard:hover,
.new-style .singleFeatureCard.active {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
    transform: translateY(-3px);
    background: #ffffff;
    border-color: rgba(53, 146, 252, 0.18);
}

/* ---- Image area: 4:3 ratio, clean crop ---- */
.new-style .singleFeatureCard .featureImg {
    position: relative !important;
    overflow: hidden !important;
    aspect-ratio: 4 / 3 !important;
    background: #f8fafc;
    flex-shrink: 0;
}

.new-style .singleFeatureCard .featureImg .main-card-image {
    display: block;
    width: 100%;
    height: 100%;
}

.new-style .singleFeatureCard .featureImg img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 0 !important;
    transition: transform 0.35s ease;
}

.new-style .singleFeatureCard:hover .featureImg img,
.new-style .singleFeatureCard.active .featureImg img {
    transform: scale(1.04);
    border-radius: 0;
}

/* ---- Flat "Featured" badge — minimal, no gradient ---- */
.new-style .singleFeatureCard .featureImg .listing-flat-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.60);
    z-index: 3;
    line-height: 1.4;
    letter-spacing: 0.3px;
}

/* Hide old gradient negotiable badge (replaced by price text) */
.new-style .singleFeatureCard .featureImg .listing-negotiable-badge {
    display: none !important;
}

/* ---- Favorite icon ---- */
.new-style .singleFeatureCard .featureImg .favourite-icon {
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 10 !important;
    position: absolute !important;
}

.new-style .singleFeatureCard .featureImg .favourite-icon:hover {
    background: #ffffff;
    transform: scale(1.12);
}

.new-style .singleFeatureCard .featureImg .favourite-icon.favourite {
    background: #ef4444;
}

/* ---- Card body: flex column, fills remaining space ---- */
.new-style .singleFeatureCard .featurebody {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 14px 16px 16px !important;
    height: auto !important;    /* override old fixed 168px */
    min-height: 0 !important;
    justify-content: flex-start !important;
}

/* ---- 1. PRICE ROW — most prominent ---- */
.new-style .singleFeatureCard .card-price-row {
    display: flex;
    align-items: baseline;
    gap: 0;
    margin-bottom: 6px;
    flex-shrink: 0;
}

.new-style .singleFeatureCard .card-price-amount {
    font-size: 21px;
    font-weight: 700;
    color: var(--tz-primary, #1E3A8A);
    line-height: 1.2;
    letter-spacing: -0.3px;
    white-space: nowrap;
}

.new-style .singleFeatureCard .card-price-negotiable {
    font-size: 20px;
    font-weight: 700;
    color: var(--tz-primary, #1E3A8A);
    white-space: nowrap;
}

/* card-date is now rendered in card-meta-line, hide old inline date */
.new-style .singleFeatureCard .card-date {
    display: none;
}

/* ---- 2. TITLE ---- */
.new-style .singleFeatureCard .featurebody .card-body-top {
    margin: 0 0 4px 0;
}

.new-style .singleFeatureCard .featurebody h4 {
    margin: 0 0 4px 0;
}

.new-style .singleFeatureCard .featurebody .featureTittle {
    font-size: 15px;
    font-weight: 500;
    color: var(--tz-text, #0F172A);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.45;
    min-height: calc(1.45em * 2);
    transition: color 0.2s ease;
}

.new-style .singleFeatureCard:hover .featureTittle {
    color: var(--tz-primary-soft, #3B82F6);
}

/* ---- 3. META: Location + Time — single combined line ---- */
.new-style .singleFeatureCard .featurebody .featureCap {
    display: none !important;
}

.new-style .singleFeatureCard .card-meta-line {
    display: none !important;
}

.new-style .singleFeatureCard .card-meta-combined {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
    margin-bottom: 10px;
    flex-shrink: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    flex-wrap: nowrap;
}

.new-style .singleFeatureCard .card-meta-combined > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.new-style .singleFeatureCard .card-meta-combined > svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.new-style .singleFeatureCard .card-meta-combined .meta-sep {
    flex-shrink: 0;
    color: #d1d5db;
    overflow: visible;
}

.new-style .singleFeatureCard .card-meta-combined i {
    font-size: 13px;
    flex-shrink: 0;
    opacity: 0.7;
}

/* ---- 4. FOOTER ROW — anchored at bottom ---- */
.new-style .singleFeatureCard .card-footer-row {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.new-style .singleFeatureCard .card-views {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #94a3b8;
    flex-shrink: 0;
}

/* ---- Strong Call CTA ---- */
.new-style .singleFeatureCard .listing-call-cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    border-radius: 10px;
    background: #3592fc;
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(53, 146, 252, 0.20);
}

.new-style .singleFeatureCard .listing-call-cta:hover {
    background: #1e74e8;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(53, 146, 252, 0.25);
}

.new-style .singleFeatureCard .listing-call-cta:active {
    transform: translateY(0);
    box-shadow: none;
}

.new-style .singleFeatureCard .listing-call-cta i {
    font-size: 13px;
}

/* ---- Override old listing-call-mini to use new CTA style ---- */
.new-style .singleFeatureCard .listing-call-mini {
    background: #3592fc;
    border: none;
    color: #ffffff;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.2s ease;
}

.new-style .singleFeatureCard .listing-call-mini:hover {
    background: #1e74e8;
    border-color: transparent;
    color: #ffffff;
}

/* ---- Hide old price/badge elements (replaced) ---- */
.new-style .singleFeatureCard .featurebody .featurePricing {
    display: none !important;
}

.new-style .singleFeatureCard .featurebody .btn-wrapper {
    display: none !important;
}

/* ---- Responsive: narrow cards ---- */
@media only screen and (max-width: 1399.99px) {
    .new-style .singleFeatureCard .card-price-amount {
        font-size: 16px;
    }

    .new-style .singleFeatureCard .card-price-negotiable {
        font-size: 14px;
    }

    .new-style .singleFeatureCard .featurebody .featureTittle {
        font-size: 13px;
    }
}
