:root {
    /* * RENK PALETI (PRIMITIVES)
     * Zinc (N      tr Griler) - Modern ve temiz bir zemin i      in
     */
    --base-white: #ffffff;
    --base-black: #000000;

    --zinc-50: #fafafa;
    --zinc-100: #f4f4f5;
    --zinc-200: #e4e4e7;
    --zinc-300: #d4d4d8;
    --zinc-400: #a1a1aa;
    --zinc-500: #71717a;
    --zinc-600: #52525b;
    --zinc-700: #3f3f46;
    --zinc-800: #27272a;
    --zinc-900: #18181b;
    --zinc-950: #09090b;

    /* * BRAND COLORS (Modarenta Gold/Amber)
     * L      ks ve sofistike bir his i      in hafif desat      re altin tonlari
     */
    --brand-50: #fdfbf7;
    --brand-100: #f7f1e3;
    --brand-200: #ebdcb3;
    --brand-300: #dec082;
    --brand-400: #d0a459;
    --brand-500: #b88b39; /* Ana Marka Rengi */
    --brand-600: #996e2b; /* Hover / Active */
    --brand-700: #7a5424;
    --brand-800: #654523;
    --brand-900: #553a22;

    /* * FUNCTIONAL COLORS
     */
    --red-50:  #fef2f2;
    --red-200: #fecaca;
    --red-400: #f87171;
    --red-500: #ef4444;
    --red-600: #dc2626;
    --red-700: #b91c1c;

    --green-50:  #f0fdf4;
    --green-200: #bbf7d0;
    --green-400: #4ade80;
    --green-500: #22c55e;
    --green-600: #16a34a;
    --green-700: #15803d;

    --amber-50:  #fffbeb;
    --amber-200: #fde68a;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;

    --blue-50:  #eff6ff;
    --blue-200: #bfdbfe;
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;

    /* * SEMANTIC TOKENS (LIGHT MODE DEFAULT)
     * Tasarimda kullanilacak anlamsal degiskenler
     */
    
    /* Backgrounds */
    --color-bg: #ffffff;
    --color-surface: #ffffff;
    --color-surface-2: #ffffff;
    --color-surface-hover: var(--zinc-100);
    --color-surface-active: var(--zinc-200);

    /* Text & Content */
    --color-text: var(--zinc-900);        /* Ana metin (neredeyse siyah) */
    --color-muted: var(--zinc-500);       /* Ikincil metin */
    --color-text-on-brand: var(--base-white);
    --color-text-on-func: var(--base-white); /* Danger/Success buton metni */

    /* Borders & Dividers */
    --color-border: var(--zinc-200);
    --color-border-hover: var(--zinc-300);
    --color-border-active: var(--zinc-400);

    /* Brand / Accent */
    --color-brand: var(--brand-600);      /* Okunabilirlik i      in biraz koyu */
    --color-brand-bg: var(--brand-500);   /* Buton arkaplanlari i      in */
    --color-brand-hover: var(--brand-700);
    --color-brand-active: var(--brand-800);
    --color-brand-subtle: var(--brand-100); /* Vurgulu zeminler */
    --color-brand-text: var(--brand-900); /* Subtle zemin       zeri metin */

    /* Interactive States (Generic) */
    --color-link: var(--zinc-900);
    --color-link-hover: var(--brand-600);
    --color-input-bg: var(--base-white);
    --color-input-border: var(--zinc-300);
    --color-input-focus: var(--brand-500);
    
    /* Inputs / Controls (Disabled States) */
    --color-input-disabled-bg: var(--zinc-100);
    --color-input-disabled-border: var(--zinc-200);
    --color-input-disabled-text: var(--zinc-400);

    /* Buttons (Semantic Contract) */
    /* Primary (Brand) */
    --color-btn-primary-bg: var(--brand-500);
    --color-btn-primary-text: var(--color-text-on-brand);
    --color-btn-primary-border: var(--brand-500);
    --color-btn-primary-hover-bg: var(--brand-600);
    --color-btn-primary-hover-border: var(--brand-600);
    --color-btn-primary-active-bg: var(--brand-700);
    --color-btn-primary-disabled-bg: var(--zinc-200);
    --color-btn-primary-disabled-text: var(--zinc-400);
    --color-btn-primary-disabled-border: var(--zinc-200);

    /* Secondary (Surface) */
    --color-btn-secondary-bg: var(--base-white);
    --color-btn-secondary-text: var(--zinc-900);
    --color-btn-secondary-border: var(--zinc-300);
    --color-btn-secondary-hover-bg: var(--zinc-50);
    --color-btn-secondary-hover-border: var(--zinc-400);
    --color-btn-secondary-active-bg: var(--zinc-100);
    --color-btn-secondary-disabled-bg: var(--zinc-100); /* Ayrismasi i      in zinc-100 yapildi */
    --color-btn-secondary-disabled-text: var(--zinc-300);
    --color-btn-secondary-disabled-border: var(--zinc-200);

    /* Ghost (Link/Transparent) */
    --color-btn-ghost-bg: transparent;
    --color-btn-ghost-text: var(--zinc-600);
    --color-btn-ghost-border: transparent;
    --color-btn-ghost-hover-bg: var(--zinc-100);
    --color-btn-ghost-hover-text: var(--zinc-900);
    --color-btn-ghost-active-bg: var(--zinc-200);
    --color-btn-ghost-disabled-bg: transparent;
    --color-btn-ghost-disabled-text: var(--zinc-300);
    --color-btn-ghost-disabled-border: transparent;

    /* Functional Variants */
    /* Danger */
    --color-danger: var(--red-600);
    --color-danger-bg: var(--red-600);
    --color-danger-hover: var(--red-700);
    --color-danger-subtle: var(--red-50);
    --color-danger-border: var(--red-200);
    --color-danger-text: var(--red-700);

    /* Success */
    --color-success: var(--green-600);
    --color-success-bg: var(--green-600);
    --color-success-hover: var(--green-700);
    --color-success-subtle: var(--green-50);
    --color-success-border: var(--green-200);
    --color-success-text: var(--green-700);

    /* Warning */
    --color-warning: var(--amber-500);
    --color-warning-bg: var(--amber-500);
    --color-warning-hover: var(--amber-600);
    --color-warning-subtle: var(--amber-50);
    --color-warning-border: var(--amber-200);
    --color-warning-text: var(--amber-700);

    /* Info */
    --color-info: var(--blue-600);
    --color-info-bg: var(--blue-600);
    --color-info-hover: var(--blue-700);
    --color-info-subtle: var(--blue-50);
    --color-info-border: var(--blue-200);
    --color-info-text: var(--blue-700);

    /* Focus Rings & Outlines */
    --color-focus: rgba(184, 139, 57, 0.5); /* Brand color with opacity */
    --color-ring: var(--color-focus);
    --color-ring-offset: var(--base-white);
    --width-ring: 3px;
    --width-ring-offset: 2px;
    --width-border-sm: 1px;
    --width-border-md: 2px;

    /* * TYPOGRAPHY SYSTEM
     */
    --font-sans: "Outfit", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-serif: "Cormorant Garamond", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; /* L      ks basliklar i      in opsiyonel */

    /* Type Scale (Major Third -ish) */
    --text-xs: 0.75rem;     /* 12px */
    --text-sm: 0.875rem;    /* 14px */
    --text-base: 1rem;      /* 16px */
    --text-lg: 1.125rem;    /* 18px */
    --text-xl: 1.25rem;     /* 20px */
    --text-2xl: 1.5rem;     /* 24px */
    --text-3xl: 1.875rem;   /* 30px */
    --text-4xl: 2.25rem;    /* 36px */
    --text-5xl: 3rem;       /* 48px */

    /* Line Heights */
    --lh-none: 1;
    --lh-tight: 1.25;
    --lh-normal: 1.5;
    --lh-relaxed: 1.75;

    /* Letter Spacing (Tracking) */
    --tracking-tighter: -0.05em;
    --tracking-tight: -0.025em;
    --tracking-normal: 0em;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;

    /* Font Weights */
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;

    /* Measures (Max Widths) */
    --measure-prose: 65ch;

    /* * SPACING SCALE (4px grid base)
     */
    --space-0: 0px;
    --space-1: 0.25rem;  /* 4px */
    --space-2: 0.5rem;   /* 8px */
    --space-3: 0.75rem;  /* 12px */
    --space-4: 1rem;     /* 16px */
    --space-5: 1.25rem;  /* 20px */
    --space-6: 1.5rem;   /* 24px */
    --space-8: 2rem;     /* 32px */
    --space-10: 2.5rem;  /* 40px */
    --space-12: 3rem;    /* 48px */
    --space-16: 4rem;    /* 64px */
    --space-20: 5rem;    /* 80px */
    --space-24: 6rem;    /* 96px */

    /* * BORDER RADIUS
     */
    --radius-sm: 0.25rem;   /* 4px */
    --radius-md: var(--radius-card, 0.625rem);  /* 6px */
    --radius-lg: calc(var(--radius-card, 0.625rem) + 2px);    /* 8px */
    --radius-xl: calc(var(--radius-card, 0.625rem) + 6px);   /* 12px */
    --radius-2xl: 1rem;     /* 16px */
    --radius-full: 9999px;

    /* * SHADOWS (Elevation)
     */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);

    /* * LAYOUT & CONTAINER
     */
    --container-max: 1280px;
    --container-padding: var(--space-4);
    --header-height: 4rem;

    /* * Z-INDEX LAYERS
     */
    --z-negative: -1;
    --z-base: 0;
    --z-elevate: 10;
    --z-sticky: 100;
    --z-overlay: 200;
    --z-modal: 300;
    --z-popover: 400;
    --z-toast: 500;
    --z-max: 9999;

    /* * MOTION
     */
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 150ms;
    --duration-normal: 300ms;
    --duration-slow: 500ms;
    --duration-slider: 600ms;

    /* * OVERLAYS & BACKDROP
     */
    --color-overlay: rgba(0, 0, 0, 0.4);
    --color-overlay-heavy: rgba(0, 0, 0, 0.6);
    --backdrop-blur: 12px;
    --backdrop-blur-heavy: 20px;

    /* * ASPECT RATIOS
     */
    --ratio-product: 3 / 4;
    --ratio-category: 4 / 5;
    --ratio-hero: 3 / 4;
    --ratio-thumb: 1 / 1;
}

