/* General Styles */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: transparent;
    color: #fff;
    overflow: hidden;
}

.hidden {
    display: none !important;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Catalog Container */
#catalog-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    max-width: 1600px;
    height: 85vh;
    background: rgba(10, 10, 15, 0.98);
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -45%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

/* Header */
.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: linear-gradient(90deg, #0f0f1a 0%, #1a1a2e 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 2;
    height: 70px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo i {
    font-size: 1.5rem;
    color: #4dabf7;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.catalog-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.catalog-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    background: linear-gradient(90deg, #4dabf7, #339af0);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.close-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0;
    outline: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    border-color: rgba(255, 107, 107, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.category-item .category-count {
    margin-left: auto;
    background: rgba(77, 171, 247, 0.15);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #4dabf7;
    min-width: 28px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(77, 171, 247, 0.2);
}


/* Main Content */
.catalog-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Categories Sidebar */
.categories-sidebar {
    width: 280px;
    background: rgba(15, 15, 20, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    position: relative;
}

.search-container {
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-box {
    position: relative;
    width: 100%;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

#search-input {
    width: 100%;
    padding: 10px 15px 10px 35px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #fff;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

#search-input:focus {
    outline: none;
    border-color: #4dabf7;
    box-shadow: 0 0 0 2px rgba(77, 171, 247, 0.2);
}

#search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.categories-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.search-box {
    padding: 15px 20px;
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    margin: 0 10px 10px;
    border-radius: 8px;
}

.search-box i {
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

#search-input {
    width: 100%;
    padding: 10px 15px 10px 35px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #fff;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

#search-input:focus {
    outline: none;
    border-color: #4dabf7;
    box-shadow: 0 0 0 2px rgba(77, 171, 247, 0.2);
}

#search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.categories-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 0 10px 20px;
    margin-top: 10px;
}

#categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    padding: 14px 30px;
    margin: 0 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.category-item i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.category-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(77, 171, 247, 0.1), transparent);
    transition: 0.5s;
}

.category-item:hover {
    background: rgba(77, 171, 247, 0.05);
    color: #fff;
    transform: translateX(5px);
}

.category-item:hover i {
    color: #4dabf7;
}

.category-item:hover::before {
    left: 100%;
}

.category-item.active {
    background: linear-gradient(90deg, rgba(77, 171, 247, 0.15), transparent);
    color: #4dabf7;
    border-left: 3px solid #4dabf7;
    font-weight: 600;
    margin-left: 20px;
    padding-left: 27px;
}

.category-item.active i {
    color: #4dabf7;
}

/* Vehicles Grid */
.vehicles-container {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
    background: rgba(12, 12, 18, 0.8);
}

.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 10px 5px 30px 5px;
}

.vehicle-card {
    background: linear-gradient(145deg, #1a1a26, #15151f);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.vehicle-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4dabf7, #339af0);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vehicle-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    border-color: rgba(77, 171, 247, 0.2);
}

.vehicle-card:hover::before {
    opacity: 1;
}

.vehicle-card:hover .vehicle-image {
    transform: scale(1.05);
}

.vehicle-image-container {
    width: 100%;
    height: 130px;
    overflow: hidden;
    position: relative;
    background: rgba(0, 0, 0, 0.3);
}

.vehicle-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.vehicle-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vehicle-info {
    padding: 16px;
    position: relative;
}

.vehicle-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vehicle-manufacturer {
    font-size: 0.8rem;
    color: #8e9aaf;
    margin-bottom: 8px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vehicle-specs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.8rem;
    color: #6c757d;
}

.vehicle-spec {
    display: flex;
    align-items: center;
}

.vehicle-spec i {
    margin-right: 4px;
    color: #4dabf7;
    font-size: 0.9rem;
}

.vehicle-price {
    font-size: 1.1rem;
    color: #4dabf7;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-align: right;
}

.vehicle-price span {
    font-size: 0.9rem;
    width: 380px;
    background: linear-gradient(145deg, #151520, #101018);
    border-left: 1px solid rgba(255, 255, 255, 0.03);
    padding: 25px;
    overflow-y: auto;
    position: relative;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
}

.vehicle-details::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4dabf7, #339af0);
}

.vehicle-details-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.vehicle-details-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.vehicle-details-header h2 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 5px;
    font-weight: 700;
}

.vehicle-category {
    color: #8e9aaf;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    display: block;
}

.vehicle-image-container {
    width: 100%;
    height: 200px;
    background: rgba(0, 0, 0, 0.3);
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border-radius: 10px;
    overflow: hidden;
    margin: 0 0 25px 0;
    border: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

#vehicle-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

/* Fallback for missing images */
#vehicle-image[src*="default_vehicle.png"] {
    object-fit: contain;
    padding: 20px;
    background: rgba(0, 0, 0, 0.1);
}

.vehicle-details-content:hover #vehicle-image {
    transform: scale(1.03);
}

