/* AppFolio Listifier - Frontend Styles */

:root {
    --afsc-primary: #598fcd;
    --afsc-secondary: #ff6600;
    --afsc-text: #333;
    --afsc-text-light: #666;
    --afsc-bg: #f8f9fa;
    --afsc-white: #fff;
    --afsc-border: #e5e5e5;
    --afsc-shadow: 0 2px 10px rgba(0,0,0,0.1);
    --afsc-radius: 8px;
    --afsc-transition: all 0.3s ease;
}

/* Container */
.afsc-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Loading */
.afsc-loading {
    text-align: center;
    padding: 60px 20px;
}

.afsc-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--afsc-border);
    border-top-color: var(--afsc-primary);
    border-radius: 50%;
    animation: afsc-spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes afsc-spin {
    to { transform: rotate(360deg); }
}

.afsc-loading p {
    color: var(--afsc-text-light);
    font-size: 16px;
    margin: 0;
}

/* Error */
.afsc-error {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 15px 20px;
    border-radius: var(--afsc-radius);
    text-align: center;
}

/* Banner / Filters */
.afsc-banner {
    background: linear-gradient(135deg, var(--afsc-primary) 0%, #4a7ab5 100%);
    padding: 24px;
    margin-bottom: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(89, 143, 205, 0.3);
}

.afsc-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.afsc-filter-group {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-self: flex-end;
}

.afsc-filter-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.85);
    padding-left: 4px;
}

.afsc-filter {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    border: 2px solid transparent;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.95);
    color: var(--afsc-text);
    cursor: pointer;
    min-width: 140px;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.afsc-filter:hover {
    background-color: var(--afsc-white);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.afsc-filter:focus {
    outline: none;
    border-color: var(--afsc-secondary);
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.2);
}

.afsc-reset-filters {
    display: inline-flex;
    align-items: center;
    align-self: flex-end;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--afsc-white);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    backdrop-filter: blur(4px);
    height: 44px;
}

.afsc-reset-filters:hover {
    background: var(--afsc-white);
    color: var(--afsc-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.afsc-reset-filters i {
    font-size: 12px;
}

/* Filter Responsive */
@media (max-width: 992px) {
    .afsc-banner {
        padding: 20px;
    }
    
    .afsc-filter-group {
        flex: 1 1 calc(50% - 6px);
        min-width: 140px;
    }
    
    .afsc-filter {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 600px) {
    .afsc-banner {
        padding: 16px;
        border-radius: 12px;
    }
    
    .afsc-filters {
        gap: 10px;
    }
    
    .afsc-filter-group {
        flex: 1 1 100%;
        align-self: stretch;
    }
    
    .afsc-filter {
        padding: 10px 14px;
        font-size: 13px;
        border-radius: 10px;
    }
    
    .afsc-filter-label {
        font-size: 10px;
    }
    
    .afsc-reset-filters {
        width: 100%;
        justify-content: center;
        padding: 10px 20px;
        height: auto;
        align-self: stretch;
    }
}

/* View Toggle Buttons */
.afsc-view-toggle {
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 20px 0;
}

.afsc-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--afsc-transition);
    background: var(--afsc-white);
    color: var(--afsc-text);
    border: 2px solid var(--afsc-border);
}

.afsc-view-btn:first-child {
    border-radius: 6px 0 0 6px;
    border-right: 1px solid var(--afsc-border);
}

.afsc-view-btn:last-child {
    border-radius: 0 6px 6px 0;
    border-left: 1px solid var(--afsc-border);
}

.afsc-view-btn:hover {
    background: var(--afsc-bg);
}

.afsc-view-btn.active {
    background: var(--afsc-primary);
    color: var(--afsc-white);
    border-color: var(--afsc-primary);
}

.afsc-view-btn.active i {
    color: var(--afsc-white);
}

.afsc-view-btn i {
    color: var(--afsc-primary);
}

/* Map Container */
.afsc-map-container {
    width: 100%;
    margin-bottom: 20px;
    border-radius: var(--afsc-radius);
    overflow: hidden;
    box-shadow: var(--afsc-shadow);
}

.afsc-map {
    width: 100%;
    height: 650px;
    background: var(--afsc-bg);
}

/* Map Info Window */
.afsc-map-info {
    padding: 0;
    max-width: 260px;
    min-width: 220px;
}

.afsc-map-info img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    margin: 0;
    display: block;
}

.afsc-map-info-content {
    padding: 12px 14px;
}