/* -------------------------------------------------------------------------- */
/* GLOBAL KEYFRAME ANIMATIONS                                                 */
/* -------------------------------------------------------------------------- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideRight {
    from { transform: translateX(-100%); }
    to   { transform: translateX(0); }
}

@keyframes slideLeft {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to   { transform: scale(1); }
}

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

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

/* -------------------------------------------------------------------------- */
/* SCROLLBAR STYLING                                                          */
/* -------------------------------------------------------------------------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-border-hover); }

/* -------------------------------------------------------------------------- */
/* SELECTION STYLING                                                          */
/* -------------------------------------------------------------------------- */
::selection {
    background: var(--color-brand-bg);
    color: var(--color-text-on-brand);
}

/* * RESPONSIVE CONTAINER OVERRIDES
 */
@media (min-width: 768px) {
    :root {
        --container-padding: var(--space-6);
    }
}

@media (min-width: 1024px) {
    :root {
        --container-padding: var(--space-8);
    }
}

/* * DARK MODE OVERRIDES
 * Sistem tercihine g      re otomatik adapte olur.
 */
@media (prefers-color-scheme: dark) {
    :root {
        /* Backgrounds */
        --color-bg: var(--zinc-950);
        --color-surface: var(--zinc-900);
        --color-surface-2: var(--zinc-800);
        --color-surface-hover: var(--zinc-800);
        --color-surface-active: var(--zinc-700);

        /* Text */
        --color-text: var(--zinc-50);
        --color-muted: var(--zinc-400);
        --color-text-on-brand: var(--zinc-900); /* Dark modda brand (altin)       st       siyah metin */

        /* Borders */
        --color-border: var(--zinc-800);
        --color-border-hover: var(--zinc-700);
        --color-border-active: var(--zinc-600);

        /* Brand */
        --color-brand: var(--brand-400); 
        --color-brand-bg: var(--brand-500);
        --color-brand-hover: var(--brand-300);
        --color-brand-active: var(--brand-200);
        --color-brand-subtle: rgba(184, 139, 57, 0.15); /* Transparan zemin */
        --color-brand-text: var(--brand-200);

        /* Interactive */
        --color-link: var(--zinc-200);
        --color-link-hover: var(--brand-400);
        --color-input-bg: var(--zinc-900);
        --color-input-border: var(--zinc-700);
        --color-input-focus: var(--brand-500);
        --color-ring-offset: var(--zinc-950);
        
        /* Inputs / Controls (Disabled States - Dark) */
        --color-input-disabled-bg: var(--zinc-800);
        --color-input-disabled-border: var(--zinc-700);
        --color-input-disabled-text: var(--zinc-500);

        /* Buttons (Semantic Contract - Dark) */
        /* Primary (Brand) */
        --color-btn-primary-bg: var(--brand-500);
        --color-btn-primary-text: var(--color-text-on-brand); /* Var referansi ile baglandi */
        --color-btn-primary-border: var(--brand-500);
        --color-btn-primary-hover-bg: var(--brand-400); /* Dark modda hover daha a      ik (parlak) olur */
        --color-btn-primary-hover-border: var(--brand-400);
        --color-btn-primary-active-bg: var(--brand-300);
        --color-btn-primary-disabled-bg: var(--zinc-800);
        --color-btn-primary-disabled-text: var(--zinc-600);
        --color-btn-primary-disabled-border: var(--zinc-800);

        /* Secondary (Surface) */
        --color-btn-secondary-bg: var(--zinc-900);
        --color-btn-secondary-text: var(--zinc-100);
        --color-btn-secondary-border: var(--zinc-700);
        --color-btn-secondary-hover-bg: var(--zinc-800);
        --color-btn-secondary-hover-border: var(--zinc-600);
        --color-btn-secondary-active-bg: var(--zinc-700);
        --color-btn-secondary-disabled-bg: var(--zinc-900);
        --color-btn-secondary-disabled-text: var(--zinc-600);
        --color-btn-secondary-disabled-border: var(--zinc-800);

        /* Ghost (Link/Transparent) */
        --color-btn-ghost-bg: transparent;
        --color-btn-ghost-text: var(--zinc-400);
        --color-btn-ghost-border: transparent;
        --color-btn-ghost-hover-bg: var(--zinc-800);
        --color-btn-ghost-hover-text: var(--zinc-100);
        --color-btn-ghost-active-bg: var(--zinc-700);
        --color-btn-ghost-disabled-bg: transparent;
        --color-btn-ghost-disabled-text: var(--zinc-600);
        --color-btn-ghost-disabled-border: transparent;

        /* Functional Variants (Dark Hover Overrides) */
        /* Danger */
        --color-danger: var(--red-500);
        --color-danger-bg: var(--red-600);
        --color-danger-hover: var(--red-400); /* Dark hover: daha parlak */
        --color-danger-subtle: rgba(220, 38, 38, 0.2);
        --color-danger-border: rgba(220, 38, 38, 0.3);
        --color-danger-text: var(--red-200);

        /* Success */
        --color-success: var(--green-500);
        --color-success-bg: var(--green-600);
        --color-success-hover: var(--green-400); /* Dark hover: daha parlak */
        --color-success-subtle: rgba(22, 163, 74, 0.2);
        --color-success-border: rgba(22, 163, 74, 0.3);
        --color-success-text: var(--green-200);

        /* Warning */
        --color-warning: var(--amber-500);
        --color-warning-bg: var(--amber-600);
        --color-warning-hover: var(--amber-400); /* Dark hover: daha parlak */
        --color-warning-subtle: rgba(217, 119, 6, 0.2);
        --color-warning-border: rgba(217, 119, 6, 0.3);
        --color-warning-text: var(--amber-200);

        /* Info */
        --color-info: var(--blue-500);
        --color-info-bg: var(--blue-600);
        --color-info-hover: var(--blue-400); /* Dark hover: daha parlak */
        --color-info-subtle: rgba(37, 99, 235, 0.2);
        --color-info-border: rgba(37, 99, 235, 0.3);
        --color-info-text: var(--blue-200);

        /* Functional Overrides */
        --color-focus: rgba(208, 164, 89, 0.5); 
        --color-ring: rgba(208, 164, 89, 0.5);

        /* Shadows */
        --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
        --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5);
        --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.7);
    }
}
