/* ═══════════════════════════════════════════════════════════
   Zain Perfumes — Design System Foundation
   CSS Reset · Variables · Accessibility · Utilities
   ═══════════════════════════════════════════════════════════ */

/* ── CSS Reset / Normalize ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

input,
button,
textarea,
select {
    font: inherit;
}

/* ── Enhanced CSS Variables ── */
:root,
.theme-gulf {
    --gold: #d4af37;
    --gold-dim: #9a7b2e;
    --gold-bright: #f0dc82;
    --gold-glow: rgba(212, 175, 55, 0.2);
    --bg: #fdfdfd;
    --bg-elevated: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f9f9f9;
    --bg-warm: #fdfaf5;
    --ink: #111111;
    --ink-muted: #666666;
    --accent: var(--gold);
    --accent-dark: var(--gold-dim);
    --accent-soft: rgba(212, 175, 55, 0.08);
    --white: #fff;
    --border: #eeeeee;
    --border-subtle: #f0f0f0;
    --font-sans: "Tajawal", system-ui, sans-serif;
    --font-serif: "El Messiri", Georgia, serif;
    --space: clamp(1rem, 4vw, 2rem);
    --container: 76rem;
    --radius: 12px;
    --header-h: 4.5rem;

    /* === Type Scale === */
    --text-xs: 0.7rem;
    --text-sm: 0.8rem;
    --text-base: 0.95rem;
    --text-md: 1.1rem;
    --text-lg: 1.25rem;
    --text-xl: 1.5rem;
    --text-2xl: 1.75rem;
    --text-3xl: 2.25rem;
    --text-display: 3rem;

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

    /* === Z-Index Scale === */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-drawer: 300;
    --z-overlay: 400;
    --z-modal: 500;
    --z-toast: 600;

    /* === Animation Durations === */
    --duration-fast: 150ms;
    --duration-base: 250ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;
    --easing-default: cubic-bezier(0.4, 0, 0.2, 1);
    --easing-spring: cubic-bezier(0.165, 0.84, 0.44, 1);

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

    /* === Shadows === */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* ── Focus-Visible Styles ── */
:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    z-index: 9999;
    padding: 0.75rem 1.5rem;
    background: var(--gold);
    color: #000;
    font-weight: 700;
    text-decoration: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.skip-link:focus {
    top: 0;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ── Skeleton Loading ── */
.skeleton {
    background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

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

/* ── Utility Classes ── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hidden-scrollbar {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.hidden-scrollbar::-webkit-scrollbar {
    display: none;
}