/* =========================================
   1) الأساسيات العامة + ألوان الثيم (تم التحديث)
   ========================================= */

:root {
    /* ألوان أساسية فاتحة جداً لضمان التباين العالي في الخلفية الداكنة */
    --nk-bg-main:       #020617;
    --nk-text-main:     #f3f4f6; /* النص الأساسي: أبيض فاتح جداً */
    --nk-text-sub:      #cbd5f5; /* نص ثانوي فاتح: أزرق-رمادي فاتح */
    --nk-text-muted:    #a1a1aa; /* نص خافت لكنه واضح: رمادي فاتح مريح */
    --nk-border-soft:   #111827;
    --nk-border-input:  #334155;
}

body,
body.nk-body {
    font-family: "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: var(--nk-bg-main);
    color: var(--nk-text-main);
    margin: 0;
}

a {
    text-decoration: none;
}

/* الكونتينر العام */
.container {
    max-width: 1180px;
}

/* =========================================
   2) التوب بار
   ========================================= */

.nk-topbar {
    background-color: var(--nk-bg-main);
    color: var(--nk-text-sub);
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    font-size: 0.8rem;
}

/* نتأكد أن كل النصوص داخله واضحة */
.nk-topbar,
.nk-topbar *,
.nk-topbar a {
    color: var(--nk-text-sub) !important;
    opacity: 1 !important;
}

/* =========================================
   3) الهيدر / النافبار
   ========================================= */

.nk-navbar {
    background-color: var(--nk-bg-main);
    border-bottom: 1px solid var(--nk-bg-main);
}

.navbar-brand span {
    color: #f9fafb;
}

.nk-logo-wrap {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: radial-gradient(circle at top, #3b82f6, #0ea5e9, #22c55e);
    padding: 2px;
}

.nk-logo-wrap img {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    object-fit: cover;
}

.navbar .nav-link {
    color: #9ca3af;
    font-size: 0.92rem;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: #f9fafb;
}

/* البحث في الهيدر */

.nk-search .nk-search-input {
    background-color: var(--nk-bg-main);
    border-radius: 999px 0 0 999px;
    border: 1px solid #1f2937;
    border-right: none;
    color: var(--nk-text-main);
    font-size: 0.9rem;
}

.nk-search .nk-search-input::placeholder {
    color: #6b7280;
}

.nk-search .nk-search-input:focus {
    box-shadow: none;
    border-color: #3b82f6;
}

/* أزرار الهيدر */

.nk-btn-primary {
    border-radius: 0 999px 999px 0;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    border: none;
    color: #f9fafb;
    font-size: 0.9rem;
    padding-inline: 1.3rem;
}

.nk-btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #4338ca);
}

.nk-btn-outline {
    border-radius: 999px;
    border-color: #334155;
    color: var(--nk-text-main);
    background-color: transparent;
    padding-inline: 1.3rem;
    font-size: 0.9rem;
}

.nk-btn-outline:hover {
    border-color: #3b82f6;
    color: #f9fafb;
    background-color: rgba(37, 99, 235, 0.18);
}

/* =========================================
   4) المحتوى الرئيسي
   ========================================= */

.nk-main {
    min-height: 70vh;
    padding-bottom: 2rem;
}

/* =========================================
   5) الهيرو (نص فقط – بدون صورة)
   ========================================= */

.nk-hero {
    margin-top: 1.8rem;
    margin-bottom: 2.4rem;
    background: radial-gradient(circle at top right, #1d4ed8, #020617 60%);
    border-radius: 26px;
    padding: 3rem 2.4rem 2.6rem;
    color: #f9fafb;
    position: relative;
    overflow: hidden;
    text-align: right;
}

/* badge فوق العنوان */
.nk-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.9rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.25);
    color: #bfdbfe;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

/* عنوان الهيرو */
.nk-hero-title {
    font-size: 2.6rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    margin-bottom: 0.6rem;
    line-height: 1.35;
}

.nk-hero-title span {
    color: #fb7185;
    display: block; /* السطر الثاني ينزل تحت الأول */
}

/* النص تحت العنوان */
.nk-hero-sub {
    color: var(--nk-text-sub);
    font-size: 0.98rem;
    line-height: 1.9;
    max-width: 620px;
    margin-left: auto;  /* لأن النص يمين */
    margin-bottom: 1.7rem;
}

/* أزرار الهيرو */
.nk-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-bottom: 2.1rem;
}

.nk-hero-actions .btn {
    border-radius: 999px;
    font-size: 0.9rem;
}

.nk-hero-actions .btn-primary {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: none;
}

.nk-hero-actions .btn-primary:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.nk-hero-actions .btn-outline-light {
    border-color: rgba(209, 213, 219, 0.6);
    color: var(--nk-text-main);
}

.nk-hero-actions .btn-outline-light:hover {
    background-color: rgba(15, 23, 42, 0.3);
}

