html, body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important; /* يمنع السحب الأفقي تماماً ويخفي المساحة البيضاء */
    margin: 0 !important;
    padding: 0 !important;
}

:root {
    --primary-color: #D4AF37;
    --secondary-color: #000000;
    --accent-gold: #B8860B;
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --text-color: #1a1a1a;
    --border-color: #e5e5e5;
    --input-bg: #f8f8f8;
    --card-shadow: 0 4px 20px rgba(212, 175, 55, 0.15);
    --transition: all 0.3s ease;
}

body.dark-mode {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-color: #f5f5f5;
    --border-color: #333333;
    --input-bg: #2a2a2a;
    --secondary-color: #D4AF37;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { 
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif; 
    background-color: var(--bg-color); 
    direction: rtl; 
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Global Image Responsiveness */
img {
    max-width: 100% !important;
    height: auto;
}

/* Main Container Fix */
.temu-container {
    width: 100% !important;
    max-width: 1400px !important;
    margin: 0 auto 20px;
    padding: 0 20px;
    box-sizing: border-box !important;
}

/* الشريط العلوي المتحرك */
.top-promo-bar { 
    background: linear-gradient(90deg, #000, var(--primary-color), #000); 
    color: white; 
    padding: 10px 0; 
    font-size: 0.85rem; 
    font-weight: 600;
    letter-spacing: 0.5px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--primary-color);
    width: 100%;
    white-space: nowrap;
}

@media (max-width: 576px) {
    .top-promo-bar {
        font-size: 11px !important;
        padding: 8px 5px !important;
    }
}

.promo-track {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 30s linear infinite;
    padding-right: 50px;
}

@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.top-promo-bar:hover .promo-track {
    animation-play-state: paused;
}

/* تنسيق العناوين البسيط */
.section-header h3 {
    position: relative;
    display: inline-block;
    color: var(--text-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.top-promo-bar a { color: var(--primary-color); text-decoration: none; font-weight: bold; margin-right: 10px; }

/* الهيدر الرئيسي */
.main-header { 
    background: var(--card-bg); 
    border-bottom: 1px solid var(--border-color); 
    position: relative; 
    z-index: 1000; 
    box-shadow: 0 2px 15px rgba(0,0,0,0.05); 
}

.header-upper { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 12px 5%; 
    width: 100%;
    max-width: 1400px; 
    margin: 0 auto; 
    gap: 20px;
}

.logo a { 
    color: var(--primary-color); 
    font-size: 2.2rem; 
    font-weight: 900; 
    text-decoration: none; 
    letter-spacing: -1px;
}

.search-bar { 
    flex: 1; 
    max-width: 700px;
    display: flex; 
    background: var(--input-bg);
    border-radius: 50px; 
    overflow: hidden; 
    padding: 2px;
    transition: var(--transition);
    border: 2px solid transparent;
}

.search-bar:focus-within {
    background: var(--card-bg);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

.search-bar input { 
    flex: 1; 
    border: none; 
    padding: 12px 25px; 
    outline: none; 
    font-size: 1rem;
    background: transparent;
    color: var(--text-color);
}

.search-bar button { 
    background: var(--primary-color); 
    color: black; 
    border: none; 
    padding: 0 30px; 
    cursor: pointer;
    font-size: 1.1rem;
    border-radius: 0 50px 50px 0;
    font-weight: bold;
}

.user-actions { display: flex; gap: 30px; }
.action-item { 
    text-decoration: none; 
    color: var(--text-color); 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    font-size: 0.85rem; 
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}
.action-item:hover { color: var(--primary-color); }
.action-item i { font-size: 1.5rem; margin-bottom: 4px; }

#cart-count-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background: var(--primary-color);
    color: black;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: bold;
}

/* قائمة التصنيفات */
.category-nav { background: var(--card-bg); border-top: 1px solid var(--border-color); padding: 5px 0; }
.category-nav ul { 
    display: flex; 
    justify-content: center; 
    list-style: none; 
    gap: 40px; 
}
.category-nav a { 
    text-decoration: none; 
    color: var(--text-color); 
    font-weight: 600; 
    font-size: 0.95rem; 
    padding: 10px 0;
    display: block;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
    opacity: 0.8;
}
.category-nav a:hover, .category-nav a.active { 
    color: var(--primary-color); 
    border-bottom-color: var(--primary-color); 
    opacity: 1;
}

/* البانر الاحترافي */
.hero-section { margin-top: 0; margin-bottom: 40px; width: 100%; }
.hero-content {
    background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(212,175,55,0.4) 100%), 
                url('https://images.unsplash.com/photo-1616486338812-3dadae4b4ace?w=1400');
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat;
    height: auto; 
    min-height: 250px;
    border-radius: 25px; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    padding: 40px 80px; 
    color: white;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.2);
    border: 1px solid var(--primary-color);
    box-sizing: border-box;
}

.hero-content h2 { font-size: 3.5rem; margin-bottom: 10px; text-shadow: 2px 2px 10px rgba(0,0,0,0.5); }
.hero-content p { font-size: 1.4rem; opacity: 0.9; margin-bottom: 30px; }
.hero-btn { 
    background: var(--primary-color); 
    color: black; 
    border: none; 
    padding: 18px 50px; 
    border-radius: 50px; 
    font-weight: 800; 
    font-size: 1.1rem;
    cursor: pointer; 
    width: fit-content;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.hero-btn:hover { transform: scale(1.05); box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4); }

/* عروض الفلاش */
.flash-sale-bar {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--primary-color);
}
.flash-title { display: flex; align-items: center; gap: 15px; font-size: 1.5rem; font-weight: 800; color: var(--primary-color); }
.timer { display: flex; gap: 10px; }
.timer-unit { 
    background: var(--primary-color); 
    color: black; 
    padding: 8px 12px; 
    border-radius: 8px; 
    font-weight: bold; 
    min-width: 45px; 
    text-align: center;
}