.afsc-map-info h4 {
    margin: 0 0 6px 0;
    font-size: 13px;
    color: #333;
    line-height: 1.3;
    font-weight: 500;
}

.afsc-map-info p {
    margin: 0 0 4px 0;
    font-size: 12px;
    color: #666;
}

.afsc-map-info .afsc-map-rent {
    font-weight: 700;
    color: #222;
    font-size: 18px;
    margin-bottom: 6px;
}

.afsc-map-info .afsc-map-specs {
    color: #555;
    font-size: 12px;
}

.afsc-map-info .afsc-map-available {
    color: #28a745;
    font-weight: 500;
    font-size: 12px;
    margin-bottom: 8px;
}

.afsc-map-details-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 10px 16px;
    background: var(--afsc-primary, #598fcd);
    color: #fff !important;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

.afsc-map-details-btn:hover {
    background: var(--afsc-primary-hover, #4a7ab0);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Listings Grid */
.afsc-listings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    padding: 20px 0;
}

.afsc-cols-1 .afsc-listings-grid { grid-template-columns: 1fr; }
.afsc-cols-2 .afsc-listings-grid { grid-template-columns: repeat(2, 1fr); }
.afsc-cols-4 .afsc-listings-grid { grid-template-columns: repeat(4, 1fr); }

/* Listing Card */
.afsc-listing-card {
    background: var(--afsc-white);
    border-radius: var(--afsc-radius);
    overflow: hidden;
    box-shadow: var(--afsc-shadow);
    transition: var(--afsc-transition);
    display: flex;
    flex-direction: column;
}

.afsc-listing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.afsc-listing-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.afsc-listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--afsc-transition);
}

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

.afsc-listing-rent {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0,0,0,0.8);
    color: var(--afsc-white);
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 16px;
}

.afsc-listing-available {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: #28a745;
    color: var(--afsc-white);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.afsc-listing-details {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.afsc-listing-title {
    font-size: 14px;
    color: var(--afsc-text-light);
    margin: 0 0 5px 0;
    font-weight: 500;
}

.afsc-listing-address {
    font-size: 18px;
    color: var(--afsc-text);
    margin: 0 0 12px 0;
    font-weight: 600;
    line-height: 1.3;
}

.afsc-listing-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.afsc-spec {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: var(--afsc-text-light);
}

.afsc-spec i {
    color: var(--afsc-primary);
}

.afsc-spec.pets-allowed i {
    color: #28a745;
}

.afsc-spec.no-pets i.fa-paw {
    color: #6c757d;
}

/* Pet policy with cross overlay */
.afsc-pet-policy {
    position: relative;
    cursor: pointer;
}

.afsc-pet-policy .afsc-pet-cross {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #dc3545;
    font-size: 18px;
    font-weight: bold;
}

/* Tooltip styles */
.afsc-pet-policy::before,
.afsc-pet-policy::after {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    transition: all 0.2s ease;
    z-index: 100;
}

.afsc-pet-policy::before {
    content: attr(data-tooltip);
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.afsc-pet-policy::after {
    content: '';
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1a1a1a;
}

.afsc-pet-policy:hover::before,
.afsc-pet-policy:hover::after {
    visibility: visible;
    opacity: 1;
}

.afsc-listing-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

/* Buttons */
.afsc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: var(--afsc-transition);
    cursor: pointer;
    border: none;
}

.afsc-btn-primary,
.afsc-btn-details {
    background: var(--afsc-primary);
    color: var(--afsc-white);
}

.afsc-btn-primary:hover,
.afsc-btn-details:hover {
    background: #4a7ab5;
    color: var(--afsc-white);
    text-decoration: none;
}

.afsc-btn-secondary,
.afsc-btn-apply {
    background: var(--afsc-secondary);
    color: var(--afsc-white);
}

.afsc-btn-secondary:hover,
.afsc-btn-apply:hover {
    background: #e55a00;
    color: var(--afsc-white);
    text-decoration: none;
}

.afsc-btn-back {
    background: var(--afsc-primary);
    color: var(--afsc-white);
}

.afsc-btn-back:hover {
    background: #4a7ab5;
    color: var(--afsc-white);
    text-decoration: none;
}

.afsc-listing-actions .afsc-btn {
    flex: 1;
    text-align: center;
}

/* No Results */
.afsc-no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--afsc-text-light);
}

.afsc-no-results i {
    font-size: 48px;
    margin-bottom: 20px;
    display: block;
}

