/**
 * TwinsRealEstate - Unified Property Cards Component (Final)
 * 
 * Consolidated from all property card implementations
 * Optimized for performance, accessibility, and mobile experience
 * Preserves all existing UI and functionality
 */

/* ==========================================================================
   CSS CUSTOM PROPERTIES - CENTRALIZED THEMING
   ========================================================================== */

:root {
    /* Card Base Colors */
    --card-bg: #ffffff;
    --card-text: #1a1a1a;
    --card-text-secondary: #666666;
    --card-border: rgba(212, 175, 55, 0.1);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --card-shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.15);
    
    /* Accent Colors */
    --accent-color: #d4af37;
    --accent-hover: #b49225;
    --accent-rgb: 212, 175, 55;
    
    /* Status Colors */
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    --warning-color: #f39c12;
    
    /* Spacing & Sizing */
    --card-border-radius: 20px;
    --card-padding: 20px;
    --card-gap: 12px;
    
    /* Animations */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s ease;
    --transition-slow: all 0.5s ease;
}

/* Dark Theme Variables - Ultra Black */
[data-theme="dark"] {
    --card-bg: #0a0a0a;              /* Ultra black for cards */
    --card-text: #ffffff;            /* Pure white */
    --card-text-secondary: #e0e0e0;  /* Light grey */
    --card-border: rgba(212, 175, 55, 0.2);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);  /* Enhanced shadow */
    --card-shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   BASE CARD STRUCTURE - UNIFIED FOR ALL VARIANTS
   ========================================================================== */

.property-card {
    position: relative;
    background: var(--card-bg);
    border-radius: var(--card-border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--card-border);
    transition: var(--transition-smooth);
    will-change: transform, box-shadow;
}

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
    border-color: rgba(var(--accent-rgb), 0.3);
}

/* Modern card variant */
.property-card.modern-card {
    border-radius: var(--card-border-radius);
}

.property-card.modern-card:hover {
    transform: translateY(-10px);
}

/* ==========================================================================
   IMAGE CONTAINER - RESPONSIVE & OPTIMIZED
   ========================================================================== */

.property-card-image,
.property-image,
.property-image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--card-border-radius) var(--card-border-radius) 0 0;
}

/* Responsive image heights - mobile first approach */
.property-card-image,
.property-image,
.property-image-wrapper {
    height: 280px; /* Mobile optimized height */
}

@media (min-width: 576px) {
    .property-card-image,
    .property-image,
    .property-image-wrapper {
        height: 300px;
    }
}

@media (min-width: 768px) {
    .property-card-image,
    .property-image,
    .property-image-wrapper {
        height: 280px;
    }
}

@media (min-width: 992px) {
    .property-card-image,
    .property-image,
    .property-image-wrapper {
        height: 300px;
    }
}

@media (min-width: 1200px) {
    .property-card-image,
    .property-image,
    .property-image-wrapper {
        height: 320px;
    }
}

@media (min-width: 1400px) {
    .property-card-image,
    .property-image,
    .property-image-wrapper {
        height: 340px;
    }
}

/* Image element styling */
.property-card-image img,
.property-image img,
.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Image overlay for better text readability */
.property-card-image::after,
.property-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
    opacity: 0.9;
    z-index: 1;
    pointer-events: none;
}

/* ==========================================================================
   IMAGE OVERLAY CONTENT (BADGES & FAVORITE BUTTON)
   ========================================================================== */

.image-overlay-content {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 3;
    pointer-events: none;
}

/* Featured badge */
.featured-badge,
.property-badge .badge {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.4);
    pointer-events: auto;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Badge variants */
