/**
 * RideDeal Custom CSS
 * Additional styles to complement Tailwind CSS
 */

/* ==================== ROOT VARIABLES ==================== */
:root {
    --primary: #E31E24;
    --primary-dark: #C41419;
    --primary-light: #FF2E34;
    --bg-light: #FAFAFA;
    --bg-dark: #121212;
    --transition: all 0.3s ease;
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined' !important;
}

/* ==================== GLOBAL STYLES ==================== */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ==================== CUSTOM SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

.dark ::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ==================== CARD HOVER EFFECTS ==================== */
.card-hover {
    transition: var(--transition);
}

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

/* ==================== BUTTON STYLES ==================== */
.btn-primary {
    background: var(--primary);
    color: white;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: scale(1.02);
}

.btn-primary:active {
    transform: scale(0.98);
}

/* ==================== IMAGE LOADING ==================== */
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[data-src].loaded {
    opacity: 1;
}

/* ==================== SKELETON LOADING ==================== */
.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.dark .skeleton {
    background: linear-gradient(
        90deg,
        #1e293b 25%,
        #334155 50%,
        #1e293b 75%
    );
    background-size: 200% 100%;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ==================== PRICE RANGE SLIDER ==================== */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 0 8px rgba(227, 30, 36, 0.1);
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 0 8px rgba(227, 30, 36, 0.1);
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ==================== BADGE STYLES ==================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background-color: #fee2e2;
    color: var(--primary);
}

.badge-success {
    background-color: #dcfce7;
    color: #16a34a;
}

.badge-warning {
    background-color: #fef3c7;
    color: #d97706;
}

.badge-danger {
    background-color: #fee2e2;
    color: #dc2626;
}

/* ==================== GRADIENT BACKGROUNDS ==================== */
.hero-gradient {
    background: radial-gradient(
        circle at 50% 50%,
        rgba(227, 30, 36, 0.05) 0%,
        transparent 70%
    );
}

.gradient-primary {
    background: linear-gradient(135deg, #E31E24 0%, #FF2E34 100%);
}

.gradient-dark {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

/* ==================== GLASS MORPHISM ==================== */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.dark .glass {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==================== IMAGE GALLERY ==================== */
.thumbnail {
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.thumbnail:hover {
    opacity: 0.8;
}

.thumbnail.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(227, 30, 36, 0.1);
}

/* ==================== CUSTOM CHECKBOX & RADIO ==================== */
input[type="checkbox"]:checked,
input[type="radio"]:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

input[type="checkbox"]:focus,
input[type="radio"]:focus {
    ring-color: rgba(227, 30, 36, 0.5);
}

/* ==================== TOAST NOTIFICATIONS ==================== */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    max-width: 400px;
    z-index: 9999;
    animation: slideInRight 0.3s ease-out;
}

.toast.hide {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* ==================== RESPONSIVE UTILITIES ==================== */
@media (max-width: 768px) {
    .toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}

/* ==================== PRINT STYLES ==================== */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* ==================== ACCESSIBILITY ==================== */
.focus-visible:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ==================== LOADING SPINNER ==================== */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==================== UTILITIES ==================== */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.transition-all {
    transition: var(--transition);
}



.sidebar a {
    color: #999;
    transition: all 0.2s;
    font-size: 14px;
}


.menu-item {
    font-size: 14px;
}