/* ==============================================
   global.css – الهوية البصرية الموحدة (نسخة محسّنة)
   الألوان الأساسية: #000675, #00a4ff, #00ffce
   النصوص: داكنة دائماً (#1f2937, #374151, #111827)
   مع تحسينات التصميم والتباين ومنع تحديد النصوص
   ============================================== */

/* ----------------------------------------------
   1. استيراد الخطوط
   ---------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Zain:wght@400;500;600;700&display=swap');

@font-face {
    font-family: 'Anderson Grotesk';
    src: url('https://cdn.jsdelivr.net/npm/anderson-grotesk@1.0.0/fonts/AndersonGrotesk-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Anderson Grotesk';
    src: url('https://cdn.jsdelivr.net/npm/anderson-grotesk@1.0.0/fonts/AndersonGrotesk-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ----------------------------------------------
   2. إعادة تعيين أساسيات الصفحة وتحسينات عامة
   ---------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Zain', 'Cairo', 'Tahoma', sans-serif;
    background: linear-gradient(145deg, #f8fafc 0%, #eef2f6 100%);
    color: #1f2937;
    line-height: 1.6;
    min-height: 100vh;
}

/* العناصر التي تحتوي على أرقام أو نصوص إنجليزية */
.price, .product-price, .cart-total, .order-total, .latin-font {
    font-family: 'Anderson Grotesk', 'Inter', 'Segoe UI', monospace;
    font-weight: 500;
}

/* ----------------------------------------------
   3. المدخلات – واضحة ومريحة
   ---------------------------------------------- */
.input-field,
input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #1f2937;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 1rem;
    transition: all 0.25s ease;
    font-family: 'Zain', 'Cairo', sans-serif;
}
.input-field:focus,
input:focus:not([type="checkbox"]):not([type="radio"]),
textarea:focus,
select:focus {
    outline: none;
    border-color: #000675;
    box-shadow: 0 0 0 4px rgba(0, 6, 117, 0.15);
    transform: scale(1.01);
}

/* داخل البطاقات الزجاجية */
.glass .input-field,
.glass input:not([type="checkbox"]):not([type="radio"]),
.glass textarea,
.glass select {
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    border-color: rgba(0, 0, 0, 0.15);
    color: #1f2937;
}

/* ----------------------------------------------
   4. الأزرار – تصميم عصري وتباين عالٍ
   ---------------------------------------------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(105deg, #000675, #0008a0);
    color: #ffffff;
    font-weight: 600;
    padding: 0.7rem 1.5rem;
    border-radius: 2rem;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.btn-primary:hover {
    background: linear-gradient(105deg, #00055e, #00068a);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
.btn-primary:active {
    transform: translateY(1px);
}

.btn-secondary {
    background-color: #e5e7eb;
    color: #1f2937;
    border: 1px solid #cbd5e1;
    border-radius: 2rem;
    padding: 0.6rem 1.3rem;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-secondary:hover {
    background-color: #d1d5db;
    transform: translateY(-1px);
}

.btn-danger {
    background-color: #dc2626;
    color: #ffffff;
    border-radius: 2rem;
    padding: 0.6rem 1.3rem;
    transition: all 0.2s;
}
.btn-danger:hover {
    background-color: #b91c1c;
    transform: translateY(-1px);
}

.btn-glass {
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 2rem;
    padding: 0.6rem 1.3rem;
    font-weight: 500;
    color: #f0f0f0;
    transition: all 0.3s;
    cursor: pointer;
}
.btn-glass:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-2px);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* ----------------------------------------------
   5. تأثيرات الزجاج (بطاقات، قوائم)
   ---------------------------------------------- */
.glass {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 1.75rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(12px);
    color: #1f2937;
}

.card-glass {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 1.75rem;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    color: #1f2937;
    backdrop-filter: blur(4px);
}
.card-glass:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(0, 6, 117, 0.2);
}

.navbar-glass {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.03);
    color: #1f2937;
}

/* ----------------------------------------------
   6. تقييمات النجوم – لون ذهبي محسّن
   ---------------------------------------------- */
.text-yellow-400, .text-yellow-500, .star-rating {
    color: #eab308 !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

/* ----------------------------------------------
   7. رسائل التنبيه (Toast/Alerts) – ألوان ناعمة
   ---------------------------------------------- */
.alert-success {
    background: #d1fae5;
    color: #065f46;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    border-right: 4px solid #10b981;
}
.alert-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    border-right: 4px solid #ef4444;
}
.alert-warning {
    background: #fef3c7;
    color: #92400e;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    border-right: 4px solid #f59e0b;
}

/* ----------------------------------------------
   8. روابط القائمة – تفاعل أنيق
   ---------------------------------------------- */
.nav-link {
    transition: all 0.2s;
    text-decoration: none;
    font-weight: 500;
    color: #374151;
    position: relative;
}
.nav-link:hover {
    color: #000675;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #000675, #00a4ff);
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
    left: 0;
    right: auto;
}

/* ----------------------------------------------
   9. صور وخلفيات مساعدة
   ---------------------------------------------- */
img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/* ----------------------------------------------
   10. تحويل أي نص أبيض إلى رمادي فاتح (لتجنب التباين الضعيف)
   ---------------------------------------------- */
.text-white {
    color: #f3f4f6 !important;
}
.bg-white {
    background-color: #ffffff;
}
.dark-bg, .bg-dark, .bg-gray-900, .bg-brand-900 {
    color: #e5e7eb;
}

/* ----------------------------------------------
   11. منع تحديد النصوص بشكل كامل (مع استثناء حقول الإدخال)
   ---------------------------------------------- */
*:not(input):not(textarea):not([contenteditable="true"]) {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

input, textarea, [contenteditable="true"] {
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
}

/* ----------------------------------------------
   12. تحسينات إضافية للتباين والجمال
   ---------------------------------------------- */
/* ظل خفيف للبطاقات */
.shadow-soft {
    box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.05);
}

/* حواف ناعمة للصور داخل البطاقات */
.card-glass img, .glass img {
    border-radius: 1rem;
}

/* تحسين التمرير (scrollbar) – أنيق وحديث */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}