/* ========================================
   Bitki Auto - Mobile-First Responsive Design
   ======================================== */

/* ========================================
   CSS Variables
   ======================================== */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #64748b;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;

    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;

    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;

    --border-color: #e2e8f0;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    --transition: all 0.3s ease;
    --container-width: 1280px;
}

/* ========================================
   Reset & Base (Mobile First)
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========================================
   Container (Mobile First)
   ======================================== */
.container {
    width: 100%;
    padding: 0 16px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .container {
        padding: 0 24px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: var(--container-width);
        padding: 0 32px;
    }
}

/* ========================================
   Typography (Mobile First)
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

@media (min-width: 768px) {
    body { font-size: 15px; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.375rem; }
}

@media (min-width: 1024px) {
    body { font-size: 16px; }
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

/* ========================================
   Buttons (Mobile First)
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

@media (min-width: 768px) {
    .btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
}

@media (min-width: 1024px) {
    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #16a34a;
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.8125rem;
}

@media (min-width: 768px) {
    .btn-sm {
        padding: 8px 16px;
        font-size: 0.875rem;
    }
}

.btn-lg {
    padding: 14px 24px;
    font-size: 1rem;
}

@media (min-width: 768px) {
    .btn-lg {
        padding: 16px 32px;
        font-size: 1.125rem;
    }
}

.btn-block {
    width: 100%;
}

/* ========================================
   Forms (Mobile First)
   ======================================== */
.form-group {
    margin-bottom: 16px;
}

