/* =========================================
   ملف التنسيقات الموحد - La Rose Store
   ========================================= */

/* --- 1. الأساسيات (باقي صفحات الموقع العادية) --- */
body { 
    font-family: 'Cairo', sans-serif; 
    background-color: #0f0f11; 
    color: #fff; 
    margin: 0 !important; 
    padding: 0 !important;
    transition: 0.3s; 
}

/* --- 2. مخصص للصفحة الرئيسية فقط (خلفية سوداء ليلية) --- */
body.home-page {
    background: #000000 !important; 
    background-attachment: fixed !important;
    position: relative;
}

/* --- تعديلات اللايت مود للصفحة الرئيسية --- */
body.home-page.light-mode {
    background: #f4f4f4 !important; 
}

/* بيخفي النجوم في وضع النهار */
body.light-mode .stars-background {
    display: none !important; 
}

/* --- تأثير النجوم (هيشتغل في الرئيسية بس) --- */
.stars-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; 
    pointer-events: none; 
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 40px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 50px 160px, #ddd, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 40px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 130px 80px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 160px 120px, #ddd, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 200px 200px; 
    animation: twinkle 4s infinite;
}

@keyframes twinkle {
    0% { opacity: 0.2; }
    50% { opacity: 1; }
    100% { opacity: 0.2; }
}

