/* Inventory Page Specific Styles - Tesla Theme */

/* Page Header */
.page-header {
    background: #000;
    color: white;
    padding: 120px 0 60px;
    text-align: center;
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.7) 100%);
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

.page-header p {
    font-size: 1rem;
    opacity: 0.95;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

/* Filters Section - Tesla Clean Style */
.filters-section {
    background: #fff;
    padding: 40px 0;
    border-bottom: 1px solid #e0e0e0;
}

.filters-container {
    background: #f4f4f4;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: none;
}

.search-bar {
    position: relative;
    margin-bottom: 2rem;
}

.search-bar i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #5c5e62;
}

.search-bar input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 0.9375rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    color: #171a20;
}

.search-bar input:focus {
    outline: none;
    border-color: #171a20;
    box-shadow: 0 0 0 1px #171a20;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #171a20;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.filter-group select {
    padding: 12px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 0.9375rem;
    background: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #171a20;
}

.filter-group select:focus {
    outline: none;
    border-color: #171a20;
    box-shadow: 0 0 0 1px #171a20;
}

.filter-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Results Section - Tesla Style */
.results-section {
    padding: 60px 0 100px;
    background: #fff;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.results-count {
    font-size: 1rem;
    font-weight: 600;
    color: #171a20;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #d0d0d0;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5c5e62;
}

.view-btn:hover {
    border-color: #171a20;
    color: #171a20;
}

.view-btn.active {
    background: #171a20;
    border-color: #171a20;
    color: white;
}

/* Cars Container */
.cars-container {
    display: grid;
    gap: 2rem;
}

.cars-container.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

.cars-container.list-view {
    grid-template-columns: 1fr;
}

.cars-container.list-view .car-card {
    display: flex;
    flex-direction: row;
    max-height: 200px;
}

.cars-container.list-view .car-image {
    width: 300px;
    height: 200px;
    flex-shrink: 0;
}

.cars-container.list-view .car-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cars-container.list-view .car-details {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
}

.cars-container.list-view .car-actions {
    align-self: flex-end;
}

/* Enhanced Car Card - Tesla Style */
.car-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

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

.car-image {
    height: 240px;
    background: linear-gradient(135deg, #e5e5e5, #f0f0f0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #a0a0a0;
    position: relative;
    overflow: hidden;
}

.car-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.02);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.car-card:hover .car-image::before {
    opacity: 1;
}

.car-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #171a20;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.carfax-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.95);
    padding: 4px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.carfax-badge img {
    display: block;
    width: 60px;
    height: auto;
    border-radius: 2px;
}

.car-info {
    padding: 1.75rem;
}

.car-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #171a20;
    letter-spacing: -0.3px;
}

.car-subtitle {
    color: #5c5e62;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.car-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #5c5e62;
}

.car-detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.car-detail-item i {
    width: 16px;
    color: #171a20;
    font-size: 0.875rem;
}

.car-price {
    font-size: 1.75rem;
    font-weight: 600;
    color: #171a20;
    margin-bottom: 1rem;
}

.car-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
    flex: 1;
}

/* No Results - Tesla Style */
.no-results {
    text-align: center;
    padding: 5rem 2rem;
    color: #5c5e62;
}

.no-results i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: #d0d0d0;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: #171a20;
    font-weight: 600;
}

.no-results p {
    color: #5c5e62;
    font-size: 0.9375rem;
}

/* Modal Styles - Tesla Clean */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 24px;
    font-weight: 400;
    cursor: pointer;
    z-index: 2001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
}

.close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* Modal Car Details - Tesla Style */
.modal-car-image {
    height: 350px;
    background: linear-gradient(135deg, #e5e5e5, #f0f0f0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    color: #a0a0a0;
    position: relative;
}

.modal-car-info {
    padding: 2.5rem;
}

.modal-car-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #171a20;
    letter-spacing: -0.5px;
}

.modal-car-price {
    font-size: 2.25rem;
    font-weight: 600;
    color: #171a20;
    margin-bottom: 2rem;
}

.modal-car-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.modal-detail-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem;
    background: #f4f4f4;
    border-radius: 4px;
    border: none;
}

.modal-detail-item i {
    width: 20px;
    color: #171a20;
    font-size: 1.1rem;
}

.modal-detail-item span {
    font-weight: 500;
    color: #171a20;
    font-size: 0.9375rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.modal-actions .btn {
    flex: 1;
    padding: 14px 28px;
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-actions {
        justify-content: center;
    }
    
    .results-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .cars-container.grid-view {
        grid-template-columns: 1fr;
    }
    
    .cars-container.list-view .car-card {
        flex-direction: column;
        max-height: none;
    }
    
    .cars-container.list-view .car-image {
        width: 100%;
        height: 200px;
    }
    
    .cars-container.list-view .car-details {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-car-details {
        grid-template-columns: 1fr;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .filters-container {
        padding: 1rem;
    }
    
    .car-actions {
        flex-direction: column;
    }
    
    .modal-car-title {
        font-size: 1.5rem;
    }
    
    .modal-car-price {
        font-size: 2rem;
    }
}

/* Loading States */
.loading-cars {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem;
}

.loading-cars .loading {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #059669;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Car Features - Tesla Style */
.car-features {
    margin: 2rem 0;
}

.car-features h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #171a20;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.features-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.feature-tag {
    background: #f4f4f4;
    color: #171a20;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #e0e0e0;
}

/* Animation for car cards */
.car-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.car-card:nth-child(1) { animation-delay: 0.1s; }
.car-card:nth-child(2) { animation-delay: 0.2s; }
.car-card:nth-child(3) { animation-delay: 0.3s; }
.car-card:nth-child(4) { animation-delay: 0.4s; }
.car-card:nth-child(5) { animation-delay: 0.5s; }
.car-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
