/* ============================================================
   AgriMarket — Global Design System
   Green & Earth Tone Aesthetic
   ============================================================ */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800;900&family=Playfair+Display:wght@400;500;600;700&display=swap');

/* ============================================================
   CSS Custom Properties (Design Tokens)
   ============================================================ */
:root {
    /* Primary Green Palette */
    --primary: #2D6A4F;
    --primary-light: #40916C;
    --primary-lighter: #52B788;
    --primary-dark: #1B4332;
    --primary-darker: #0F2A1D;

    /* Secondary Earth Tones */
    --secondary: #D4A373;
    --secondary-light: #E9C46A;
    --secondary-dark: #BC8A5F;

    /* Accent */
    --accent: #F4A261;
    --accent-dark: #E76F51;

    /* Neutrals */
    --white: #FFFFFF;
    --off-white: #FAFDF7;
    --surface: #F4F7F0;
    --surface-alt: #EBF0E4;
    --border: #D4DCC9;
    --border-light: #E8EDE2;
    --text-primary: #1A1A2E;
    --text-secondary: #4A5568;
    --text-muted: #8B9A7E;
    --text-inverse: #FFFFFF;

    /* Status Colors */
    --success: #10B981;
    --success-light: #D1FAE5;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --error: #EF4444;
    --error-light: #FEE2E2;
    --info: #3B82F6;
    --info-light: #DBEAFE;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #1B4332 0%, #2D6A4F 50%, #40916C 100%);
    --gradient-hero: linear-gradient(180deg, #0F2A1D 0%, #1B4332 40%, #2D6A4F 100%);
    --gradient-card: linear-gradient(145deg, rgba(45, 106, 79, 0.05) 0%, rgba(212, 163, 115, 0.05) 100%);
    --gradient-gold: linear-gradient(135deg, #D4A373, #E9C46A, #F4A261);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(27, 67, 50, 0.06);
    --shadow-sm: 0 2px 8px rgba(27, 67, 50, 0.08);
    --shadow-md: 0 4px 16px rgba(27, 67, 50, 0.1);
    --shadow-lg: 0 8px 32px rgba(27, 67, 50, 0.12);
    --shadow-xl: 0 16px 48px rgba(27, 67, 50, 0.16);
    --shadow-glow: 0 0 30px rgba(45, 106, 79, 0.3);
    --shadow-gold: 0 4px 20px rgba(212, 163, 115, 0.3);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-accent: 'Playfair Display', serif;

    /* Spacing Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 500ms cubic-bezier(0.175, 0.885, 0.32, 1.275);

    /* Layout */
    --max-width: 1280px;
    --sidebar-width: 260px;
    --header-height: 72px;
}

/* ============================================================
   Reset & Base
   ============================================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background-color: var(--off-white);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-light);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
    font-family: inherit;
}

input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    outline: none;
}

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

.text-accent {
    font-family: var(--font-accent);
}

.text-gradient {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-muted {
    color: var(--text-muted);
}

.text-center { text-align: center; }
.text-right { text-align: right; }

/* ============================================================
   Layout Utilities
   ============================================================ */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--space-lg);
}

.section {
    padding: var(--space-4xl) 0;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }
.gap-2xl { gap: var(--space-2xl); }

/* Grid */
.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .grid-4, .grid-3, .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Visibility & Spacing
   ============================================================ */
.hidden { display: none !important; }
.visible { display: block !important; }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

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

::-webkit-scrollbar-track {
    background: var(--surface);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: var(--radius-full);
}

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

/* ============================================================
   Selection
   ============================================================ */
::selection {
    background: var(--primary-lighter);
    color: var(--white);
}
