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

body {
    font-family: 'Inter', 'Cairo', sans-serif;
}

/* Arabic font when RTL */
[dir="rtl"] body {
    font-family: 'Cairo', 'Inter', sans-serif;
}

/* RTL specific adjustments */
[dir="rtl"] .space-x-2 > * + * {
    --tw-space-x-reverse: 1;
}

[dir="rtl"] .space-x-4 > * + * {
    --tw-space-x-reverse: 1;
}

[dir="rtl"] .space-x-8 > * + * {
    --tw-space-x-reverse: 1;
}

[dir="rtl"] .mr-1 {
    margin-right: 0;
    margin-left: 0.25rem;
}

[dir="rtl"] .mr-2 {
    margin-right: 0;
    margin-left: 0.5rem;
}

[dir="rtl"] .ml-2 {
    margin-left: 0;
    margin-right: 0.5rem;
}

[dir="rtl"] .ml-4 {
    margin-left: 0;
    margin-right: 1rem;
}

[dir="rtl"] .pl-10 {
    padding-left: 0;
    padding-right: 2.5rem;
}

[dir="rtl"] .pr-10 {
    padding-right: 0;
    padding-left: 2.5rem;
}

[dir="rtl"] .text-left {
    text-align: right;
}

[dir="rtl"] .left-0 {
    left: auto;
    right: 0;
}

[dir="rtl"] .left-3 {
    left: auto;
    right: 0.75rem;
}

[dir="rtl"] .right-3 {
    right: auto;
    left: 0.75rem;
}

[dir="rtl"] .right-4 {
    right: auto;
    left: 1rem;
}

[dir="rtl"] .left-4 {
    left: auto;
    right: 1rem;
}

/* Language selector styles */
#languageMenu {
    min-width: 140px;
}

.animate-modal {
    animation: modalPop 0.3s ease-out;
}

@keyframes modalPop {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.car-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.car-card h3 {
    transition: color 0.2s ease;
}

/* Car detail page specific styles */
.car-detail-gallery {
    scroll-behavior: smooth;
}

.thumbnail-active {
    border-color: #dc2626 !important;
}

.thumbnail-active img {
    opacity: 1;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Image hover zoom */
.img-zoom-container {
    overflow: hidden;
}

.img-zoom-container img {
    transition: transform 0.5s ease;
}

.img-zoom-container:hover img {
    transform: scale(1.05);
}