/**
 * Property Cards CSS - All 3 Styles
 * Comprehensive styling for GLIZWP property card layouts
 * 
 * @package GLIZWP
 * @version 1.0.0
 */

/* ================================
   BASE PROPERTY CARD STYLES
   ================================ */

.property-card {
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    height: fit-content;
}

.property-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Image Container Base */
.property-image-container {
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
    /* Height will be set by aspect ratio or card-specific rules */
}

/* Apply aspect ratios when specified */
.property-image-container.ratio-square {
    height: auto;
    aspect-ratio: 1/1;
    position: relative;
    min-height: 150px;
}

.property-image-container.ratio-16-9 {
    height: auto;
    aspect-ratio: 16/9;
    position: relative;
    /* Ensure absolute children position correctly */
    min-height: 150px;
    /* Minimum height for very small screens */
}

.property-image-container.ratio-4-3 {
    height: auto;
    aspect-ratio: 4/3;
    position: relative;
    min-height: 150px;
}

.property-image-container.ratio-3-2 {
    height: auto;
    aspect-ratio: 3/2;
    position: relative;
    min-height: 150px;
}

.property-image-container.custom-ratio {
    height: auto;
    position: relative;
    min-height: 150px;
    /* Custom aspect ratio will be added via inline CSS */
}

.property-image-single img,
.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.property-card:hover .property-image-single img,
.property-card:hover .slide img {
    transform: scale(1.05);
}

/* Image Placeholder */
.property-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #dee2e6;
    min-height: 200px;
}

/* ================================
   ASPECT RATIO CLASSES
   ================================ */

.ratio-square {
    aspect-ratio: 1/1;
}

.ratio-16-9 {
    aspect-ratio: 16/9;
}

.ratio-4-3 {
    aspect-ratio: 4/3;
}

.ratio-3-2 {
    aspect-ratio: 3/2;
}

/* ================================
   IMAGE SLIDER STYLES
   ================================ */

.property-image-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.slide.active {
    opacity: 1;
}

/* Slider Navigation */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 5px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    opacity: 0.9;
    /* Made visible by default for debugging */
}

.property-card:hover .slider-nav {
    opacity: 1;
}

.slider-nav:hover {
    background: white;
}

.slider-nav.prev {
    left: 8px;
}

.slider-nav.next {
    right: 8px;
}

/* Slider Dots */
.slider-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dot.active {
    background: white;
    transform: scale(1.2);
}

/* ================================
   PROPERTY BADGES
   ================================ */

.property-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 15;
}

.badge {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.discount {
    background: #28a745;
}

.badge.weekend-deal {
    background: #ff385c;
}

.badge.coupon {
    background: #ffc107;
    color: #212529;
}

.badge.seasonal {
    background: #17a2b8;
}

/* Feature Badges for Style 3 - DEPRECATED (replaced by dynamic property labels) */
.feature-badges {
    /* This is deprecated - use .property-labels instead */
    display: none;
}

.feature-badge {
    /* This is deprecated - use .property-label instead */
    display: none;
}

/* ================================
   FAVORITES BUTTON
   ================================ */

.glizwp-favorite-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgb(255 255 255 / 55%);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 15;
    color: #6c757d;
}

.glizwp-favorite-btn:hover {
    background: white;
    color: #ff385c;
}

.glizwp-favorite-btn.favorited {
    color: #ff385c !important;
    background: white;
}

.glizwp-favorite-btn.favorited .heart-icon {
    color: #ff385c !important;
    fill: #ff385c !important;
}


/* ================================
   STYLE 1: CARD 1 DESIGN
   ================================ */

.property-card.style1 {
    /* border: 1px solid #e9ecef; */
    border-radius: 12px;
}

.property-card.style1 .property-image-container {
    border-radius: 12px 12px 0 0;
}

/* Only set min-height for style1 when NO aspect ratio is set */
.property-card.style1 .property-image-container:not([class*="ratio-"]) {
    min-height: 200px;
}

.property-card.style1 .property-content {
    padding: 16px;
}

