/**
 * Featured Listings Widget Styles
 */

/* Featured Section */
.featured-section {
    padding: 60px 20px;
    background: #f9fafb;
}

.featured-section h2 {
    text-align: center;
    color: var(--primary-color, #2d5016);
    font-size: 36px;
    margin-bottom: 40px;
}

/* Featured Grid */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.featured-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

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

.featured-image-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.featured-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-card:hover .featured-image-container img {
    transform: scale(1.05);
}

/* Listing Card Image (for grid view) */
.listing-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

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

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

/* Banner Overlay (PENDING, SOLD, etc) - Diagonal Ribbon */
.listing-banner-overlay,
.diagonal-banner {
    position: absolute;
    top: 20px;
    left: -35px;
    width: 150px;
    text-align: center;
    background: rgba(220, 38, 38, 0.95);
    color: white;
    padding: 6px 0;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
    transform: rotate(-45deg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.listing-banner-overlay.pending,
.diagonal-banner.pending {
    background: rgba(234, 179, 8, 0.95);
}

.listing-banner-overlay.sold,
.diagonal-banner.sold {
    background: rgba(220, 38, 38, 0.95);
}

.listing-banner-overlay.coming-soon,
.diagonal-banner.coming-soon {
    background: rgba(59, 130, 246, 0.95);
}

.listing-banner-overlay.active,
.listing-banner-overlay.for-sale,
.diagonal-banner.active,
.diagonal-banner.for-sale {
    background: rgba(34, 197, 94, 0.95);
}

/* Favorite Button - Top Right */
.featured-favorite-btn,
.listing-favorite-btn,
.carousel-favorite-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #2d5016;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-favorite-btn:hover,
.listing-favorite-btn:hover,
.carousel-favorite-btn:hover {
    transform: scale(1.15);
    background: #0f2505;
}

.featured-favorite-btn.favorited,
.listing-favorite-btn.favorited,
.carousel-favorite-btn.favorited {
    animation: heartBeat 0.3s ease;
}

.featured-card-body {
    padding: 20px;
}

.featured-card-body h3 {
    margin: 0 0 8px 0;
    color: #1e3a8a;
    font-size: 22px;
}

.featured-city {
    color: #666;
    font-size: 15px;
    margin-bottom: 12px;
}

.featured-price {
    color: #2d5016;
    font-size: 26px;
    font-weight: bold;
    margin-bottom: 12px;
}

.featured-details {
    color: #666;
    font-size: 15px;
    margin-bottom: 15px;
}

.featured-description {
    color: #444;
    line-height: 1.6;
    font-size: 14px;
}

/* Featured Carousel */
.featured-carousel {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-slide {
    min-width: 100%;
    padding: 0 15px;
}

/* Carousel Card */
.carousel-slide .featured-card {
    max-height: 500px !important;
}

.carousel-slide .featured-image-container {
    height: 300px !important;
    max-height: 300px !important;
}

.carousel-slide .featured-image-container img {
    width: 100%;
    height: 100% !important;
    max-height: 300px !important;
    object-fit: cover !important;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.carousel-btn {
    background: #2d5016;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.carousel-btn:hover {
    background: #0f2505;
}

.carousel-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.carousel-dot.active {
    background: #2d5016;
}

/* Listing Modal */
.listing-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    margin: 20px auto;
    position: relative;
}

.modal-header {
    position: relative;
    padding: 0;
}

.modal-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.modal-close:hover {
    background: #f3f4f6;
}

.modal-body {
    padding: 30px;
}

.modal-body h2 {
    margin: 0 0 10px 0;
    color: #1e3a8a;
    font-size: 32px;
}

.modal-city {
    color: #666;
    font-size: 18px;
    margin-bottom: 20px;
}

.modal-price {
    color: #2d5016;
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 20px;
}

.modal-details {
    color: #666;
    font-size: 18px;
    margin-bottom: 25px;
}

.modal-description {
    color: #444;
    line-height: 1.8;
    font-size: 16px;
    margin-bottom: 30px;
}

.modal-actions {
    display: flex;
    gap: 15px;
}

.modal-favorite-btn,
.modal-contact-btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-favorite-btn {
    background: #f3f4f6;
    color: #333;
}

.modal-favorite-btn:hover {
    background: #e5e7eb;
}

.modal-favorite-btn.favorited {
    background: #ef4444;
    color: white;
}

.modal-contact-btn {
    background: #2d5016;
    color: white;
}

.modal-contact-btn:hover {
    background: #0f2505;
}

/* Carousel Layout */
.carousel-content {
    max-width: 900px;
    margin: 0 auto;
}

.carousel-main {
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.carousel-image {
    width: 100%;
    height: 350px;
    overflow: hidden;
}

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

.carousel-info {
    padding: 1.5rem 2rem;
}

.carousel-info h3 {
    margin: 0 0 0.25rem;
    color: var(--primary-color, #2d5016);
    font-size: 1.4rem;
}

.carousel-city {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.carousel-price {
    color: var(--primary-color, #2d5016);
    font-size: 1.6rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.carousel-details {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.carousel-description {
    color: #444;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-top: 0.5rem;
}

/* Prev/Next buttons inside the card */
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 175px;
    transform: translateY(-50%);
    background: rgba(45, 80, 22, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 2rem;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.carousel-prev {
    left: 12px;
}

.carousel-next {
    right: 12px;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(45, 80, 22, 1);
    transform: translateY(-50%) scale(1.1);
}

/* Carousel Indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1rem;
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
    padding: 0;
}

.carousel-indicator.active {
    background: var(--primary-color, #2d5016);
}

/* Animations */
@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .featured-section h2 {
        font-size: 28px;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .featured-image-container {
        height: 200px;
    }
    
    .featured-favorite-btn {
        width: 40px;
        height: 40px;
        font-size: 22px;
    }
    
    .featured-card-body h3 {
        font-size: 20px;
    }
    
    .featured-price {
        font-size: 24px;
    }
    
    .modal-image {
        height: 250px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-body h2 {
        font-size: 24px;
    }
    
    .modal-price {
        font-size: 28px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}