/* الشبكة */
.section-header { 
    background: var(--card-bg); 
    padding: 12px 20px; 
    border-radius: 12px; 
    margin: 25px 0 15px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    box-shadow: var(--card-shadow);
    border-right: 5px solid var(--primary-color);
}
.section-header h3 { font-size: 1.3rem; font-weight: 800; margin: 0; }

.temu-product-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); 
    gap: 25px; 
    width: 100%;
    max-width: 1400px;
}

@media (max-width: 576px) {
    .temu-product-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* منتجين بالتساوي في السطر */
        gap: 10px; /* مسافة صغيرة بين المنتجات */
        padding: 10px;
    }
}

/* بطاقة المنتج - تصميم Temu */
.temu-card { 
    background: var(--card-bg); 
    border-radius: 15px; 
    overflow: hidden; 
    transition: var(--transition);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}
.temu-card:hover { transform: translateY(-8px); box-shadow: 0 15px 35px rgba(212, 175, 55, 0.15); border-color: var(--primary-color); }

.temu-image-wrapper { 
    width: 100%; 
    aspect-ratio: 1/1; 
    overflow: hidden; 
    background: #f9f9f9; 
    position: relative;
}
.temu-image-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }

.badge-new { 
    position: absolute; 
    top: 12px; 
    right: 12px; 
    background: var(--primary-color); 
    color: black; 
    padding: 4px 10px; 
    border-radius: 5px; 
    font-size: 0.75rem; 
    font-weight: bold;
    z-index: 1;
}

