/* Dealer Home Inventory - Public Styles */

/* Global Styles */
.dhi-homepage,
.dhi-vehicle-search,
.dhi-single-vehicle {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
}

.dhi-btn {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.dhi-btn-primary {
    background: #0073aa;
    color: #fff;
}

.dhi-btn-primary:hover {
    background: #005a87;
    color: #fff;
}

.dhi-btn-secondary {
    background: #f1f1f1;
    color: #333;
}

.dhi-btn-secondary:hover {
    background: #e1e1e1;
    color: #333;
}

/* Hero Section */
.dhi-hero {
    background-size: cover;
    background-position: center;
    background-color: #333;
    color: #fff;
    padding: 80px 20px;
    text-align: center;
    position: relative;
}

.dhi-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
}

.dhi-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.dhi-hero h1 {
    font-size: 48px;
    margin-bottom: 30px;
    color: #fff;
}

.dhi-quick-search {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.dhi-quick-search input {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

.dhi-quick-search button {
    border-radius: 0 4px 4px 0;
    padding: 15px 30px;
}

/* Filters Panel */
.dhi-filters-panel {
    background: #f9f9f9;
    padding: 30px;
    margin: 20px 0;
    border-radius: 8px;
}

.dhi-filters-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.dhi-filter-group {
    display: flex;
    flex-direction: column;
}

.dhi-filter-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.dhi-filter-group select,
.dhi-filter-group input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.dhi-range-inputs {
    display: flex;
    gap: 10px;
}

.dhi-range-inputs input {
    width: 50%;
}

.dhi-filter-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* Results Panel */
.dhi-results-panel {
    margin: 30px 0;
}

.dhi-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.dhi-results-count {
    font-size: 16px;
    color: #666;
}

.dhi-sort-options select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Vehicle Grid */
.dhi-vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

/* Vehicle Card */
.dhi-vehicle-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dhi-vehicle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.dhi-vehicle-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.dhi-vehicle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.dhi-vehicle-card:hover .dhi-vehicle-image img {
    transform: scale(1.05);
}

.dhi-vehicle-condition {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.dhi-vehicle-condition.condition-new {
    background: #4caf50;
    color: #fff;
}

.dhi-vehicle-condition.condition-used {
    background: #ff9800;
    color: #fff;
}

.dhi-vehicle-condition.condition-certified {
    background: #2196f3;
    color: #fff;
}

.dhi-vehicle-details {
    padding: 20px;
}

.dhi-vehicle-title {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.dhi-vehicle-title a {
    color: #333;
    text-decoration: none;
}

.dhi-vehicle-title a:hover {
    color: #0073aa;
}

.dhi-vehicle-price {
    margin-bottom: 15px;
}

.dhi-vehicle-price .price {
    font-size: 24px;
    font-weight: 700;
    color: #0073aa;
}

.dhi-vehicle-specs {
    margin-bottom: 15px;
    padding: 10px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.dhi-vehicle-specs .spec {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 14px;
}

.dhi-vehicle-specs .spec-label {
    color: #666;
}

.dhi-vehicle-specs .spec-value {
    font-weight: 600;
    color: #333;
}

.dhi-vehicle-actions {
    display: flex;
    gap: 10px;
}

.dhi-vehicle-actions .dhi-btn {
    flex: 1;
    text-align: center;
}

/* Featured Vehicles Carousel */
.dhi-featured-vehicles {
    margin: 60px 0;
    padding: 0 20px;
}

.dhi-featured-vehicles h2 {
    text-align: center;
    margin-bottom: 30px;
}

.dhi-featured-carousel {
    position: relative;
    overflow: hidden;
}

.dhi-carousel-track {
    display: flex;
    transition: transform 0.3s ease;
    gap: 20px;
}

.dhi-carousel-track .dhi-vehicle-card {
    flex: 0 0 300px;
}

.dhi-carousel-prev,
.dhi-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.9);
    border: 1px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
}

.dhi-carousel-prev:hover,
.dhi-carousel-next:hover {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.dhi-carousel-prev {
    left: 10px;
}

.dhi-carousel-next {
    right: 10px;
}

/* Single Vehicle Page */
.dhi-single-vehicle {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.dhi-vehicle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.dhi-vehicle-header h1 {
    margin: 0;
    font-size: 36px;
}

.dhi-vehicle-price-large {
    text-align: right;
}

.dhi-vehicle-price-large .price {
    font-size: 32px;
    font-weight: 700;
    color: #0073aa;
    display: block;
}

.dhi-vehicle-price-large .stock-number {
    color: #666;
    font-size: 14px;
}

.dhi-vehicle-gallery {
    margin-bottom: 40px;
}

.dhi-main-image {
    margin-bottom: 20px;
}

.dhi-main-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.dhi-thumbnail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.dhi-thumbnail-gallery img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.dhi-thumbnail-gallery img:hover {
    opacity: 0.8;
}

.dhi-vehicle-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.dhi-specs-table {
    width: 100%;
    border-collapse: collapse;
}

.dhi-specs-table th,
.dhi-specs-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.dhi-specs-table th {
    width: 40%;
    font-weight: 600;
    color: #555;
}

.dhi-financing-cta {
    grid-column: 1 / -1;
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    margin-top: 30px;
}

.dhi-financing-cta h3 {
    margin-bottom: 15px;
}

.dhi-financing-cta .dhi-cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.dhi-related-vehicles {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.dhi-related-vehicles h2 {
    text-align: center;
    margin-bottom: 30px;
}

/* Dealership Info */
.dhi-dealership-info {
    background: #f9f9f9;
    padding: 60px 20px;
    margin: 60px 0;
}

.dhi-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.dhi-info-grid h3 {
    margin-bottom: 20px;
    color: #333;
}

.dhi-info-hours ul {
    list-style: none;
    padding: 0;
}

.dhi-info-hours li {
    margin-bottom: 10px;
    color: #666;
}

.dhi-info-hours span {
    font-weight: 600;
    color: #333;
}

.dhi-info-contact p {
    margin-bottom: 10px;
    color: #666;
}

.dhi-info-cta {
    text-align: center;
}

.dhi-info-cta .dhi-btn {
    display: block;
    margin-bottom: 10px;
}

/* Loading State */
.dhi-loading {
    text-align: center;
    padding: 40px;
    color: #666;
    position: relative;
}

.dhi-loading::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 2px solid #f3f3f3;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No Results */
.dhi-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 18px;
}

/* Load More Button Container */
.dhi-load-more {
    text-align: center;
    margin: 40px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dhi-hero h1 {
        font-size: 32px;
    }

    .dhi-filters-form {
        grid-template-columns: 1fr;
    }

    .dhi-vehicle-header {
        flex-direction: column;
        text-align: center;
    }

    .dhi-vehicle-price-large {
        text-align: center;
        margin-top: 20px;
    }

    .dhi-vehicle-content {
        grid-template-columns: 1fr;
    }

    .dhi-info-grid {
        grid-template-columns: 1fr;
    }

    .dhi-vehicles-grid {
        grid-template-columns: 1fr;
    }
}