/* Property Carousel - Work Sans Font - Enhanced Design from idx-ampre-old */

/* Property Carousel - Work Sans Font - Enhanced Design from idx-ampre-old */

/* CRITICAL: Fix for Owl Carousel display issue - ensure it's not hidden */
.idx-ampre .owl-carousel,
.idx-ampre .property-carousel {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
}

.idx-ampre .owl-carousel.owl-hidden,
.idx-ampre .property-carousel.owl-hidden {
    display: block !important;
}

/* ADDITIONAL FIXES FOR IDX-MAIN NAMESPACE */
.idx-main .owl-carousel,
.idx-main .idx-property-carousel {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
}

.idx-main .owl-carousel.owl-hidden,
.idx-main .idx-property-carousel.owl-hidden {
    display: block !important;
}

/* Force proper display for carousel stages and items */
.idx-ampre .owl-carousel .owl-stage-outer,
.idx-main .owl-carousel .owl-stage-outer {
    display: block !important;
    overflow: hidden;
}

.idx-ampre .owl-carousel .owl-stage,
.idx-main .owl-carousel .owl-stage {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch;
    width: auto !important;
    transform: translate3d(0px, 0px, 0px);
    transition: all 0.25s ease 0s;
}

.idx-ampre .owl-carousel .owl-item,
.idx-main .owl-carousel .owl-item {
    display: flex !important;
    float: none !important;
    height: auto;
    min-height: 420px;
    backface-visibility: hidden;
    tap-highlight-color: transparent;
    touch-callout: none;
}

/* Specific fixes for property cards */
.idx-ampre .owl-carousel .property-card-new,
.idx-main .owl-carousel .idx-property-card {
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    float: none !important;
    clear: none !important;
}

/* Fix any WordPress theme interference */
.idx-ampre .property-carousel-container .owl-carousel *,
.idx-main .idx-property-carousel-container .owl-carousel * {
    box-sizing: border-box !important;
}

.idx-ampre .property-carousel-container {
    font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 2rem 0;
    width: 100%;
    max-width: 1400px; /* Increased to accommodate 4 cards + navigation */
    margin: 2rem auto;
}

.idx-ampre .property-carousel-wrapper {
    width: 100%;
    position: relative;
}

/* Carousel Header */
.idx-ampre .carousel-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.idx-ampre .carousel-title {
    font-size: 1.875rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
    line-height: 2.25rem;
    font-family: 'Work Sans', sans-serif;
}

/* Carousel with Navigation Container */
.idx-ampre .carousel-with-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 19px;
    width: 100%;
    height: auto;
    position: relative;
    z-index: 1;
}

/* Navigation Container */
.idx-ampre .carousel-nav-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4px;
    gap: 10px;
    width: 64px;
    height: 64px;
    flex: none;
    flex-grow: 0;
}

/* Navigation Button */
.idx-ampre .carousel-nav-btn {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 0;
    gap: 10px;
    width: 56px;
    height: 56px;
    background: #93370D;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: none;
    align-self: stretch;
    flex-grow: 1;
}

.idx-ampre .carousel-nav-btn:hover {
    background: #7d2f0b;
    transform: scale(1.05);
}

.idx-ampre .carousel-nav-btn:active {
    transform: scale(0.95);
}

/* Navigation Button Inner */
.idx-ampre .nav-btn-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 8px;
    gap: 10px;
    width: 40px;
    height: 40px;
    flex: none;
    flex-grow: 0;
}

.idx-ampre .nav-btn-inner {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 0;
    gap: 10px;
    width: 24px;
    height: 24px;
    border-radius: 100px;
    flex: none;
    flex-grow: 0;
}

.idx-ampre .nav-btn-inner svg {
    width: 24px !important;
    height: 24px !important;
    fill: white;
}

/* Carousel Content Wrapper */
.idx-ampre .carousel-content-wrapper {
    flex: 1;
    overflow: hidden;
    width: 1257px; /* Exact width for 4 cards: 300px * 4 + 19px * 3 = 1257px */
    max-width: 1257px;
}

/* Owl Carousel Container */
.idx-ampre .owl-carousel.property-carousel {
    position: relative;
    margin: 0;
}

/* Property Cards - 4 Cards Layout: 300px × 420px */
.idx-ampre .property-card-new {
    width: 300px !important;
    height: 420px !important;
    background: #FFFFFF;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    flex: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin: 0;
    min-width: 300px !important;
    max-width: 300px !important;
}

.idx-ampre .property-card-new:hover {
    transform: translateY(-2px);
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.15);
}

/* Card Image Container - 4 Cards Layout: 300px × 228px */
.idx-ampre .card-image-container {
    position: relative;
    width: 300px !important;
    height: 228px !important;
    overflow: hidden;
    border-radius: 12px; /* Rounded on all sides */
    flex-shrink: 0;
}