.temu-card-info { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.product-title { 
    font-size: 1rem; 
    font-weight: 500;
    line-height: 1.4;
    height: 2.8em; 
    overflow: hidden; 
    margin-bottom: 12px; 
    color: var(--text-color);
}
.price-row { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.new-price { color: var(--accent-gold); font-weight: 800; font-size: 1.4rem; }
.old-price { color: #999; text-decoration: line-through; font-size: 0.9rem; }
.discount { background: #fff8e1; color: var(--accent-gold); font-size: 0.85rem; padding: 3px 8px; border-radius: 4px; font-weight: bold; }

/* صفحات التفاصيل */
.product-detail-wrapper { 
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 50px; 
    background: var(--card-bg); 
    padding: 40px; 
    border-radius: 25px; 
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}
.main-image { 
    width: 100%; 
    border-radius: 20px; 
    overflow: hidden; 
    border: 1px solid var(--border-color);
}
.main-image img { width: 100%; display: block; transition: 0.3s; }

.detail-title { font-size: 2.2rem; font-weight: 900; margin-bottom: 20px; color: var(--text-color); }
.detail-price-box { margin-bottom: 30px; padding: 20px; background: var(--input-bg); border-radius: 15px; border-right: 5px solid var(--primary-color); }
.detail-new-price { font-size: 2.5rem; color: var(--accent-gold); font-weight: 900; }

.qty-control { display: flex; align-items: center; gap: 20px; margin-bottom: 30px; }
.qty-btn { 
    width: 45px; 
    height: 45px; 
    border: 1px solid var(--border-color); 
    background: var(--card-bg); 
    color: var(--text-color);
    border-radius: 12px; 
    cursor: pointer; 
    font-size: 1.2rem; 
    font-weight: bold;
    transition: var(--transition);
}
.qty-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
#qty-val { font-size: 1.2rem; font-weight: bold; width: 30px; text-align: center; }

/* أزرار المتغيرات */
.variant-chip {
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    background: var(--card-bg);
    color: var(--text-color);
}

.variant-chip.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: black;
}

/* التذييل */
.main-footer { 
    background: #000;
    text-align: center; 
    padding: 60px 20px; 
    color: #eee; 
    border-top: 3px solid var(--primary-color); 
    margin-top: 80px; 
}

/* صفحات العربة والدفع المطورة */
.cart-wrapper, .checkout-wrapper { 
    display: grid;
    grid-template-columns: 2fr 1.2fr;
    gap: 30px; 
    align-items: start;
    margin-top: 30px;
}

.cart-items-section, .checkout-form-section {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 25px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.summary-card { 
    background: var(--card-bg); 
    padding: 35px; 
    border-radius: 25px; 
    box-shadow: var(--card-shadow);
    position: sticky;
    top: 120px;
    border: 1px solid var(--primary-color);
}

.summary-card h3 { 
    font-size: 1.6rem; 
    margin-bottom: 25px; 
    padding-bottom: 15px; 
    border-bottom: 2px solid var(--border-color);
    color: var(--accent-gold);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
    font-size: 1.15rem;
    color: #666;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid var(--border-color);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--accent-gold);
}

/* تحسين الفورم والخانات الضخمة */
.form-group { margin-bottom: 30px; }
.form-group label { 
    display: block; 
    margin-bottom: 12px; 
    font-weight: 700; 
    font-size: 1.15rem;
    color: var(--text-color);
}
.form-group input, .form-group select { 
    width: 100%; 
    padding: 20px 25px; 
    border: 2px solid var(--border-color); 
    border-radius: 18px; 
    font-size: 1.15rem;
    outline: none;
    transition: var(--transition);
    background: var(--input-bg);
    color: var(--text-color);
}
.form-group input:focus {
    border-color: var(--primary-color);
    background: var(--card-bg);
    box-shadow: 0 0 0 5px rgba(212, 175, 55, 0.1);
}

/* الأزرار الضخمة والواضحة */
.checkout-btn, .place-order-btn, .add-to-cart-btn, .buy-now-btn { 
    width: 100%; 
    padding: 24px; 
    border-radius: 60px; 
    border: none; 
    font-weight: 900; 
    cursor: pointer; 
    font-size: 1.4rem;
    margin-top: 25px;
    transition: var(--transition);
    text-align: center;
    display: block;
    text-decoration: none;
}

.buy-now-btn, .checkout-btn, .place-order-btn { 
    background: var(--primary-color); 
    color: black; 
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
}

.buy-now-btn:hover, .checkout-btn:hover, .place-order-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(212, 175, 55, 0.5);
    background: var(--accent-gold);
}

/* عناصر العربة */
.cart-item {
    display: flex;
    gap: 25px;
    padding: 25px 0;
    border-bottom: 2px solid var(--border-color);
    align-items: center;
}
.cart-item img {
    width: 140px;
    height: 140px;
    border-radius: 20px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}
.cart-item-info { flex: 1; }
.cart-item-info h4 { font-size: 1.3rem; margin-bottom: 10px; color: var(--text-color); }
.cart-item-price { color: var(--accent-gold); font-weight: 900; font-size: 1.5rem; }

.remove-item {
    background: #fff0f0;
    color: #e74c3c;
    border: none;
    padding: 15px;
    border-radius: 15px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.1rem;
}
.remove-item:hover { background: #e74c3c; color: white; }

/* وسائل الدفع */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.payment-option {
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    background: var(--input-bg);
}

.payment-option input {
    position: absolute;
    opacity: 0;
}

.payment-option i {
    font-size: 1.8rem;
    display: block;
    margin-bottom: 8px;
    color: #666;
}

.payment-option span {
    font-weight: 700;
    font-size: 0.9rem;
    display: block;
    color: var(--text-color);
}

.payment-option.active {
    border-color: var(--primary-color);
    background: #fffdf0;
}

.payment-option.active i {
    color: var(--primary-color);
}

.payment-instructions {
    margin-top: 25px;
    padding: 20px;
    background: var(--input-bg);
    border: 2px dashed var(--primary-color);
    border-radius: 15px;
    display: none; 
}

.payment-instructions.show {
    display: block;
    animation: fadeIn 0.4s ease;
}

.instruction-box {
    text-align: center;
    padding: 10px;
}

.copy-box {
    background: var(--card-bg);
    color: var(--text-color);
    padding: 10px;
    border-radius: 10px;
    font-family: monospace;
    font-size: 1.2rem;
    margin: 10px 0;
    display: inline-block;
    cursor: pointer;
    border: 1px solid var(--primary-color);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* شريط التنقل السفلي للموبايل */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #000; 
    display: none; 
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 15px rgba(0,0,0,0.2);
    z-index: 999;
    border-top: 2px solid var(--primary-color);
}

.bottom-nav-item {
    text-decoration: none;
    color: #aaa;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.bottom-nav-item i { font-size: 1.3rem; margin-bottom: 3px; }
.bottom-nav-item.active { color: var(--primary-color); }

/* قائمة الأمنيات Wishlist */
.wishlist-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255,255,255,0.9);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: var(--transition);
    z-index: 2;
}

.wishlist-btn i { color: #ccc; font-size: 1.1rem; }
.wishlist-btn.active i { color: #e74c3c; }
.wishlist-btn:hover { transform: scale(1.1); }

/* إشعار شراء منبثق */
#purchase-popup {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: #000;
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1500;
    transform: translateX(150%);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--primary-color);
    color: white;
}

#purchase-popup.show { transform: translateX(0); }
#purchase-popup img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1px solid var(--primary-color); }
#purchase-popup .info { font-size: 0.85rem; }
#purchase-popup b { color: var(--primary-color); }

/* أيقونات الثقة */
.trust-badges {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 30px;
    padding: 20px;
    background: var(--input-bg);
    border-radius: 15px;
}

.badge-item { text-align: center; font-size: 0.8rem; color: #888; }
.badge-item i { font-size: 1.5rem; color: var(--primary-color); margin-bottom: 8px; display: block; }

@media (max-width: 600px) {
    .bottom-nav { display: flex; }
    body { padding-bottom: 70px; } 
}

@media (max-width: 900px) {
    .product-detail-wrapper { grid-template-columns: 1fr; }
    .hero-content { padding: 0 40px; height: 300px; }
    .hero-content h2 { font-size: 2.2rem; }
    .search-bar { order: 3; max-width: 100%; }
    .header-upper { flex-wrap: wrap; }
}

/* Trust Features */
.trust-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 40px 0;
    width: 100%;
}

@media (max-width: 768px) {
    .trust-features {
        display: flex;
        flex-wrap: wrap; /* تتيح للعناصر النزول لسطر جديد */
        justify-content: space-around;
    }
    .feature-item {
        width: 45%; /* كارتين في كل سطر بدلاً من أربعة */
        margin-bottom: 15px;
    }
}

.feature-item {
    background: var(--card-bg);
    padding: 30px 20px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}
.feature-item:hover { transform: translateY(-5px); box-shadow: var(--card-shadow); border-color: var(--primary-color); }
.feature-item i { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 15px; display: block; }
.feature-item h4 { font-size: 1.2rem; margin-bottom: 8px; font-weight: 800; }
.feature-item p { font-size: 0.9rem; color: #888; }

/* تحسين المنزلق ليكون انسيابياً جداً عبر CSS */
.carousel-container {
    position: relative;
    margin-bottom: 30px;
    overflow: hidden; 
}

.horizontal-scroll-grid {
    display: flex;
    gap: 20px;
    padding: 10px 0 30px;
    width: max-content; 
}

/* حركة الماركي للمنتجات */
.marquee-track {
    display: flex;
    gap: 20px;
    animation: productMarquee 80s linear infinite; 
}

@keyframes productMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(33.333%); } 
}

.carousel-container:hover .marquee-track {
    animation-play-state: paused;
}

.horizontal-scroll-grid .temu-card { 
    min-width: 280px; 
    flex-shrink: 0; 
}

@media (max-width: 900px) {
    .horizontal-scroll-grid .temu-card { min-width: 220px; }
    .marquee-track { animation-duration: 60s; } 
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
    cursor: pointer;
    z-index: 10;
    border: 1px solid var(--primary-color);
    transition: var(--transition);
    color: var(--primary-color);
    font-size: 1.2rem;
}

.carousel-arrow:hover {
    background: var(--primary-color);
    color: black;
    transform: translateY(-50%) scale(1.1);
}

.carousel-arrow.prev { right: -22px; }
.carousel-arrow.next { left: -22px; }

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background-color: #25d366;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-align: center;
    font-size: 35px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}
.whatsapp-float:hover { transform: scale(1.1); }

/* --- Mobile Responsiveness Overhaul --- */
@media (max-width: 768px) {
    :root {
        --container-padding: 15px;
    }

    body { font-size: 14px; }

    /* تقليل مساحات الكروت وتصغير الأيقونات */
    .trust-features {
        gap: 10px !important;
        padding: 10px !important;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-around;
        grid-template-columns: none !important;
    }

    .feature-item {
        width: 45% !important;
        padding: 12px 8px !important;
        min-height: auto !important;
        height: auto !important;
        margin-bottom: 15px;
    }

    .feature-item i {
        font-size: 35px !important;
        margin-bottom: 6px !important;
    }

    .feature-item h4 {
        font-size: 13px !important;
        margin-bottom: 4px !important;
    }

    .feature-item p {
        font-size: 10px !important;
        line-height: 1.3 !important;
    }

    /* تصغير صندوق عروض الفلاش */
    .flash-sale-bar {
        padding: 10px 15px !important;
        margin-top: 10px !important;
        margin-bottom: 10px !important;
    }

    .timer-unit {
        width: 35px !important;
        height: 35px !important;
        min-width: 35px !important;
        font-size: 14px !important;
        padding: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* تصغير البانر العلوي واللوجو */
    .official-logo-container {
        padding: 15px 0 !important;
        height: auto !important;
    }

    .official-logo-container img {
        max-width: 50% !important;
        height: auto !important;
    }

    /* تصغير الأزرار العائمة */
    .chat-fab {
        width: 45px !important;
        height: 45px !important;
        bottom: 90px !important; /* رفعها أكثر لتفادي الـ Bottom Nav والزحام */
        font-size: 1.2rem !important;
    }

    #wheel-trigger-float {
        width: 35px !important;
        height: 35px !important;
        bottom: 145px !important; /* رفعها لتكون فوق زر الشات بوضوح */
        right: 15px !important;
    }

    .whatsapp-float {
        position: fixed;
        bottom: 200px !important; /* رفع زر الواتساب ليكون في الأعلى بعيداً عن الأزرار الأخرى */
        left: 15px !important;
        background-color: #25d366;
        color: #fff;
        width: 45px !important;
        height: 45px !important;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 25px !important;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
        z-index: 10000;
        text-decoration: none;
    }

    .ai-chat-widget {
        bottom: 15px;
        right: 15px;
    }

    /* Hero Section - Drastic reduction for mobile */
    .hero-section { margin-top: 5px; margin-bottom: 20px; }
    .hero-content {
        padding: 20px 15px !important;
        min-height: 180px !important;
        border-radius: 15px;
    }
    .hero-content h2 { font-size: 1.5rem !important; margin-bottom: 5px; }
    .hero-content p { font-size: 12px !important; margin-bottom: 15px; }
    .hero-btn { padding: 10px 25px; font-size: 0.9rem; }

    /* Account & Sections */
    .dashboard-grid { grid-template-columns: 1fr; }
    #loyalty-tier-section { padding: 20px; }
    #loyalty-tier-section h2 { font-size: 1.2rem; }
    #ambassador-section { padding: 20px; }
    #profile-ref-code { font-size: 1.4rem; padding: 10px; }

    /* Modals & AI Chat */
    .chat-window { width: calc(100vw - 40px); right: -10px; height: 70vh; }
    .modal-content { padding: 30px 20px; }

    /* Fix Overlapping Text */
    h1, h2, h3 { word-wrap: break-word; overflow-wrap: break-word; }
    
    /* Stats & Reports */
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-box { padding: 15px; }
    .stat-box h3 { font-size: 1.4rem; }

    /* إخفاء الجمل الجانبية لتنظيف التصميم على الموبايل */
    .header-slogan-left, .header-slogan-right { 
        display: none !important; 
    }
}

@media (max-width: 480px) {
    .product-info { padding: 10px; }
    .btn-buy { font-size: 0.8rem; padding: 8px; }
}

/* AI Chat Widget */
.ai-chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.chat-fab {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: var(--primary-color);
    color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.4);
    transition: 0.3s;
    border: 2px solid black;
}

