/* --- الإعدادات العامة والخطوط --- */
body { 
    font-family: 'Cairo', sans-serif; 
    background-color: #fdfbf9; 
    color: #333; 
    overflow-x: hidden; 
}

/* --- العناوين الرئيسية --- */
.section-title-right { 
    text-align: right; 
    margin-bottom: 40px; 
}
.section-title-right h2 { 
    font-weight: 800; 
    border-bottom: 3px solid #a68b7c; 
    display: inline-block; 
    padding-bottom: 5px; 
}

/* --- كروت المنتجات (السجاد) --- */
.product-card { 
    background: #fff; 
    border: 1px solid #eee; 
    border-radius: 15px; 
    overflow: hidden; 
    transition: 0.3s; 
    height: 100%; 
    display: flex; 
    flex-direction: column; 
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(166, 139, 124, 0.15);
}

/* --- صندوق الصورة والخصم --- */
.product-img-box { 
    height: 350px; 
    position: relative; 
    overflow: hidden; 
    background: #f9f9f9; 
}
.product-img-box img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}
.discount-badge { 
    position: absolute; 
    top: 15px; 
    left: 15px; 
    background: #e63946; 
    color: white; 
    padding: 5px 12px; 
    border-radius: 50px; 
    font-size: 0.85rem; 
    font-weight: 700; 
    z-index: 10; 
}

/* --- تفاصيل الكرت والأسعار --- */
.product-info { 
    padding: 20px 15px; 
    text-align: center; 
    flex-grow: 1; 
}
.product-name { 
    font-weight: 700; 
    font-size: 1.1rem; 
    color: #333; 
    margin-bottom: 10px; 
}
.price-wrapper { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 12px; 
    flex-direction: row-reverse; 
}
.price-new { 
    color: #a68b7c; 
    font-weight: 800; 
    font-size: 1.4rem; 
}
.price-old { 
    color: #b0b0b0; 
    text-decoration: line-through; 
    font-size: 1rem; 
}

/* --- زر تفاصيل المنتج --- */
.btn-details { 
    background: #fcfcfc; 
    color: #a68b7c !important; 
    border-top: 1px solid #eee; 
    text-decoration: none; 
    display: block; 
    padding: 15px; 
    font-weight: 700; 
    text-align: center; 
    transition: 0.3s; 
}
.btn-details:hover { 
    background: #a68b7c; 
    color: #fff !important; 
}

/* --- شاشات الجوال والتابلت --- */
@media (max-width: 768px) { 
    .product-img-box { 
        height: 250px; 
    } 
}

/* --- ضبط حجم وتجاوب البنر الإعلاني (Slider) --- */
#mainSlider {
    max-height: 400px; /* الحد الأقصى للارتفاع على الشاشات الكبيرة */
    overflow: hidden;
    border-radius: 15px; /* إعطاء حواف دائرية خفيفة للبنر ليتماشى مع فخامة المتجر */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); /* ظل خفيف وناعم خلف البنر */
}

#mainSlider .carousel-item img {
    width: 100%;
    height: 400px; /* الارتفاع الثابت على الشاشات الكبيرة */
    object-fit: cover; /* لضمان عدم تمدد أو تشوه أبعاد الصورة */
    object-position: center; /* توسيط الصورة داخل البنر */
}

/* التجاوب على شاشات الجوال والتابلت لجعل البنر أصغر وأنسب */
@media (max-width: 768px) {
    #mainSlider {
        max-height: 220px;
    }
    #mainSlider .carousel-item img {
        height: 220px; /* تقليل الارتفاع على الجوال ليناسب حجم الشاشة */
    }
}

/* تفاصيل المنتج 

/* ==========================================================================
   تفاصيل المنتج (Product Details Page)
   ========================================================================== */
   :root { 
    --main-color: #a68b7c; 
    --hover-color: #8e7668; 
}

.details-page {
    padding-bottom: 50px;
}

.product-main-card { 
    background: #fff; 
    border-radius: 25px; 
    border: none; 
    overflow: hidden; 
    box-shadow: 0 15px 40px rgba(0,0,0,0.04); 
    margin-top: 30px; 
}

/* القسم الجانبي للصور */
.img-side { 
    background: #fff; 
    padding: 30px; 
    border-left: 1px solid #f1f1f1; 
}

.main-img-container { 
    height: 500px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background: #fafafa; 
    border-radius: 20px; 
    margin-bottom: 20px; 
    overflow: hidden; 
}