/* المربعات (الإحصائيات) داخل الهيرو */
.nk-hero-stats {
    margin-top: 5rem;    /* إنزال صف المربعات عن الأزرار */
}

.nk-stat-card {
    background: var(--nk-bg-main);
    border-radius: 18px;
    border: 1px solid var(--nk-border-soft);
    padding: 0.85rem 1rem;
    text-align: center;
    transform: scale(0.90);  /* تصغير بسيط */
}

.nk-stat-label {
    color: #9ca3af;
    font-size: 0.74rem;
}

.nk-stat-value {
    font-size: 0.98rem;
    font-weight: 800;
}

.nk-stat-value.blue  { color: #38bdf8; }
.nk-stat-value.green { color: #22c55e; }
.nk-stat-value.amber { color: #facc15; }
.nk-stat-value.pink  { color: #f472b6; }

/* =========================================
   6) صفحة المنتج – الصور
   ========================================= */

/* الصورة الرئيسية */
#mainProductImage {
    border-radius: 18px;
}

/* زر الصورة المصغّرة */
.nk-thumb-btn {
    cursor: pointer;
    border-radius: 16px;
    padding: 0;
    background: transparent;
}

/* الصورة المصغّرة نفسها */
.nk-thumb-img {
    transition: transform 0.15s ease-out, box-shadow 0.15s ease-out, outline-color 0.15s ease-out;
}

/* تأثير بسيط عند المرور */
.nk-thumb-btn:hover .nk-thumb-img {
    transform: scale(1.03);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
}

/* =========================================
   7) الأقسام / العناوين العامة
   ========================================= */

.nk-section {
    margin-bottom: 2.2rem;
}

.nk-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.9rem;
}

.nk-section-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.nk-section-icon {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #f97316;
}

.nk-section-icon.blue {
    background: #3b82f6;
}

.nk-section-icon.pink {
    background: #ec4899;
}

.nk-section-title {
    font-size: 1.15rem;
    font-weight: 800;
}

.nk-section-link {
    font-size: 0.85rem;
    color: #60a5fa;
}

.nk-section-link:hover {
    color: #93c5fd;
}

/* تشيب الأقسام */

.nk-category-chip {
    background: var(--nk-bg-main);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.85rem;
    border: 1px solid #1f2937;
    color: var(--nk-text-main);
    cursor: pointer;
    transition: all 0.18s ease-out;
}

.nk-category-chip:hover {
    background: #2563eb;
    border-color: #2563eb;
}

/* =========================================
   8) كروت المنتجات
   ========================================= */

.card {
    border-radius: 18px;
    background: var(--nk-bg-main);
    border: 1px solid var(--nk-border-soft);
}

.card-img-top {
    border-radius: 16px 16px 0 0;
}

.card.h-100 {
    transition: transform 0.18s ease-out, box-shadow 0.18s ease-out, border-color 0.18s ease-out;
}

.card.h-100:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.7);
    border-color: #2563eb;
}

.card-title a {
    color: #f9fafb;
    font-size: 0.9rem;
}

.card-title a:hover {
    color: #bfdbfe;
}

.card .price-main {
    color: #38bdf8;
    font-weight: 700;
    font-size: 0.95rem;
}

.card .price-old {
    color: var(--nk-text-muted);
    font-size: 0.8rem;
}

/* زر الكرت */
.nk-card-btn {
    border-radius: 999px;
    font-size: 0.86rem;
}

/* =========================================
   9) الفوتر
   ========================================= */

.nk-footer {
    background-color: var(--nk-bg-main);
    border-top: 1px solid var(--nk-border-soft);
    color: var(--nk-text-main);
}

/* كل نصوص الفوتر الأساسية */
.nk-footer,
.nk-footer p,
.nk-footer span,
.nk-footer small,
.nk-footer a {
    color: var(--nk-text-main) !important;
}

/* العناوين في الفوتر */
.nk-footer h5,
.nk-footer h6 {
    color: #ffffff !important;
}

/* الوصف تحت عناوين الفوتر */
.nk-footer .text-muted {
    color: var(--nk-text-sub) !important;
}

/* الروابط في الفوتر */
.nk-footer-link {
    color: var(--nk-text-main) !important;
    font-size: 0.9rem;
}

.nk-footer-link:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

/* شريط الحقوق في الأسفل */
.nk-footer-bottom {
    border-color: var(--nk-border-soft) !important;
}

.nk-footer-bottom .text-muted,
.nk-footer-bottom span {
    color: var(--nk-text-main) !important;
}

/* شارات وسائل الدفع */
.nk-footer .badge {
    background-color: var(--nk-border-soft) !important;
    color: var(--nk-text-main) !important;
    border-radius: 999px;
    padding-inline: 0.75rem;
}

/* =========================================
   10) استجابة الجوال
   ========================================= */

