/* Custom CSS for BKT Motors */

/* CSS Reset and Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.focus\:not-sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Focus styles for better accessibility */
*:focus {
    outline: 2px solid #e11d48;
    outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #e11d48;
    outline-offset: 2px;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Header Styles */
#header {
    transition: all 0.3s ease;
}

#header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* Mobile Menu Animation */
#mobile-menu {
    transition: all 0.3s ease;
}

#mobile-menu.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Vehicle Cards */
.vehicle-card {
    transition: all 0.3s ease;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.vehicle-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.vehicle-card img {
    transition: transform 0.3s ease;
}

.vehicle-card:hover img {
    transform: scale(1.05);
}

/* Vehicle Gallery */
.vehicle-gallery {
    position: relative;
}

.vehicle-gallery .swiper-button-next,
.vehicle-gallery .swiper-button-prev {
    color: #e11d48;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    margin-top: -22px;
}

.vehicle-gallery .swiper-button-next:after,
.vehicle-gallery .swiper-button-prev:after {
    font-size: 18px;
}

.vehicle-gallery .swiper-pagination-bullet {
    background: #e11d48;
    opacity: 0.5;
}

.vehicle-gallery .swiper-pagination-bullet-active {
    opacity: 1;
}

/* Swiper Customization */
.featured-vehicles-swiper .swiper-button-next,
.featured-vehicles-swiper .swiper-button-prev {
    color: #e11d48;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.featured-vehicles-swiper .swiper-button-next:after,
.featured-vehicles-swiper .swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

.featured-vehicles-swiper .swiper-pagination-bullet {
    background: #e11d48;
    opacity: 0.3;
    width: 12px;
    height: 12px;
}

.featured-vehicles-swiper .swiper-pagination-bullet-active {
    opacity: 1;
}

/* Testimonials Swiper */
.testimonials-swiper .swiper-pagination-bullet {
    background: #e11d48;
}

/* Filter Styles */
.filter-chip {
    background: #e11d48;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    margin: 0.25rem;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    background: #be185d;
}

.filter-chip .remove-filter {
    margin-left: 0.5rem;
    cursor: pointer;
    opacity: 0.8;
}

.filter-chip .remove-filter:hover {
    opacity: 1;
}

/* Price Range Slider */
.price-range-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
}

.price-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e11d48;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.price-range-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e11d48;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: #e11d48;
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1);
    outline: none;
}

.form-error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-success {
    color: #059669;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: #e11d48;
    color: white;
}

.btn-primary:hover {
    background: #be185d;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(225, 29, 72, 0.3);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.3);
}

.btn-outline {
    background: transparent;
    color: #e11d48;
    border: 2px solid #e11d48;
}

.btn-outline:hover {
    background: #e11d48;
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-new {
    background: #059669;
    color: white;
}

.badge-used {
    background: #7c3aed;
    color: white;
}

.badge-certified {
    background: #ea580c;
    color: white;
}

.badge-featured {
    background: #e11d48;
    color: white;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #e11d48;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0.5rem;
}

.modal-close:hover {
    color: #e11d48;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: white;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    border-left: 4px solid #059669;
}

.toast.show {
    transform: translateX(0);
}

.toast.error {
    border-left-color: #dc2626;
}

.toast.warning {
    border-left-color: #f59e0b;
}

.toast.info {
    border-left-color: #3b82f6;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Vehicle Stats */
.vehicle-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
}

.vehicle-stat {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: #6b7280;
}

.vehicle-stat i {
    margin-right: 0.5rem;
    color: #e11d48;
}

/* Sticky Elements */
.sticky-cta {
    position: sticky;
    bottom: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 1rem;
    z-index: 30;
}

/* Grid Utilities */
.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Responsive Video */
.video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.video-responsive iframe,
.video-responsive object,
.video-responsive embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        color: black !important;
        background: white !important;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .vehicle-card {
        border: 2px solid #000;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* Dark Mode (if implemented) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles would go here */
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Selection Styles */
::selection {
    background: #e11d48;
    color: white;
}

::-moz-selection {
    background: #e11d48;
    color: white;
}
