/**
 * property-card.css - Base Property Card Styles
 * 
 * Base styles shared by both card types (overlay and compact).
 * Card-specific styles are in:
 * - property-card-overlay.css (glassmorphism overlay variant)
 * - property-card-compact.css (compact image-below variant)
 */

/* ==========================================================================
   Base Card Structure (Shared)
   ========================================================================== */

.property-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--color-background, #fff);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.property-card[data-property-url] {
    cursor: pointer;
}

/* ==========================================================================
   Common Image Styles
   ========================================================================== */

.property-card-image {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--color-background-secondary, #1a1a1a);
}

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

/* ==========================================================================
   Common Badge Styles
   ========================================================================== */

.property-card-badges,
.image-overlay-content {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.property-badge,
.featured-badge {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.property-badge.featured,
.featured-badge {
    background: linear-gradient(135deg, var(--accent-color, #d4af37), #f4d03f);
    color: white;
}

/* ==========================================================================
   Common Favorite Button Styles
   ========================================================================== */

.favorite-btn,
.btn-favorite {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.favorite-btn:hover,
.btn-favorite:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.favorite-btn i,
.btn-favorite i {
    font-size: 1.1rem;
    color: var(--accent-color, #d4af37);
    transition: all 0.2s ease;
}

.favorite-btn.favorited i,
.btn-favorite.favorited i {
    color: #ef4444;
    transform: scale(1.15);
}

/* ==========================================================================
   Common Carousel Styles
   ========================================================================== */

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

.carousel-inner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease;
    backdrop-filter: blur(10px);
}

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

.carousel-nav:hover {
    background: rgba(255, 255, 255, 1);
}

.carousel-prev {
    left: 1rem;
}

.carousel-next {
    right: 1rem;
}

.carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.4rem;
    z-index: 5;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-indicator.active {
    background: rgba(255, 255, 255, 1);
    width: 24px;
    border-radius: 4px;
}

/* Mobile carousel controls always visible */
@media (max-width: 991px) {
    .carousel-nav {
        opacity: 1;
        background: rgba(255, 255, 255, 0.85);
    }
}

/* ==========================================================================
   Common Listing Type Badge Styles
   ========================================================================== */

.listing-types-indicator,
.property-listing-types {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.listing-type-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.listing-type-badge.sale {
    background: #fee2e2;
    color: #991b1b;
}

.listing-type-badge.long-term {
    background: #dcfce7;
    color: #166534;
}

.listing-type-badge.short-term {
    background: #dbeafe;
    color: #1e40af;
}

/* ==========================================================================
   Dark Mode Support (Base)
   ========================================================================== */

[data-theme="dark"] .property-card {
    background: var(--color-background-secondary, #0a0a0a);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .property-badge,
[data-theme="dark"] .favorite-btn,
[data-theme="dark"] .btn-favorite {
    background: rgba(0, 0, 0, 0.75);
}