.idx-ampre .card-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 12px; /* Rounded on all sides */
    transition: transform 0.3s ease;
    display: block;
}

.idx-ampre .property-card-new:hover .card-image {
    transform: scale(1.05);
}

/* Image Filters/Chips - Adjusted for 300px cards with equal spacing */
.idx-ampre .image-filters {
    display: flex;
    flex-direction: row;
    justify-content: space-between; /* Better distribution */
    align-items: center;
    padding: 0;
    gap: 0; /* Remove fixed gap, use space-between */
    position: absolute;
    width: calc(100% - 16px); /* Account for 8px on each side */
    height: 32px;
    left: 8px; /* Equal spacing from left */
    right: 8px; /* Equal spacing from right */
    top: 8px;
    z-index: 2;
}

.idx-ampre .filter-chip {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 6px 16px;
    gap: 8px;
    height: 32px;
    background: #FFFFFF;
    border-radius: 100px;
    font-family: 'Work Sans', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 14px;
    line-height: 24px;
    text-align: center;
    letter-spacing: -0.03em;
    color: #293056;
    flex: none;
    box-sizing: border-box;
    white-space: nowrap; /* Prevent text wrapping */
    min-width: 64px; /* Minimum width */
    max-width: 150px; /* Maximum width for price */
}

.idx-ampre .filter-chip:first-child {
    width: auto; /* Auto width instead of fixed */
    min-width: 64px;
    flex-shrink: 0;
}

.idx-ampre .filter-chip.filter-price {
    width: auto; /* Auto width instead of fixed */
    min-width: 80px;
    max-width: 150px;
    flex-shrink: 0;
}

/* FOR RENT / FOR LEASE SPECIFIC STYLING - Enhanced */
.idx-ampre .filter-chip.for-rent {
    background: #E8F5E8 !important; /* Light green background for rent */
    color: #2D5016 !important; /* Dark green text */
    border: 1px solid #C3E6C3 !important; /* Subtle green border */
    font-weight: 700 !important; /* Bold text for better visibility */
}

.idx-ampre .filter-chip.for-sale {
    background: #FFFFFF !important; /* White background for sale */
    color: #293056 !important; /* Standard color */
    border: 1px solid #E5E7EB !important; /* Light gray border */
    font-weight: 700 !important; /* Bold text for consistency */
}

/* Hover effects for rental properties */
.idx-ampre .property-card-new[data-is-rental="true"]:hover .filter-chip.for-rent {
    background: #D1F2D1 !important; /* Slightly darker green on hover */
    transform: scale(1.02); /* Subtle scale effect */
}

.idx-ampre .property-card-new[data-is-rental="false"]:hover .filter-chip.for-sale {
    background: #F9FAFB !important; /* Slightly gray on hover */
    transform: scale(1.02); /* Subtle scale effect */
}

/* Animation for filter chips */
.idx-ampre .filter-chip {
    transition: all 0.2s ease;
}

/* Special emphasis for rental properties */
.idx-ampre .property-card-new[data-is-rental="true"] {
    border: 1px solid #E8F5E8; /* Subtle green border for rental cards */
}

.idx-ampre .property-card-new[data-is-rental="true"]:hover {
    border-color: #C3E6C3; /* Darker green border on hover */
    box-shadow: 0px 8px 16px rgba(45, 80, 22, 0.1); /* Green-tinted shadow */
}

/* Locked property specific styles */
.idx-ampre .property-card-new.locked-property .card-image.blurred {
    filter: blur(4px);
}

.idx-ampre .lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px; /* Rounded on all sides */
    z-index: 3;
}

.idx-ampre .lock-icon-container {
    margin-bottom: 1rem;
}

.idx-ampre .lock-icon {
    width: 3rem;
    height: 3rem;
    color: white;
    opacity: 0.9;
}

.idx-ampre .login-banner {
    text-align: center;
    color: white;
}

.idx-ampre .login-banner-button {
    font-size: 0.75rem;
    font-weight: 500;
    background-color: white;
    color: #dc2626;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    margin-bottom: 0.5rem;
    font-family: 'Work Sans', sans-serif;
}

.idx-ampre .login-banner-text {
    font-size: 0.625rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Work Sans', sans-serif;
}

/* Card Content - Positioned below image (192px remaining height) */
.idx-ampre .card-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 14px;
    gap: 6px; /* Reduced gap for better fit */
    width: 100%;
    height: 192px; /* 420px total - 228px image = 192px for content */
    flex: 1;
    box-sizing: border-box;
    justify-content: space-between; /* Distribute space evenly */
}

