/**
 * Property Unit Type 5 - Booking.com style horizontal card
 */

/* Main wrapper - always full width */
.listing_wrapper.property_unit_v5 {
    width: 100%;
    padding: 0 0 15px 0;
    float: none;
}

/* Card container - horizontal flexbox */
.property_unit_v5 .property_listing.property_unit_v5_card {
    display: flex;
    flex-direction: row;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
}

.property_unit_v5 .property_listing.property_unit_v5_card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    border-color: #ccc;
}

/* ===== Left: Image section ===== */
.property_unit_v5 .v5-image-wrapper {
    flex: 0 0 220px;
    width: 220px;
    min-height: 200px;
    position: relative;
    overflow: hidden;
}

.property_unit_v5 .v5-image-wrapper .property_unit_carousel_wrapper,
.property_unit_v5 .v5-image-wrapper .listing-unit-img-wrapper {
    height: 100%;
    width: 100%;
}

.property_unit_v5 .v5-image-wrapper .listing-unit-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property_unit_v5 .v5-image-wrapper .property_unit_carousel_wrapper .owl-stage-outer,
.property_unit_v5 .v5-image-wrapper .property_unit_carousel_wrapper .owl-stage,
.property_unit_v5 .v5-image-wrapper .property_unit_carousel_wrapper .owl-item {
    height: 100%;
}

.property_unit_v5 .v5-image-wrapper .property_unit_carousel_wrapper .owl-item img {
    height: 100%;
    object-fit: cover;
}

/* Featured badge */
.property_unit_v5 .featured_div {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
}

/* Favorite icon */
.property_unit_v5 .v5-favorite {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
}

.property_unit_v5 .v5-favorite .icon-fav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    cursor: pointer;
    transition: background 0.2s ease;
}

.property_unit_v5 .v5-favorite .icon-fav:hover {
    background: #fff;
}

.property_unit_v5 .v5-favorite .icon-fav i {
    font-size: 14px;
    color: #999;
}

.property_unit_v5 .v5-favorite .icon-fav-on i {
    color: #e74c3c;
}

/* ===== Middle: Details section ===== */
.property_unit_v5 .v5-details-wrapper {
    flex: 1 1 auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
}

/* Title */
.property_unit_v5 .v5-title-row {
    margin-bottom: 6px;
}

.property_unit_v5 .v5-title-row .listing_title_unit {
    font-size: 17px;
    font-weight: 700;
    color: #006ce4;
    text-decoration: none;
    line-height: 1.3;
    display: block;
}

.property_unit_v5 .v5-title-row .listing_title_unit:hover {
    color: #003580;
    text-decoration: underline;
}

/* Location */
.property_unit_v5 .v5-location-row {
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
}

.property_unit_v5 .v5-location-row i {
    color: #006ce4;
    margin-right: 4px;
    font-size: 12px;
}

.property_unit_v5 .v5-location-row a {
    color: #555;
    text-decoration: none;
}

.property_unit_v5 .v5-location-row a:hover {
    color: #006ce4;
}

/* Description row (category / action) */
.property_unit_v5 .v5-description-row {
    font-size: 13px;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
}

.property_unit_v5 .v5-description-row a {
    color: #333;
    text-decoration: none;
}

/* Features row */
.property_unit_v5 .v5-features-row {
    font-size: 13px;
    color: #555;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.property_unit_v5 .v5-feature i {
    color: #006ce4;
    margin-right: 3px;
    font-size: 12px;
}

.property_unit_v5 .v5-feature-sep {
    color: #999;
    margin: 0 2px;
    font-weight: bold;
}

/* ===== Right: Price & rating section ===== */
.property_unit_v5 .v5-price-wrapper {
    flex: 0 0 190px;
    width: 190px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    border-left: 1px solid #e8e8e8;
    text-align: right;
}

/* Rating */
.property_unit_v5 .v5-rating {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    width: 100%;
    justify-content: flex-end;
}

.property_unit_v5 .v5-rating-text {
    text-align: right;
}

.property_unit_v5 .v5-rating-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.property_unit_v5 .v5-rating-count {
    display: block;
    font-size: 11px;
    color: #888;
    line-height: 1.3;
}

.property_unit_v5 .v5-rating-badge {
    flex-shrink: 0;
    background: #003580;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    padding: 6px 8px;
    border-radius: 6px 6px 6px 0;
    line-height: 1;
    min-width: 36px;
    text-align: center;
}

/* Price */
.property_unit_v5 .v5-price {
    margin-bottom: 10px;
    width: 100%;
    text-align: right;
}

.property_unit_v5 .v5-price .price_unit {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    display: block;
}

.property_unit_v5 .v5-price .pernight {
    font-size: 12px;
    font-weight: 400;
    color: #777;
}

.property_unit_v5 .v5-price .price_before {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
    margin-right: 4px;
}

/* CTA Button */
.property_unit_v5 .v5-cta-button {
    width: 100%;
}

.property_unit_v5 .v5-details-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: #006ce4;
    color: #fff;
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
    line-height: 1.3;
}

.property_unit_v5 .v5-details-btn:hover {
    background: #003580;
    color: #fff;
    text-decoration: none;
}

/* ===== Hide parent theme elements that leak through ===== */
.property_unit_v5 .property_listing.property_unit_v5_card .property_unit_action,
.property_unit_v5 .property_listing.property_unit_v5_card .title-container,
.property_unit_v5 .property_listing.property_unit_v5_card .category_tagline_wrapper {
    display: none;
}

/* ===== Responsive ===== */

/* Tablet */
@media (max-width: 992px) {
    .property_unit_v5 .v5-image-wrapper {
        flex: 0 0 180px;
        width: 180px;
    }

    .property_unit_v5 .v5-price-wrapper {
        flex: 0 0 160px;
        width: 160px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .property_unit_v5 .property_listing.property_unit_v5_card {
        flex-direction: column;
    }

    .property_unit_v5 .v5-image-wrapper {
        flex: 0 0 auto;
        width: 100%;
        height: 200px;
    }

    .property_unit_v5 .v5-details-wrapper {
        padding: 14px 16px;
    }

    .property_unit_v5 .v5-price-wrapper {
        flex: 0 0 auto;
        width: 100%;
        border-left: none;
        border-top: 1px solid #e8e8e8;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
    }

    .property_unit_v5 .v5-rating {
        width: auto;
        margin-bottom: 0;
    }

    .property_unit_v5 .v5-price {
        width: auto;
        margin-bottom: 0;
        text-align: left;
    }

    .property_unit_v5 .v5-cta-button {
        width: 100%;
        margin-top: 10px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .property_unit_v5 .v5-image-wrapper {
        height: 180px;
    }

    .property_unit_v5 .v5-title-row .listing_title_unit {
        font-size: 15px;
    }

    .property_unit_v5 .v5-price .price_unit {
        font-size: 16px;
    }
}