.badge-short-term,
.listing-type-badge.short-term {
    background: linear-gradient(135deg, var(--info-color) 0%, #2980b9 100%) !important;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.badge-long-term,
.listing-type-badge.long-term {
    background: linear-gradient(135deg, var(--success-color) 0%, #229954 100%) !important;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.badge-sale,
.listing-type-badge.sale {
    background: linear-gradient(135deg, var(--danger-color) 0%, #c0392b 100%) !important;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

/* Favorite button - unified styling */
.favorite-btn,
.property-actions .btn-favorite {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: none;
    border-radius: 50%;
    color: #666;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
}

.favorite-btn:hover,
.property-actions .btn-favorite:hover {
    background: rgba(255, 255, 255, 1);
    color: var(--danger-color);
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

.favorite-btn.favorited,
.property-actions .btn-favorite.favorited {
    color: var(--danger-color);
    background: rgba(231, 76, 60, 0.1);
}

/* Property type indicator */
.property-type-indicator {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Price display on image */
.property-price {
    position: absolute;
    bottom: 15px;
    right: 15px;
    z-index: 2;
}

.property-price .price,
.price-display {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    color: white;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 3px 12px rgba(var(--accent-rgb), 0.25);
    transition: var(--transition-fast);
    font-size: 1rem;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.price-display:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.35);
}

.price-amount {
    font-size: 1.1rem;
    font-weight: 700;
}

.price-type,
.price-period {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* ==========================================================================
   CONTENT AREA - ORGANIZED & CONSISTENT
   ========================================================================== */

.property-card-content,
.property-content {
    padding: var(--card-padding);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: var(--card-gap);
    position: relative;
}

/* Responsive content padding */
@media (max-width: 576px) {
    .property-card-content,
    .property-content {
        padding: 16px;
        gap: 10px;
    }
}

@media (min-width: 1200px) {
    .property-card-content,
    .property-content {
        padding: 24px;
        gap: 14px;
    }
}

/* Property header */
.property-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 4px;
}

/* Property title - unified styling */
.property-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--card-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 2.8em;
    transition: color 0.3s ease;
}

.property-title a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

.property-title a:hover,
.property-card:hover .property-title {
    color: var(--accent-color);
}

/* Responsive title sizing */
@media (max-width: 576px) {
    .property-title {
        font-size: 1.1rem;
        height: 2.6em;
    }
}

@media (min-width: 1200px) {
    .property-title {
        font-size: 1.3rem;
    }
}

/* Property location */
.property-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--card-text-secondary);
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.property-location i {
    color: var(--accent-color);
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* ==========================================================================
   LISTING TYPE BADGES & PRICING
   ========================================================================== */

.listing-types-indicator {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.listing-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}

/* Property pricing section */
.property-pricing-section,
.property-price-section {
    margin: 12px 0 8px 0;
    padding: 12px 0;
    border-top: 1px solid rgba(var(--accent-rgb), 0.2);
    border-bottom: 1px solid rgba(var(--accent-rgb), 0.2);
}

.property-pricing-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    margin-right: 8px;
    margin-bottom: 6px;
}

/* Multiple offers styling */
.multiple-offers .offers-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 8px;
    opacity: 0.8;
    color: var(--card-text-secondary);
}

.multiple-offers .offers-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ==========================================================================
   PROPERTY FEATURES - COMPACT & MODERN
   ========================================================================== */

.property-features {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    margin: 8px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding-top: 14px;
}

.feature-item,
.property-features .feature {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.1) 0%, rgba(var(--accent-rgb), 0.05) 100%);
    padding: 8px 12px;
    border-radius: 18px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--card-text);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    transition: var(--transition-fast);
    box-shadow: 0 2px 6px rgba(var(--accent-rgb), 0.1);
    min-width: fit-content;
}

.feature-item:hover {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.15) 0%, rgba(var(--accent-rgb), 0.08) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.15);
}

.feature-item i,
.property-features .feature i {
    color: var(--accent-color);
    font-size: 1rem;
    width: 16px;
    text-align: center;
}

.feature-item span {
    font-weight: 700;
    letter-spacing: -0.01em;
    font-size: 0.9rem;
}

/* Mobile optimization for features */
@media (max-width: 576px) {
    .property-features {
        gap: 6px;
        justify-content: space-between;
    }
    
    .feature-item,
    .property-features .feature {
        font-size: 0.8rem;
        padding: 6px 10px;
        gap: 4px;
        flex: 1;
        min-width: 0;
        justify-content: center;
        border-radius: 14px;
    }
    
    .feature-item i,
    .property-features .feature i {
        font-size: 0.9rem;
        width: 14px;
    }
    
    .feature-item span {
        font-size: 0.8rem;
    }
}