@media (min-width: 768px) {
    .form-group {
        margin-bottom: 20px;
    }
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .form-label {
        margin-bottom: 8px;
        font-size: 1rem;
    }
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    font-size: 16px; /* Prevents zoom on iOS */
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

@media (min-width: 768px) {
    .form-control {
        padding: 12px 16px;
    }
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.invalid-feedback {
    display: block;
    margin-top: 4px;
    font-size: 0.8125rem;
    color: var(--danger);
}

select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 20px;
    padding-right: 40px;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

@media (min-width: 768px) {
    textarea.form-control {
        min-height: 120px;
    }
}

/* ========================================
   Cards (Mobile First)
   ======================================== */
.card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

@media (min-width: 1024px) {
    .card:hover {
        box-shadow: var(--shadow-md);
    }
}

.card-body {
    padding: 16px;
}

@media (min-width: 768px) {
    .card-body {
        padding: 24px;
    }
}

.card-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

@media (min-width: 768px) {
    .card-header {
        padding: 20px 24px;
    }
}

.card-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

@media (min-width: 768px) {
    .card-footer {
        padding: 16px 24px;
    }
}

/* ========================================
   Header (Mobile First)
   ======================================== */
.header {
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

@media (min-width: 768px) {
    .header-inner {
        height: 70px;
    }
}

@media (min-width: 1024px) {
    .header-inner {
        height: 80px;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--text-primary);
}

@media (min-width: 768px) {
    .logo {
        gap: 12px;
        font-size: 1.5rem;
    }
}

.logo:hover {
    color: var(--primary);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.125rem;
}

@media (min-width: 768px) {
    .logo-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }
}

/* Mobile Navigation */
.nav {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    flex-direction: column;
    padding: 20px;
    transform: translateX(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    overflow-y: auto;
    display: flex;
}

.nav.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

@media (min-width: 768px) {
    .nav {
        top: 70px;
    }
}

@media (min-width: 1024px) {
    .nav {
        position: static;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        padding: 0;
        transform: none;
        opacity: 1;
        visibility: visible;
        overflow: visible;
        background: transparent;
    }
}

.nav-link {
    display: block;
    padding: 14px 16px;
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    text-align: center;
}

@media (min-width: 1024px) {
    .nav-link {
        padding: 10px 16px;
        font-size: 0.9375rem;
    }
}

.nav-link:hover,
.nav-link.active {
    background: var(--bg-tertiary);
    color: var(--primary);
}

.nav-cta {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.nav-cta .btn {
    width: 100%;
}

@media (min-width: 1024px) {
    .nav-cta {
        margin-top: 0;
        margin-left: 16px;
        padding-top: 0;
        border-top: none;
    }

    .nav-cta .btn {
        width: auto;
    }
}

.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (min-width: 1024px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* ========================================
   Hero Section (Mobile First)
   ======================================== */
.hero {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-tertiary) 100%);
    padding: 40px 0;
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .hero {
        padding: 60px 0;
    }
}

@media (min-width: 1024px) {
    .hero {
        padding: 80px 0;
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(37, 99, 235, 0.1) 100%);
    border-radius: 50%;
    transform: rotate(-15deg);
}

@media (min-width: 1024px) {
    .hero::before {
        right: -20%;
        width: 60%;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

@media (min-width: 1024px) {
    .hero-content {
        max-width: 600px;
    }
}

.hero h1 {
    font-size: 1.75rem;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (min-width: 768px) {
    .hero h1 {
        font-size: 2.25rem;
        margin-bottom: 20px;
    }
}

@media (min-width: 1024px) {
    .hero h1 {
        font-size: 3rem;
        margin-bottom: 24px;
    }
}

.hero p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .hero p {
        font-size: 1.125rem;
        margin-bottom: 28px;
    }
}

@media (min-width: 1024px) {
    .hero p {
        font-size: 1.25rem;
        margin-bottom: 32px;
    }
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 480px) {
    .hero-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }
}

/* ========================================
   Features (Mobile First)
   ======================================== */
.features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 24px;
    position: relative;
    z-index: 2;
}

@media (min-width: 480px) {
    .features {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .features {
        gap: 20px;
        margin-top: -20px;
    }
}

@media (min-width: 1024px) {
    .features {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
        margin-top: -40px;
    }
}

.feature-card {
    background: var(--bg-primary);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

@media (min-width: 768px) {
    .feature-card {
        padding: 24px;
    }
}

@media (min-width: 1024px) {
    .feature-card {
        padding: 32px;
    }

    .feature-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
    }
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
}

@media (min-width: 768px) {
    .feature-icon {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .feature-icon {
        width: 64px;
        height: 64px;
        margin-bottom: 20px;
        font-size: 1.75rem;
    }
}

.feature-card h3 {
    font-size: 1rem;
    margin-bottom: 8px;
}

@media (min-width: 768px) {
    .feature-card h3 {
        font-size: 1.125rem;
        margin-bottom: 12px;
    }
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .feature-card p {
        font-size: 1rem;
    }
}

/* ========================================
   Section (Mobile First)
   ======================================== */
.section {
    padding: 40px 0;
}

@media (min-width: 768px) {
    .section {
        padding: 60px 0;
    }
}

@media (min-width: 1024px) {
    .section {
        padding: 80px 0;
    }
}

.section-header {
    text-align: center;
    margin-bottom: 32px;
}

@media (min-width: 768px) {
    .section-header {
        margin-bottom: 40px;
    }
}

@media (min-width: 1024px) {
    .section-header {
        margin-bottom: 48px;
    }
}

.section-header h2 {
    margin-bottom: 12px;
}

@media (min-width: 768px) {
    .section-header h2 {
        margin-bottom: 16px;
    }
}

.section-header p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    font-size: 0.9375rem;
}

@media (min-width: 768px) {
    .section-header p {
        font-size: 1rem;
    }
}

/* ========================================
   Car Grid (Mobile First)
   ======================================== */
.cars-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: stretch;
}

@media (min-width: 480px) {
    .cars-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .cars-grid {
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .cars-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

@media (min-width: 1280px) {
    .cars-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.car-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

@media (min-width: 1024px) {
    .car-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
    }

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

.car-image {
    display: block;
    position: relative;
    height: 180px;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .car-image {
        height: 200px;
    }
}

.car-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.car-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 10px;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 20px;
    background: var(--warning);
    color: white;
}

@media (min-width: 768px) {
    .car-badge {
        top: 12px;
        left: 12px;
        padding: 6px 12px;
        font-size: 0.75rem;
    }
}

.car-badge.featured {
    background: var(--primary);
}

.car-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

@media (min-width: 768px) {
    .car-content {
        padding: 20px;
    }
}

.car-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

@media (min-width: 768px) {
    .car-title {
        font-size: 1.125rem;
    }
}

.car-title a {
    color: inherit;
}

.car-title a:hover {
    color: var(--primary);
}

.car-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

@media (min-width: 768px) {
    .car-meta {
        gap: 12px;
        margin-bottom: 16px;
        font-size: 0.875rem;
    }
}

.car-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.car-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
}

@media (min-width: 768px) {
    .car-price {
        font-size: 1.5rem;
    }
}

.car-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

@media (min-width: 768px) {
    .car-footer {
        padding-top: 16px;
    }
}

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

@media (min-width: 768px) {
    .car-location {
        font-size: 0.875rem;
    }
}

/* ========================================
   Filters (Mobile First)
   ======================================== */
.filters {
    background: var(--bg-primary);
    padding: 16px;
    border-radius: var(--border-radius);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
    .filters {
        padding: 20px;
        margin-bottom: 28px;
    }
}

@media (min-width: 1024px) {
    .filters {
        padding: 24px;
        margin-bottom: 32px;
    }
}

.filters-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (min-width: 768px) {
    .filters-title {
        font-size: 1.125rem;
        margin-bottom: 20px;
    }
}

.filters-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 480px) {
    .filters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .filters-grid {
        gap: 16px;
    }
}

@media (min-width: 1024px) {
    .filters-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.filters-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

@media (min-width: 480px) {
    .filters-actions {
        flex-direction: row;
        gap: 12px;
    }
}

@media (min-width: 768px) {
    .filters-actions {
        margin-top: 20px;
    }
}

/* ========================================
   Pagination (Mobile First)
   ======================================== */
.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 32px;
}

@media (min-width: 768px) {
    .pagination {
        gap: 8px;
        margin-top: 48px;
    }
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--transition);
}

@media (min-width: 768px) {
    .pagination a,
    .pagination span {
        min-width: 44px;
        height: 44px;
        padding: 0 16px;
        font-size: 1rem;
    }
}

.pagination a {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.pagination a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination span.current {
    background: var(--primary);
    color: white;
}

.pagination span.disabled {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

/* ========================================
   Car Detail Page (Mobile First)
   ======================================== */
.car-detail {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 768px) {
    .car-detail {
        gap: 24px;
    }
}

@media (min-width: 1024px) {
    .car-detail {
        display: grid;
        grid-template-columns: 1fr 380px;
        gap: 32px;
    }
}

@media (min-width: 1280px) {
    .car-detail {
        grid-template-columns: 1fr 400px;
    }
}

.car-gallery {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.gallery-main {
    position: relative;
    height: 250px;
}

@media (min-width: 480px) {
    .gallery-main {
        height: 300px;
    }
}

@media (min-width: 768px) {
    .gallery-main {
        height: 400px;
    }
}

@media (min-width: 1024px) {
    .gallery-main {
        height: 450px;
    }
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery-thumbs {
    display: flex;
    gap: 6px;
    padding: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 768px) {
    .gallery-thumbs {
        gap: 8px;
        padding: 16px;
    }
}

.gallery-thumb {
    flex-shrink: 0;
    width: 60px;
    height: 45px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: var(--transition);
}

@media (min-width: 768px) {
    .gallery-thumb {
        width: 80px;
        height: 60px;
    }
}

.gallery-thumb:hover,
.gallery-thumb.active {
    opacity: 1;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.car-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 768px) {
    .car-info {
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .car-info {
        gap: 24px;
    }
}

.car-info-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 16px;
}

@media (min-width: 768px) {
    .car-info-card {
        padding: 20px;
    }
}

@media (min-width: 1024px) {
    .car-info-card {
        padding: 24px;
    }
}

.car-detail-title {
    font-size: 1.375rem;
    margin-bottom: 8px;
}

@media (min-width: 768px) {
    .car-detail-title {
        font-size: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .car-detail-title {
        font-size: 1.75rem;
    }
}

.car-detail-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .car-detail-price {
        font-size: 1.75rem;
        margin-bottom: 24px;
    }
}

@media (min-width: 1024px) {
    .car-detail-price {
        font-size: 2rem;
    }
}

.car-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 768px) {
    .car-specs {
        gap: 16px;
    }
}

.spec-item {
    display: flex;
    flex-direction: column;
}

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

@media (min-width: 768px) {
    .spec-label {
        font-size: 0.875rem;
    }
}

.spec-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

@media (min-width: 768px) {
    .spec-value {
        font-size: 1rem;
    }
}

.contact-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: var(--border-radius);
    padding: 16px;
}

@media (min-width: 768px) {
    .contact-card {
        padding: 20px;
    }
}

@media (min-width: 1024px) {
    .contact-card {
        padding: 24px;
    }
}

.contact-card h4 {
    color: white;
    margin-bottom: 12px;
    font-size: 1rem;
}

@media (min-width: 768px) {
    .contact-card h4 {
        margin-bottom: 16px;
        font-size: 1.125rem;
    }
}

.contact-phone {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (min-width: 768px) {
    .contact-phone {
        font-size: 1.5rem;
        margin-bottom: 16px;
    }
}

.contact-phone a {
    color: white;
}

.car-description {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-top: 20px;
}

@media (min-width: 768px) {
    .car-description {
        padding: 24px;
        margin-top: 24px;
    }
}

@media (min-width: 1024px) {
    .car-description {
        padding: 32px;
        margin-top: 32px;
    }
}

.car-description h3 {
    margin-bottom: 12px;
}

@media (min-width: 768px) {
    .car-description h3 {
        margin-bottom: 16px;
    }
}

/* Video Container */
.car-video {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
    .car-video {
        padding: 24px;
    }
}

.car-video h3 {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ========================================
   Lightbox (Image Zoom)
   ======================================== */
.gallery-main {
    position: relative;
}

.gallery-zoom-hint {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    opacity: 0.7;
    transition: var(--transition);
    pointer-events: none;
}

.gallery-main:hover .gallery-zoom-hint {
    opacity: 1;
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.lightbox-close:hover,
.lightbox-close:active {
    background: rgba(0, 0, 0, 0.9);
    border-color: white;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev:hover,
.lightbox-prev:active,
.lightbox-next:hover,
.lightbox-next:active {
    background: rgba(0, 0, 0, 0.8);
    border-color: white;
}

.lightbox-prev {
    left: 16px;
}

.lightbox-next {
    right: 16px;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 0.875rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
}

@media (max-width: 767px) {
    .lightbox-prev,
    .lightbox-next {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .lightbox-prev {
        left: 8px;
    }

    .lightbox-next {
        right: 8px;
    }

    .lightbox-close {
        top: 12px;
        right: 12px;
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }

    .lightbox-content img {
        max-height: 75vh;
    }

    .lightbox-counter {
        bottom: 16px;
    }
}

/* ========================================
   Contacts Page (Mobile First)
   ======================================== */
.contacts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .contacts-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

/* ========================================
   Sell Form (Mobile First)
   ======================================== */
.sell-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 480px) {
    .form-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (min-width: 768px) {
    .form-row {
        gap: 20px;
    }
}

.form-section {
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .form-section {
        margin-bottom: 32px;
    }
}

.form-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

@media (min-width: 768px) {
    .form-section-title {
        font-size: 1.25rem;
        margin-bottom: 20px;
        padding-bottom: 12px;
    }
}

/* ========================================
   Image Upload (Mobile First)
   ======================================== */
.image-upload {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

@media (min-width: 768px) {
    .image-upload {
        padding: 40px;
    }
}

.image-upload:hover,
.image-upload.dragover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.image-upload-icon {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

@media (min-width: 768px) {
    .image-upload-icon {
        font-size: 3rem;
        margin-bottom: 16px;
    }
}

.image-upload p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .image-upload p {
        font-size: 1rem;
    }
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 16px;
}

@media (min-width: 480px) {
    .image-preview {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
}

@media (min-width: 768px) {
    .image-preview {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 12px;
        margin-top: 20px;
    }
}

.preview-item {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .preview-item .remove-btn {
        width: 24px;
        height: 24px;
        font-size: 1rem;
    }
}

/* ========================================
   Footer (Mobile First)
   ======================================== */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 40px 0 24px;
    margin-top: 40px;
}

@media (min-width: 768px) {
    .footer {
        padding: 50px 0 30px;
        margin-top: 60px;
    }
}

@media (min-width: 1024px) {
    .footer {
        padding: 60px 0 30px;
        margin-top: 80px;
    }
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

@media (min-width: 480px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .footer-grid {
        gap: 40px;
        margin-bottom: 40px;
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: 2fr repeat(3, 1fr);
        gap: 48px;
        margin-bottom: 48px;
    }
}

.footer-brand {
    max-width: 300px;
}

@media (min-width: 480px) {
    .footer-brand {
        grid-column: span 2;
    }
}

@media (min-width: 1024px) {
    .footer-brand {
        grid-column: span 1;
    }
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 12px;
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .footer-brand p {
        margin-top: 16px;
        font-size: 1rem;
    }
}

.footer h4 {
    color: white;
    margin-bottom: 16px;
    font-size: 0.9375rem;
}

@media (min-width: 768px) {
    .footer h4 {
        margin-bottom: 20px;
        font-size: 1rem;
    }
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

@media (min-width: 768px) {
    .footer-links li {
        margin-bottom: 12px;
    }
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .footer-links a {
        font-size: 1rem;
    }
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .footer-bottom {
        padding-top: 30px;
        font-size: 1rem;
    }
}

/* ========================================
   Badges (Mobile First)
   ======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 20px;
}

@media (min-width: 768px) {
    .badge {
        padding: 4px 12px;
        font-size: 0.75rem;
    }
}

.badge-success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge-info {
    background: rgba(6, 182, 212, 0.1);
    color: var(--info);
}

.badge-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

/* ========================================
   Alerts (Mobile First)
   ======================================== */
.alert {
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .alert {
        padding: 16px 20px;
        margin-bottom: 20px;
        gap: 12px;
        font-size: 1rem;
    }
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: #166534;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-info {
    background: rgba(6, 182, 212, 0.1);
    color: #0e7490;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

/* ========================================
   Modal (Mobile First)
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 0;
}

@media (min-width: 480px) {
    .modal-overlay {
        align-items: center;
        padding: 20px;
    }
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    padding: 24px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: var(--transition);
}

@media (min-width: 480px) {
    .modal {
        border-radius: var(--border-radius);
        max-width: 450px;
        transform: translateY(20px);
    }
}

@media (min-width: 768px) {
    .modal {
        padding: 32px;
    }
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .modal-header {
        margin-bottom: 24px;
    }
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    padding: 4px;
}

.modal-close:hover {
    color: var(--text-primary);
}

/* ========================================
   Loading & Spinner
   ======================================== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

@media (min-width: 768px) {
    .loading {
        padding: 40px;
    }
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@media (min-width: 768px) {
    .spinner {
        width: 40px;
        height: 40px;
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   Utility Classes
   ======================================== */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.d-none { display: none; }
.d-block { display: block; }

@media (min-width: 768px) {
    .d-md-none { display: none; }
    .d-md-block { display: block; }
    .d-md-flex { display: flex; }
}

@media (min-width: 1024px) {
    .d-lg-none { display: none; }
    .d-lg-block { display: block; }
    .d-lg-flex { display: flex; }
}

/* ========================================
   404 Page (Mobile First)
   ======================================== */
.error-page {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 0;
}

@media (min-width: 768px) {
    .error-page {
        min-height: 60vh;
    }
}

.error-code {
    font-size: 5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 12px;
}

@media (min-width: 768px) {
    .error-code {
        font-size: 8rem;
        margin-bottom: 16px;
    }
}

/* ========================================
   About Page (Mobile First)
   ======================================== */
.about-hero {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 40px 0;
    text-align: center;
}

@media (min-width: 768px) {
    .about-hero {
        padding: 60px 0;
    }
}

@media (min-width: 1024px) {
    .about-hero {
        padding: 80px 0;
    }
}

.about-hero h1 {
    color: white;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

@media (min-width: 768px) {
    .about-content {
        gap: 40px;
    }
}

@media (min-width: 1024px) {
    .about-content {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 48px;
    }
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 768px) {
    .about-stats {
        gap: 24px;
    }
}

.stat-card {
    background: var(--bg-primary);
    padding: 16px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
    .stat-card {
        padding: 24px;
    }
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
}

@media (min-width: 768px) {
    .stat-number {
        font-size: 2.5rem;
    }
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .stat-label {
        font-size: 1rem;
    }
}

/* ========================================
   Touch Device Optimizations
   ======================================== */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .btn-primary:hover {
        transform: none;
        box-shadow: none;
    }

    .card:hover {
        box-shadow: var(--shadow-sm);
    }

    .car-card:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }

    .car-card:hover .car-image img {
        transform: none;
    }

    .feature-card:hover {
        transform: none;
        box-shadow: var(--shadow);
    }

    /* Larger touch targets */
    .btn {
        min-height: 44px;
    }

    .nav-link {
        min-height: 44px;
    }

    .pagination a,
    .pagination span {
        min-width: 44px;
        min-height: 44px;
    }
}

/* ========================================
   Safe Area (for notched devices)
   ======================================== */
@supports (padding: max(0px)) {
    .header {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }

    .footer {
        padding-bottom: max(24px, env(safe-area-inset-bottom));
    }

    .nav {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }

    .modal {
        padding-bottom: max(24px, env(safe-area-inset-bottom));
    }
}

/* ========================================
   Sold Car Styles
   ======================================== */
.sold-banner {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    font-size: 1.125rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.sold-banner i {
    font-size: 1.5rem;
}

.sold-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.sold-overlay span {
    background: #dc2626;
    color: white;
    padding: 16px 48px;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 4px;
    transform: rotate(-15deg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.gallery-main {
    position: relative;
}

.car-sold .car-info-card {
    opacity: 0.85;
}

.sold-contact-card {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
}

@media (max-width: 767px) {
    .sold-banner {
        padding: 12px 16px;
        font-size: 1rem;
        gap: 8px;
    }

    .sold-banner i {
        font-size: 1.25rem;
    }

    .sold-overlay span {
        padding: 12px 32px;
        font-size: 1.5rem;
        letter-spacing: 2px;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .header,
    .footer,
    .nav,
    .mobile-menu-btn,
    .modal-overlay,
    .btn {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .container {
        max-width: none;
        padding: 0;
    }
}