/* Card 1 Design Specific Styles */
.property-card.style1 .card1-header .title-price-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.property-card.style1 .card1-header .property-title {
    flex: 1;
    margin: 0;
    padding-right: 12px;
}

.property-card.style1 .card1-header .property-price {
    text-align: right;
    flex-shrink: 0;
}

.property-card.style1 .card1-header .property-price .price-amount {
    color: #ff385c;
    display: block;
}

.property-card.style1 .card1-header .property-price .price-period {
    font-size: 12px;
    color: #6c757d;
}

.property-card.style1 .property-location {
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.property-card.style1 .property-title {
    margin: 0 0 0px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.property-card.style1 .property-title a {
    color: #212529;
    text-decoration: none;
    transition: color 0.2s ease;
}

.property-card.style1 .property-title a:hover {
    color: #ff385c;
}

.property-card.style1 .property-details {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 8px;
}

.property-card.style1 .property-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 0px;
    font-size: 14px;
}

.property-card.style1 .rating-value {
    color: #ff385c;
    font-weight: 500;
}

.property-card.style1 .review-count {
    color: #6c757d;
}

.property-card.style1 .property-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.property-card.style1 .price-amount {
    font-size: 18px;
    font-weight: 700;
    color: #212529;
}

.property-card.style1 .price-period {
    color: #6c757d;
    font-size: 14px;
}

/* ================================
   STYLE 2: MODERN COMPACT
   ================================ */

.property-card.style2 {
    border: 1px solid #e9ecef;
    border-radius: 16px;
}

.property-card.style2 .property-image-container {
    border-radius: 16px 16px 0 0;
}

/* Only set min-height for style2 when NO aspect ratio is set */
.property-card.style2 .property-image-container:not([class*="ratio-"]) {
    min-height: 180px;
}

.property-card.style2 .property-content {
    padding: 14px;
}

.property-card.style2 .content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.property-card.style2 .content-left {
    flex: 1;
    min-width: 0;
    padding-right: 12px;
}

.property-card.style2 .property-location {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #6c757d;
    font-size: 16px;
    font-weight: 400;
}

.property-card.style2 .property-title {
    margin: 0 0 0px 0;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
}

.property-card.style2 .property-title a {
    color: #212529;
    text-decoration: none;
    transition: color 0.2s ease;
}

.property-card.style2 .property-title a:hover {
    color: #ff385c;
}

.property-card.style2 .property-price {
    text-align: right;
    flex-shrink: 0;
}

.property-card.style2 .price-amount {
    font-size: 16px;
    font-weight: 700;
    color: #212529;
    display: block;
}

.property-card.style2 .price-period {
    color: #6c757d;
    font-size: 12px;
}

.property-card.style2 .property-details {
    color: #6c757d;
    margin-bottom: 6px;
}

.property-card.style2 .property-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 15px;
}

.property-card.style2 .rating-value {
    color: #ff385c;
    font-weight: 500;
}

.property-card.style2 .review-count {
    color: #6c757d;
}

/* ================================
   STYLE 3: PREMIUM
   ================================ */

.property-card.style3 {
    border: 1px solid #e9ecef;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.property-card.style3:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transform: translateY(-6px);
}

.property-card.style3 .property-image-container {
    border-radius: 20px 20px 0 0;
}

.property-card.style3 .property-content {
    padding: 18px;
}

.property-card.style3 .premium-header {
    margin-bottom: 12px;
}

.property-card.style3 .property-location {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #6c757d;
    font-size: 16px;
    font-weight: 400;
}

.property-card.style3 .property-title {
    margin: 0 0 0px 0;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
}

.property-card.style3 .property-title a {
    color: #212529;
    text-decoration: none;
    transition: color 0.2s ease;
}

.property-card.style3 .property-title a:hover {
    color: #ff385c;
}

.property-card.style3 .property-rating-inline {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 15px;
}

.property-card.style3 .rating-value {
    color: #ff385c;
    font-weight: 600;
}