/* Pagination */
.afsc-pagination {
    text-align: center;
    padding: 30px 0;
}

.afsc-pagination-inner {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.afsc-page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 2px solid var(--afsc-border);
    background: var(--afsc-white);
    color: var(--afsc-text);
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--afsc-transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.afsc-page-btn:hover:not(:disabled):not(.active) {
    border-color: var(--afsc-primary);
    color: var(--afsc-primary);
}

.afsc-page-btn.active {
    background: var(--afsc-primary);
    border-color: var(--afsc-primary);
    color: var(--afsc-white);
}

.afsc-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.afsc-page-dots {
    padding: 0 8px;
    color: var(--afsc-text-light);
}

.afsc-pagination-info {
    margin-top: 15px;
    font-size: 14px;
    color: var(--afsc-text-light);
}

/* Load More */
.afsc-load-more {
    text-align: center;
    padding: 30px 0;
}

.afsc-btn-load-more {
    padding: 14px 40px;
    font-size: 15px;
}

/* Scroll Loading */
.afsc-scroll-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 30px 0;
    color: var(--afsc-text-light);
    font-size: 14px;
}

.afsc-spinner-small {
    width: 24px;
    height: 24px;
    border: 3px solid var(--afsc-border);
    border-top-color: var(--afsc-primary);
    border-radius: 50%;
    animation: afsc-spin 1s linear infinite;
}

/* ===== Single Listing Page ===== */
.afsc-back-btn {
    padding: 20px;
}

.afsc-single-listing {
    display: flex;
    gap: 40px;
    padding: 0 20px 40px;
}

.afsc-single-left {
    flex: 0 0 45%;
    max-width: 45%;
}

.afsc-single-right {
    flex: 1;
}

/* Gallery */
.afsc-gallery {
    position: relative;
    border-radius: var(--afsc-radius);
    overflow: hidden;
}

.afsc-slide {
    position: relative;
}

.afsc-slide img {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    cursor: zoom-in;
}

.afsc-slide-count {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    color: var(--afsc-white);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 13px;
}

.afsc-gallery-prev,
.afsc-gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.9);
    color: var(--afsc-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: var(--afsc-transition);
    text-decoration: none;
}

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

.afsc-gallery-prev { left: 15px; }
.afsc-gallery-next { right: 15px; }

.afsc-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.afsc-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: var(--afsc-transition);
    flex-shrink: 0;
}

.afsc-thumb:hover,
.afsc-thumb.active {
    opacity: 1;
}

.afsc-thumb.active {
    outline: 3px solid var(--afsc-primary);
    outline-offset: 2px;
}

/* Single Header */
.afsc-single-header {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--afsc-border);
    margin-bottom: 25px;
}

.afsc-single-info {
    flex: 1;
}

.afsc-single-address {
    font-size: 24px;
    margin: 0 0 10px 0;
    color: var(--afsc-text);
}

.afsc-map-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--afsc-primary);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 15px;
}

.afsc-map-link:hover {
    text-decoration: underline;
}

.afsc-single-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.afsc-single-specs span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: var(--afsc-text-light);
}

.afsc-single-specs i {
    color: var(--afsc-primary);
}

.afsc-single-pricing {
    text-align: right;
}

.afsc-single-rent {
    font-size: 28px;
    font-weight: 700;
    color: var(--afsc-text);
    margin-bottom: 10px;
}

.afsc-single-avail {
    font-size: 14px;
    color: var(--afsc-text-light);
    margin-bottom: 10px;
}

.afsc-single-avail.available-now {
    color: #28a745;
}

.afsc-single-avail i {
    margin-right: 5px;
}

.afsc-phone-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--afsc-primary);
    text-decoration: none;
    font-size: 15px;
}

.afsc-phone-link:hover {
    text-decoration: underline;
}

/* Single Content */
.afsc-single-title {
    font-size: 18px;
    color: var(--afsc-text);
    margin: 0 0 15px 0;
}

.afsc-single-desc {
    color: var(--afsc-text-light);
    line-height: 1.7;
    margin-bottom: 25px;
}

.afsc-single-desc a {
    color: var(--afsc-primary);
}

/* Single Actions */
.afsc-single-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 25px;
}

.afsc-single-actions .afsc-btn {
    padding: 12px 25px;
}

/* Share Buttons */
.afsc-share-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid var(--afsc-border);
}

.afsc-share-buttons span {
    color: var(--afsc-text-light);
    font-size: 14px;
}

