/* ==========================================
   Vatrina Design System
   Professional Arabic Marketplace
   ========================================== */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --accent: #0ea5e9;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #0f172a;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --shadow-sm: 0 1px 2px rgba(15,23,42,0.04);
    --shadow: 0 1px 3px rgba(15,23,42,0.06), 0 4px 12px rgba(15,23,42,0.04);
    --shadow-md: 0 4px 6px rgba(15,23,42,0.04), 0 10px 20px rgba(15,23,42,0.03);
    --shadow-lg: 0 10px 25px rgba(15,23,42,0.06), 0 20px 48px rgba(15,23,42,0.04);
    --shadow-xl: 0 20px 40px rgba(15,23,42,0.08), 0 40px 80px rgba(15,23,42,0.04);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

::selection { background: var(--primary-100); color: var(--primary-dark); }

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

/* Glass effect for header */
.glass {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
}

/* Card lift effect */
.card-lift {
    transition: var(--transition);
    will-change: transform;
}
.card-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Image zoom */
.img-zoom {
    overflow: hidden;
}
.img-zoom img {
    transition: var(--transition-slow);
    will-change: transform;
}
.img-zoom:hover img {
    transform: scale(1.06);
}

/* Shimmer loading */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.shimmer {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Fade in animation */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in {
    animation: fadeInUp 0.5s ease-out forwards;
}
.fade-in-d1 { animation-delay: 0.1s; opacity: 0; }
.fade-in-d2 { animation-delay: 0.2s; opacity: 0; }
.fade-in-d3 { animation-delay: 0.3s; opacity: 0; }
.fade-in-d4 { animation-delay: 0.4s; opacity: 0; }

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Input focus ring */
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

/* Button press */
.btn-press:active {
    transform: scale(0.97);
}

/* Line clamp */
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero gradient */
.hero-gradient {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 30%, #2563eb 70%, #0ea5e9 100%);
}

/* Blob decoration */
@keyframes blob {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; transform: translate(0,0) rotate(0deg); }
    33% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; transform: translate(20px,-20px) rotate(5deg); }
    66% { border-radius: 50% 60% 30% 60% / 30% 40% 70% 60%; transform: translate(-10px,10px) rotate(-3deg); }
}
.blob {
    animation: blob 12s ease-in-out infinite;
}

/* Pulse ring */
@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.6); opacity: 0; }
}
.pulse-ring::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 2px solid var(--primary);
    animation: pulse-ring 2s ease-out infinite;
}

/* Mobile iOS fix */
@supports (-webkit-touch-callout: none) {
    input, textarea, select { font-size: 16px !important; }
}

/* Section divider */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gray-200), transparent);
}

/* Empty state illustration */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}
.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: var(--radius-lg);
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

/* Toast notification */
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* Stats counter animation placeholder */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hover underline */
.hover-underline {
    position: relative;
}
.hover-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}
.hover-underline:hover::after {
    width: 100%;
}

/* Status dot pulse */
@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.status-pulse {
    animation: statusPulse 2s ease-in-out infinite;
}