.main-img { 
    width: 100%; 
    height: 100%; 
    object-fit: contain; 
    transition: 0.3s; 
}

.thumb-item { 
    width: 80px; 
    height: 80px; 
    object-fit: cover; 
    cursor: pointer; 
    border-radius: 12px; 
    border: 2px solid transparent; 
    transition: 0.2s; 
    opacity: 0.6; 
}

.thumb-item:hover, 
.thumb-item.active { 
    border-color: var(--main-color); 
    opacity: 1; 
    transform: translateY(-2px); 
}

/* القسم الجانبي للمعلومات */
.info-side { 
    padding: 50px; 
}

.price-wrapper { 
    margin-bottom: 25px; 
}

.price-value { 
    font-size: 2.8rem; 
    color: var(--main-color); 
    font-weight: 800; 
    display: flex; 
    align-items: baseline; 
    gap: 8px; 
}

.old-price-display { 
    font-size: 1.4rem; 
    color: #dc3545; 
    text-decoration: line-through; 
    opacity: 0.7; 
    margin-bottom: -5px; 
    display: block; 
}

/* أزرار المقاسات المبتكرة */
.size-wrapper { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); 
    gap: 15px; 
    margin-bottom: 30px; 
}

.size-btn { 
    border: 2px solid #eee; 
    padding: 15px; 
    border-radius: 15px; 
    cursor: pointer; 
    background: #fff; 
    transition: 0.3s; 
    text-align: center; 
}

.size-input:checked + label .size-btn { 
    border-color: var(--main-color); 
    background: #fdf8f5; 
    box-shadow: 0 5px 15px rgba(166,139,124,0.1); 
}

/* زر الشراء */
.btn-buy-now { 
    background: var(--main-color); 
    color: #fff; 
    border: none; 
    padding: 20px; 
    width: 100%; 
    border-radius: 18px; 
    font-weight: 800; 
    font-size: 1.3rem; 
    transition: 0.3s; 
}
.btn-buy-now:hover {
    background: var(--hover-color);
}

/* كروت المنتجات المقترحة */
.custom-card { 
    background: #fff; 
    border-radius: 18px; 
    overflow: hidden; 
    border: 1px solid #f1f1f1; 
    transition: 0.4s; 
    height: 100%; 
    display: flex; 
    flex-direction: column; 
    position: relative; 
}

.custom-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.custom-img-wrapper { 
    height: 350px; 
    background: #f8f8f8; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    position: relative; 
    overflow: hidden; 
}

.custom-img-wrapper img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: 0.6s ease; 
}

.custom-body { 
    padding: 20px 15px; 
    text-align: center; 
    flex-grow: 1; 
}

.price-new { 
    color: var(--main-color); 
    font-weight: 800; 
    font-size: 1.3rem; 
}

.price-old { 
    color: #bbb; 
    text-decoration: line-through; 
    font-size: 0.9rem; 
    margin-left: 8px; 
}

/* شاشات الجوال */
@media (max-width: 768px) { 
    .main-img-container { 
        height: 300px; 
    } 
    .info-side {
        padding: 25px;
    }
    .custom-img-wrapper {
        height: 250px;
    }
}
/* --- تأثيرات وحركات واجهة الأقسام الرئيسية --- */
.category-img-wrapper {
    transition: transform 0.3s ease, border-color 0.3s ease !important;
}

.category-img-wrapper:hover {
    transform: translateY(-5px);
    border-color: #b18b5e !important;
}

.group:hover .group-hover-gold {
    color: #b18b5e !important;
    transition: color 0.2s ease;
}


/* ==========================================
   تنسيقات صفحة الأقسام والمنتجات (Category Page)
   ========================================== */

