/* Dealers Page Styles */

/* Hero Section */
.dealers-hero {
    background: linear-gradient(135deg, #1a237e 0%, #3f51b5 50%, #5c6bc0 100%);
    color: white;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.dealers-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../img/car-pattern.png') repeat;
    opacity: 0.1;
}

.dealers-hero .hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.dealers-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ffffff, #e3f2fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dealers-hero p {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 3rem;
}

.stat {
    text-align: center;
}

.stat i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #ff9800;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.8;
}

/* Search Section */
.search-section {
    padding: 2rem 0;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.search-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.search-bar {
    position: relative;
    flex: 1;
}

.search-bar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.search-bar input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 3rem;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.filter-controls {
    display: flex;
    gap: 1rem;
}

.filter-controls select {
    padding: 0.8rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-controls select:focus {
    outline: none;
    border-color: #007bff;
}

.sort-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sort-button:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

/* Dealers Grid */
.dealers-grid {
    padding: 4rem 0;
}

.dealers-grid h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: #333;
}

.dealers-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Dealer Card */
.dealer-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.dealer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.dealer-image {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dealer-image img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.default-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid white;
}

.default-avatar i {
    font-size: 3rem;
    color: white;
}

.dealer-status {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: #28a745;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.dealer-status i {
    font-size: 0.6rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.dealer-info {
    padding: 1.5rem;
}

.dealer-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #333;
}

.dealer-title {
    color: #6c757d;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.dealer-rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 1rem;
}

.dealer-rating .fas.fa-star {
    color: #ddd;
    font-size: 1rem;
}

.dealer-rating .fas.fa-star.active {
    color: #ffc107;
}

.rating-number {
    margin-left: 0.5rem;
    color: #6c757d;
    font-size: 0.9rem;
}

.dealer-experience {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #6c757d;
    font-size: 0.9rem;
}

.dealer-experience i {
    color: #007bff;
}

.dealer-description {
    margin-bottom: 1.5rem;
}

.dealer-description p {
    color: #666;
    line-height: 1.6;
}

.dealer-contact {
    border-top: 1px solid #e9ecef;
    padding-top: 1rem;
}

.contact-info {
    margin-bottom: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.contact-item i {
    color: #007bff;
    width: 16px;
}

.dealer-actions {
    display: flex;
    gap: 0.5rem;
}

.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #007bff;
    border: 2px solid #007bff;
}

.btn-outline:hover {
    background: #007bff;
    color: white;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

/* No Dealers State */
.no-dealers {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}

.no-dealers i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #dee2e6;
}

.no-dealers h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #495057;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    color: #aaa;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close:hover {
    color: #333;
    background: white;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 16px 16px 0 0;
}

.dealer-profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.profile-image img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
}

.profile-info h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.profile-title {
    opacity: 0.8;
    margin-bottom: 1rem;
}

.profile-rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
}

.profile-rating .fas.fa-star {
    color: #ffc107;
}

.profile-experience {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.8;
}

.modal-body {
    padding: 2rem;
}

.detail-section {
    margin-bottom: 2rem;
}

.detail-section h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.contact-details {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
}

.contact-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.contact-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.contact-row i {
    color: #007bff;
    width: 20px;
}

.contact-row span {
    flex: 1;
    font-weight: 500;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #1a237e 0%, #3f51b5 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dealers-hero h1 {
        font-size: 2.5rem;
    }
    
    .dealers-hero p {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 2rem;
    }
    
    .search-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-controls {
        flex-direction: column;
    }
    
    .dealers-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .dealer-actions {
        flex-direction: column;
    }
    
    .dealer-profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
}
