/*
 * Asfar Rahal — Main Frontend Styles
 * Contains: CSS Custom Properties (brand tokens), reset, base typography, utilities
 */

/* ══════════════════════════════════════
   CSS CUSTOM PROPERTIES (Design Tokens)
   ══════════════════════════════════════ */
:root {
    /* Brand Colors */
    --asfar-navy: #123D5E;
    --asfar-navy-light: #1A4F75;
    --asfar-navy-dark: #0C2A42;
    --asfar-blue: #336E8E;
    --asfar-blue-light: #4A88A8;
    --asfar-blue-dark: #275670;
    --asfar-teal: #1E8C8F;
    --asfar-teal-light: #25A5A8;
    --asfar-teal-dark: #176C6E;
    --asfar-gold: #ECA539;
    --asfar-gold-light: #F4BD5E;
    --asfar-gold-dark: #D4912B;
    --asfar-coral: #CD4B5E;
    --asfar-coral-light: #E06070;
    --asfar-coral-dark: #A83A4A;

    /* Neutrals */
    --asfar-white: #FFFFFF;
    --asfar-gray-50: #F8F9FA;
    --asfar-gray-100: #F1F3F5;
    --asfar-gray-200: #E2E8F0;
    --asfar-gray-300: #CBD5E0;
    --asfar-gray-400: #A0AEC0;
    --asfar-gray-500: #718096;
    --asfar-gray-600: #4A5568;
    --asfar-gray-700: #2D3748;
    --asfar-gray-800: #1A202C;

    /* Semantic */
    --color-primary: var(--asfar-navy);
    --color-secondary: var(--asfar-blue);
    --color-accent: var(--asfar-teal);
    --color-highlight: var(--asfar-gold);
    --color-danger: var(--asfar-coral);
    --color-bg: var(--asfar-white);
    --color-bg-alt: var(--asfar-gray-50);
    --color-border: var(--asfar-gray-200);
    --color-text: var(--asfar-gray-700);
    --color-text-muted: var(--asfar-gray-500);
    --color-text-heading: var(--asfar-navy);
    --color-text-inverse: var(--asfar-white);
    --color-link: var(--asfar-blue);
    --color-link-hover: var(--asfar-teal);

    /* Component */
    --color-btn-primary-bg: var(--asfar-teal);
    --color-btn-primary-hover: var(--asfar-teal-dark);
    --color-btn-whatsapp-bg: #25D366;
    --color-btn-whatsapp-hover: #1DA851;
    --color-badge-featured: var(--asfar-gold);
    --color-star: var(--asfar-gold);
    --color-wishlist-active: var(--asfar-coral);
    --color-wishlist-inactive: var(--asfar-gray-300);

    /* Typography */
    --font-family-ar: 'Cairo', 'Tajawal', system-ui, sans-serif;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 2rem;
    --font-size-3xl: 2.5rem;
    --line-height-base: 1.7;
    --line-height-heading: 1.3;

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

    /* Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-card: 0 2px 8px rgba(18, 61, 94, 0.06);
    --shadow-card-hover: 0 8px 24px rgba(18, 61, 94, 0.14);
    --shadow-lg: 0 8px 24px rgba(18, 61, 94, 0.12);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
}

/* ══════════════════════════════════════
   BASE & PLUGIN SCOPE
   ══════════════════════════════════════ */
.asfar-wrap {
    font-family: var(--font-family-ar);
    color: var(--color-text);
    line-height: var(--line-height-base);
    font-size: var(--font-size-base);
    direction: rtl;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.asfar-wrap *,
.asfar-wrap *::before,
.asfar-wrap *::after {
    box-sizing: border-box;
}

.asfar-wrap h1,
.asfar-wrap h2,
.asfar-wrap h3,
.asfar-wrap h4 {
    color: var(--color-text-heading);
    line-height: var(--line-height-heading);
    margin: 0 0 var(--space-md);
    font-weight: 700;
}

.asfar-wrap a {
    color: var(--color-link);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.asfar-wrap a:hover {
    color: var(--color-link-hover);
}

.asfar-wrap img {
    max-width: 100%;
    height: auto;
}

/* ══════════════════════════════════════
   UTILITY CLASSES
   ══════════════════════════════════════ */
.asfar-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.asfar-section-title {
    font-size: var(--font-size-xl);
    color: var(--color-text-heading);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 3px solid var(--asfar-teal);
    display: inline-block;
}

.asfar-page-header {
    position: relative;
    background: linear-gradient(135deg, var(--asfar-navy), var(--asfar-blue));
    background-size: cover;
    background-position: center;
    color: var(--color-text-inverse);
    padding: var(--space-3xl) var(--space-xl);
    text-align: center;
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-2xl);
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.asfar-page-header--with-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(18, 61, 94, 0.75);
    pointer-events: none;
    z-index: 0;
}

.asfar-page-header > * {
    position: relative;
    z-index: 1;
}

.asfar-page-header h1 {
    color: var(--color-text-inverse);
    font-size: var(--font-size-3xl);
    margin: 0;
}

.asfar-page-header p {
    color: var(--asfar-gray-300);
    font-size: var(--font-size-lg);
    margin: var(--space-sm) 0 0;
}