.vehicle-price-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.8);
    color: #4dabf7;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.vehicle-price-tag span {
    font-size: 0.9rem;
    color: #8e9aaf;
    margin-left: 4px;
    font-weight: 400;
}

#vehicle-name {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #fff;
}

.vehicle-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 25px 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 18px 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.spec {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px 10px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(77, 171, 247, 0.1);
}

/* Vehicle Specs Grid */
.vehicle-specs-grid {
    margin: 0 0 25px 0;
}

.specs-section {
    margin-bottom: 25px;
}

.specs-section h3 {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.spec-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    cursor: default;
}

.spec-item:hover {
    background: rgba(77, 171, 247, 0.1);
    border-color: rgba(77, 171, 247, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.spec-icon {
    width: 36px;
    height: 36px;
    background: rgba(77, 171, 247, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: #4dabf7;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.spec-content {
    flex: 1;
    min-width: 0;
}

.spec-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spec-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tooltip */
.spec-item::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 100;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.spec-item:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-12px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .specs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .specs-grid {
        grid-template-columns: 1fr;
        position: relative;
        overflow: hidden;
    }
}

.spec::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(77, 171, 247, 0.05), transparent);
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.spec:hover {
    background: rgba(51, 154, 240, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: rgba(77, 171, 247, 0.2);
}

.spec:hover::before {
    opacity: 1;
}

.spec i {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #4dabf7;
    background: rgba(77, 171, 247, 0.1);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.spec:hover i {
    background: rgba(77, 171, 247, 0.2);
    transform: scale(1.1);
    color: #6bb9ff;
}

#vehicle-description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #b8c2cc;
    margin: 10px 0 25px 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    flex-grow: 1;
    position: relative;
    overflow: hidden;
}

#vehicle-description::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, #4dabf7, #339af0);
}

.spawn-btn {
    background: linear-gradient(90deg, #4dabf7 0%, #339af0 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spawn-btn i {
    margin-right: 8px;
}

.spawn-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(77, 171, 247, 0.3);
}

.spawn-btn:disabled {
    background: #495057;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}
/* Responsive Design */
@media (max-width: 1400px) {
    .vehicles-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 1200px) {
    .vehicle-details {
        width: 350px;
    }
    
    .vehicles-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 992px) {
    .catalog-content {
        flex-direction: column;
    }
    
    .categories-sidebar {
        width: 100%;
        height: auto;
        max-height: 250px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .vehicle-details {
        width: 100%;
        height: auto;
        max-height: 500px;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .vehicles-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

@media (max-width: 768px) {
    #catalog-container {
        width: 98%;
        height: 95vh;
        border-radius: 8px;
    }
    
    .catalog-header {
        padding: 15px 20px;
    }
    
    .catalog-header h1 {
        font-size: 1.4rem;
    }
    
    .vehicles-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .vehicle-specs-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .catalog-header h1 {
        font-size: 1.2rem;
    }
    
    .close-btn {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .vehicles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .vehicle-image {
        height: 100px;
    }
    
    .vehicle-info {
        padding: 12px 10px;
    }
    
    .vehicle-name {
        font-size: 0.9rem;
    }
    
    .vehicle-manufacturer {
        font-size: 0.75rem;
    }
    
    .vehicle-price {
        font-size: 1rem;
    }
    
    .spawn-btn {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { transform: translateX(20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(77, 171, 247, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(77, 171, 247, 0); }
    100% { box-shadow: 0 0 0 0 rgba(77, 171, 247, 0); }
}

/* Custom Scrollbar for Webkit */
.vehicles-container::-webkit-scrollbar,
.vehicle-details::-webkit-scrollbar,
.categories-sidebar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.vehicles-container::-webkit-scrollbar-track,
.vehicle-details::-webkit-scrollbar-track,
.categories-sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.vehicles-container::-webkit-scrollbar-thumb,
.vehicle-details::-webkit-scrollbar-thumb,
.categories-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.vehicles-container::-webkit-scrollbar-thumb:hover,
.vehicle-details::-webkit-scrollbar-thumb:hover,
.categories-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}
