@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&family=Tajawal:wght@300;400;500;700;800;900&display=swap');

:root {
    /* Color Palette */
    --primary: #10B981;
    --primary-dark: #059669;
    --primary-light: #34D399;
    --primary-soft: rgba(16, 185, 129, 0.1);
    --secondary: #0F172A;
    --secondary-light: #1E293B;
    --accent: #F59E0B;
    --danger: #EF4444;
    --success: #10B981;
    
    /* Neutral Colors */
    --bg-main: #F8FAFC;
    --bg-card: #FFFFFF;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --white: #FFFFFF;
    --border: #E2E8F0;
    
    /* Glassmorphism */
    --glass: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.5);
    --blur: blur(12px);
    
    /* Shadows & Radii */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 90px; /* Space for fixed navbar */
}

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

h1, h2, h3, h4, h5, h6, .fw-900 { font-weight: 900; }
.fw-800 { font-weight: 800; }
.fw-700 { font-weight: 700; }

/* Loader */
.loader-wrapper {
    position: fixed;
    inset: 0;
    background: var(--white);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease-out;
}
.loader-content {
    position: relative;
    width: 80px; height: 80px;
}
.loader-circle {
    width: 100%; height: 100%;
    border: 4px solid var(--primary-soft);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.loader-logo {
    position: absolute;
    inset: 0; margin: auto;
    width: 40px; height: 40px;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.2); opacity: 1; } }

/* Premium Navigation */
.modern-nav {
    height: 90px;
    background: var(--glass);
    backdrop-filter: var(--blur);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
    z-index: 1050;
}
.modern-nav.scrolled {
    height: 75px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-lg);
}

/* حل مشكلة تكرار القائمة (Duplicate Menu Fix) */
@media (min-width: 992px) {
    #mobileNav { display: none !important; }
    #desktopNav { display: flex !important; }
}

@media (max-width: 991px) {
    #desktopNav { display: none !important; }
    #mobileNav.show { display: block !important; }
}

.brand-logo-wrap {
    width: 50px; height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border-radius: 15px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
}

.nav-link {
    font-weight: 700;
    color: var(--secondary) !important;
    padding: 0.5rem 1.2rem !important;
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    width: 0; height: 3px;
    background: var(--primary);
    border-radius: 99px;
    transition: var(--transition);
    transform: translateX(-50%);
}
.nav-link:hover::after, .nav-link.active::after { width: 20px; }
.nav-link:hover { color: var(--primary) !important; transform: translateY(-1px); }

.btn-action-nav {
    width: 45px; height: 45px;
    border: none;
    background: var(--bg-main);
    border-radius: 14px;
    color: var(--secondary);
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
    position: relative;
}
.btn-action-nav:hover { background: var(--primary); color: var(--white); transform: translateY(-3px) scale(1.05); box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3); }
.btn-action-nav.active i { color: #ef4444 !important; }
.pulse { animation: pulse-anim 0.5s ease-in-out; }
@keyframes pulse-anim {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.cart-badge {
    position: absolute;
    top: -5px; right: -5px;
    background: var(--danger);
    color: var(--white);
    font-size: 11px;
    font-weight: 800;
    min-width: 20px; height: 20px;
    padding: 0 4px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--white);
    font-family: 'Inter', sans-serif;
}

/* Glass Components */
.glass-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
    transition: var(--transition);
}
.glass-card:hover { transform: translateY(-5px); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1); }

/* Buttons */
.btn-premium {
    padding: 12px 32px;
    border-radius: 16px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}
.btn-premium-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.25);
}
.btn-premium-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(16, 185, 129, 0.35);
    color: var(--white);
}

.btn-premium-outline {
    background: var(--white);
    color: var(--secondary);
    border: 2px solid var(--border);
}
.btn-premium-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-4px);
}

/* Product Cards */
.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    height: 100%;
    border: 1px solid var(--border);
    transition: var(--transition);
}
.product-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-10px);
    box-shadow: var(--shadow-premium);
}

.product-img-wrap {
    background: #F8FAFC;
    border-radius: var(--radius-md);
    aspect-ratio: 1/1;
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
    display: flex; align-items: center; justify-content: center;
}
.product-img-wrap img { width: 85%; height: 85%; object-fit: contain; transition: var(--transition); }
.product-card:hover .product-img-wrap img { transform: scale(1.1) rotate(2deg); }

.product-badge {
    position: absolute;
    top: 15px; right: 15px;
    background: var(--primary);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 800;
    z-index: 2;
}

.product-actions {
    position: absolute;
    bottom: 15px; left: 50%;
    transform: translateX(-50%) translateY(20px);
    display: flex; gap: 10px;
    opacity: 0;
    transition: var(--transition);
}
.product-card:hover .product-actions { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Pricing */
.price-tag {
    font-family: 'Inter', sans-serif;
    color: var(--primary);
    font-weight: 800;
    font-size: 1.25rem;
}
.price-currency { font-size: 0.8rem; margin-right: 4px; font-family: 'Tajawal', sans-serif; }

/* Sections */
.section-title {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px; left: 0;
    width: 60px; height: 5px;
    background: var(--primary);
    border-radius: 99px;
}
.text-center .section-title::after { left: 50%; transform: translateX(-50%); }

/* Footer */
.footer-modern {
    background: var(--secondary);
    color: var(--white);
    padding: 80px 0 0;
    margin-top: 100px;
    border-radius: 60px 60px 0 0;
}
.footer-link {
    color: rgba(255, 255, 255, 0.6);
    display: block;
    margin-bottom: 12px;
    transition: var(--transition);
}
.footer-link:hover { color: var(--primary); transform: translateX(-5px); }

/* Responsive Adjustments */
@media (max-width: 991px) {
    body { padding-top: 80px; }
    .modern-nav { height: 80px; }
    .section-title { font-size: 2rem; }
}

/* Animations */
[data-aos] { pointer-events: none; }
.aos-animate { pointer-events: auto; }