/* Property Type Title - LEFT ALIGNED */
.idx-ampre .property-type-title {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    justify-content: flex-start; /* LEFT ALIGNED */
    align-items: center;
    padding: 0 0 6px 0; /* Reduced padding */
    width: 100%;
    height: auto;
    border-bottom: 1px solid #E9EAEB;
    font-family: 'Work Sans', sans-serif;
    font-style: normal;
    font-weight: 400 !important; /* Force font-weight 400 */
    font-size: 16px;
    line-height: 24px;
    letter-spacing: -0.03em;
    color: #293056 !important; /* Force correct color */
    text-align: left; /* LEFT ALIGNED */
    margin-bottom: 4px; /* Reduced margin */
    flex-shrink: 0;
}

/* Property Address - LEFT ALIGNED */
.idx-ampre .property-address {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    justify-content: flex-start; /* LEFT ALIGNED */
    align-items: center;
    padding: 0 0 6px 0; /* Reduced padding */
    width: 100%;
    height: auto;
    border-bottom: 1px solid #E9EAEB;
    font-family: 'Work Sans', sans-serif;
    font-style: normal;
    font-weight: 400 !important;
    font-size: 14px;
    line-height: 22px;
    letter-spacing: -0.03em;
    color: #293056 !important;
    text-align: left; /* LEFT ALIGNED */
    margin-bottom: 4px; /* Reduced margin */
    flex-shrink: 0;
}

/* Property Features - LEFT ALIGNED */
.idx-ampre .property-features {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    justify-content: flex-start; /* LEFT ALIGNED */
    align-items: center;
    padding: 0 0 6px 0; /* Reduced padding */
    width: 100%;
    height: auto;
    border-bottom: 1px solid #E9EAEB;
    font-family: 'Work Sans', sans-serif;
    font-style: normal;
    font-weight: 400 !important;
    font-size: 14px;
    line-height: 22px;
    letter-spacing: -0.03em;
    color: #293056 !important;
    text-align: left; /* LEFT ALIGNED */
    margin-bottom: 4px; /* Reduced margin */
    flex-shrink: 0;
}

/* Property MLS - LEFT ALIGNED with proper spacing */
.idx-ampre .property-mls {
    display: flex;
    flex-direction: row;
    justify-content: flex-start; /* LEFT ALIGNED */
    align-items: center;
    padding: 0;
    width: 100%;
    height: auto;
    font-family: 'Work Sans', sans-serif;
    font-style: normal;
    font-weight: 400 !important;
    font-size: 14px;
    line-height: 22px;
    letter-spacing: -0.03em;
    color: #293056 !important;
    text-align: left; /* LEFT ALIGNED */
    flex-shrink: 0;
}

/* Property Card Link */
.idx-ampre .property-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.idx-ampre .property-card-link:hover {
    text-decoration: none;
    color: inherit;
}

/* Sample Cards */
.idx-ampre .property-card-new.sample-card {
    opacity: 0.9;
}