.chat-window {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 380px;
    height: 550px;
    background: var(--card-bg);
    border-radius: 25px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 2px solid var(--primary-color);
}

.chat-header {
    background: #000;
    color: var(--primary-color);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--primary-color);
}

/* Modal Styles - Centered and Royal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(8px);
    padding: 20px;
}

.modal-content {
    background: #000;
    padding: 50px 40px;
    border-radius: 30px;
    width: 100%;
    max-width: 500px;
    position: relative;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.3);
    text-align: center;
    animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: #fff;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.close-modal {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--primary-color);
    transition: var(--transition);
    line-height: 1;
}

.close-modal:hover {
    transform: rotate(90deg) scale(1.2);
}


/* --- Fix Floating Elements Overlap on Mobile --- */
.whatsapp-float {
    position: fixed !important;
    bottom: 90px !important;
    left: 20px !important;
    right: auto !important;
    width: 55px !important;
    height: 55px !important;
    border-radius: 50% !important;
    background-color: #25d366 !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.8rem !important;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4) !important;
    z-index: 9998 !important;
    text-decoration: none !important;
    transition: transform 0.3s ease !important;
}
.whatsapp-float:hover {
    transform: scale(1.1) !important;
}

.ai-chat-widget .chat-fab {
    position: fixed !important;
    bottom: 90px !important;
    right: 20px !important;
    width: 55px !important;
    height: 55px !important;
    border-radius: 50% !important;
    background: #D4AF37 !important;
    color: #000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.5rem !important;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4) !important;
    z-index: 9997 !important;
    cursor: pointer !important;
}