.property-card.style3 .review-count {
    color: #6c757d;
}

/* Enhanced Details with Icons */
.property-details-enhanced {
    margin-bottom: 16px;
}

.detail-icons {
    display: flex;
    gap: 6px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 17px;
}

.property-card.style3 svg {
    color: #6c757d;
    width: 20px;
}

/* Premium Footer - Inline Price and Button */
.premium-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.property-price-enhanced {
    flex: 1;
}

.property-card .price-label {
    color: #6c757d;
    font-size: 11px;
    font-weight: 500;
    display: block;
    margin-bottom: -4px;
}

.price-main {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.property-card.style3 .price-amount {
    font-size: 20px;
    font-weight: 700;
    color: #212529;
}

.property-card.style3 .price-period {
    color: #6c757d;
    font-size: 13px;
}

/* Quick Book Button - Inline Style */
.btn-quick-book {
    background: #ff385c;
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-quick-book:hover {
    background: #e61e4d;
    transform: translateY(-1px);
    color: white;
}

/* ================================
   STYLE 4: CARD 2 DESIGN
   ================================ */

.property-card.style4 {
    border: 1px solid #e9ecef;
    border-radius: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.property-card.style4:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.property-card.style4 .property-image-container {
    border-radius: 8px 8px 0 0;
}

/* Only set min-height for style4 when NO aspect ratio is set */
.property-card.style4 .property-image-container:not([class*="ratio-"]) {
    min-height: 200px;
}

.property-card.style4 .property-content {
    padding: 14px;
}

.property-card.style4 .property-title {
    margin: 0 0 0px 0;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
}

/* Card 2 Header */
.property-card.style4 .card2-header .property-title {
    margin: 0 0 0px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.property-card.style4 .card2-header .property-title a {
    color: #212529;
    text-decoration: none;
    transition: color 0.2s ease;
}

.property-card.style4 .card2-header .property-title a:hover {
    color: #ff385c;
}

.property-card.style4 .card2-header .property-location {
    color: #6c757d;
    font-size: 16px;
}

/* Enhanced Rating Row */
.property-card.style4 .property-rating-enhanced {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 15px;
}

.property-card.style4 .rating-value {
    color: #ff385c;
    font-weight: 500;
}

.property-card.style4 .review-count {
    color: #6c757d;
}

.property-card.style4 .superhost-badge {
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    margin-left: auto;
}

/* Card 2 Details */
.property-card.style4 .card2-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.property-card.style4 .card2-details .property-details {
    color: #6c757d;
    font-size: 12px;
}

.property-card.style4 .cancellation-policy .policy-text {
    color: #6c757d;
    font-size: 11px;
}

/* Card 2 Footer */
.property-card.style4 .card2-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.property-card.style4 .property-price-detailed {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.property-card.style4 .original-price {
    color: #999;
    font-size: 12px;
    text-decoration: line-through;
}

.property-card.style4 .current-price {
    color: #ff385c;
    font-weight: 600;
    font-size: 18px;
}

.property-card.style4 .price-period {
    color: #6c757d;
    font-size: 13px;
}

/* Book Now Button */
.property-card.style4 .btn-book-now {
    background: #f8f9fa;
    color: #495057;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
}

.property-card.style4 .btn-book-now:hover {
    background: #ff385c;
    color: white;
    border-color: #ff385c;
}

/* ================================
   PROPERTY LABELS
   ================================ */

.property-labels {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    /* flex-direction: column;*/
    gap: 6px;
    z-index: 3;
    max-width: calc(100% - 80px);
    /* Leave space for favorites button */
}

.property-label {
    display: inline-block;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 10px;
    backdrop-filter: blur(8px);
    letter-spacing: 0.5px;
    line-height: 1;
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* Individual label color overrides (optional) */
.property-label-seasonal {
    background-color: #ff5e30 !important;
    color: #c54314;
}

.property-label-weekend {
    background-color: #f4e9f9 !important;
    color: #6c3483 !important;
}

.property-label-early_bird {
    background-color: #b7fbd4 !important;
    color: #17733e !important;
}

.property-card .property-label-early_bird {
    background-color: #b7fbd4 !important;
    color: #17733e !important;
}

.property-card .property-label-last_minute {
    background-color: #e74c3c3b !important;
    color: #e74c3c !important;
}

.property-card .property-label-coupon {
    background-color: #ffebd2 !important;
    color: #8f6525 !important;
}

.property-card .property-label-los_discount {
    background-color: #d0e9fb !important;
    color: #2972a4 !important;
}

.property-card .property-label-services {
    background-color: #16a085 !important;
}

.property-card .property-label-smart_pricing {
    background-color: #c1e2da !important;
    color: #0f6d5b !important;
}

/* Hover effects */
.property-label:hover {}

/* Single Room Page Labels */
.property-labels-single {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.property-label-single {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    /*  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);*/
    /* transition: transform 0.2s ease, box-shadow 0.2s ease;*/
    cursor: default;
}

.property-label-single:hover {
    /*  transform: translateY(-1px);*/
    /*  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);*/
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .property-labels {
        top: 8px;
        left: 8px;
        gap: 4px;
        max-width: calc(100% - 60px);
    }

    .property-label {
        font-size: 9px;
        padding: 3px 6px;
        max-width: 100px;
    }

    /* Single room page labels mobile */
    .property-labels-single {
        gap: 6px;
        margin-bottom: 12px;
    }

    .property-label-single {
        font-size: 11px;
        padding: 4px 8px;
        border-radius: 16px;
    }
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */

@media (max-width: 768px) {
    .property-card {
        border-radius: 12px;
    }

    .property-card.style3 {
        border-radius: 16px;
    }

    .property-card.style3 .property-image-container {
        border-radius: 16px 16px 0 0;
    }

    /* Only set min-height for style3 when NO aspect ratio is set */
    .property-card.style3 .property-image-container:not([class*="ratio-"]) {
        min-height: 220px;
    }

    /* Adjust padding for mobile */
    .property-card.style1 .property-content,
    .property-card.style2 .property-content {
        padding: 12px;
    }

    .property-card.style3 .property-content,
    .property-card.style4 .property-content {
        padding: 14px;
    }

    /* Keep inline layout on mobile for style 3 */
    .premium-footer {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .btn-quick-book {
        text-align: center;
        padding: 6px 10px;
        font-size: 11px;
    }

    /* Adjust detail icons for mobile */
    .detail-icons {
        gap: 12px;
    }

    /* Smaller badges on mobile */
    .property-badges {
        top: 8px;
        left: 8px;
        gap: 4px;
    }

    .feature-badges {
        /* Deprecated - use .property-labels instead */
        display: none;
    }

    .glizwp-favorite-btn {
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
    }

    /* Slider navigation adjustments */
    .slider-nav {
        width: 28px;
        height: 28px;
    }

    .slider-nav.prev {
        left: 6px;
    }

    .slider-nav.next {
        right: 6px;
    }
}

@media (max-width: 480px) {
    .property-card.style2 .content-header {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .property-card.style2 .content-left {
        padding-right: 0;
    }

    .property-card.style2 .property-price {
        text-align: left;
    }

    /* Style 4 mobile adjustments */
    .property-card.style4 .card2-details {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .property-card.style4 .card2-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .property-card.style4 .btn-book-now {
        text-align: center;
        padding: 8px 12px;
    }

    .detail-icons {
        gap: 8px;
    }

    .detail-item {
        gap: 4px;
        font-size: 12px;
    }
}

/* ================================
   LOADING STATES
   ================================ */

.property-card.loading {
    pointer-events: none;
    opacity: 0.7;
}

.property-card.loading .property-image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* ================================
   GRID LAYOUTS
   ================================ */

.property-grid {
    display: grid;
    gap: 24px;
}

.property-grid.cols-1 {
    grid-template-columns: 1fr;
}

.property-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.property-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.property-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1200px) {
    .property-grid.cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {

    .property-grid.cols-3,
    .property-grid.cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .property-grid {
        gap: 16px;
    }
}

@media (max-width: 480px) {

    .property-grid.cols-2,
    .property-grid.cols-3,
    .property-grid.cols-4 {
        grid-template-columns: 1fr;
    }

    .property-grid {
        gap: 12px;
    }
}

/* ================================
   LIST LAYOUTS - STYLE 5 & 6
   ================================ */

/* Property List - List Style 1 (Style 5) */
.property-card.list-style-1 {
    display: flex;
    flex-direction: row;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: auto;
    min-height: 200px;
}

.property-card.list-style-1:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15), 0 4px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
    border-color: #d1d5db;
}

.property-card.list-style-1 .property-image-section {
    position: relative;
    width: 320px;
    min-width: 320px;
    flex-shrink: 0;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: stretch;
}

/* Make list layout respect image ratio settings */
.property-card.list-style-1 .property-image-section .property-image-container {
    width: 100%;
    height: 100%;
    flex: 1;
    display: flex;
    align-items: stretch;
    overflow: hidden;
}

.property-card.list-style-1 .property-image-section .property-image-container.ratio-square {
    aspect-ratio: 1 / 1;
}

.property-card.list-style-1 .property-image-section .property-image-container.ratio-16-9 {
    aspect-ratio: 16 / 9;
}

.property-card.list-style-1 .property-image-section .property-image-container.ratio-4-3 {
    aspect-ratio: 4 / 3;
}

.property-card.list-style-1 .property-image-section .property-image-container.ratio-3-2 {
    aspect-ratio: 3 / 2;
}

.property-card.list-style-1 .property-image-section .property-image-container.custom-ratio {
    /* Custom ratio will be set via inline styles */
}

/* Ensure sliders and images within ratio containers work properly */
.property-card.list-style-1 .property-image-container .property-image-slider,
.property-card.list-style-1 .property-image-container .property-image-single {
    width: 100%;
    height: 100%;
    flex: 1;
    display: flex;
    align-items: stretch;
}

/* Default height when no ratio container is used */
.property-card.list-style-1 .property-image-section:not(:has(.property-image-container)) {
    height: 200px;
}

/* Ensure image slider works in list layout and fills full height */
.property-card.list-style-1 .property-image-slider {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 200px;
    overflow: hidden;
    border-radius: 0;
    flex: 1;
    display: flex;
    align-items: stretch;
}

.property-card.list-style-1 .slider-container {
    position: relative;
    width: 100%;
    height: 100%;
    flex: 1;
    display: flex;
    align-items: stretch;
}

.property-card.list-style-1 .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.property-card.list-style-1 .slide.active {
    opacity: 1;
}

.property-card.list-style-1 .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.property-card.list-style-1 .property-image-single {
    width: 100%;
    height: 100%;
    min-height: 200px;
    flex: 1;
    display: flex;
    align-items: stretch;
}

.property-card.list-style-1 .property-image-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.property-card.list-style-1:hover .property-image-section img {
    transform: scale(1.03);
}

.property-card.list-style-1 .property-content-section {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
}

.property-card.list-style-1 .list-header {
    margin-bottom: 8px;
}

.property-card.list-style-1 .title-row {
    margin-bottom: 8px;
}

.property-card.list-style-1 .property-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    flex: 1;
    color: #1f2937;
}

.property-card.list-style-1 .property-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.property-card.list-style-1 .property-title a:hover {
    color: #e11d48;
}

.property-card.list-style-1 .property-rating {
    text-align: right;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.property-card.list-style-1 .rating-value {
    color: #e11d48;
    font-weight: 600;
    font-size: 14px;
}

.property-card.list-style-1 .review-count {
    color: #6b7280;
    font-size: 12px;
    display: block;
    margin-top: 2px;
}

/* Location and Tags Row with Rating */
.property-card.list-style-1 .location-tags-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    gap: 20px;
}

.property-card.list-style-1 .location-tags-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
}

.property-card.list-style-1 .property-location {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

.property-card.list-style-1 .location-icon {
    width: 14px;
    height: 14px;
    color: #6b7280;
    flex-shrink: 0;
}

.property-card.list-style-1 .property-category-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.property-card.list-style-1 .category-tag {
    background: #fdf2f8;
    color: #d56790;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 500;
    border: 1px solid #f3cede;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.property-card.list-style-1 .category-tag:hover {}

.property-card.list-style-1 .list-body {
    flex: 1;
    margin-bottom: 16px;
}

.property-card.list-style-1 .property-details {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f3f4f6;
}

.property-card.list-style-1 .property-details-enhanced {
    display: flex;
    gap: 16px;
    margin-bottom: 5px;
    padding-bottom: 5px;
}

.property-card.list-style-1 .detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

.property-card.list-style-1 .detail-icon {
    color: #6b7280;
    flex-shrink: 0;
}

.property-card.list-style-1 .property-excerpt {
    color: #4b5563;
    font-size: 14px;
    line-height: 1.5;
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.property-card.list-style-1 .list-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 12px;
}

.property-card.list-style-1 .property-price {
    text-align: left;
}

.property-card.list-style-1 .price-amount {
    color: #1f2937;
    font-weight: 700;
    font-size: 20px;
}

.property-card.list-style-1 .price-period {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    margin-left: 3px;
}

.property-card.list-style-1 .btn-view-details {
    background: #e11d48;
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(225, 29, 72, 0.2);
}

.property-card.list-style-1 .btn-view-details:hover {
    background: #be185d;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(225, 29, 72, 0.3);
}

/* Favorites Button for List Style 1 */
.property-card.list-style-1 .list-favorite {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.property-card.list-style-1 .list-favorite:hover {
    background: white;
    transform: scale(1.1);
}

.property-card.list-style-1 .list-labels {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: row;
    gap: 4px;
    z-index: 5;
}

/* Property List - List Style 2 (Style 6) - Compact */
.property-card.list-style-2 {
    display: flex;
    flex-direction: row;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 12px;
    min-height: 120px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.property-card.list-style-2:hover {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.property-card.list-style-2 .property-image-section.compact {
    position: relative;
    width: 180px;
    min-width: 180px;
    overflow: hidden;
    background: #f8f9fa;
}

/* Make compact list layout respect image ratio settings */
.property-card.list-style-2 .property-image-section .property-image-container {
    width: 100%;
    height: 100%;
}

.property-card.list-style-2 .property-image-section .property-image-container.ratio-square {
    aspect-ratio: 1 / 1;
}

.property-card.list-style-2 .property-image-section .property-image-container.ratio-16-9 {
    aspect-ratio: 16 / 9;
}

.property-card.list-style-2 .property-image-section .property-image-container.ratio-4-3 {
    aspect-ratio: 4 / 3;
}

.property-card.list-style-2 .property-image-section .property-image-container.ratio-3-2 {
    aspect-ratio: 3 / 2;
}

.property-card.list-style-2 .property-image-section .property-image-container.custom-ratio {
    /* Custom ratio will be set via inline styles */
}

/* Default height when no ratio container is used */
.property-card.list-style-2 .property-image-section:not(:has(.property-image-container)) {
    height: 120px;
}

/* Ensure image slider works in compact list layout */
.property-card.list-style-2 .property-image-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 0;
}

.property-card.list-style-2 .slider-container {
    position: relative;
    width: 100%;
    height: 100%;
    /* Remove fixed min-height to respect aspect ratios */
}

.property-card.list-style-2 .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.property-card.list-style-2 .slide.active {
    opacity: 1;
}

.property-card.list-style-2 .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Remove duplicate - already defined above */

.property-card.list-style-2 .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.property-card.list-style-2 .slide.active {
    opacity: 1;
}

.property-card.list-style-2 .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.property-card.list-style-2 .compact-image img,
.property-card.list-style-2 .compact-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.property-card.list-style-2:hover .compact-image img,
.property-card.list-style-2:hover .compact-slider img {
    transform: scale(1.03);
}

.property-card.list-style-2 .compact-content {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.property-card.list-style-2 .compact-main-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 15px;
}

.property-card.list-style-2 .title-location-block {
    flex: 1;
}

.property-card.list-style-2 .compact-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 6px 0;
}

.property-card.list-style-2 .compact-title a {
    color: #222;
    text-decoration: none;
    transition: color 0.2s ease;
}

.property-card.list-style-2 .compact-title a:hover {
    color: #FF385C;
}

.property-card.list-style-2 .compact-location {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #717171;
    font-size: 13px;
}

.property-card.list-style-2 .rating-price-block {
    text-align: right;
    flex-shrink: 0;
}

.property-card.list-style-2 .compact-rating {
    margin-bottom: 4px;
}

.property-card.list-style-2 .compact-rating .rating-value {
    color: #FF385C;
    font-weight: 600;
    font-size: 13px;
}

.property-card.list-style-2 .compact-rating .review-count {
    color: #717171;
    font-size: 11px;
    margin-left: 4px;
}

.property-card.list-style-2 .compact-price {
    text-align: right;
}

.property-card.list-style-2 .compact-price .price-amount {
    color: #222;
    font-weight: 600;
    font-size: 16px;
}

.property-card.list-style-2 .compact-price .price-period {
    color: #717171;
    font-size: 12px;
}

.property-card.list-style-2 .compact-details-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.property-card.list-style-2 .compact-details {
    color: #717171;
    font-size: 13px;
}

.property-card.list-style-2 .compact-tags {
    display: flex;
    gap: 4px;
}

.property-card.list-style-2 .compact-tag {
    background: #f7f7f7;
    color: #717171;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.property-card.list-style-2 .compact-action-mobile {
    margin-left: auto;
}

.property-card.list-style-2 .btn-view-compact {
    background: #f7f7f7;
    color: #222;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 12px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.property-card.list-style-2 .btn-view-compact:hover {
    background: #FF385C;
    color: white;
}

/* Favorites Button for List Style 2 */
.property-card.list-style-2 .compact-favorite {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.property-card.list-style-2 .compact-favorite:hover {
    background: white;
    transform: scale(1.1);
}

.property-card.list-style-2 .compact-labels {
    position: unset;
    top: 8px;
    left: 8px;
    z-index: 5;
    margin-bottom: 8px;
    flex-direction: row;
}

/* Compact slider controls */
.property-card.list-style-2 .compact-nav {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.9);
}

.property-card.list-style-2 .compact-nav.prev {
    left: 6px;
}

.property-card.list-style-2 .compact-nav.next {
    right: 6px;
}

.property-card.list-style-2 .compact-dots {
    bottom: 8px;
}

.property-card.list-style-2 .compact-dots .dot {
    width: 5px;
    height: 5px;
}

/* ================================
   RESPONSIVE DESIGN FOR LIST LAYOUTS
   ================================ */

@media (max-width: 768px) {

    /* List Style 1 - Stack on mobile */
    .property-card.list-style-1 {
        flex-direction: column;
        min-height: auto;
    }

    .property-card.list-style-1 .property-image-section {
        width: 100%;
        height: 200px;
    }

    .property-card.list-style-1 .property-content-section {
        padding: 20px;
        min-height: auto;
    }

    .property-card.list-style-1 .location-tags-row {
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 12px;
    }

    .property-card.list-style-1 .location-tags-left {
        width: 100%;
    }

    .property-card.list-style-1 .property-rating {
        text-align: left;
        align-self: flex-start;
    }

    .property-card.list-style-1 .property-details-enhanced {
        flex-wrap: wrap;
        gap: 12px;
    }

    .property-card.list-style-1 .list-footer {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        margin-top: 12px;
    }

    .property-card.list-style-1 .btn-view-details {
        width: 100%;
        text-align: center;
        padding: 14px 24px;
    }

    /* List Style 2 - Compact mobile layout */
    .property-card.list-style-2 .property-image-section.compact {
        width: 120px;
        min-width: 120px;
    }

    .property-card.list-style-2 .compact-content {
        padding: 12px;
    }

    .property-card.list-style-2 .compact-main-row {
        flex-direction: column;
        gap: 8px;
    }

    .property-card.list-style-2 .rating-price-block {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .property-card.list-style-2 .compact-details-row {
        margin-top: 8px;
    }
}

@media (max-width: 480px) {

    /* Further mobile optimizations */
    .property-card.list-style-1 .property-image-section {
        height: 180px;
    }

    .property-card.list-style-2 {
        min-height: 100px;
    }

    .property-card.list-style-2 .property-image-section.compact {
        width: 100px;
        min-width: 100px;
    }

    .property-card.list-style-2 .compact-title {
        font-size: 14px;
    }

    .property-card.list-style-2 .compact-location {
        font-size: 12px;
    }

    .property-card.list-style-2 .compact-details-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .property-card.list-style-2 .compact-action-mobile {
        margin-left: 0;
        margin-top: 6px;
    }
}

/* List Layout Container Styles */
.property-grid.list-layout {
    display: flex !important;
    flex-direction: column;
    gap: 1rem;
}

.property-grid.list-layout .property-card {
    width: 100%;
    margin-bottom: 0;
}

/* Fix for List Content Wrapper */
.property-card.list-style-1 .list-style-1-content,
.property-card.list-style-2 .list-style-2-content {
    display: flex;
    width: 100%;
    height: 100%;
}

.property-card.list-style-1 .list-style-1-content {
    flex-direction: row;
    min-height: 180px;
}

.property-card.list-style-2 .list-style-2-content {
    flex-direction: row;
    min-height: 120px;
}

/* Layout toggle controls removed - layouts now controlled via admin settings only */

/* Property Grid Container Classes */
.property-list-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

/* Remove any grid behavior for list containers */
.property-list-container.grid {
    display: flex !important;
    grid-template-columns: none !important;
}

/* Ensure list layout cards take full width */
.property-list-container .property-card {
    width: 100% !important;
    max-width: none !important;
    margin-bottom: 0;
}

/* Image Ratio Support for List Layouts */
.property-card.list-style-1 .property-image-section .property-image-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.property-card.list-style-2 .property-image-section .property-image-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Ensure image containers maintain aspect ratios in list layouts */
.property-card.list-style-1 .property-image-section .ratio-square {
    aspect-ratio: 1 / 1;
}

.property-card.list-style-1 .property-image-section .ratio-16-9 {
    aspect-ratio: 16 / 9;
}

.property-card.list-style-1 .property-image-section .ratio-4-3 {
    aspect-ratio: 4 / 3;
}

.property-card.list-style-1 .property-image-section .ratio-3-2 {
    aspect-ratio: 3 / 2;
}

.property-card.list-style-2 .property-image-section .ratio-square {
    aspect-ratio: 1 / 1;
}

.property-card.list-style-2 .property-image-section .ratio-16-9 {
    aspect-ratio: 16 / 9;
}

.property-card.list-style-2 .property-image-section .ratio-4-3 {
    aspect-ratio: 4 / 3;
}

.property-card.list-style-2 .property-image-section .ratio-3-2 {
    aspect-ratio: 3 / 2;
}

/* Single image in list layouts */
.property-card.list-style-1 .property-image-single img,
.property-card.list-style-2 .property-image-single img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Responsive fixes for List Layouts */
@media (max-width: 768px) {
    .property-card.list-style-1 .list-style-1-content {
        flex-direction: column !important;
    }

    .property-card.list-style-1 .property-image-section {
        width: 100% !important;
        min-width: unset !important;
        min-height: 240px;
    }

    .property-card.list-style-2 .list-style-2-content {
        flex-direction: column !important;
    }

    .property-card.list-style-2 .property-image-section.compact {
        width: 100% !important;
        min-width: unset !important;
        min-height: 150px;
    }
}