.afsc-share {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--afsc-bg);
    color: var(--afsc-text-light);
    border-radius: 50%;
    text-decoration: none;
    transition: var(--afsc-transition);
}

.afsc-share:hover {
    background: var(--afsc-primary);
    color: var(--afsc-white);
}

/* Lightbox */
.afsc-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.afsc-lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.afsc-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: var(--afsc-white);
    cursor: pointer;
    transition: var(--afsc-transition);
}

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

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .afsc-listings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .afsc-cols-4 .afsc-listings-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .afsc-single-listing {
        flex-direction: column;
    }
    
    .afsc-single-left,
    .afsc-single-right {
        flex: none;
        max-width: 100%;
    }
    
    .afsc-single-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .afsc-single-pricing {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .afsc-listings-grid,
    .afsc-cols-2 .afsc-listings-grid,
    .afsc-cols-3 .afsc-listings-grid,
    .afsc-cols-4 .afsc-listings-grid {
        grid-template-columns: 1fr;
    }
    
    .afsc-filters {
        flex-direction: column;
    }
    
    .afsc-filter {
        width: 100%;
    }
    
    .afsc-banner {
        padding: 20px 15px;
    }
    
    .afsc-listing-actions {
        flex-direction: column;
    }
    
    .afsc-single-actions {
        flex-direction: column;
    }
    
    .afsc-single-actions .afsc-btn {
        width: 100%;
    }
    
    .afsc-single-address {
        font-size: 20px;
    }
    
    .afsc-single-rent {
        font-size: 24px;
    }
    
    .afsc-map {
        height: 400px;
    }
    
    .afsc-view-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .afsc-page-btn {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 13px;
    }
    
    .afsc-pagination-inner {
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .afsc-listing-specs {
        flex-direction: column;
        gap: 8px;
    }
    
    .afsc-single-specs {
        flex-direction: column;
        gap: 10px;
    }
    
    .afsc-thumbnails {
        display: none;
    }
}

/* ===== Slider / Carousel ===== */
.afsc-slider-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 15px;
    box-sizing: border-box;
}

.afsc-slider-header {
    text-align: center;
    margin-bottom: 40px;
}

.afsc-slider-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--afsc-text);
    margin: 0 0 10px 0;
}

.afsc-slider-subtitle {
    font-size: 16px;
    color: var(--afsc-text-light);
    margin: 0;
}

.afsc-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
}

.afsc-slider-track-wrapper {
    flex: 1;
    overflow: hidden;
}

.afsc-slider-track-wrapper {
    padding: 10px 0 15px;
}

.afsc-slider-track {
    display: flex;
    gap: 20px;
    transition: transform 0.4s ease;
}

.afsc-slider-card {
    flex: 0 0 calc(25% - 15px);
    background: var(--afsc-white);
    border-radius: var(--afsc-radius);
    overflow: hidden;
    box-shadow: var(--afsc-shadow);
    transition: var(--afsc-transition);
}

.afsc-slider-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.afsc-slider-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.afsc-slider-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--afsc-transition);
}

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

.afsc-slider-card-details {
    padding: 20px;
}

/* Slider centered Details button */
.afsc-slider-actions {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.afsc-slider-actions .afsc-btn {
    min-width: 120px;
}

/* Slider Arrows */
.afsc-slider-arrow {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--afsc-white);
    border: 2px solid var(--afsc-border);
    color: var(--afsc-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--afsc-transition);
    flex-shrink: 0;
}

.afsc-slider-arrow:hover:not(.disabled) {
    background: var(--afsc-primary);
    border-color: var(--afsc-primary);
    color: var(--afsc-white);
}

.afsc-slider-arrow.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.afsc-slider-arrow i {
    font-size: 18px;
}

/* Slider Dots */
.afsc-slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
}

.afsc-slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--afsc-border);
    border: none;
    cursor: pointer;
    transition: var(--afsc-transition);
    padding: 0;
}

.afsc-slider-dot:hover {
    background: var(--afsc-text-light);
}

.afsc-slider-dot.active {
    background: var(--afsc-primary);
    transform: scale(1.2);
}

/* Slider Loading */
.afsc-slider-loading {
    text-align: center;
    padding: 60px 20px;
}

/* Slider Responsive */
/* Tablet: 3 cards */
@media (max-width: 1024px) {
    .afsc-slider-card {
        flex: 0 0 calc(33.333% - 14px);
    }
    
    .afsc-slider-arrow {
        width: 40px;
        height: 40px;
    }
}

