/*
====================================
  1. المتغيرات والألوان الأساسية (مستوحاة من تصميمك)
====================================
*/
:root {
    --primary-blue: #3b82f6; /* أزرق ساطع وواضح */
    --dark-bg: #111827; /* خلفية رمادي داكن جداً (ليست سوداء تماماً) */
    --secondary-bg: #1f2937; /* لون الكروت وحقل البحث */
    --border-color: #374151; /* لون الحدود الخفيف */
    --text-light: #f9fafb; /* أبيض ناصع للنصوص الرئيسية */
    --text-muted: #9ca3af; /* رمادي فاتح للنصوص الثانوية */

    --font-family-main: "Tajawal", sans-serif; /* الفونت الأساسي */
}
a {
    text-decoration: none;
}
.row {
    margin: 0;
    padding: 0;
}
/*
====================================
  2. التعديلات العامة (Body & Typography)
====================================
*/
body,
html {
    color: var(--text-light);
    font-family: var(--font-family-main);
    scroll-behavior: smooth;
}

/* للتأكد من تطبيق الفونت على كل شيء */
body,
h1,
h2,
h3,
h4,
h5,
h6,
.btn,
.navbar,
.form-control,
.card-title {
    font-family: var(--font-family-main);
}

/*
====================================
  3. الهيدر والـ Navbar
====================================
*/
.navbar {
    background-color: var(--dark-bg) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.navbar .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
    padding-bottom: 0.5rem;
}
.navbar .nav-link.active {
    font-weight: 700;
    color: var(--primary-blue);
    border-bottom: 3px solid var(--primary-blue);
}
.navbar .nav-link:hover {
    color: var(--primary-blue);
}
.navbar-brand img {
    height: 30px; /* تعديل حجم اللوجو */
}

/*
====================================
  4. الكاروسيل (Carousel)
====================================
*/
.carousel-caption-custom {
    position: absolute;
    right: 15%;
    bottom: 2rem; /* تم خفضه قليلاً */
    left: 15%;
    padding: 1.5rem;
    color: #fff;
    text-align: center;
    background: rgba(17, 24, 39, 0.6); /* خلفية داكنة شبه شفافة */
    backdrop-filter: blur(8px);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

/*
====================================
  5. عناوين الأقسام وحقل البحث
====================================
*/
.section-title {
    font-size: 2.5rem; /* حجم كبير وواضح */
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.search-form {
    position: relative;
    max-width: 500px;
    margin: auto;
}
.search-form .form-control {
    height: 50px;
    border-radius: 50px;
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    padding-right: 20px;
    padding-left: 55px; /* مساحة لزر البحث */
}
.search-form .form-control:focus {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
    border-color: var(--primary-blue);
}
.search-form .btn {
    position: absolute;
    left: 5px; /* ليتناسب مع RTL */
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
}

/*
====================================
  6. كارت المنتج (Product Card) - التصميم الجديد
====================================
*/
.product-card-v2 {
    background-color: var(--secondary-bg);
    border: 1px solid transparent;
    border-radius: 1.25rem; /* حواف دائرية أكثر */
    overflow: hidden;
    transition: all 0.3s ease;
    text-align: center; /* كل النصوص في المنتصف */
    position: relative; /* لتموضع الزر الدائري */
    padding: 1.25rem;
    height: 100%;
}

.product-card-v2:hover {
    transform: translateY(-10px);
    border-color: var(--border-color);
}

.product-card-v2 .card-img-top {
    border-radius: 1rem;
    margin-bottom: 1.5rem;
}

.product-card-v2 .card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.product-card-v2 .card-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.product-card-v2 .card-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-light);
    letter-spacing: -1px; /* لجعل الأرقام متقاربة بشكل أفضل */
}

/* زر التفاصيل الدائري */
.product-card-v2 .btn-details {
    position: absolute;
    bottom: 1.25rem;
    right: 1.25rem; /* المكان في التصميم RTL */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--dark-bg);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0; /* مخفي افتراضيًا */
    transform: scale(0.8);
    text-decoration: none;
}

.product-card-v2:hover .btn-details {
    opacity: 1; /* يظهر عند مرور الماوس */
    transform: scale(1);
}

.product-card-v2 .btn-details:hover {
    background-color: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/*
====================================
  7. الفوتر
====================================
*/
/*
====================================
  8. الفوتر الجديد (New Footer)
====================================
*/
footer {
    background-color: var(
        --secondary-bg
    ); /* لون خلفية أفتح قليلاً من باقي الجسم */
    color: var(--text-muted);
}

footer h6 {
    color: var(--text-light);
    font-weight: 700;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--primary-blue);
    text-decoration: underline;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--border-color);
    color: var(--text-light);
    margin: 0 0.5rem;
    font-size: 1.1rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.social-icon:hover {
    background-color: var(--primary-blue);
    transform: translateY(-3px);
    color: #fff;
}
.toast-notification {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 1050;
    background-color: var(--primary-blue);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
/*
====================================
  9. صفحة الدفع (Checkout Page)
====================================
*/

.checkout-form .form-label-custom {
    position: absolute;
    top: -0.7rem;
    right: 1.5rem;
    background-color: var(--secondary-bg);
    padding: 0 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.checkout-form .form-control {
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.25rem 1rem;
    color: var(--text-light);
    font-size: 1rem;
}

.checkout-form .form-control::placeholder {
    color: var(--text-muted);
}

.checkout-form .form-control:focus {
    background-color: transparent;
    color: var(--text-light);
    border-color: var(--primary-blue);
    box-shadow: none;
}

.checkout-section {
    background-color: var(--secondary-bg);
    padding: 2.5rem;
    border-radius: 1.5rem; /* حواف دائرية كبيرة */
    position: relative;
    border: 1px solid var(--border-color);
}

.checkout-section-title {
    position: absolute;
    top: -1rem; /* يرفع العنوان ليكون فوق الكارد */
    right: 50%;
    transform: translateX(50%);
    background-color: #273142; /* لون مختلف قليلاً ليميزه */
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--text-light);
    white-space: nowrap; /* لمنع كسر العنوان */
}

.order-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
}
.order-summary-item:last-of-type {
    border-bottom: none;
}
.order-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-top: 1rem;
    color: var(--text-light);
}

.order-summary-total .label {
    font-size: 1.5rem;
    font-weight: 800;
}
.order-summary-total .amount {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-blue);
}

.payment-method-item {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.payment-method-item:has(input:checked) {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: var(--primary-blue);
}
.payment-details {
    background-color: var(--dark-bg); /* لون أغمق قليلاً لتمييزه */
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 0.5rem;
}
.user-select-all {
    user-select: all; /* يجعل الرقم سهل التحديد والنسخ للمستخدم */
}
.search-form input::placeholder {
    color: white !important;
}
