/* ===== Featured Carousel ===== */
.featured-carousel {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

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

.carousel-slide {
    min-width: 100%;
    position: relative;
}

.carousel-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.carousel-image {
    position: relative;
    height: 400px;
    overflow: hidden;
}

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

.carousel-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
}

.carousel-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.carousel-status.status-active {
    background: var(--primary-color);
}

.carousel-status.status-pending {
    background: #e67e22;
}

.carousel-status.status-sold {
    background: #c0392b;
}

.carousel-mls {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    background: rgba(255,255,255,0.2);
    margin-left: 0.5rem;
}

.carousel-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: white;
}

.carousel-address {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 0.75rem;
}

.carousel-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.carousel-price {
    font-size: 1.5rem;
    font-weight: 700;
}

.carousel-specs {
    font-size: 0.9rem;
    opacity: 0.9;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all var(--transition);
    z-index: 10;
    color: var(--text-color);
}

.carousel-prev:hover,
.carousel-next:hover {
    background: white;
    box-shadow: var(--shadow);
}

.carousel-prev {
    left: 1rem;
}

.carousel-next {
    right: 1rem;
}

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

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    background: transparent;
    cursor: pointer;
    transition: background var(--transition);
}

.carousel-dot.active,
.carousel-dot:hover {
    background: white;
}

/* Responsive carousel */
@media (max-width: 768px) {
    .carousel-image {
        height: 300px;
    }

    .carousel-content {
        padding: 1.5rem;
    }

    .carousel-title {
        font-size: 1.25rem;
    }

    .carousel-price {
        font-size: 1.25rem;
    }

    .carousel-prev,
    .carousel-next {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* ===== Property Gallery ===== */
.property-gallery-container {
    background: var(--bg-light);
}

.gallery-main {
    position: relative;
    height: 450px;
    cursor: pointer;
    overflow: hidden;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.gallery-main:hover img {
    transform: scale(1.02);
}

.gallery-counter {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.gallery-expand-hint {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity var(--transition);
}

.gallery-main:hover .gallery-expand-hint {
    opacity: 1;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all var(--transition);
    opacity: 0;
    color: var(--text-color);
}

.gallery-main:hover .gallery-nav {
    opacity: 1;
}

.gallery-nav:hover {
    background: white;
    box-shadow: var(--shadow);
}

.gallery-prev {
    left: 1rem;
}

.gallery-next {
    right: 1rem;
}

.gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    background: white;
}

.gallery-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border: 3px solid transparent;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: border-color var(--transition);
    padding: 0;
    background: none;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumb.active,
.gallery-thumb:hover {
    border-color: var(--primary-color);
}

/* ===== Lightbox ===== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    padding: 0.5rem;
}

.lightbox-close:hover {
    color: var(--secondary-color);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: background var(--transition);
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255,255,255,0.2);
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

.lightbox-counter {
    text-align: center;
    color: white;
    padding: 1rem;
    font-size: 0.9rem;
}

/* Responsive gallery */
@media (max-width: 768px) {
    .gallery-main {
        height: 300px;
    }

    .gallery-thumb {
        width: 60px;
        height: 45px;
    }

    .lightbox-prev,
    .lightbox-next {
        padding: 0.75rem 1rem;
        font-size: 1.5rem;
    }
}

/* ===== Location Section ===== */
.location-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.location-section h3 {
    margin-bottom: 1rem;
}

.location-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .location-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.map-container {
    height: 300px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-light);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.walkscore-container {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.walkscore-container h4 {
    margin-bottom: 1rem;
}

.walkscore-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.walkscore-badge {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: var(--radius);
    min-width: 100px;
}

.walkscore-badge .score {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.walkscore-badge .label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.walkscore-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.walkscore-link:hover {
    text-decoration: underline;
}