/* Carousel Footer */
.idx-ampre .carousel-footer {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.idx-ampre .view-all-properties-btn {
    /* Button - Filled buttons are high-emphasis buttons */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0px;
    gap: 8px;
    width: 132px;
    height: 64px;
    /* Black */
    background: #000000;
    border-radius: 100px;
    text-decoration: none;
    transition: all 0.2s ease;
    /* Inside auto layout */
    flex: none;
    order: 1;
    flex-grow: 0;
}

.idx-ampre .view-all-properties-btn:hover {
    background: #374151;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* State layer for the button */
.idx-ampre .view-all-properties-btn .view-all-text {
    /* Auto layout */
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 10px 32px;
    gap: 8px;
    width: 132px;
    height: 64px;
    /* Inside auto layout */
    flex: none;
    order: 0;
    align-self: stretch;
    flex-grow: 0;
}

/* Label text styles */
.idx-ampre .view-all-text {
    width: 68px;
    height: 28px;
    /* Button/Medium */
    font-family: 'Work Sans', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 18px;
    line-height: 28px;
    /* identical to box height, or 156% */
    display: flex;
    align-items: center;
    text-align: center;
    letter-spacing: -0.03em;
    /* White */
    color: #FFFFFF;
    /* Inside auto layout */
    flex: none;
    order: 0;
    flex-grow: 0;
}

/* Owl Carousel Specific Styles */
.idx-ampre .owl-carousel .owl-stage-outer {
    overflow: hidden;
}

.idx-ampre .owl-carousel .owl-stage {
    display: flex;
    align-items: stretch;
    width: 1319px !important; /* 4 cards * 319px (300px + 19px margin) */
    padding: 15px 0; /* Add 15px padding top and bottom */
}

.idx-ampre .owl-carousel .owl-item {
    height: auto;
    display: flex;
    width: 319px !important; /* 300px card + 19px margin */
    min-width: 319px !important;
    max-width: 319px !important;
    flex-shrink: 0;
}

.idx-ampre .owl-carousel .owl-item .property-card-new {
    height: 420px !important;
    width: 300px !important;
    min-width: 300px !important;
    max-width: 300px !important;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    margin: 0 auto;
}

/* Remove Owl Carousel default navigation and dots */
.idx-ampre .owl-carousel .owl-nav,
.idx-ampre .owl-carousel .owl-dots {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 640px) {
    .idx-ampre .carousel-with-nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .idx-ampre .carousel-nav-container {
        display: none; /* Hide navigation on mobile */
    }
    
    .idx-ampre .carousel-content-wrapper {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Keep 360px card size on mobile but scale down if needed */
    .idx-ampre .property-card-new {
        width: 320px !important;
        height: 420px !important;
        margin: 0 auto;
        min-width: 320px !important;
        max-width: 320px !important;
    }
    
    .idx-ampre .card-image-container {
        width: 320px !important;
        height: 240px !important;
    }
    
    .idx-ampre .card-content {
        width: 100%;
        height: 192px; /* Adjusted for new height */
    }
    
    .idx-ampre .image-filters {
        width: calc(100% - 12px); /* Smaller margins on mobile */
        left: 6px;
        right: 6px;
        gap: 0;
    }
    
    .idx-ampre .filter-chip {
        padding: 4px 12px; /* Smaller padding on mobile */
        font-size: 12px;
        max-width: 120px;
    }
    
    .idx-ampre .owl-carousel .owl-item {
        width: 340px !important;
        min-width: 340px !important;
        max-width: 340px !important;
    }
    
    .idx-ampre .owl-carousel .owl-item .property-card-new {
        width: 320px !important;
        min-width: 320px !important;
        max-width: 320px !important;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .idx-ampre .carousel-with-nav {
        gap: 15px;
    }
    
    .idx-ampre .carousel-content-wrapper {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Keep close to 360px on tablet */
    .idx-ampre .property-card-new {
        width: 350px !important;
        height: 420px !important;
        min-width: 350px !important;
        max-width: 350px !important;
    }
    
    .idx-ampre .card-image-container {
        width: 350px !important;
        height: 270px !important;
    }
    
    .idx-ampre .card-content {
        width: 100%;
        height: 192px;
    }
    
    .idx-ampre .image-filters {
        width: calc(100% - 14px);
        left: 7px;
        right: 7px;
        gap: 0;
    }
    
    .idx-ampre .owl-carousel .owl-item {
        width: 365px !important;
        min-width: 365px !important;
        max-width: 365px !important;
    }
    
    .idx-ampre .owl-carousel .owl-item .property-card-new {
        width: 350px !important;
        min-width: 350px !important;
        max-width: 350px !important;
    }
}

@media (min-width: 1024px) {
    .idx-ampre .carousel-with-nav {
        gap: 19px;
    }

    /* Desktop: 4 Cards Layout - 300px × 420px */
    .idx-ampre .property-card-new {
        width: 300px !important;
        height: 420px !important;
        min-width: 300px !important;
        max-width: 300px !important;
    }

    .idx-ampre .card-image-container {
        width: 300px !important;
        height: 228px !important;
    }

    .idx-ampre .card-content {
        width: 100%;
        height: 192px;
    }
}

/* Ensure proper spacing */
.idx-ampre .owl-carousel .owl-stage {
    margin: 0;
    display: flex;
    align-items: center;
}

/* Override any inherited Owl Carousel styles that might conflict */
.idx-ampre .owl-carousel,
.idx-ampre .owl-carousel .owl-stage-outer,
.idx-ampre .owl-carousel .owl-stage,
.idx-ampre .owl-carousel .owl-item {
    position: relative;
}

/* ENHANCED LOADING STYLES */
.idx-ampre .lazy-property-image {
    transition: opacity 0.3s ease;
    background-color: #f5f5f5; /* Light background while loading */
}

.idx-ampre .lazy-property-image:not(.loaded) {
    opacity: 0.7; /* Slightly transparent while loading */
}

.idx-ampre .lazy-property-image.loaded {
    opacity: 1; /* Full opacity when loaded */
}

/* Enhanced loading overlay for carousel */
.idx-ampre .carousel-image-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    border-radius: 12px; /* Match image border radius */
}

.idx-ampre .carousel-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #93370D; /* Match carousel theme */
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: carousel-spin 1s linear infinite;
}

@keyframes carousel-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Print styles */
@media print {
    .idx-ampre .carousel-nav-container,
    .idx-ampre .carousel-footer {
        display: none !important;
    }
    
    .idx-ampre .image-filters {
        display: none; /* Hide filter chips in print */
    }
}