/* Mobile: 1 card */
@media (max-width: 767px) {
    .afsc-slider-container {
        padding: 30px 10px;
    }
    
    .afsc-slider-title {
        font-size: 24px;
    }
    
    .afsc-slider-subtitle {
        font-size: 14px;
    }
    
    .afsc-slider-card {
        flex: 0 0 calc(100% - 10px);
    }
    
    .afsc-slider-wrapper {
        gap: 10px;
    }
    
    .afsc-slider-arrow {
        width: 36px;
        height: 36px;
    }
    
    .afsc-slider-arrow i {
        font-size: 14px;
    }
    
    .afsc-slider-dots {
        margin-top: 20px;
    }
}

/* ===== Slider Modal ===== */
.afsc-slider-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.afsc-slider-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
}

.afsc-slider-modal-container {
    position: relative;
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    margin: 5vh auto;
    background: var(--afsc-white);
    border-radius: var(--afsc-radius);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.afsc-slider-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--afsc-white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: var(--afsc-transition);
}

.afsc-slider-modal-close:hover {
    background: #f5f5f5;
    transform: scale(1.1);
}

.afsc-slider-modal-close i {
    font-size: 18px;
    color: var(--afsc-text);
}

.afsc-slider-modal-content {
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px;
}

.afsc-slider-modal-content .afsc-single-listing {
    padding: 0;
}

.afsc-modal-loading {
    text-align: center;
    padding: 60px 20px;
}

.afsc-modal-loading .afsc-spinner {
    margin-bottom: 20px;
}

body.afsc-modal-open {
    overflow: hidden;
}

/* Modal Responsive */
@media (max-width: 992px) {
    .afsc-slider-modal-container {
        width: 98%;
        max-height: 95vh;
        margin: 2.5vh auto;
    }
    
    .afsc-slider-modal-content {
        max-height: 95vh;
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .afsc-slider-modal-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
    }
    
    .afsc-slider-modal-content .afsc-single-listing {
        flex-direction: column;
    }
    
    .afsc-slider-modal-content .afsc-single-left,
    .afsc-slider-modal-content .afsc-single-right {
        max-width: 100%;
    }
}

/* =============================================
   SKELETON LOADER STYLES
============================================= */

@keyframes afsc-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.afsc-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 20px 0;
}

.afsc-skeleton-slider {
    display: flex;
    gap: 20px;
    padding: 20px;
    overflow: hidden;
}

.afsc-skeleton-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.afsc-skeleton-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: afsc-shimmer 1.5s ease-in-out infinite;
}

.afsc-skeleton-content {
    padding: 20px;
}

.afsc-skeleton-line {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: afsc-shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.afsc-skeleton-title {
    height: 24px;
    width: 70%;
    margin-bottom: 12px;
}

.afsc-skeleton-address {
    height: 16px;
    width: 90%;
    margin-bottom: 16px;
}

.afsc-skeleton-specs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.afsc-skeleton-spec {
    height: 14px;
    width: 60px;
}

.afsc-skeleton-buttons {
    display: flex;
    gap: 10px;
}

.afsc-skeleton-btn {
    height: 40px;
    flex: 1;
    border-radius: 6px;
}

/* Skeleton loading state container */
.afsc-loading-skeleton {
    padding: 20px 0;
}

/* Responsive skeleton */
@media (max-width: 1024px) {
    .afsc-skeleton-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .afsc-skeleton-slider .afsc-skeleton-card:nth-child(4) {
        display: none;
    }
}

@media (max-width: 767px) {
    .afsc-skeleton-grid {
        grid-template-columns: 1fr;
    }
    
    .afsc-skeleton-slider .afsc-skeleton-card:nth-child(2),
    .afsc-skeleton-slider .afsc-skeleton-card:nth-child(3) {
        display: none;
    }
    
    .afsc-skeleton-slider .afsc-skeleton-card {
        width: 100%;
    }
}

/* Slider skeleton specific */
.afsc-slider-loading.afsc-loading-skeleton {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.afsc-skeleton-slider .afsc-skeleton-card {
    flex: 0 0 calc(25% - 15px);
    min-width: 240px;
}

@media (max-width: 1024px) {
    .afsc-skeleton-slider .afsc-skeleton-card {
        flex: 0 0 calc(33.333% - 14px);
    }
}

@media (max-width: 767px) {
    .afsc-skeleton-slider .afsc-skeleton-card {
        flex: 0 0 100%;
    }
}