/* Property highlights */
.property-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.property-highlight {
    font-size: 12px;
    background-color: rgba(var(--accent-rgb), 0.08);
    color: var(--accent-color);
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.property-highlight i {
    font-size: 11px;
}

/* ==========================================================================
   ACTION BUTTONS - OPTIMIZED FOR SPACE
   ========================================================================== */

.property-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 8px;
    justify-content: space-between;
    align-items: center;
}

/* Primary Button - View Details */
.property-actions .btn-primary {
    flex: 1;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    box-shadow: 0 3px 12px rgba(var(--accent-rgb), 0.25);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* Shimmer effect for primary button */
.property-actions .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.property-actions .btn-primary:hover::before {
    left: 100%;
}

.property-actions .btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-hover) 0%, #9e7a1a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(var(--accent-rgb), 0.4);
    color: white;
    text-decoration: none;
}

/* Secondary Button - Compare */
.property-actions .btn-secondary {
    width: 44px;
    height: 44px;
    background: rgba(var(--accent-rgb), 0.1);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    border-radius: 12px;
    color: var(--accent-color);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

/* Ripple effect for secondary button */
.property-actions .btn-secondary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--accent-color);
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

.property-actions .btn-secondary:hover::before {
    width: 100%;
    height: 100%;
}

.property-actions .btn-secondary:hover {
    color: white;
    transform: scale(1.05);
    border-color: var(--accent-color);
}

.property-actions .btn-secondary i {
    position: relative;
    z-index: 1;
}

/* Responsive button sizing */
@media (max-width: 576px) {
    .property-actions {
        gap: 8px;
    }
    
    .property-actions .btn-primary {
        padding: 10px 16px;
        font-size: 0.85rem;
        border-radius: 10px;
    }
    
    .property-actions .btn-secondary {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
        border-radius: 10px;
    }
}

@media (min-width: 1200px) {
    .property-actions .btn-primary {
        padding: 14px 24px;
        font-size: 0.95rem;
    }
    
    .property-actions .btn-secondary {
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
    }
}

/* ==========================================================================
   CAROUSEL SPECIFIC STYLES
   ========================================================================== */

.carousel-property-card {
    flex: 0 0 300px;
    margin-right: var(--card-gap);
    scroll-snap-align: start;
}

.carousel-property-card .property-card {
    height: 400px;
}

@media (max-width: 768px) {
    .carousel-property-card {
        flex: 0 0 280px;
    }
    
    .carousel-property-card .property-card {
        height: 380px;
    }
}

/* Carousel navigation */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    opacity: 0;
    transition: var(--transition-fast);
    z-index: 2;
    backdrop-filter: blur(8px);
}

.property-card:hover .carousel-nav {
    opacity: 0.8;
}

.carousel-nav:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.85);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 12px;
}

.carousel-next {
    right: 12px;
}

/* Carousel indicators */
.carousel-indicators {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.property-card:hover .carousel-indicators {
    opacity: 0.9;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.carousel-indicator.active {
    background: white;
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   GRID LAYOUT - OPTIMIZED PROPORTIONS
   ========================================================================== */

.property-cards-grid,
.property-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    padding: 0;
    max-width: none;
}

/* Responsive grid adjustments */
@media (min-width: 576px) {
    .property-cards-grid,
    .property-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 28px;
    }
}

@media (min-width: 768px) {
    .property-cards-grid,
    .property-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
}

@media (min-width: 1200px) {
    .property-cards-grid,
    .property-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 36px;
    }
}

@media (min-width: 1600px) {
    .property-cards-grid,
    .property-grid {
        max-width: 1440px;
        margin: 0 auto;
        gap: 40px;
    }
}

@media (max-width: 575px) {
    .property-cards-grid,
    .property-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 16px;
    }
}

/* ==========================================================================
   FEATURED PROPERTIES SECTION
   ========================================================================== */

.featured-properties-section {
    padding: 5rem 0;
    background-color: #f9f9fa;
    position: relative;
}

.featured-properties-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.2), transparent);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--card-text);
    margin-bottom: 0.75rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover));
    border-radius: 3px;
}