#wheel-trigger-float {
    position: fixed !important;
    bottom: 160px !important;
    right: 22px !important;
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    background: #000 !important;
    border: 2px solid #D4AF37 !important;
    color: #D4AF37 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 9996 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.whatsapp-direct-btn {
    width: 100%;
    background: #25d366;
    color: #fff;
    border: none;
    padding: 15px 25px;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    transition: all 0.3s ease;
    text-decoration: none;
}
.whatsapp-direct-btn:hover {
    background: #1eb954;
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

.coupon-applied-box {
    background: #fdfaf0;
    border: 1px dashed #D4AF37;
    border-radius: 12px;
    padding: 12px 18px;
    margin: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    color: #b8860b;
}


/* --- Bulletproof Logo & Header Fix --- */
.official-logo-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 10px 20px !important;
    background: #000 !important;
    border-bottom: 2px solid #D4AF37 !important;
    overflow: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.official-logo-container a {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-decoration: none !important;
    flex-shrink: 0 !important;
}

.official-logo-container img {
    height: 85px !important;
    max-height: 85px !important;
    width: auto !important;
    max-width: 250px !important;
    object-fit: contain !important;
    filter: drop-shadow(0 0 10px rgba(212,175,55,0.5)) !important;
    transition: all 0.3s ease !important;
}

.official-logo-container h1 {
    color: #D4AF37 !important;
    font-family: 'Inter', serif !important;
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    letter-spacing: 3px !important;
    margin-top: -15px !important;
    text-transform: uppercase !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5) !important;
}

.header-slogan-right, .header-slogan-left {
    color: #D4AF37 !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    text-shadow: 0 0 10px rgba(212,175,55,0.3) !important;
    flex: 1 !important;
}
.header-slogan-right { text-align: left !important; }
.header-slogan-left { text-align: right !important; }

@media (max-width: 900px) {
    .header-slogan-right, .header-slogan-left {
        font-size: 0.8rem !important;
    }
    .official-logo-container img {
        height: 70px !important;
        max-height: 70px !important;
    }
}

@media (max-width: 768px) {
    .header-slogan-right, .header-slogan-left {
        display: none !important;
    }
    .official-logo-container {
        padding: 8px 10px !important;
        gap: 0 !important;
    }
    .official-logo-container img {
        height: 65px !important;
        max-height: 65px !important;
    }
}