@media (max-width: 767.98px) {
    .nk-hero {
        padding: 2rem 1.5rem 1.8rem;
        margin-top: 1.2rem;
    }

    .nk-hero-title {
        font-size: 2rem;
    }

    .nk-hero-sub {
        max-width: 100%;
    }

    .nk-hero-stats {
        margin-top: 1.4rem;  /* على الموبايل المسافة أقل */
    }

    .nk-stat-card {
        transform: scale(1);
        padding: 0.8rem 0.9rem;
    }
}

/* =========================================
   11) تحسين الحقول (صفحة التذاكر وغيرها)
   ========================================= */

/* placeholder واضح */
input::placeholder,
input.form-control::placeholder,
textarea::placeholder,
textarea.form-control::placeholder {
    color: #ffffff !important;
    opacity: 1 !important;
}

/* لون الكتابة داخل الحقول */
input,
textarea,
input.form-control,
textarea.form-control {
    color: #ffffff !important;
}

/* خلفية الحقول وحدودها */
input,
textarea,
input.form-control,
textarea.form-control {
    background-color: #0F172A !important;
    border: 1px solid var(--nk-border-input) !important;
}

/* =========================================
   12) النصوص العامة + السعر القديم + البادجات (تم التعديل)
   ========================================= */

/* النصوص الرمادية العامة - يجب أن تكون واضحة في كل مكان */
.text-muted,
.small,
.form-text,
.nk-section .text-muted {
    /* تم توحيدها على متغير nk-text-muted المحدث */
    color: var(--nk-text-muted) !important; 
    opacity: 1 !important;
}

/* السعر القديم (في كل مكان) */
.price-old,
.price-old.text-decoration-line-through,
.nk-section .price-old {
    color: var(--nk-text-muted) !important;
    opacity: 1 !important;
    font-weight: 500;
}

/* البادجات الفاتحة مثل "ضمن قسم: المطبخ" */
.badge.bg-secondary-subtle,
.badge.bg-light {
    background-color: #111827 !important;
    color: var(--nk-text-sub) !important;
    border: 1px solid #1f2937;
}

/* =========================================
   13) مسار التنقل (Breadcrumb) – عام
   ========================================= */

.breadcrumb {
    background: transparent;
    margin-bottom: 1rem;
}

nav .breadcrumb .breadcrumb-item,
nav .breadcrumb .breadcrumb-item a {
    color: var(--nk-text-sub) !important;  /* أزرق فاتح واضح */
    font-size: 0.88rem;
    opacity: 1 !important;
}

nav .breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: #64748b !important;    /* لون السهم / الفاصل */
}

nav .breadcrumb .breadcrumb-item.active {
    color: #ffffff !important;    /* آخر عنصر (اسم الصفحة / المنتج) */
    font-weight: 700 !important;
}

/* =========================================
   14) FINAL TEXT FIX FOR PRODUCT PAGE (التركيز على صفحة المنتج)
   ========================================= */

/* جعل جميع النصوص داخل صفحة المنتج فاتحة وواضحة جداً (أعلى من القاعدة العامة) */
.product-page :not(.badge):not(.price-old):not(.btn) {
    color: var(--nk-text-main) !important; /* النص الأساسي */
    opacity: 1 !important;
}

/* تحسين وصف المنتج والـ text-muted ليكون أكثر وضوحاً للقراءة */
.product-page p, 
.product-page .text-muted,
.product-page .small {
    color: #cdd5e0 !important; /* درجة أفتح قليلاً من المتغير العام */
    line-height: 1.8; 
    font-size: 1.05rem; 
    font-weight: 400 !important; /* التأكد من أن النص العادي ليس ثقيلاً */
}

/* السعر القديم - فصله عن الـ text-muted لضمان بقائه واضحاً */
.product-page .price-old {
    color: #94a3b8 !important; /* رمادي متوسط واضح */
    text-decoration-color: #ef4444 !important; 
    opacity: 1 !important;
    font-weight: 500;
}

/* العناوين في صفحة المنتج */
.product-page h1, .product-page h2, .product-page h3, 
.product-page h4, .product-page h5, .product-page h6 {
    color: #ffffff !important;
    letter-spacing: 0.5px;
}

/* تحسين البادج داخل صفحة المنتج ليتناسب مع الخلفية */
.product-page .badge.bg-secondary-subtle {
    background-color: rgba(59, 130, 246, 0.15) !important; 
    color: #93c5fd !important; 
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* إخفاء الشريط العلوي (الترحيب) بالكامل */
.nk-topbar {
    display: none !important;
}

/* ===== Fix Category Description Text Color ===== */
.card-body p,
.card-body li,
.card-body h3 {
    color: #e5e7eb !important;   /* لون فاتح واضح */
}

.card-body ul {
    padding-right: 20px;
}
/* ************ نهاية ملف CSS ************ */