/* هيدر القسم المميز */
.category-hero {
    background: linear-gradient(135deg, #fdfbf7 0%, #f5ece1 100%);
    border-bottom: 1px solid #e9ecef;
    padding: 50px 0;
}

.category-badge-icon {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #b18b5e;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* كروت المنتجات وحماية أبعاد الصور */
.product-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.product-img-box {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; /* نسبة مربعة مثالية 1:1 لتوحيد الارتفاع */
    overflow: hidden;
    background-color: #f8f9fa;
}

.product-img-box img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* يمنع تمدد صورة السجادة ويحافظ على أبعادها */
    object-position: center !important;
    transition: transform 0.3s ease;
}

.product-card:hover .product-img-box img {
    transform: scale(1.05);
}

/* إدارة وتنسيق الشارات فوق الكارت */
.badge-wrapper {
    position: absolute;
    top: 10px;
    right: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    z-index: 10;
    pointer-events: none;
}

.discount-badge {
    background-color: #e63946;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.cashback-badge-fixed {
    background-color: #2ec4b6;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* تفاصيل ومعلومات المنتج */
.product-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-name {
    font-size: 0.95rem;
    color: #2d3748;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8rem;
}

.price-new {
    color: #b18b5e;
    font-weight: 700;
    font-size: 1.1rem;
}

.price-old {
    color: #a0aec0;
    text-decoration: line-through;
    font-size: 0.85rem;
    margin-right: 8px;
}

/* زر عرض التفاصيل */
/* زر عرض التفاصيل المحسن - ظاهر ومقروء دائماً */
.btn-details {
    display: block;
    width: 100%;
    text-align: center;
    background-color: #b18b5e; /* اللون الذهبي الدافئ لمتجرك */
    color: #ffffff !important;  /* نص أبيض ناصع وواضح دائماً */
    text-decoration: none;
    padding: 12px 10px;
    font-weight: 700;           /* خط عريض لسهولة القراءة */
    font-size: 0.95rem;
    transition: all 0.3s ease-in-out;
    border-radius: 0 0 8px 8px; /* حواف دائرية تتوافق مع الكرت */
    border: none;
}

/* تأثير التمرير الفاخر عند وضع الماوس على الزر */
.btn-details:hover {
    background-color: #8c6a41; /* درجة أغمق قليلاً تمنح شعوراً بالتفاعل */
    color: #ffffff !important;
    letter-spacing: 0.5px;     /* تباعد خفيف جداً بين الحروف اللاتينية كأثر حركي أنيق */
}

/* ==========================================
   تنسيقات الفلتر الذكي والمتجاوب (Filter Styles)
   ========================================== */

/* زر الفلتر الذي يظهر على الجوال */
.filter-trigger-btn {
    background-color: #b18b5e;
    color: #fff !important;
    border: none;
    padding: 10px 20px;
    font-weight: 700;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(177, 139, 94, 0.3);
    transition: all 0.3s ease;
}

.filter-trigger-btn:hover {
    background-color: #8c6a41;
    transform: translateY(-2px);
}

/* التنسيق الجانبي للفلتر على الشاشات الكبيرة */
.filter-sidebar {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 20px;
    position: sticky;
    top: 20px;
}

.filter-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3748;
    border-bottom: 2px solid #b18b5e;
    padding-bottom: 8px;
    margin-bottom: 20px;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: #4a5568;
    margin-bottom: 12px;
}

/* تنسيق خيارات الراديو والفحص */
.custom-filter-option {
    display: block;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #4a5568;
}

.custom-filter-option input {
    margin-left: 8px;
    accent-color: #b18b5e;
}

/* زر تطبيق الفلتر */
.btn-apply-filter {
    background-color: #b18b5e;
    color: #fff !important;
    width: 100%;
    border: none;
    padding: 10px;
    font-weight: 700;
    border-radius: 6px;
    transition: background 0.2s;
}

.btn-apply-filter:hover {
    background-color: #8c6a41;
}

/* زر إعادة الضبط */
.btn-reset-filter {
    background-color: #f7fafc;
    color: #718096 !important;
    border: 1px solid #e2e8f0;
    width: 100%;
    padding: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 6px;
    text-decoration: none;
    display: block;
    text-align: center;
}

.btn-reset-filter:hover {
    background-color: #edf2f7;
}

/* ==========================================
   تنسيقات حساب العميل والطلبات (Auth & Profile)
   ========================================== */

/* كروت الصفحات ونماذج الإدخال */
.auth-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    padding: 30px;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #2d3748;
    margin-bottom: 25px;
    text-align: center;
}

.form-label {
    font-weight: 700;
    color: #4a5568;
    font-size: 0.9rem;
}

.form-control:focus {
    border-color: #b18b5e;
    box-shadow: 0 0 0 0.2rem rgba(177, 139, 94, 0.25);
}

.btn-auth {
    background-color: #b18b5e;
    color: #fff !important;
    font-weight: 700;
    border: none;
    padding: 12px;
    border-radius: 8px;
    width: 100%;
    transition: background 0.2s;
}

