/**
 * Salezen Base CSS v2.0
 * استایل‌های مشترک
 */

/* ============================================
   FONTS
   ============================================ */
* {
    font-family: 'Vazirmatn', system-ui, -apple-system, sans-serif;
}

body {
    font-family: 'Vazirmatn', system-ui, -apple-system, sans-serif;
    font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Vazirmatn', system-ui, sans-serif;
}

code, pre, .font-mono {
    font-family: monospace;
}

/* ============================================
   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;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   GLASSMORPHISM
   ============================================ */
.glass {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-light {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-dark {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ============================================
   GRADIENTS
   ============================================ */
.gradient-primary {
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #0EA5E9 100%);
}

.gradient-text {
    background: linear-gradient(135deg, #6366F1 0%, #0EA5E9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-success {
    background: linear-gradient(135deg, #10B981 0%, #34D399 100%);
}

.gradient-warning {
    background: linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%);
}

.gradient-error {
    background: linear-gradient(135deg, #EF4444 0%, #F87171 100%);
}

/* ============================================
   GLOW EFFECTS
   ============================================ */
.glow-primary {
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.3);
}

.glow-accent {
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.2);
}

.glow-error {
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.2);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 0 40px rgba(99, 102, 241, 0.5); }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

@keyframes confetti-fall {
    0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

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

::-webkit-scrollbar-track {
    background: #0F172A;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* ============================================
   HERO BACKGROUNDS
   ============================================ */
.hero-mesh {
    background: 
        radial-gradient(at 20% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(at 80% 70%, rgba(14, 165, 233, 0.1) 0%, transparent 50%),
        radial-gradient(at 50% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* ============================================
   CARDS
   ============================================ */
.product-card {
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(99, 102, 241, 0.2);
}

.category-card {
    transition: all 0.3s ease;
}

.category-card:hover {
    border-color: rgba(99, 102, 241, 0.5);
    transform: scale(1.02);
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #6366F1, #0EA5E9);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ============================================
   FORMS
   ============================================ */
.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #6366F1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-input.error {
    border-color: #EF4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.form-input.success {
    border-color: #10B981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

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

.toast.success { background: #22c55e; }
.toast.error { background: #ef4444; }
.toast.warning { background: #f59e0b; }
.toast.info { background: #3b82f6; }

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

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

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #334155;
    border-top-color: #6366F1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ============================================
   CHECKOUT STEPS
   ============================================ */
.step-circle.active {
    background: #6366F1;
    color: white;
}

.step-circle.completed {
    background: #10B981;
    color: white;
}

.step-line.active {
    background: linear-gradient(90deg, #10B981, #6366F1);
}

.step-line.completed {
    background: #10B981;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar-link {
    transition: all 0.2s ease;
}

.sidebar-link:hover {
    background: rgba(99, 102, 241, 0.1);
}

.sidebar-link.active {
    background: rgba(99, 102, 241, 0.2);
    color: #6366F1;
}

/* ============================================
   TABLES
   ============================================ */
.table-row {
    transition: background 0.2s ease;
}

.table-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

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

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: #10B981;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #F59E0B;
}

.badge-error {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
}

.badge-info {
    background: rgba(59, 130, 246, 0.2);
    color: #3B82F6;
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}

/* ============================================
   CONFETTI ANIMATION
   ============================================ */
.confetti-piece {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -10px;
    animation: confetti-fall 3s ease-out forwards;
}

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