/* ========================================
   Custom Variables - Primary Color #0c8f73
   ======================================== */
:root {
    --primary-color: #0c8f73;
    --primary-hover: #0a7560;
    --primary-light: #e6f5f2;
    --accent-color: #dc2626;
    --accent-hover: #b91c1c;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --bg-light: #f9fafb;
}

/* ========================================
   Global Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    color: var(--text-primary);
    background-color: #ffffff;
}

/* Override Bootstrap Primary Color */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

/* ========================================
   Header Styles
   ======================================== */
.header {
    z-index: 1000;
}

.navbar-brand {
    color: var(--primary-color) !important;
    font-size: 1.5rem;
}

.nav-link {
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

/* ========================================
   Brand Slider Styles
   ======================================== */
.brand-slider-wrapper {
    position: relative;
    padding: 0 50px;
}

.brand-slider {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 8px 0;
}

.brand-slider::-webkit-scrollbar {
    display: none;
}

.brand-btn {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 8px 20px;
    font-weight: 600;
}

.brand-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.brand-slider-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.brand-slider-prev {
    right: 0;
}

.brand-slider-next {
    left: 0;
}

/* ========================================
   Car Card Styles
   ======================================== */
.car-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.car-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    overflow: hidden;
    background: var(--bg-light);
}

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

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

.badge-new {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #16a34a;
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-discount {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--accent-color);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
}

.car-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.car-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    min-height: 56px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.car-specs {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.car-spec-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.car-spec-item i {
    font-size: 1rem;
}

.car-pricing {
    margin-bottom: 1rem;
}

.original-price {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: line-through;
    margin-bottom: 4px;
}

.discounted-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2px;
}

.price-note {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.badge-financing {
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 8px;
    text-align: center;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: auto;
}

/* ========================================
   Filters Section
   ======================================== */
.filters-section {
    background: var(--bg-light);
}

.form-label {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-select,
.form-control {
    border-color: var(--border-color);
    border-radius: 8px;
    padding: 0.625rem 0.875rem;
}

.form-select:focus,
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(12, 143, 115, 0.25);
}

/* ========================================
   Footer Styles
   ======================================== */
.footer {
    background: var(--bg-light);
}

.footer h5 {
    color: var(--text-primary);
    font-size: 1.125rem;
}

.footer a {
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--primary-color) !important;
}

.btn-outline-primary.rounded-circle {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   Responsive Styles
   ======================================== */
@media (max-width: 768px) {
    .brand-slider-wrapper {
        padding: 0 40px;
    }
    
    .brand-slider-btn {
        width: 32px;
        height: 32px;
    }
    
    .car-name {
        font-size: 1rem;
        min-height: 48px;
    }
    
    .discounted-price {
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    h1 {
        font-size: 1.5rem !important;
    }
    
    .car-specs {
        gap: 0.5rem;
    }
    
    .car-spec-item {
        font-size: 0.8rem;
    }
}

/* ========================================
   Utility Classes
   ======================================== */
.shadow-sm {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.shadow {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.transition-all {
    transition: all 0.3s ease;
}