.btn-auth:hover {
    background-color: #8c6a41;
}

/* لوحة تحكم العميل والطلبات */
.profile-sidebar {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 20px;
}

.profile-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: #4a5568;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s;
}

.profile-nav-link:hover, .profile-nav-link.active {
    background-color: #fbf9f6;
    color: #b18b5e;
}

/* كروت الطلبات */
.order-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: transform 0.2s;
}

.order-card:hover {
    transform: translateY(-2px);
}

.order-header {
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 12px;
    margin-bottom: 15px;
}

/* شارات حالات الطلب الملونة */
.status-badge {
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
}
.status-pending { background-color: #fef3c7; color: #d97706; } /* معلق */
.status-processing { background-color: #e0f2fe; color: #0284c7; } /* قيد التنفيذ */
.status-completed { background-color: #dcfce7; color: #15803d; } /* مكتمل */
.status-canceled { background-color: #fee2e2; color: #dc2626; } /* ملغي */


/* ==========================================
   حقيبة التسوق والسلّة | Cart Page Styles
   ========================================== */
   body { 
    font-family: 'Cairo', sans-serif; 
    background-color: #f8fafc; 
    color: #334155; 
    font-size: 0.95rem;
}

.cart-wrapper {
    max-width: 1100px;
    margin: 0 auto;
}

/* كروت السلة الهادئة */
.cart-card { 
    border: 1px solid #f1f5f9; 
    border-radius: 12px; 
    background: #fff; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02) !important;
}

/* الصورة المعالجة والمحسنة */
.product-img-wrapper {
    width: 85px; 
    height: 85px; 
    flex-shrink: 0;
    background-color: #f8fafc; 
    border-radius: 10px;
    overflow: hidden; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    border: 1px solid #f1f5f9;
}
.product-img-wrapper img {
    width: 100%; 
    height: 100%; 
    object-fit: cover;
}

/* أزرار التحكم بالكمية اللطيفة */
.qty-input-group { 
    width: 95px; 
    height: 34px;
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    background: #f8fafc; 
    border-radius: 6px; 
    border: 1px solid #e2e8f0; 
    overflow: hidden; 
}
.qty-btn { 
    background: none; 
    border: none; 
    width: 30px;
    height: 100%;
    color: #64748b; 
    font-size: 1rem; 
    cursor: pointer; 
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    user-select: none;
}
.qty-btn:hover { background: #e2e8f0; color: #0f172a; }
.quantity-form-input { 
    text-align: center; 
    border: none; 
    width: 35px; 
    background: transparent; 
    font-weight: 600; 
    font-size: 0.9rem;
    color: #1e293b;
}
.quantity-form-input:focus { outline: none; }
.quantity-form-input::-webkit-outer-spin-button,
.quantity-form-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* أزرار الإزالة الفورية */
.btn-action-remove { 
    background: none; 
    color: #ef4444; 
    border: none; 
    padding: 4px 8px; 
    font-size: 0.85rem; 
    font-weight: 600;
    transition: color 0.2s; 
}
.btn-action-remove:hover { color: #b91c1c; text-decoration: underline !important; }

/* كوبون الخصم */
.coupon-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 12px;
}
.coupon-input { 
    border-radius: 6px !important; 
    font-size: 0.85rem;
    border: 1px solid #cbd5e1;
    padding: 8px 12px;
}
.coupon-input:focus {
    box-shadow: none;
    border-color: #2563eb;
}
.btn-coupon-apply { 
    border-radius: 6px !important; 
    font-size: 0.85rem; 
    font-weight: 600; 
    padding: 8px 16px;
}

/* زر إتمام الدفع */
.btn-checkout { 
    background: #0f172a; 
    border: none; 
    border-radius: 8px; 
    padding: 12px; 
    font-size: 1rem; 
    font-weight: 700; 
    transition: all 0.2s; 
}
.btn-checkout:hover { background: #1e293b; transform: translateY(-1px); }

.product-title { font-size: 1.05rem; font-weight: 700; color: #1e293b; }
.price-text { font-size: 0.95rem; color: #475569; }
.summary-title { font-size: 1.15rem; font-weight: 800; color: #0f172a; border-bottom: 1px solid #f1f5f9; padding-bottom: 12px; }
.summary-item { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 0.9rem; }
.summary-total { font-size: 1.25rem; font-weight: 800; color: #2563eb; }