/* Cars Store Specific Styles */
.store-cars-cover {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.cars-type-container {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 10px;
}

.cars-type-bubble {
    display: inline-flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    margin-right: 0.5rem;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.cars-type-bubble.active {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    color: white;
    border-color: transparent;
}

.cars-type-bubble:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 52, 96, 0.3);
}

.btn-cars-search {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

.btn-cars-search:hover {
    background: linear-gradient(135deg, #0d0d1a 0%, #0a264a 100%);
    color: white;
}

/* Secondary Filters Container */
.secondary-filters-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 0.5rem;
}

.facets-group {
    margin-bottom: 0.75rem;
    text-align: center;
}

.facets-group:last-of-type {
    margin-bottom: 0;
}

.facets-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-align: center;
}

.facets-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.btn-filter-toggle {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 20px;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.btn-filter-toggle:hover {
    background: var(--hover-bg);
    border-color: #0f3460;
}

.btn-filter-toggle.active {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    border-color: transparent;
    color: white;
}

.btn-filter-toggle .badge {
    font-size: 0.7rem;
    margin-left: 0.25rem;
}

.btn-filter-toggle.active .badge {
    background: rgba(255,255,255,0.3) !important;
}

/* Apply Filters Container */
.apply-filters-container {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    justify-content: center;
}

.btn-apply-filters {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-apply-filters:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 52, 96, 0.3);
    color: white;
}

.btn-clear-filters {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.btn-clear-filters:hover {
    background: var(--hover-bg);
    color: var(--text-color);
}

/* Active Filters Summary */
.active-filters-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    justify-content: center;
}

.active-filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.active-filter-badge .remove-filter {
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.active-filter-badge .remove-filter:hover {
    opacity: 1;
}

/* Car Card */
.car-card {
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
}

.car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.car-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

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

.car-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
}

.car-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.car-quick-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.car-card:hover .car-quick-actions {
    opacity: 1;
}

.car-details {
    padding: 1rem;
}

.car-brand-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.car-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.car-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.car-spec {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.car-spec i {
    color: #0f3460;
    font-size: 0.75rem;
}

.car-price-container {
    margin-bottom: 0.5rem;
}

.car-price {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f3460;
}

.financing-badge {
    font-size: 0.75rem;
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

/* Compare Panel */
.compare-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    color: white;
    padding: 1rem;
    z-index: 1000;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.compare-panel.active {
    transform: translateY(0);
    display: block !important;
}

.compare-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.compare-panel-body {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.compare-item {
    flex: 0 0 120px;
    position: relative;
}

.compare-item img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
}

.compare-item .remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #dc3545;
    color: white;
    border: none;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.compare-panel-footer {
    margin-top: 0.75rem;
    text-align: right;
}

/* Hide item when filtered out */
.car-item.filtered-out {
    display: none !important;
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 12px;
}

[data-bs-theme="dark"] .loading-overlay {
    background: rgba(0,0,0,0.8);
}

@media (max-width: 768px) {
    .car-image-container {
        height: 180px;
    }
    
    .secondary-filters-container {
        padding: 0.75rem;
    }
    
    .facets-list {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 5px;
        justify-content: flex-start;
    }
    
    .btn-filter-toggle {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .apply-filters-container {
        flex-direction: column;
    }
    
    .btn-apply-filters,
    .btn-clear-filters {
        width: 100%;
    }
}
