/* ============================================
   GLOBAL STYLES - FreshMarket
   Base Reset & Variables
   ============================================ */

:root {
    /* Primary Colors */
    --primary: #00a049;
    --primary-dark: #008a3e;
    --primary-light: #e8f5e9;
    --primary-gradient: linear-gradient(135deg, #00a049, #00c853);

    /* Secondary */
    --secondary: #ef4056;
    --secondary-light: #fff0f1;

    /* Accent */
    --accent-orange: #ff6d00;
    --accent-yellow: #ffc107;
    --accent-blue: #2196f3;
    --accent-purple: #7c4dff;

    /* Neutrals */
    --dark: #0c0c0c;
    --text-primary: #1a1a2e;
    --text-secondary: #62666d;
    --text-muted: #9e9fb4;
    --border: #e0e0e6;
    --border-light: #f0f0f5;
    --bg-light: #f5f5fa;
    --bg-white: #ffffff;
    --bg-dark: #1a1a2e;
    --bg-card: #ffffff;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.16);

    /* Typography */
    --font-family: 'Vazirmatn', system-ui, -apple-system, sans-serif;
    --font-size-xs: 11px;
    --font-size-sm: 12px;
    --font-size-base: 14px;
    --font-size-md: 15px;
    --font-size-lg: 16px;
    --font-size-xl: 18px;
    --font-size-2xl: 22px;
    --font-size-3xl: 28px;

    /* Radius */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-full: 50%;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.4s ease;
    --transition-bounce: 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);

    /* Z-Index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-tooltip: 600;
}

/* ============ RESET ============ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    font-size: 100%;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--text-primary);
    background-color: var(--bg-light);
    line-height: 1.7;
    direction: rtl;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

a:hover {
    text-decoration: none;
}

ul, ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    outline: none;
}

input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
    background: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
}

::selection {
    background-color: var(--primary);
    color: white;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* ============ CONTAINER ============ */
.container {
    width: 100%;
    max-width: 1340px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============ UTILITY CLASSES ============ */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.bg-primary { background-color: var(--primary) !important; }
.bg-light { background-color: var(--bg-light) !important; }

/* ============ ANIMATIONS ============ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
    60% { transform: translateY(-3px); }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(0, 160, 73, 0.3); }
    50% { box-shadow: 0 0 20px rgba(0, 160, 73, 0.6); }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}