.container { padding: 40px 20px; max-width: 1200px; margin: auto; }
.main-btn { background: #d4a373; color: #000; border: none; padding: 10px 20px; cursor: pointer; border-radius: 5px; font-weight: bold; font-size: 1.1rem; transition: 0.3s; width: 100%; text-decoration: none; display: inline-block; text-align: center; }
.main-btn:hover { background: #b58555; }
.back-btn { background: #d4a373; color: #000; padding: 10px 25px; text-decoration: none; border-radius: 5px; font-weight: bold; display: inline-block; margin-top: 20px; transition: 0.3s; }
.back-btn:hover { background: #b58555; transform: scale(1.05); }

/* ==================================================== */
/* 🌟 PREMIUM HEADER REDESIGN 🌟 */
/* ==================================================== */
.main-header {
    background: rgba(18, 18, 26, 0.85); 
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(212, 163, 115, 0.1); 
    padding: 10px 20px;
    display: flex;
    justify-content: space-between; 
    align-items: center; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.header-side {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}
.right-side { justify-content: flex-start; }
.left-side { justify-content: flex-end; }

.menu-btn {
    font-size: 1.5rem;
    color: #d4a373;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    margin: 0 10px;
}
.logo-container img {
    height: 35px; 
    width: auto;
    margin-bottom: 2px;
}
.logo-text {
    font-size: 1rem;
    font-weight: 800;
    color: #d4a373;
    letter-spacing: 1.5px;
    margin: 0;
    text-transform: uppercase;
}

.header-action-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
    padding: 5px;
    transition: 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.header-action-btn:hover {
    color: #d4a373; 
    transform: translateY(-2px);
}
.cart-badge {
    position: absolute;
    top: -3px;
    right: -5px;
    background: #ff4d4d;
    color: #fff;
    font-size: 0.7rem;
    font-weight: bold;
    height: 16px;
    width: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    border: 1px solid #12121a;
}

/* القائمة الجانبية */
.dropdown { position: relative; display: flex; align-items: center;}
.dropdown-content { display: none; position: absolute; background-color: #1a1a24; min-width: 180px; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5); z-index: 10; border-radius: 8px; border: 1px solid #444; overflow: hidden; top: 100%; right: 0; }
.dropdown-content a, .dropdown-content span { color: white; padding: 12px 16px; text-decoration: none; display: block; font-size: 1rem; border-bottom: 1px solid #333; text-align: right; }
.dropdown-content a:hover { background-color: #d4a373; color: #000; font-weight: bold; }
.dropdown:hover .dropdown-content { display: block; }

/* ========================================= */
/* 🌟 PREMIUM GLASS CATEGORIES 🌟 */
/* ========================================= */
.premium-categories-wrapper {
    width: 100%;
    margin: 20px 0 30px 0;
    overflow: hidden; 
    position: relative;
}

.premium-categories-wrapper::before,
.premium-categories-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20px;
    z-index: 2;
    pointer-events: none;
}
.premium-categories-wrapper::before {
    left: 0;
    background: linear-gradient(to right, #000 0%, transparent 100%);
}
.premium-categories-wrapper::after {
    right: 0;
    background: linear-gradient(to left, #000 0%, transparent 100%);
}

body.light-mode .premium-categories-wrapper::before { background: linear-gradient(to right, #f4f4f4 0%, transparent 100%); }
body.light-mode .premium-categories-wrapper::after { background: linear-gradient(to left, #f4f4f4 0%, transparent 100%); }

.premium-categories-scroll {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 10px 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; 
}

.premium-categories-scroll::-webkit-scrollbar { display: none; }
.premium-categories-scroll { -ms-overflow-style: none; scrollbar-width: none; }

.glass-cat-card {
    flex: 0 0 auto; 
    min-width: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 10px;
    background: rgba(26, 26, 36, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(212, 163, 115, 0.15);
    border-radius: 16px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.glass-cat-card svg { color: #fff; transition: 0.3s ease; }
.glass-cat-card span { color: #fff; font-size: 0.85rem; font-weight: 700; font-family: 'Cairo', sans-serif; letter-spacing: 0.5px; white-space: nowrap; transition: 0.3s ease; }
.glass-cat-card:hover { transform: translateY(-5px); background: rgba(212, 163, 115, 0.1); border-color: rgba(212, 163, 115, 0.5); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); }
.glass-cat-card:hover svg, .glass-cat-card:hover span { color: #d4a373; }

.highlight-gold { border-color: rgba(241, 196, 15, 0.3); position: relative; overflow: hidden; }
.highlight-gold svg, .highlight-gold span { color: #f1c40f; }
.highlight-red { border-color: rgba(255, 59, 59, 0.3); position: relative; overflow: hidden; }
.highlight-red svg, .highlight-red span { color: #ff3b3b; }

@keyframes softPulseRed { 0% { box-shadow: 0 0 0 rgba(255, 59, 59, 0); } 50% { box-shadow: 0 0 10px rgba(255, 59, 59, 0.2); } 100% { box-shadow: 0 0 0 rgba(255, 59, 59, 0); } }
@keyframes softPulseGold { 0% { box-shadow: 0 0 0 rgba(241, 196, 15, 0); } 50% { box-shadow: 0 0 10px rgba(241, 196, 15, 0.2); } 100% { box-shadow: 0 0 0 rgba(241, 196, 15, 0); } }

.highlight-red { animation: softPulseRed 3s infinite; }
.highlight-gold { animation: softPulseGold 3s infinite; }

/* --- 3. الهيدر البسيط (للصفحات الداخلية) --- */
.page-header { background-color: #1a1a24; padding: 30px 20px; text-align: center; border-bottom: 1px solid #333; position: relative; }
.page-title { color: #d4a373; margin: 0 0 10px 0; font-size: 2rem; }
.header-back-link { color: #d4a373; text-decoration: none; display: inline-block; font-size: 1.1rem; transition: 0.3s; font-weight: bold; }
.header-back-link:hover { color: #fff; }

/* --- 4. شبكة المنتجات (Products Grid) --- */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 25px; }
.product-card { position: relative; background: #1a1a24; border: 1px solid #333; padding: 15px; border-radius: 12px; text-align: center; transition: 0.3s; }
.product-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.5); border-color: #d4a373; }
.product-card img { width: 100%; height: 250px; object-fit: contain; border-radius: 8px; cursor: pointer; }
.product-card h3 { color: #fff; margin: 15px 0 10px; font-size: 1.4rem; cursor: pointer; }
.product-card .price { color: #d4a373; font-weight: bold; font-size: 1.3rem; margin-bottom: 15px; }

/* Skeleton Loader */
.skeleton-card { background: #1a1a24; border: 1px solid #333; padding: 15px; border-radius: 12px; height: 380px; position: relative; overflow: hidden; }
.skeleton-img { width: 100%; height: 250px; background-color: #333; border-radius: 8px; margin-bottom: 15px; }
.skeleton-text { height: 20px; background-color: #333; border-radius: 4px; margin: 10px auto; width: 80%; }
.skeleton-btn { height: 40px; background-color: #333; border-radius: 5px; width: 100%; margin-top: 15px; }
.skeleton-card::after { content: ""; position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent); animation: shimmer 1.5s infinite; }
@keyframes shimmer { 100% { left: 100%; } }

/* --- 5. صفحة تفاصيل المنتج --- */
.product-details-box { max-width: 600px; margin: 40px auto; background: #1a1a24; padding: 30px; border-radius: 15px; border: 1px solid #333; text-align: center; }
.product-details-box img { width: 100%; border-radius: 10px; margin-bottom: 20px; object-fit: contain; max-height: 450px; }
.product-details-box .price { color: #d4a373; font-size: 1.8rem; margin: 15px 0; font-weight: bold; }
.action-group { display: flex; justify-content: center; gap: 15px; margin-top: 20px; }
.qty-input { width: 60px; text-align: center; border-radius: 8px; border: 1px solid #444; background: #222; color: #fff; font-size: 1.2rem; font-family: 'Cairo'; outline: none; }
.review-card { background: #16161e; padding: 15px; margin-bottom: 15px; border-radius: 8px; text-align: right; border: 1px solid #2a2a35; }
.add-review { text-align: right; background: #222; padding: 20px; border-radius: 10px; margin-top: 30px; border: 1px solid #444; }
.review-input { width: 100%; box-sizing: border-box; padding: 12px; margin-bottom: 15px; border-radius: 8px; border: 1px solid #555; background: #111; color: white; font-family: 'Cairo', sans-serif; font-size: 1rem; outline: none; }
.review-input:focus { border-color: #d4a373; }

/* --- 6. سلة المشتريات (Cart) --- */
.cart-page-container { padding: 40px 20px; max-width: 900px; margin: auto; position: relative; z-index: 2; background: transparent; }
.cart-item { background: #1a1a24; border: 1px solid #333; padding: 15px 20px; border-radius: 12px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.item-info h3 { margin: 0 0 5px; color: #fff; font-size: 1.2rem; }
.item-info p { margin: 0; color: #aaa; font-size: 0.95rem; }
.quantity-control { display: flex; align-items: center; gap: 15px; background: #222; padding: 5px 15px; border-radius: 8px; border: 1px solid #444; }
.qty-btn { background: none; border: none; color: #d4a373; font-size: 1.2rem; cursor: pointer; font-weight: bold; }
.qty-btn:hover { color: #fff; }
.qty-number { font-size: 1.2rem; font-weight: bold; width: 30px; text-align: center; }
.item-actions { display: flex; align-items: center; gap: 20px; }
.item-price { font-weight: bold; color: #d4a373; font-size: 1.2rem; }
.remove-btn { background: #ff4d4d; color: white; border: none; padding: 8px 12px; border-radius: 5px; cursor: pointer; font-weight: bold; transition: 0.3s; }
.remove-btn:hover { background: #cc0000; }
.cart-summary { background: #1a1a24; border: 1px solid #d4a373; padding: 20px; border-radius: 12px; text-align: right; margin-top: 30px; }
.cart-summary h2 { margin-top: 0; color: #d4a373; border-bottom: 1px solid #333; padding-bottom: 15px; margin-bottom: 20px; text-align: center; }
.form-section { margin-bottom: 20px; background: #222; padding: 15px; border-radius: 8px; border: 1px solid #444; }
.form-section h3 { margin: 0 0 10px; font-size: 1.1rem; color: #fff; }
.input-field, .gov-select { width: 100%; box-sizing: border-box; padding: 10px; margin-bottom: 12px; border-radius: 5px; border: 1px solid #d4a373; background: #0f0f11; color: #fff; font-family: 'Cairo'; outline: none; font-size: 1rem; }
.payment-methods { background: #222; padding: 15px; border-radius: 8px; border: 1px solid #444; margin: 20px 0; }
.payment-methods h3 { margin-top: 0; color: #fff; font-size: 1.1rem; margin-bottom: 15px; }
.payment-option { display: block; margin-bottom: 10px; cursor: pointer; font-size: 1.1rem; color: #ddd; }
.payment-option input { accent-color: #d4a373; margin-left: 8px; transform: scale(1.2); }
.totals-breakdown { background: #0f0f11; padding: 15px; border-radius: 8px; margin-bottom: 20px; border: 1px solid #333; }
.totals-breakdown p { margin: 5px 0; font-size: 1.1rem; display: flex; justify-content: space-between; color: #aaa; }
.totals-breakdown .total-price { font-size: 1.6rem; font-weight: bold; color: #d4a373; margin-top: 15px; padding-top: 15px; border-top: 1px dashed #444; display: flex; justify-content: space-between; }
.checkout-btn { background: #d4a373; color: #000; border: none; padding: 15px 30px; cursor: pointer; border-radius: 8px; font-weight: bold; font-size: 1.2rem; width: 100%; transition: 0.3s; }
.checkout-btn:hover { background: #b58555; }
.empty-cart { text-align: center; margin-top: 50px; color: #aaa; }

/* --- 7. المصادقة --- */
.auth-page-wrapper { display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; box-sizing: border-box; }
.auth-container { background: #1a1a24; padding: 40px 30px; border-radius: 15px; width: 100%; max-width: 400px; text-align: center; border: 1px solid #333; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.auth-brand { color: #d4a373; margin-top: 0; margin-bottom: 30px; font-size: 2rem; letter-spacing: 2px; }
.toggle-link { color: #888; margin-top: 20px; display: block; cursor: pointer; text-decoration: underline; transition: 0.3s; font-size: 0.95rem; }
.toggle-link:hover { color: #d4a373; }

/* --- 8. الإدارة --- */
.admin-header { text-align: center; padding: 40px 20px; background: linear-gradient(180deg, #1a1a24 0%, transparent 100%); border-bottom: 1px solid #2a2a35; }
.admin-header h1 { color: #d4a373; margin: 0; font-size: 2.2rem; }
.dashboard-container { max-width: 1200px; margin: 40px auto; padding: 0 20px; }
.admin-form-container { max-width: 600px; margin: 40px auto; padding: 30px; background-color: #16161e; border-radius: 15px; border: 1px solid #2a2a35; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: #aaa; text-align: right;}
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 12px; background-color: #0f0f11; color: white; border: 1px solid #2a2a35; border-radius: 8px; box-sizing: border-box; font-family: 'Cairo', sans-serif; }
.form-group input[type="file"] { padding: 9px; cursor: pointer; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: #d4a373; outline: none; }
.submit-btn { background-color: #d4a373; color: #000; border: none; width: 100%; padding: 15px; font-size: 1.2rem; font-weight: bold; border-radius: 8px; cursor: pointer; transition: 0.3s; font-family: 'Cairo', sans-serif; }
.submit-btn:hover { background: #bc8f62; }
.back-link { display: block; text-align: center; margin-top: 20px; color: #888; text-decoration: none; }

.table-responsive { width: 100%; overflow-x: auto; }
.admin-table, .products-stats-table { width: 100%; border-collapse: collapse; background-color: #16161e; border-radius: 10px; overflow: hidden; border: 1px solid #2a2a35; min-width: 800px; }
.admin-table th, .admin-table td, .products-stats-table th, .products-stats-table td { padding: 15px; text-align: right; border-bottom: 1px solid #2a2a35; transition: 0.3s; }
.admin-table th, .products-stats-table th { background-color: #1a1a24; color: #d4a373; font-weight: 700; }
tr.status-pending:hover, .products-stats-table tr:hover { background-color: #1f1f2e; }

/* كروت تحليلات الأدمن */
.analytics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 40px; }
.stat-card { background: linear-gradient(135deg, #1a1a24, #222); border: 1px solid #d4a373; border-radius: 12px; padding: 20px; text-align: center; transition: 0.3s; }
.stat-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.5); }
.stat-card h3 { margin: 0 0 10px; color: #aaa; font-size: 1.1rem; }
.stat-card .value { font-size: 2rem; color: #d4a373; font-weight: bold; margin: 0; }

/* --- 9. تتبع الطلبات --- */
.track-container { max-width: 600px; margin: 40px auto; padding: 30px; background-color: #1a1a24; border-radius: 15px; border: 1px solid #333; text-align: center; }
.track-input { width: 80%; padding: 12px; background-color: #0f0f11; color: white; border: 1px solid #333; border-radius: 8px; font-family: 'Cairo', sans-serif; margin-bottom: 20px; text-align: center; font-size: 1.1rem; outline: none; }
.track-input:focus { border-color: #d4a373; }
.track-btn { background-color: #d4a373; color: #000; border: none; width: 80%; padding: 12px; font-size: 1.2rem; font-weight: bold; border-radius: 8px; cursor: pointer; transition: 0.3s; font-family: 'Cairo', sans-serif; }
.track-result { margin-top: 30px; display: none; text-align: right; padding: 20px; background-color: #0f0f11; border-radius: 10px; border: 1px dashed #d4a373; }
.status-box { padding: 15px; border-radius: 8px; font-weight: bold; text-align: center; font-size: 1.2rem; margin-top: 10px; }

/* --- 10. الصفحات النصية --- */
.box, .policy-container { background: #1a1a24; padding: 40px; border-radius: 15px; max-width: 800px; margin: 50px auto; border: 1px solid #333; text-align: center; }
.box h1, .policy-container h2 { color: #d4a373; }
.box p, .policy-container p, .policy-container li { font-size: 1.1rem; line-height: 1.8; color: #ccc; text-align: right; }

/* ========================================= */
/* 🟢 أيقونة واتساب العائمة الاحترافية 🟢 */
/* ========================================= */
.whatsapp-float { 
    position: fixed; 
    bottom: 25px; 
    right: 25px; 
    background-color: #25D366; 
    color: #fff; 
    width: 60px; 
    height: 60px; 
    border-radius: 50%; 
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); 
    z-index: 1000; 
    text-decoration: none; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    transition: 0.3s; 
    animation: waPulse 2s infinite; 
}

.whatsapp-float:hover { 
    transform: scale(1.1); 
    background-color: #1ebe57; 
} 

.whatsapp-float svg {
    margin-top: 2px; 
}

@keyframes waPulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ========================================= */
/* 🌞 الإصلاح الجذري الشامل للـ Light Mode 🌞 */
/* ========================================= */
body.light-mode { background-color: #f4f5f7 !important; color: #222 !important; }
body.light-mode .main-header { background: rgba(255, 255, 255, 0.95); border-bottom: 1px solid #ddd; }
body.light-mode .header-action-btn, body.light-mode .menu-btn { color: #333; }
body.light-mode .logo-text { color: #b58555; }
body.light-mode .dropdown-content { background-color: #fff; border-color: #ddd; }
body.light-mode .dropdown-content a, body.light-mode .dropdown-content span { color: #222; border-color: #eee; }

/* إصلاح الكروت العامة وصفحة التفاصيل */
body.light-mode .product-card, 
body.light-mode .product-details-box,
body.light-mode .related-products-section { 
    background-color: #ffffff !important; 
    border-color: #e0e0e0 !important; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important;
}
body.light-mode .product-card h3 { color: #222 !important; }

/* إصلاح قوائم الأكورديون (وصف المنتج والشحن) */
body.light-mode .accordion-container,
body.light-mode .accordion-header,
body.light-mode .accordion-content,
body.light-mode .accordion-item {
    background-color: #ffffff !important;
    color: #222 !important;
    border-color: #e0e0e0 !important;
}
body.light-mode .accordion-header::after { color: #222 !important; }

/* إصلاح مربع تحديد الكمية والملاحظات (Mix and Match) */
body.light-mode div#mixAndMatchSection,
body.light-mode .product-variants-section,
body.light-mode .variant-card {
    background-color: #ffffff !important;
    border-color: #d4a373 !important;
}
body.light-mode .variant-card .variant-name,
body.light-mode .variant-card .inline-counter span {
    color: #222 !important;
    font-weight: bold;
}
body.light-mode .variant-card.active {
    background-color: rgba(212, 163, 115, 0.15) !important;
}

/* تفتيح حقول الإدخال والملاحظات */
body.light-mode #orderNote,
body.light-mode .order-note-input,
body.light-mode .header-search,
body.light-mode .header-search input {
    background-color: #f9f9f9 !important;
    color: #222 !important;
    border: 1px solid #ccc !important;
}
body.light-mode .order-note-section label { color: #222 !important; }

/* إصلاح قسم التقييم */
body.light-mode .add-review {
    background-color: #ffffff !important;
    border-color: #e0e0e0 !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
}
body.light-mode .review-input,
body.light-mode select.review-input,
body.light-mode textarea.review-input {
    background-color: #f9f9f9 !important;
    color: #222 !important;
    border: 1px solid #ccc !important;
}
body.light-mode .add-review h4 { border-color: #eee !important; color: #222 !important; }
body.light-mode .review-card { background: #ffffff !important; border: 1px solid #e0e0e0 !important; }

/* إصلاح العناوين والنصوص والألوان العامة */
body.light-mode h1, body.light-mode h2, body.light-mode h3, 
body.light-mode p, body.light-mode label, body.light-mode .review-card p {
    color: #222 !important;
}
body.light-mode hr { border-color: #e0e0e0 !important; }
body.light-mode .price, body.light-mode #prodPrice { color: #111 !important; font-weight: bold; }
body.light-mode .header-back-link { color: #d4a373 !important; }

/* إصلاح فئات الأقسام الفخمة */
body.light-mode .glass-cat-card { background: rgba(255, 255, 255, 0.9) !important; border-color: rgba(0, 0, 0, 0.1) !important; }
body.light-mode .glass-cat-card svg, body.light-mode .glass-cat-card span { color: #333 !important; }
body.light-mode .highlight-gold svg, body.light-mode .highlight-gold span { color: #d4af37 !important; }
body.light-mode .highlight-red svg, body.light-mode .highlight-red span { color: #e74c3c !important; }


/* --- 12. التصميم المتجاوب للموبايل (Mobile Responsive Design) --- */
@media (max-width: 768px) {
    .main-header { padding: 10px; }
    .header-side { gap: 8px; }
    .logo-container img { height: 26px; }
    .logo-text { font-size: 0.75rem; }
    .header-action-btn svg, .menu-btn svg { width: 18px; height: 18px; }

    .premium-categories-scroll {
        justify-content: flex-start; 
        padding: 10px 5px; 
    }

    .products-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; }
    .product-card img { height: 160px; }
    .product-card h3 { font-size: 1.1rem; }
    .main-btn { font-size: 1rem; padding: 8px; }
    .product-details-box { margin: 20px 15px; padding: 20px; }
    .product-details-box .price { font-size: 1.5rem; }
    .action-group { flex-direction: column; }
    .qty-input { width: 100%; padding: 12px; }

    .cart-page-container { padding: 20px 10px; }
    .cart-item { flex-direction: column; align-items: flex-start; gap: 15px; }
    .item-actions { width: 100%; justify-content: space-between; }
    .quantity-control { width: 100%; justify-content: center; }

    .analytics-grid { grid-template-columns: 1fr 1fr; gap: 15px; }
    .dashboard-container { padding: 0 10px; }
    .admin-form-container { margin: 20px 15px; padding: 20px; }

    .admin-form-container .form-group div[style*="display: flex"],
    .admin-form-container .form-group div[style*="flex"] {
        flex-direction: column !important;
        gap: 10px !important;
        margin-bottom: 15px !important;
        background: #111;
        padding: 15px;
        border-radius: 8px;
        border: 1px solid #333;
    }
    
    .admin-form-container .form-group div[style*="display: flex"] input,
    .admin-form-container .form-group div[style*="flex"] input {
        width: 100% !important;
        margin: 0 !important;
    }
    
    .admin-form-container .form-group div[style*="display: flex"] button,
    .admin-form-container .form-group div[style*="flex"] button {
        width: 100% !important;
        margin-top: 5px !important;
        padding: 12px !important;
    }

    .track-container { margin: 20px 15px; padding: 20px; }
    .track-input, .track-btn { width: 100%; box-sizing: border-box; }
    
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    .whatsapp-float svg {
        width: 25px;
        height: 25px;
    }

    body { font-size: 14px; }
    h2, h3 { font-size: 1.1rem; }

    /* 📱 شريط السحب الأفقي للموبايل فقط 📱 */
    .variants-grid {
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        overflow-x: auto !important;
        padding-bottom: 15px !important;
        scroll-behavior: smooth !important;
        -webkit-overflow-scrolling: touch !important; 
        scrollbar-width: none !important; 
    }
    .variants-grid::-webkit-scrollbar {
        display: none !important;
    }
}

/* --- تنسيقات مربعات الأنواع وملحوظة الأوردر (Desktop Base) --- */
.product-variants-section { text-align: center; }
.variants-grid { 
    display: flex !important; 
    flex-wrap: wrap !important; 
    gap: 15px !important; 
    justify-content: center !important; 
    width: 100% !important;
    margin-bottom: 15px !important;
}
.variant-card { 
    flex: 0 0 auto !important;
    min-width: 150px !important;
    background: #1a1a24; 
    border: 2px solid #333; 
    border-radius: 12px; 
    padding: 15px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    gap: 15px; 
    cursor: pointer; 
    transition: all 0.3s ease !important; 
}
.variant-card:hover, .variant-card.active { border-color: #d4a373; background: rgba(212, 163, 115, 0.1); transform: translateY(-3px); box-shadow: 0 5px 15px rgba(212, 163, 115, 0.2); }
.variant-name { color: #fff; font-size: 1.1rem; font-weight: bold; font-family: 'Cairo', sans-serif; display: block !important; }
.mix-card { border-color: #d4a373; }
.inline-counter { display: flex; align-items: center; background: #111; border-radius: 30px; padding: 5px; border: 1px solid #444; }
.inline-counter button { background: #d4a373; color: #000; border: none; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-weight: bold; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.inline-counter button:hover { background: #f1c40f; transform: scale(1.1); }
.inline-counter span { color: #fff; font-size: 1.1rem; font-weight: bold; min-width: 35px; text-align: center; }

.order-note-input { width: 100%; box-sizing: border-box; background: #222; border: 1px solid #444; color: #fff; padding: 12px; border-radius: 8px; font-family: 'Cairo', sans-serif; font-size: 1rem; min-height: 80px; resize: vertical; outline: none; transition: 0.3s; }
.order-note-input:focus { border-color: #d4a373; box-shadow: 0 0 8px rgba(212, 163, 115, 0.3); }

/* --- تصميم قسم التقييمات الاحترافي --- */
.add-review { background: #1a1a24; border: 1px solid #333; border-radius: 12px; padding: 25px; margin-top: 25px; box-shadow: 0 8px 20px rgba(0,0,0,0.4); }
.add-review h4 { color: #d4a373; font-size: 1.3rem; margin-top: 0; margin-bottom: 20px; border-bottom: 1px dashed #444; padding-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.review-input { width: 100%; background: #111; border: 1px solid #444; color: #fff; padding: 14px 15px; border-radius: 8px; font-family: 'Cairo', sans-serif; font-size: 1rem; margin-bottom: 15px; transition: all 0.3s ease; box-sizing: border-box; }
.review-input:focus { border-color: #d4a373; outline: none; box-shadow: 0 0 10px rgba(212, 163, 115, 0.2); background: #16161e; }
.review-input::placeholder { color: #777; }
.submit-review-btn { background: linear-gradient(45deg, #d4a373, #b58555); color: #fff; border: none; padding: 14px; font-size: 1.1rem; font-weight: bold; border-radius: 8px; cursor: pointer; transition: 0.3s; width: 100%; font-family: 'Cairo', sans-serif; display: flex; justify-content: center; align-items: center; gap: 8px; }
.submit-review-btn:hover { transform: translateY(-3px); box-shadow: 0 6px 15px rgba(212, 163, 115, 0.4); background: linear-gradient(45deg, #b58555, #d4a373); }

/* 🌟 شارة "الأكثر مبيعاً" لكروت المنتجات وللصورة الكبيرة في التفاصيل 🌟 */
.pro-badge, .main-product-badge {
    position: absolute;
    background: linear-gradient(135deg, #d4a373 0%, #b58555 100%) !important; 
    color: #12121a !important;       
    font-weight: 800;
    font-family: 'Cairo', sans-serif;
    border: 1px solid #fff !important; 
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    animation: premiumPulse 2s infinite alternate; 
}

.pro-badge {
    top: 12px;            
    right: 12px;          
    padding: 4px 12px;    
    font-size: 0.75rem;   
    border-radius: 8px;   
    box-shadow: 0 4px 10px rgba(212, 163, 115, 0.3); 
}

.main-product-badge {
    top: 15px;
    right: 15px;
    padding: 8px 16px;
    font-size: 1.1rem;
    border-radius: 10px;
    box-shadow: 0 6px 15px rgba(212, 163, 115, 0.4); 
}

@keyframes premiumPulse {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-2px) scale(1.02); }
}

body.light-mode .pro-badge {
    border-color: #f4f4f4;
    box-shadow: 0 5px 15px rgba(212, 163, 115, 0.6);
}

.premium-categories {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 30px 15px;
    background-color: #050505; 
    flex-wrap: wrap; 
    direction: rtl; 
}

.premium-card {
    background-color: #0f0f0f; 
    border: 2px solid #d4af37; 
    border-radius: 20px; 
    width: 180px;
    padding: 25px 15px 20px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2), inset 0 0 15px rgba(212, 175, 55, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.premium-card:hover {
    transform: translateY(-8px); 
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.6), inset 0 0 20px rgba(212, 175, 55, 0.3); 
}

.card-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 20px;
    filter: drop-shadow(0 10px 10px rgba(0,0,0,0.5)); 
}

.card-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    margin: 0;
    margin-bottom: 8px;
    font-family: 'Cairo', sans-serif; 
}

.card-line {
    width: 35px;
    height: 3px;
    background: linear-gradient(90deg, #b8860b, #ffd700, #b8860b); 
    border-radius: 5px;
}

@media (max-width: 768px) {
    .premium-card {
        width: 140px;
        padding: 15px 10px;
    }
    .card-img {
        width: 70px;
        height: 70px;
        margin-bottom: 15px;
    }
    .card-title {
        font-size: 15px;
    }
}