.section-subtitle {
    color: var(--card-text-secondary);
    max-width: 650px;
    margin: 1.25rem auto 0;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* ==========================================================================
   DARK MODE SUPPORT
   ========================================================================== */

[data-theme="dark"] .property-card {
    background: var(--card-bg);
    border-color: var(--card-border);
    box-shadow: var(--card-shadow);
}

[data-theme="dark"] .property-card:hover {
    box-shadow: var(--card-shadow-hover);
    border-color: rgba(var(--accent-rgb), 0.4);
}

[data-theme="dark"] .property-title,
[data-theme="dark"] .property-title a {
    color: var(--card-text);
}

[data-theme="dark"] .property-location {
    color: var(--card-text-secondary);
}

[data-theme="dark"] .property-features {
    border-top-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .property-features .feature,
[data-theme="dark"] .feature-item {
    background: rgba(255, 255, 255, 0.08);
    color: var(--card-text);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .feature-item span {
    color: var(--card-text);
}

[data-theme="dark"] .favorite-btn,
[data-theme="dark"] .property-actions .btn-favorite {
    background: rgba(42, 42, 42, 0.9);
    color: #d0d0d0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .favorite-btn:hover,
[data-theme="dark"] .property-actions .btn-favorite:hover {
    background: rgba(255, 255, 255, 0.25);
    color: var(--danger-color);
}

[data-theme="dark"] .property-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #d0d0d0;
}

[data-theme="dark"] .property-actions .btn-secondary:hover {
    background: var(--accent-color);
    color: white;
}

[data-theme="dark"] .property-type-indicator {
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .property-highlight {
    background-color: rgba(var(--accent-rgb), 0.1);
    color: #8db4d4;
}

[data-theme="dark"] .multiple-offers .offers-label {
    color: var(--card-text-secondary);
}

[data-theme="dark"] .featured-properties-section {
    background-color: #1a1a1a;
}

[data-theme="dark"] .featured-properties-section::before {
    opacity: 0.3;
}

[data-theme="dark"] .section-title {
    color: var(--card-text);
}

[data-theme="dark"] .section-subtitle {
    color: var(--card-text-secondary);
}

/* ==========================================================================
   ACCESSIBILITY & PERFORMANCE OPTIMIZATIONS
   ========================================================================== */

/* Hardware acceleration for smooth animations */
.property-card,
.property-card-image img,
.property-image img,
.card-image,
.favorite-btn,
.property-actions .btn-primary,
.property-actions .btn-secondary {
    will-change: transform;
}

/* Focus states for accessibility */
.property-actions .btn-primary:focus,
.property-actions .btn-secondary:focus,
.favorite-btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.property-card:focus-within {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .property-card {
        border: 2px solid var(--card-border);
    }
    
    .favorite-btn {
        border: 2px solid var(--card-border);
    }
    
    .featured-badge {
        border: 2px solid white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .property-card,
    .property-card-image img,
    .property-image img,
    .card-image,
    .favorite-btn,
    .property-actions .btn-primary,
    .property-actions .btn-secondary {
        transition: none;
    }
    
    .property-card:hover {
        transform: none;
    }
    
    .property-card:hover .property-card-image img,
    .property-card:hover .property-image img,
    .property-card:hover .card-image {
        transform: none;
    }
}

/* Print styles */
@media print {
    .property-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .carousel-nav,
    .carousel-indicators,
    .favorite-btn {
        display: none;
    }
}

/* Loading state for images */
.card-image,
.property-card-image img,
.property-image img {
    opacity: 1;
}

@keyframes fadeInImage {
    to {
        opacity: 1;
    }
}

/* Mobile touch optimizations */
@media (max-width: 576px) {
    .property-card {
        margin: 0;
    }
    
    /* Touch-friendly adjustments */
    .favorite-btn {
        width: 44px;
        height: 44px;
    }
    
    .featured-badge {
        padding: 6px 10px;
    }
}

/* Responsive adjustments for small screens */
@media (max-width: 768px) {
    .property-features {
        gap: 12px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .property-price .price,
    .price-display {
        font-size: 14px;
        padding: 6px 14px;
    }
}

@media (max-width: 576px) {
    .property-card-image,
    .property-image,
    .property-image-wrapper {
        height: 200px;
    }
    
    .property-card-content,
    .property-content {
        padding: 18px;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .property-features .feature,
    .feature-item {
        font-size: 12px;
    }
    
    .property-features .feature i,
    .feature-item i {
        font-size: 14px;
    }
    
    .property-title {
        font-size: 17px;
        height: 2.6em;
    }
}