/**
 * ============================================================================
 * style.css
 * ============================================================================
 * الإصدار: 12.0.0
 * الوصف: ملف التصميم الرئيسي لمتجر روميسا - نسخة معدلة ومحسنة
 * آخر تحديث: 28 مارس 2026
 * 
 * التغييرات الأمنية والوظيفية:
 *   ✅ تحسين الأداء مع استخدام CSS Variables
 *   ✅ إضافة دعم لـ prefers-reduced-motion
 *   ✅ تحسين إمكانية الوصول (Accessibility)
 *   ✅ إضافة أنماط للتحميل والانتقالات
 *   ✅ تحسين الاستجابة لجميع الأجهزة
 * 
 * هذا الملف يحتوي على:
 *   1. المتغيرات وإعادة التعيين
 *   2. شريط التحميل والبار العلوي
 *   3. الهيدر وشريط التصنيفات
 *   4. شبكة المنتجات والبطاقات
 *   5. صفحة المنتج والخيارات
 *   6. الأقسام الإضافية (الأكثر مبيعاً، آراء العملاء)
 *   7. المودالات (السلة، الطلب، التتبع، المفضلة، الصور)
 *   8. الفوتر والأزرار الثابتة
 *   9. تحسينات الموبايل والأداء
 * ============================================================================
 */

/* ============================================================================
   القسم 1: استيراد الخطوط والمتغيرات
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap');

@font-face {
    font-family: 'Cairo Fallback';
    src: local('Tahoma'), local('Arial');
    font-weight: 300;
    font-style: normal;
}

:root {
    /* الألوان الأساسية */
    --green-dark: #566246;
    --green-light: #A4C2A5;
    --white: #FFFFFF;
    --gray-light: #F1F2EB;
    --gray: #D8DAD3;
    --gray-dark: #4A4A48;
    --red: #D32F2F;
    --red-light: #FFEBEE;
    --success: #2E7D32;
    --success-light: #E8F5E9;
    --warning: #FF9800;
    --warning-light: #FFF3E0;
    --gold: #FFD700;
    
    /* الظلال */
    --shadow-sm: 0 2px 8px rgba(86, 98, 70, 0.08);
    --shadow-md: 0 4px 16px rgba(86, 98, 70, 0.12);
    --shadow-lg: 0 8px 24px rgba(86, 98, 70, 0.16);
    
    /* التحولات */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* المسافات */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    /* الحدود */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-circle: 50%;
    --radius-pill: 9999px;
    
    /* الارتفاعات */
    --header-height: 70px;
    --promo-height: 40px;
    --nav-height: 60px;
    --filter-height: 60px;
}

/* ============================================================================
   القسم 2: إعادة تعيين الأنماط
   ============================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + var(--promo-height) + var(--nav-height));
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Cairo', 'Cairo Fallback', Tahoma, Arial, sans-serif;
    background: var(--gray-light);
    color: var(--gray-dark);
    line-height: 1.6;
    min-height: 100vh;
    padding-top: calc(var(--promo-height) + var(--header-height) + var(--nav-height));
    direction: rtl;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================================================
   القسم 3: شريط التحميل والبار العلوي
   ============================================================================ */

.loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--green-light), var(--green-dark));
    z-index: 100001;
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--green-light);
}

.promo-bar {
    background: linear-gradient(135deg, var(--green-dark), var(--green-light));
    color: white;
    height: var(--promo-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    border-bottom: 2px solid var(--green-light);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.promo-badge-left, .promo-badge-right {
    min-width: 80px;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2002;
    transition: background var(--transition-normal);
    cursor: pointer;
}

.promo-badge-left:hover, .promo-badge-right:hover {
    background: rgba(255, 255, 255, 0.2);
}

.promo-badge-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: fadeBadge 3s ease-in-out infinite;
}

.promo-badge-icon {
    font-size: 18px;
    color: white;
    line-height: 1;
}

.promo-badge-text {
    font-size: 10px;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

@keyframes fadeBadge {
    0%, 100% { opacity: 0.9; transform: scale(0.98); }
    50% { opacity: 1; transform: scale(1); }
}

.promo-content-wrapper {
    flex: 1;
    overflow: hidden;
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
}

.promo-content {
    display: flex;
    align-items: center;
    animation: scrollLeft 180s linear infinite;
    white-space: nowrap;
    position: absolute;
    left: 0;
}

.promo-content span {
    margin: 0 30px;
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.promo-content i {
    margin: 0 10px;
    color: white;
    font-size: 14px;
    opacity: 0.7;
}

@keyframes scrollLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.promo-bar:hover .promo-content {
    animation-play-state: paused;
}

/* ============================================================================
   الهيدر - نسخة محسنة مع الحفاظ على التصميم الأصلي
   ============================================================================ */

header {
    background: white;
    padding: 0 16px;
    border-bottom: 2px solid var(--green-light);
    position: fixed;
    top: var(--promo-height);
    left: 0;
    right: 0;
    z-index: 1999;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: var(--header-height);
    /* ✅ منع overflow مع السماح بالتمرير */
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

/* ✅ إخفاء شريط التمرير */
header::-webkit-scrollbar {
    display: none;
}

/* ✅ الشعار - الحفاظ على التصميم الأصلي */
.header-title {
    flex-shrink: 0;
}

.header-title a {
    text-decoration: none;
    display: block;
}

.header-title span[lang="en"] {
    font-size: 24px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--green-dark), var(--green-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    white-space: nowrap;
}

.header-title span[lang="en"]::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--green-light), var(--green-dark));
    transition: width var(--transition-normal);
}

.header-title:hover span[lang="en"]::after {
    width: 100%;
}

/* حاوية البحث */
.search-container {
    flex: 1 1 auto;
    min-width: 100px;
    max-width: 250px;
}

.search-box {
    display: flex;
    align-items: center;
    background: white;
    border-radius: var(--radius-pill);
    border: 1px solid var(--gray);
    overflow: hidden;
    height: 40px;
    width: 100%;
    box-shadow: var(--shadow-sm);
}

.search-box:focus-within {
    border-color: var(--green-light);
    box-shadow: 0 0 0 4px rgba(164, 194, 165, 0.2);
    transform: scale(1.02);
}

.search-input {
    flex: 1;
    padding: 0 10px;
    border: none;
    background: transparent;
    font-size: 13px;
    outline: none;
    min-width: 0;
    color: var(--green-dark);
}

.search-input::placeholder {
    color: var(--gray);
    font-size: 12px;
}

.search-btn {
    background: none;
    border: none;
    padding: 0 10px;
    cursor: pointer;
    color: var(--green-dark);
    font-size: 14px;
    flex-shrink: 0;
}

.search-btn:hover {
    color: var(--green-light);
}

/* الأزرار */
.header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* ✅ تصميم الأزرار - الحفاظ على المظهر الأصلي */
.cart-header-icon, 
.favorite-header-icon, 
.track-order-icon,
.refresh-cache-icon {
    background: white;
    border: 1px solid var(--gray);
    color: var(--green-dark);
    border-radius: var(--radius-pill);
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0 10px;
    height: 40px;
    min-width: auto;
    gap: 6px;
    white-space: nowrap;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.cart-header-icon:hover, 
.favorite-header-icon:hover, 
.track-order-icon:hover,
.refresh-cache-icon:hover {
    border-color: var(--green-light);
    color: var(--green-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* الأيقونات */
.cart-header-icon i,
.favorite-header-icon i,
.track-order-icon i,
.refresh-cache-icon i {
    font-size: 16px;
    flex-shrink: 0;
}

/* ✅ النصوص داخل الأزرار - تبقى ظاهرة */
.cart-header-icon span,
.favorite-header-icon span,
.track-order-icon span,
.refresh-cache-icon span {
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    display: inline-block; /* ✅ تظهر دائماً */
}

/* العداد */
.cart-count, .favorite-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--red);
    color: white;
    border-radius: 50%;
    padding: 2px 5px;
    font-size: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    font-weight: 700;
}

/* ============================================================================
   تحسينات خاصة للمتصفحات المختلفة
   ============================================================================ */

/* ✅ Firefox - ضبط المرونة */
@-moz-document url-prefix() {
    .header-actions {
        flex-shrink: 1;
    }
    .cart-header-icon,
    .favorite-header-icon,
    .track-order-icon,
    .refresh-cache-icon {
        min-width: 36px;
    }
}

/* ============================================================================
   الموبايل - جميع المتصفحات
   ============================================================================ */

@media (max-width: 768px) {
    header {
        padding: 0 12px;
        gap: 6px;
        height: 60px;
    }
    
    .header-title span[lang="en"] {
        font-size: 20px;
    }
    
    .search-container {
        min-width: 80px;
        max-width: 180px;
    }
    
    .search-box {
        height: 36px;
    }
    
    .search-input {
        font-size: 12px;
        padding: 0 8px;
    }
    
    .cart-header-icon,
    .favorite-header-icon,
    .track-order-icon,
    .refresh-cache-icon {
        height: 36px;
        padding: 0 8px;
    }
    
    .cart-header-icon i,
    .favorite-header-icon i,
    .track-order-icon i,
    .refresh-cache-icon i {
        font-size: 14px;
    }
    
    .cart-header-icon span,
    .favorite-header-icon span,
    .track-order-icon span,
    .refresh-cache-icon span {
        font-size: 11px;
    }
}

@media (max-width: 550px) {
    /* ✅ فقط إخفاء كلمة "تحديث" في زر التحديث (لأنها طويلة) */
    .refresh-cache-icon span {
        display: none;
    }
    
    .refresh-cache-icon {
        padding: 0;
        width: 36px;
    }
    
    /* ✅ كلمة "تتبع" تبقى ظاهرة */
    .track-order-icon span {
        display: inline-block;
    }
}

@media (max-width: 480px) {
    header {
        padding: 0 10px;
        gap: 4px;
        height: 55px;
    }
    
    .header-title span[lang="en"] {
        font-size: 18px;
    }
    
    .search-container {
        min-width: 70px;
        max-width: 140px;
    }
    
    .search-box {
        height: 34px;
    }
    
    .search-input {
        font-size: 11px;
        padding: 0 6px;
    }
    
    .cart-header-icon,
    .favorite-header-icon,
    .track-order-icon,
    .refresh-cache-icon {
        height: 34px;
        padding: 0 6px;
    }
    
    .cart-header-icon i,
    .favorite-header-icon i,
    .track-order-icon i,
    .refresh-cache-icon i {
        font-size: 13px;
    }
    
    /* ✅ إخفاء النصوص الطويلة فقط (السلة والمفضلة) */
    .cart-header-icon span,
    .favorite-header-icon span {
        display: none;
    }
    
    /* ✅ كلمة "تتبع" تبقى ظاهرة */
    .track-order-icon span {
        display: inline-block;
        font-size: 10px;
    }
    
    /* ✅ زر التحديث - أيقونة فقط */
    .refresh-cache-icon span {
        display: none;
    }
    
    .refresh-cache-icon {
        padding: 0;
        width: 34px;
    }
    
    /* ✅ العداد */
    .cart-count, .favorite-count {
        top: -4px;
        right: -4px;
        min-width: 16px;
        height: 16px;
        font-size: 9px;
        padding: 1px 4px;
    }
}

@media (max-width: 380px) {
    header {
        padding: 0 8px;
        gap: 3px;
    }
    
    .header-title span[lang="en"] {
        font-size: 16px;
    }
    
    .search-container {
        min-width: 60px;
        max-width: 110px;
    }
    
    .cart-header-icon,
    .favorite-header-icon,
    .track-order-icon,
    .refresh-cache-icon {
        height: 32px;
        padding: 0 4px;
    }
    
    .cart-header-icon i,
    .favorite-header-icon i,
    .track-order-icon i,
    .refresh-cache-icon i {
        font-size: 12px;
    }
    
    /* ✅ كلمة "تتبع" تصبح أيقونة فقط على أصغر شاشة */
    .track-order-icon span {
        display: none;
    }
    
    .track-order-icon {
        padding: 0;
        width: 32px;
    }
}


.cart-header-icon i, .favorite-header-icon i, .track-order-icon i {
    font-size: 20px;
}

.cart-header-icon:hover, .favorite-header-icon:hover, .track-order-icon:hover {
    border-color: var(--green-light);
    color: var(--green-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.cart-count, .favorite-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--red);
    color: white;
    border-radius: var(--radius-circle);
    padding: 2px 6px;
    font-size: 11px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

/* ============================================================================
   القسم 5: شريط التصنيفات والفلترة
   ============================================================================ */

.nav-container {
    background: white;
    padding: 0 24px;
    border-bottom: 2px solid var(--green-light);
    position: fixed;
    top: calc(var(--promo-height) + var(--header-height));
    left: 0;
    right: 0;
    z-index: 1998;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--green-dark) var(--gray);
    height: var(--nav-height);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-container::-webkit-scrollbar {
    height: 4px;
}

.nav-container::-webkit-scrollbar-track {
    background: var(--gray);
    border-radius: var(--radius-pill);
}

.nav-container::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--green-dark), var(--green-light));
    border-radius: var(--radius-pill);
}

.nav-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    background: white;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid var(--gray);
    transition: all var(--transition-normal);
    color: var(--green-dark);
    white-space: nowrap;
    height: 42px;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-item:hover {
    border-color: var(--green-light);
    color: var(--green-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--green-dark), var(--green-light));
    color: white;
    border-color: var(--green-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.filter-bar {
    background: white;
    padding: 8px 24px;
    border-bottom: 1px solid var(--gray);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 10px;
    position: relative;
    z-index: 10;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-size: 14px;
    color: var(--green-dark);
    font-weight: 600;
}

#sortSelect {
    padding: 4px 12px;
    border: 1px solid var(--gray);
    border-radius: var(--radius-pill);
    font-size: 14px;
    color: var(--gray-dark);
    background: white;
    cursor: pointer;
    outline: none;
}

#sortSelect:focus {
    border-color: var(--green-light);
    box-shadow: 0 0 0 2px rgba(164, 194, 165, 0.2);
}

.view-mode-buttons {
    display: flex;
    gap: 4px;
}

.view-mode-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--gray);
    background: white;
    color: var(--gray-dark);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.view-mode-btn:hover {
    background: var(--gray);
}

.view-mode-btn.active {
    background: var(--green-dark);
    color: white;
    border-color: var(--green-dark);
}

/* ============================================================================
   القسم 6: شبكة المنتجات والبطاقات (محسنة)
   ============================================================================ */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 24px;
    max-width: 1600px;
    margin: 0 auto;
}

.grid.list-view {
    grid-template-columns: 1fr;
}

.grid.list-view .card {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
}

.grid.list-view .img-box {
    height: 200px;
}

@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1280px) { .grid { grid-template-columns: repeat(5, 1fr); } }

.card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    position: relative;
    cursor: pointer;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--green-light), var(--green-dark));
    transform: scaleX(0);
    transition: transform var(--transition-normal);
    z-index: 2;
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--green-light);
}

.img-box {
    width: 100%;
    height: 320px;
    background: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.main-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: var(--gray);
    transition: transform var(--transition-slow);
    pointer-events: none;
}

.card:hover .main-img {
    transform: scale(1.08);
}

.favorite-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    border: 2px solid transparent;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    color: var(--green-dark);
    font-size: 18px;
    border: 1.5px solid rgba(255, 255, 255, 0.8);
}

.favorite-btn:hover {
    transform: scale(1.15);
    border-color: var(--red);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

.favorite-btn.active {
    background: linear-gradient(135deg, #FFE5E5, #FFB6B6);
    color: var(--red);
    border-color: var(--red);
    animation: heartBeat var(--transition-normal);
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.best-seller-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, var(--gold), #FFA500);
    color: black;
    padding: 4px 8px;
    border-radius: var(--radius-pill);
    font-size: 10px;
    font-weight: 700;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 4px;
}

.out-of-stock-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: var(--gray-dark);
    color: white;
    padding: 4px 8px;
    border-radius: var(--radius-pill);
    font-size: 10px;
    font-weight: 700;
    z-index: 5;
    opacity: 0.9;
}

.info {
    padding: 16px 16px 20px;
    background: white;
    border-top: 1px solid var(--gray);
}

.info h2 {
    font-size: 16px;
    margin: 0 0 4px;
    color: var(--green-dark);
    line-height: 1.4;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 44px;
    overflow: hidden;
}

.product-colors {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 4px 0;
    flex-wrap: wrap;
}

.color-dot {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-circle);
    border: 2px solid white;
    box-shadow: 0 0 0 1px var(--gray);
    cursor: pointer;
    transition: transform var(--transition-fast);
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.color-dot:hover { transform: scale(1.2); }
.color-dot.unavailable { opacity: 0.5; filter: grayscale(0.3); cursor: not-allowed; }

.more-colors {
    font-size: 12px;
    color: var(--gray-dark);
    background: var(--gray);
    padding: 2px 6px;
    border-radius: var(--radius-pill);
}

.price-range {
    font-weight: 900;
    color: var(--green-dark);
    font-size: 18px;
    margin: 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.current-price { color: var(--green-dark); font-size: 20px; }
.old-price { font-size: 14px; color: var(--gray-dark); text-decoration: line-through; opacity: 0.7; }

.add-btn {
    background: linear-gradient(145deg, var(--green-light), var(--green-dark));
    color: white;
    border: none;
    padding: 12px 12px;
    width: 100%;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    margin-top: 8px;
    transition: all var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.add-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.add-btn:hover::before { left: 100%; }
.add-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(86, 98, 70, 0.3); }
.add-btn:active { transform: translateY(-1px); }
.add-btn:disabled { background: linear-gradient(145deg, var(--gray), var(--gray-dark)); cursor: not-allowed; opacity: 0.6; transform: none; box-shadow: none; }

/* ============================================================================
   القسم 7: صفحة المنتج (محسنة)
   ============================================================================ */

.product-page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.product-page {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray);
    overflow: hidden;
}

.product-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
    padding: 48px;
    position: relative;
}

@media (max-width: 768px) {
    .product-container {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px;
    }
}

.product-gallery {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--gray);
    box-shadow: var(--shadow-md);
}

.product-main-image {
    width: 100%;
    aspect-ratio: 1/1;
    background: var(--gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.product-main-image:hover { transform: scale(1.02); }
.product-main-image img { width: 100%; height: 100%; object-fit: contain; }

.product-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 16px 0;
    scrollbar-width: thin;
    margin-top: 16px;
}

.product-thumbnail {
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    object-fit: cover;
    cursor: pointer;
    flex-shrink: 0;
    transition: all var(--transition-normal);
    opacity: 0.7;
    background: var(--gray);
}

.product-thumbnail:hover { transform: translateY(-3px); opacity: 1; }
.product-thumbnail.active { border-color: var(--green-dark); opacity: 1; transform: scale(1.05); }

.product-page-favorite-btn {
    position: absolute;
    top: 24px;
    left: 24px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    width: 60px;
    height: 60px;
    border-radius: var(--radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
    color: var(--green-dark);
    font-size: 30px;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.product-page-favorite-btn:hover { transform: scale(1.15); border-color: var(--red); }
.product-page-favorite-btn.active { background: linear-gradient(135deg, #FFE5E5, #FFB6B6); color: var(--red); border-color: var(--red); }

.product-title {
    font-size: 30px;
    font-weight: 900;
    color: var(--green-dark);
    margin: 0 0 16px;
    line-height: 1.3;
}

.product-description {
    font-size: 16px;
    color: var(--gray-dark);
    margin-bottom: 24px;
    line-height: 1.8;
}

.product-price-box {
    background: linear-gradient(145deg, var(--gray), var(--gray-light));
    padding: 24px 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray);
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
    margin: 24px 0;
}

.product-price-box .current-price { font-size: 36px; font-weight: 900; color: var(--green-dark); }
.product-price-box .old-price { font-size: 18px; color: var(--gray-dark); text-decoration: line-through; }

.product-options {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 32px 0;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--green-dark);
}

.color-options, .size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.color-btn, .size-btn {
    min-width: 50px;
    padding: 8px 16px;
    border: 1px solid var(--gray);
    background: white;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-size: 14px;
    transition: all var(--transition-normal);
    color: var(--green-dark);
    font-weight: 600;
}

.color-btn.available, .size-btn.available { background: white; color: var(--green-dark); }
.color-btn.available:hover, .size-btn.available:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--green-light); }
.color-btn.unavailable, .size-btn.unavailable { background: #f5f5f5; color: #999; opacity: 0.6; cursor: not-allowed; text-decoration: line-through; }
.color-btn.selected, .size-btn.selected { background: linear-gradient(135deg, var(--green-light), var(--green-dark)); color: white; border-color: var(--green-light); animation: selectPulse var(--transition-fast); }

@keyframes selectPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.stock-info {
    font-size: 14px;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    text-align: center;
    margin: 16px 0;
}

.stock-info.available { color: var(--success); background: var(--success-light); border: 1px solid var(--success); }
.stock-info.unavailable { color: var(--red); background: var(--red-light); border: 1px solid var(--red); }

.product-actions {
    display: flex;
    gap: 16px;
    margin: 24px 0;
}

.add-to-cart-btn, .buy-now-btn {
    flex: 1;
    padding: 16px;
    border-radius: var(--radius-pill);
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
}

.add-to-cart-btn { background: linear-gradient(145deg, var(--green-light), var(--green-dark)); color: white; }
.buy-now-btn { background: linear-gradient(145deg, var(--gold), #FFA500); color: black; }
.add-to-cart-btn:hover, .buy-now-btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.add-to-cart-btn:disabled, .buy-now-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.back-to-products-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 2px solid var(--green-light);
    border-radius: var(--radius-pill);
    cursor: pointer;
    margin-top: 16px;
    color: var(--green-dark);
    font-weight: 700;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.back-to-products-btn:hover { background: rgba(164, 194, 165, 0.1); transform: translateY(-2px); }

/* ============================================================================
   القسم 8: الأكثر مبيعاً وآراء العملاء (محسنة)
   ============================================================================ */

.best-seller-section {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background: white;
    padding: 64px 0;
    overflow: hidden;
    border-top: 2px solid var(--green-light);
    border-bottom: 2px solid var(--green-light);
}

.best-seller-header {
    text-align: center;
    margin-bottom: 48px;
    padding: 0 24px;
}

.best-seller-title {
    font-size: 36px;
    font-weight: 900;
    color: var(--green-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.best-seller-title i { color: var(--gold); font-size: 30px; }

.best-seller-wrapper {
    width: 100%;
    padding: 0 16px;
}

.best-seller-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 20px;
    scrollbar-width: thin;
}

.best-seller-card {
    min-width: 250px;
    width: 250px;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray);
    overflow: hidden;
    flex-shrink: 0;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.best-seller-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: var(--shadow-lg); border-color: var(--green-light); }

.best-seller-img-container {
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

.best-seller-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform var(--transition-slow);
}

.best-seller-card:hover .best-seller-img { transform: scale(1.08); }

.best-seller-info {
    padding: 16px;
    text-align: center;
}

.best-seller-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.best-seller-price {
    font-size: 18px;
    font-weight: 900;
    color: var(--green-light);
    margin-bottom: 8px;
}

.best-seller-add-btn {
    width: 100%;
    background: linear-gradient(145deg, var(--green-light), var(--green-dark));
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.best-seller-add-btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* ============================================================================
   آراء العملاء - نسخة يدوية (بدون تحرك تلقائي + أزرار تحكم)
   ============================================================================ */

.reviews-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin: 64px 0 48px;
    padding: 0 24px;
}

.divider-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--green-light) 20%, var(--green-dark) 50%, var(--green-light) 80%, transparent);
}

.divider-text {
    font-size: 30px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--green-dark), var(--green-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    padding: 4px 32px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}



/* ============================================================================
   آراء العملاء - نفس نظام الأكثر مبيعاً (تمرير أفقي بسيط)
   ============================================================================ */

/* حاوية آراء العملاء الرئيسية */
.reviews-section {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background: white;
    padding: 48px 0 64px;
    overflow: hidden;
}

/* الغلاف - نفس نظام best-seller-wrapper */
.reviews-wrapper {
    width: 100%;
    padding: 0 16px;
}

/* المسار - نفس نظام best-seller-track (تمرير أفقي طبيعي) */
.reviews-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 20px;
    scrollbar-width: thin;
    scroll-behavior: smooth;
}

/* تخصيص شريط التمرير */
.reviews-track::-webkit-scrollbar {
    height: 4px;
}

.reviews-track::-webkit-scrollbar-track {
    background: var(--gray);
    border-radius: 10px;
}

.reviews-track::-webkit-scrollbar-thumb {
    background: var(--green-dark);
    border-radius: 10px;
}

/* إخفاء أزرار التنقل لأننا لن نستخدمها */
.reviews-nav-btn {
    display: none;
}

/* نقاط التنقل - يمكن إخفاؤها أو الاحتفاظ بها كدليل بصري */
.reviews-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 30px;
}

.reviews-dot {
    width: 8px;
    height: 8px;
    background: var(--gray);
    border-radius: 50%;
    transition: all 0.3s ease;
    cursor: pointer;
}

.reviews-dot.active {
    width: 24px;
    background: var(--green-dark);
    border-radius: 10px;
}

/* بطاقة المراجعة - نفس حجم best-seller-card */
.review-card {
    min-width: 250px;
    width: 250px;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray);
    overflow: hidden;
    flex-shrink: 0;
    transition: all var(--transition-normal);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.review-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--green-light);
}

.review-img-container {
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: var(--gray);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.review-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform var(--transition-slow);
}

.review-card:hover .review-img {
    transform: scale(1.08);
}

.review-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: var(--green-dark);
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* استجابة الموبايل */
@media (max-width: 768px) {
    .review-card {
        min-width: 200px;
        width: 200px;
    }
    .review-img-container {
        height: 240px;
    }
}

@media (max-width: 480px) {
    .review-card {
        min-width: 160px;
        width: 160px;
    }
    .review-img-container {
        height: 200px;
    }
}

/* ============================================================================
   القسم 9: تحميل المزيد
   ============================================================================ */

.load-more-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 48px 0;
    padding: 0 24px;
}

.load-more-progress {
    font-size: 14px;
    color: var(--gray-dark);
}

.load-more-btn {
    background: transparent;
    color: var(--green-dark);
    border: 2px solid var(--gray);
    padding: 12px 48px;
    border-radius: var(--radius-pill);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 8px;
}

.load-more-btn:hover {
    border-color: var(--green-light);
    color: var(--green-light);
    background: rgba(164, 194, 165, 0.1);
    transform: translateY(-3px);
}

.load-more-btn i { transition: transform var(--transition-normal); }
.load-more-btn:hover i { transform: translateY(3px); }

/* ============================================================================
   القسم 10: السلة السفلية
   ============================================================================ */

.cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 3px solid var(--green-light);
    padding: 12px 24px;
    display: none;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    box-shadow: 0 -8px 24px rgba(86, 98, 70, 0.2);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.cart-bar-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cart-bar-label {
    font-size: 16px;
    color: var(--gray-dark);
    font-weight: 500;
}

.total-txt {
    font-weight: 900;
    font-size: 20px;
    background: linear-gradient(135deg, var(--green-dark), var(--green-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.order-now {
    background: linear-gradient(145deg, var(--green-light), var(--green-dark));
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: var(--radius-pill);
    font-weight: 900;
    font-size: 16px;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-now:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* ============================================================================
   القسم 11: المودالات (محسنة)
   ============================================================================ */

.cart-modal, .modal-overlay, .image-modal, .favorites-modal, .confirm-modal, .track-order-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.cart-modal.active, .image-modal.active, .track-order-modal.show { display: flex; }

.cart-modal-content, .modal-content, .favorites-modal-content, .confirm-modal-content, .track-order-content {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius-xl);
    padding: 24px;
    max-height: 85vh;
    overflow-y: auto;
    animation: modalSlideUp var(--transition-normal);
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

.cart-modal-header, .modal-header, .favorites-modal-header, .track-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--green-light);
    padding-bottom: 12px;
}

.cart-modal-title, .modal-title, .favorites-modal-title, .track-order-header h3 {
    font-size: 20px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--green-dark), var(--green-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-modal-close, .close-modal, .favorites-modal-close, .track-order-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-dark);
    width: 44px;
    height: 44px;
    border-radius: var(--radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.cart-modal-close:hover, .close-modal:hover, .favorites-modal-close:hover, .track-order-close:hover {
    color: var(--green-light);
    background: var(--red-light);
    transform: rotate(90deg);
}

/* ============================================================================
   القسم 12: عناصر السلة والمفضلة (محسنة)
   ============================================================================ */

.cart-items-list, .favorites-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 4px;
}

.cart-item, .favorite-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray);
    transition: all var(--transition-normal);
}

.cart-item:hover, .favorite-item:hover { border-color: var(--green-light); box-shadow: var(--shadow-lg); transform: translateX(-2px); }

.cart-item-img, .favorite-item-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: var(--radius-md);
    background: var(--gray);
    padding: 4px;
    cursor: pointer;
    transition: transform var(--transition-normal);
}

.cart-item-img:hover, .favorite-item-img:hover { transform: scale(1.1); }

.cart-item-info, .favorite-item-info { flex: 1; }

.cart-item-name, .favorite-item-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item-code {
    font-size: 11px;
    color: var(--green-light);
    background: rgba(164, 194, 165, 0.1);
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    margin: 4px 0;
    font-family: monospace;
}

.cart-item-price { font-size: 16px; color: var(--green-light); font-weight: 700; }

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.quantity-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--gray);
    background: white;
    border-radius: var(--radius-circle);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.quantity-btn:hover:not(:disabled) { background: var(--green-light); color: white; border-color: var(--green-light); }
.quantity-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.quantity-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--green-dark);
    min-width: 30px;
    text-align: center;
}

.cart-item-total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.add-from-favorite-btn {
    background: linear-gradient(145deg, var(--green-light), var(--green-dark));
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 4px;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.add-from-favorite-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.cart-item-remove, .favorite-item-remove {
    background: none;
    border: none;
    color: var(--gray-dark);
    font-size: 18px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.cart-item-remove:hover, .favorite-item-remove:hover { background: var(--red-light); color: var(--red); transform: rotate(90deg) scale(1.1); }

.cart-empty {
    text-align: center;
    padding: 48px 16px;
    color: var(--gray-dark);
}

.cart-empty i { font-size: 48px; color: var(--gray); margin-bottom: 16px; }

.cart-summary {
    background: linear-gradient(145deg, var(--gray), var(--gray-light));
    padding: 16px;
    border-radius: var(--radius-lg);
    margin: 16px 0;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--gray-dark);
}

.cart-summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 2px solid var(--green-light);
    font-weight: 900;
    color: var(--green-dark);
    font-size: 18px;
}

.cart-actions {
    display: flex;
    gap: 12px;
}

.cart-clear-btn, .cart-checkout-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.cart-clear-btn { background: linear-gradient(145deg, var(--red), #B71C1C); color: white; }
.cart-checkout-btn { background: linear-gradient(145deg, var(--green-light), var(--green-dark)); color: white; }
.cart-clear-btn:hover, .cart-checkout-btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* ============================================================================
   القسم 13: مودال التتبع (محسن)
   ============================================================================ */

.track-order-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    background: var(--gray);
    padding: 4px;
    border-radius: var(--radius-pill);
}

.track-order-tab {
    flex: 1;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-dark);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.track-order-tab:hover { background: rgba(255, 255, 255, 0.5); color: var(--green-dark); }
.track-order-tab.active { background: white; color: var(--green-dark); box-shadow: var(--shadow-sm); }

.track-order-input-group {
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

.track-order-input-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 700;
    font-size: 14px;
    color: var(--green-dark);
}

.input-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--gray-dark);
    opacity: 0.7;
}

.track-order-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(145deg, var(--green-light), var(--green-dark));
    color: white;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.track-order-btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.track-result-container {
    max-height: 400px;
    overflow-y: auto;
}

.track-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.track-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(86, 98, 70, 0.15);
    border-color: #a4c2a5;
}

/* ============================================================================
   القسم 14: الفوتر والأزرار الثابتة
   ============================================================================ */

.trust-section {
    background: white;
    margin-top: 64px;
    padding: 48px 24px;
    text-align: center;
    border-top: 4px solid var(--green-light);
}

.trust-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.trust-badge {
    background: white;
    padding: 8px 24px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 700;
    color: var(--green-dark);
    border: 1px solid var(--gray);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-normal);
}

.trust-badge:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--green-light); }
.trust-badge i { color: var(--green-light); }

.trust-phone {
    font-size: 24px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--green-dark), var(--green-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.trust-copyright { font-size: 12px; color: var(--gray-dark); }

.whatsapp-icon {
    position: fixed;
    bottom: 100px;
    left: 20px;
    background: linear-gradient(145deg, #25D366, #128C7E);
    color: white;
    width: 65px;
    height: 65px;
    border-radius: var(--radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: var(--shadow-lg);
    z-index: 9998;
    text-decoration: none;
    transition: all var(--transition-normal);
    border: 3px solid white;
    animation: whatsappPulse 2s infinite;
}

@keyframes whatsappPulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.whatsapp-icon:hover { transform: scale(1.15) rotate(5deg); animation: none; }

.scroll-to-top {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--green-dark);
    color: white;
    border: none;
    border-radius: var(--radius-circle);
    font-size: 20px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 9997;
    transition: all var(--transition-normal);
    border: 2px solid white;
}

.scroll-to-top:hover { transform: translateY(-5px) scale(1.1); background: var(--green-light); }
.scroll-to-top.visible { display: flex; }

/* ============================================================================
   القسم 15: تحسينات الموبايل (محسنة)
   ============================================================================ */

@media (max-width: 768px) {
    body { padding-top: calc(var(--promo-height) + 60px + 50px); }
    :root { --header-height: 60px; --nav-height: 50px; --filter-height: 50px; }
    header { padding: 0 16px; height: 60px; }
    .header-title span[lang="en"] { font-size: 20px; }
    .search-container { max-width: 200px; min-width: 120px; }
    .search-box { height: 40px; }
    .search-input { font-size: 12px; padding: 0 12px; }
    .cart-header-icon, .favorite-header-icon, .track-order-icon { height: 40px; min-width: 40px; font-size: 16px; padding: 0 8px; }
    .nav-container { top: calc(var(--promo-height) + 60px); height: 50px; }
    .nav-item { padding: 0 16px; height: 36px; font-size: 12px; }
    .grid { gap: 16px; padding: 16px; }
    .img-box { height: 260px; }
    .best-seller-card { min-width: 180px; width: 180px; }
    .best-seller-img-container { height: 220px; }
    .review-card { min-width: 180px; width: 180px; height: 240px; }
    .review-img-container { height: 180px; }
    .reviews-track { min-height: 240px; max-height: 240px; }
    .product-page-favorite-btn { width: 50px; height: 50px; font-size: 24px; }
    .product-container { padding: 24px; }
    .product-title { font-size: 24px; }
    .product-price-box .current-price { font-size: 30px; }
    .whatsapp-icon { width: 55px; height: 55px; font-size: 28px; bottom: 90px; }
    .scroll-to-top { width: 45px; height: 45px; font-size: 18px; bottom: 90px; }
}

@media (max-width: 480px) {
    body { padding-top: calc(var(--promo-height) + 55px + 45px); }
    header { height: 55px; }
    .header-title span[lang="en"] { font-size: 18px; }
    .search-container { max-width: 150px; min-width: 100px; }
    .search-box { height: 36px; }
    .search-input { font-size: 11px; padding: 0 8px; }
    .cart-header-icon, .favorite-header-icon, .track-order-icon { height: 36px; min-width: 36px; font-size: 14px; }
    .nav-container { top: calc(var(--promo-height) + 55px); height: 45px; }
    .nav-item { padding: 0 12px; height: 32px; font-size: 11px; }
    .grid { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 8px; }
    .img-box { height: 200px; }
    .info { padding: 8px; }
    .info h2 { font-size: 12px; min-height: 32px; }
    .current-price { font-size: 16px; }
    .add-btn { padding: 6px; font-size: 11px; }
    .favorite-btn { width: 30px; height: 30px; font-size: 14px; }
    .best-seller-card { min-width: 140px; width: 140px; }
    .best-seller-img-container { height: 170px; }
    .best-seller-name { font-size: 12px; }
    .best-seller-price { font-size: 14px; }
    .best-seller-add-btn { font-size: 10px; }
    .review-card { min-width: 140px; width: 140px; height: 190px; }
    .review-img-container { height: 140px; }
    .reviews-track { min-height: 190px; max-height: 190px; }
    .product-page-favorite-btn { width: 40px; height: 40px; font-size: 20px; top: 16px; left: 16px; }
    .product-title { font-size: 20px; }
    .product-price-box .current-price { font-size: 24px; }
    .add-to-cart-btn, .buy-now-btn { font-size: 14px; padding: 12px; }
    .cart-item-img, .favorite-item-img { width: 60px; height: 60px; }
    .cart-item-name { font-size: 12px; }
    .whatsapp-icon { width: 50px; height: 50px; font-size: 24px; bottom: 80px; left: 10px; }
    .scroll-to-top { width: 40px; height: 40px; font-size: 16px; bottom: 80px; right: 10px; }
}

@media (max-width: 360px) {
    .grid { grid-template-columns: 1fr; }
    .img-box { height: 250px; }
    .best-seller-card { min-width: 120px; width: 120px; }
    .best-seller-img-container { height: 150px; }
    .review-card { min-width: 120px; width: 120px; height: 170px; }
    .review-img-container { height: 120px; }
    .reviews-track { min-height: 170px; max-height: 170px; }
}

/* ============================================================================
   القسم 16: تحسينات الوصولية والأداء
   ============================================================================ */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
}

:focus-visible {
    outline: 3px solid var(--green-light);
    outline-offset: 2px;
}

@media (hover: none) {
    .card:hover, .best-seller-card:hover, .add-btn:hover, .order-now:hover, .cart-header-icon:hover {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================================================
   قائمة واتساب المدمجة
   ============================================================================ */

.whatsapp-menu {
    position: fixed;
    bottom: 100px;
    left: 20px;
    z-index: 9998;
}

.whatsapp-main-btn {
    width: 65px;
    height: 65px;
    background: linear-gradient(145deg, #25D366, #128C7E);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    border: 3px solid white;
    animation: whatsappPulse 2s infinite;
    position: relative;
    z-index: 9999;
}

.whatsapp-main-btn i {
    font-size: 32px;
    color: white;
}

.whatsapp-main-btn:hover {
    transform: scale(1.1) rotate(5deg);
    animation: none;
}

@keyframes whatsappPulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.whatsapp-menu-items {
    position: absolute;
    bottom: 80px;
    left: 0;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    min-width: 210px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    border: 1px solid rgba(37, 211, 102, 0.3);
    z-index: 9998;
}

.whatsapp-menu-items.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.whatsapp-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    background: white;
    width: 100%;
    text-align: right;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
}

.whatsapp-menu-item i {
    font-size: 20px;
    width: 25px;
}

.whatsapp-menu-item:first-child {
    border-bottom: 1px solid #f0f0f0;
}

.whatsapp-menu-item:hover {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    color: #128C7E;
}

.whatsapp-menu-item:first-child i {
    color: #25D366;
}

.whatsapp-menu-item:last-child i {
    color: #FF9800;
}

.whatsapp-menu-item:last-child:hover i {
    color: #e65100;
}

.whatsapp-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9997;
    display: none;
}

.whatsapp-overlay.show {
    display: block;
}

@media (max-width: 768px) {
    .whatsapp-menu {
        bottom: 90px;
        left: 15px;
    }
    
    .whatsapp-main-btn {
        width: 55px;
        height: 55px;
    }
    
    .whatsapp-main-btn i {
        font-size: 28px;
    }
    
    .whatsapp-menu-items {
        min-width: 190px;
        bottom: 70px;
    }
    
    .whatsapp-menu-item {
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* ============================================================================
   تنسيق أيقونة التتبع (كلمة + أيقونة)
   ============================================================================ */

.track-order-icon {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px !important;
}

.track-order-icon i {
    font-size: 16px;
}

.track-order-icon span {
    font-size: 14px;
    font-weight: 600;
    color: inherit;
}

/* تحسين للموبايل */
@media (max-width: 768px) {
    .track-order-icon {
        padding: 0 10px !important;
    }
    
    .track-order-icon i {
        font-size: 14px;
    }
    
    .track-order-icon span {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .track-order-icon {
        padding: 0 8px !important;
        gap: 4px;
    }
    
    .track-order-icon i {
        font-size: 12px;
    }
    
    .track-order-icon span {
        font-size: 10px;
    }
}

/* ============================================================================
   أنماط صفحة المنتج المستقلة
   ============================================================================ */

.product-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-back-button-container {
    padding: 24px;
    text-align: center;
}

.back-to-products-btn {
    background: transparent;
    border: 2px solid var(--green-light);
    border-radius: var(--radius-pill);
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 700;
    color: var(--green-dark);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-to-products-btn:hover {
    background: rgba(164, 194, 165, 0.1);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* تحسينات للروابط */
.card a {
    text-decoration: none;
    color: inherit;
}

/* عند تمرير الماوس على البطاقة */
.card:hover .product-card-link {
    text-decoration: none;
}

/* ============================================================================
   أنماط زر تحديث الكاش (جديد)
   ============================================================================ */

.refresh-cache-icon {
    background: white;
    border: 1px solid var(--gray);
    color: var(--green-dark);
    border-radius: var(--radius-pill);
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0 12px;
    font-size: 18px;
    height: 46px;
    min-width: 46px;
    position: relative;
    box-shadow: var(--shadow-sm);
    gap: 4px;
}

.refresh-cache-icon i {
    font-size: 16px;
}

.refresh-cache-icon span {
    font-size: 14px;
    font-weight: 600;
}

.refresh-cache-icon:hover {
    border-color: var(--green-light);
    color: var(--green-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.refresh-cache-icon.loading {
    opacity: 0.6;
    pointer-events: none;
}

.refresh-cache-icon.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .refresh-cache-icon {
        padding: 0 10px;
        height: 40px;
        min-width: 40px;
    }
    .refresh-cache-icon i {
        font-size: 14px;
    }
    .refresh-cache-icon span {
        font-size: 12px;
    }
}

/* منع انتشار حدث النقر من شارات الألوان إلى البطاقة */
.card .product-colors {
    position: relative;
    z-index: 15;
    pointer-events: auto;
}

.card .img-box .color-dot,
.card .product-colors .color-dot {
    position: relative;
    z-index: 20;
    cursor: pointer;
}

/* منع الحدث من الوصول إلى الرابط */
.card a.product-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.card .product-colors,
.card .color-dot {
    pointer-events: auto;
}

/* ============================================================================
   تحسين زر إغلاق مودال الصور
   ============================================================================ */

/* زر الإغلاق الرئيسي */
.image-modal .close-btn-modern {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.image-modal .close-btn-modern:hover {
    background: rgba(86, 98, 70, 0.9);
    border-color: var(--green-light);
    transform: scale(1.1) rotate(90deg);
}

/* للشاشات المتوسطة */
@media (max-width: 768px) {
    .image-modal .close-btn-modern {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

/* للشاشات الصغيرة */
@media (max-width: 480px) {
    .image-modal .close-btn-modern {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
}

/* أزرار التنقل (السهم الأيمن والأيسر) */
.image-modal .nav-btn-modern {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.image-modal .nav-btn-modern:hover {
    background: rgba(86, 98, 70, 0.9);
    border-color: var(--green-light);
    transform: translateY(-50%) scale(1.1);
}

.image-modal .prev-btn {
    left: 20px;
}

.image-modal .next-btn {
    right: 20px;
}

@media (max-width: 768px) {
    .image-modal .nav-btn-modern {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    .image-modal .prev-btn { left: 10px; }
    .image-modal .next-btn { right: 10px; }
}

@media (max-width: 480px) {
    .image-modal .nav-btn-modern {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
}

/* مؤشر الصفحات (النقاط السفلية) */
.image-modal .page-indicator {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border-radius: 50px;
    z-index: 10001;
}

.image-modal .page-dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.image-modal .page-dot.active {
    width: 20px;
    background: var(--green-light);
}

/* الخلفية المظلمة */
.image-modal .modal-overlay-new {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
}

/* حاوية الصورة */
.image-modal .image-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90vw;
    max-height: 90vh;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal .modal-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

/* تحسينات لانتقالات الصور */
.main-img {
    transition: opacity 0.25s ease, transform 0.3s ease, filter 0.25s ease;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

/* تأثير دوران للـ flip */
@keyframes flipEffect {
    0% { transform: rotateY(0); }
    50% { transform: rotateY(90deg); }
    100% { transform: rotateY(0); }
}

/* تأثير تكبير */
@keyframes zoomEffect {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

/* ========== شارة التصنيف ========== */
.product-category {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 8px;
    direction: rtl;
}

.product-category i {
    margin-left: 5px;
    font-size: 10px;
}

.category-clothing {
    background: #e3f2fd;
    color: #1976d2;
}

.category-bags {
    background: #fff3e0;
    color: #f57c00;
}

.category-accessories {
    background: #f3e5f5;
    color: #7b1fa2;
}

.category-default {
    background: #e8f5e9;
    color: #2e7d32;
}

/* ============================================ */
/* قسم الثقة (الفوتر) - تنسيق موحد */
/* ============================================ */

.trust-section {
    background: #f8f9fa;
    padding: 40px 20px 25px;
    margin-top: 50px;
    border-top: 1px solid #e9ecef;
    font-family: 'Cairo', sans-serif;
}

/* شارات الثقة العلوية */
.trust-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e9ecef;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    background: white;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: #566246;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: default;
}

.trust-badge i {
    color: #a4c2a5;
    font-size: 18px;
}

.trust-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* الصف السفلي - بنفس تنسيق الشارات العلوية */
.trust-bottom-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
    margin: 20px 0 30px;
}

/* عناصر التواصل - بنفس نمط trust-badge */
.trust-social-item,
.trust-phone-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    background: white;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: #566246;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

/* فيسبوك */
.trust-social-item.facebook {
    color: #1877f2;
}

.trust-social-item.facebook i {
    color: #1877f2;
    font-size: 18px;
}

.trust-social-item.facebook:hover {
    background: #1877f2;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(24, 119, 242, 0.25);
}

.trust-social-item.facebook:hover i {
    color: white;
}

/* إنستجرام */
.trust-social-item.instagram {
    color: #d62976;
}

.trust-social-item.instagram i {
    color: #d62976;
    font-size: 18px;
}

.trust-social-item.instagram:hover {
    background: linear-gradient(45deg, #f09433, #d62976, #962fbf);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(214, 41, 118, 0.25);
}

.trust-social-item.instagram:hover i {
    color: white;
}

/* رقم الهاتف */
.trust-phone-item {
    color: #25D366;
    cursor: pointer;
    direction: ltr;
}

.trust-phone-item i {
    color: #25D366;
    font-size: 18px;
}

.trust-phone-item:hover {
    background: #25D366;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.25);
}

.trust-phone-item:hover i {
    color: white;
}

/* حقوق النشر */
.trust-copyright {
    text-align: center;
    font-size: 12px;
    color: #999;
    padding-top: 20px;
    margin-top: 10px;
    border-top: 1px solid #e9ecef;
}

/* للشاشات الصغيرة (الموبايل) */
@media (max-width: 768px) {
    .trust-badges {
        gap: 15px;
    }
    
    .trust-badge {
        padding: 6px 14px;
        font-size: 12px;
    }
    
    .trust-badge i {
        font-size: 14px;
    }
    
    .trust-bottom-row {
        gap: 15px;
    }
    
    .trust-social-item,
    .trust-phone-item {
        padding: 6px 14px;
        font-size: 12px;
    }
    
    .trust-social-item i,
    .trust-phone-item i {
        font-size: 14px;
    }
}

/* ============================================================================
   تحسينات نموذج الطلب (Order Form)
   ============================================================================ */

/* تنسيق عام لنموذج الطلب */
#orderModal .modal-content {
    max-width: 650px;
    padding: 24px;
}

/* تنسيق الصفوف (Row) */
#orderModal .row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

#orderModal .row .form-group {
    flex: 1;
    min-width: 150px;
}

/* تنسيق الحقول */
#orderModal .form-group {
    margin-bottom: 16px;
    text-align: right;
}

#orderModal .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--green-dark);
    font-size: 14px;
}

#orderModal .form-group label .required {
    color: var(--red);
    margin-right: 4px;
}

#orderModal .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray);
    border-radius: 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

#orderModal .form-control:focus {
    outline: none;
    border-color: var(--green-light);
    box-shadow: 0 0 0 3px rgba(164, 194, 165, 0.2);
}

#orderModal textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* تنسيق حقل الديبوزيت */
#orderModal input#deposit,
#orderModal input#remainingAmount {
    background: #f8f9fa;
}

#orderModal input#remainingAmount {
    background: #e8f5e9;
    font-weight: bold;
    color: var(--success);
}

/* تنسيق معلومات الدفع */
#orderModal .payment-info {
    background: #e3f2fd;
    padding: 12px 16px;
    border-radius: 12px;
    margin: 20px 0;
    font-size: 14px;
    color: #1976d2;
    display: flex;
    align-items: center;
    gap: 10px;
    border-right: 4px solid #1976d2;
}

#orderModal .payment-info i {
    font-size: 18px;
}

/* تنسيق زر الإرسال */
#orderModal .submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--green-dark), var(--green-light));
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#orderModal .submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(86, 98, 70, 0.3);
}

/* تنسيق رسالة الخطأ في النموذج */
#orderModal .input-hint {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    color: #999;
}

/* تنسيق ملخص الطلب داخل المودال */
#orderModal .order-summary {
    margin-bottom: 20px;
    background: var(--gray-light);
    border-radius: 16px;
    padding: 5px;
}

/* إصلاح مشكلة overflow */
#orderModal .modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

/* تنسيق select */
#orderModal select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23566246' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    padding-left: 36px;
}

/* توافق الموبايل */
@media (max-width: 640px) {
    #orderModal .row {
        flex-direction: column;
        gap: 0;
    }
    
    #orderModal .modal-content {
        padding: 20px;
    }
    
    #orderModal .submit-btn {
        font-size: 16px;
        padding: 12px;
    }
}

/* ============================================================================
   التصميم الجديد للمنتجات - صورة أطول + صفين منفصلين
   ============================================================================ */

/* ✅ إلغاء البطاقة بالكامل */
.grid .card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
    transition: transform 0.3s ease !important;
}

.grid .card:hover {
    transform: translateY(-5px) !important;
}

.card::before {
    display: none !important;
}

/* ✅ صورة أطول رأسياً (aspect-ratio: 3/4 يعني عرض أقل وطول أكبر) */
.grid .card .img-box {
    width: 100% !important;
    background: #f5f5f5 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    position: relative !important;
    aspect-ratio: 3 / 4 !important;  /* ← صورة أطول (عرض 3 : طول 4) */
    margin-bottom: 0 !important;
}

.grid .card .img-box .main-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.4s ease !important;
}

.grid .card .img-box:hover .main-img {
    transform: scale(1.06) !important;
}

/* ✅ منطقة البيانات - مقسمة إلى صفين */
.grid .card .info {
    padding: 10px 4px 0 4px !important;
    text-align: center !important;
    background: transparent !important;
    border: none !important;
}

/* ✅ الصف الأول: اسم المنتج + السعر */
.product-header-row {
    margin-bottom: 10px !important;
}

/* ✅ اسم المنتج */
.grid .card .info h2 {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #2c3e2f !important;
    margin: 0 0 4px 0 !important;
    line-height: 1.35 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* ✅ السعر */
.grid .card .price-range {
    justify-content: center !important;
    margin: 0 0 6px 0 !important;
    gap: 6px !important;
}

.current-price {
    font-size: 17px !important;
    font-weight: 800 !important;
    color: #1a472a !important;
}

.old-price {
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #999 !important;
}

/* ✅ الصف الثاني: التصنيف + الألوان + زر التفاصيل */
.product-footer-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 0 !important;
}

/* ✅ التصنيف */
.product-category {
    display: inline-block !important;
    margin: 0 auto !important;
    font-size: 10px !important;
    padding: 3px 10px !important;
    border-radius: 20px !important;
    font-weight: 500 !important;
}

/* ✅ الألوان */
.product-colors {
    justify-content: center !important;
    margin: 0 !important;
    gap: 5px !important;
}

.color-dot {
    width: 16px !important;
    height: 16px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
    transition: transform 0.2s ease !important;
}

.color-dot:hover {
    transform: scale(1.15) !important;
}

/* ✅ زر التفاصيل */
.add-btn {
    background: transparent !important;
    color: #1a472a !important;
    padding: 6px 14px !important;
    border-radius: 30px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    width: auto !important;
    display: inline-block !important;
    margin-top: 0 !important;
    border: 1.5px solid #1a472a !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.add-btn:hover {
    background: #1a472a !important;
    color: white !important;
    transform: translateY(-2px) !important;
}

/* ✅ شارة الأكثر مبيعاً */
.best-seller-badge {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    background: linear-gradient(135deg, #f5a623, #f7d654) !important;
    color: #000 !important;
    padding: 3px 8px !important;
    border-radius: 20px !important;
    font-size: 9px !important;
    font-weight: 700 !important;
    z-index: 5 !important;
}

/* ✅ شارة غير متوفر */
.out-of-stock-badge {
    position: absolute !important;
    bottom: 10px !important;
    left: 10px !important;
    background: rgba(0,0,0,0.7) !important;
    color: white !important;
    padding: 3px 8px !important;
    border-radius: 20px !important;
    font-size: 9px !important;
    font-weight: 600 !important;
    z-index: 5 !important;
}

/* ✅ أيقونة القلب */
.favorite-btn {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(4px) !important;
    width: 32px !important;
    height: 32px !important;
    font-size: 16px !important;
    top: 10px !important;
    left: 10px !important;
}

.favorite-btn:hover {
    transform: scale(1.1) !important;
}

/* ============================================================================
   وضع القائمة (List View)
   ============================================================================ */

.grid.list-view .card .product-card-link {
    display: flex !important;
    flex-direction: row !important;
    gap: 20px !important;
    align-items: center !important;
}

.grid.list-view .card .img-box {
    width: 140px !important;
    height: 186px !important;
    aspect-ratio: 3/4 !important;
    flex-shrink: 0 !important;
}

.grid.list-view .card .info {
    flex: 1 !important;
    text-align: right !important;
    padding: 0 !important;
}

.grid.list-view .card .price-range {
    justify-content: flex-start !important;
}

.grid.list-view .card .product-colors {
    justify-content: flex-start !important;
}

.grid.list-view .product-footer-row {
    align-items: flex-start !important;
}

/* ============================================================================
   تحسينات الموبايل
   ============================================================================ */

@media (max-width: 768px) {
    .grid {
        gap: 16px !important;
        padding: 16px !important;
    }
    
    .grid .card .info h2 {
        font-size: 13px !important;
    }
    
    .current-price {
        font-size: 15px !important;
    }
    
    .add-btn {
        padding: 5px 12px !important;
        font-size: 11px !important;
    }
    
    .product-category {
        font-size: 9px !important;
        padding: 2px 8px !important;
    }
    
    .color-dot {
        width: 14px !important;
        height: 14px !important;
    }
    
    .grid.list-view .card .img-box {
        width: 100px !important;
        height: 133px !important;
    }
}

@media (max-width: 550px) {
    .grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        padding: 12px !important;
    }
    
    .grid .card .img-box {
        aspect-ratio: 3 / 4 !important;
    }
    
    .grid .card .info h2 {
        font-size: 12px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .current-price {
        font-size: 13px !important;
    }
    
    .add-btn {
        padding: 4px 8px !important;
        font-size: 10px !important;
        border-width: 1px !important;
    }
    
    .product-footer-row {
        gap: 5px !important;
    }
    
    .grid.list-view {
        grid-template-columns: 1fr !important;
    }
    
    .grid.list-view .card .product-card-link {
        flex-direction: column !important;
        text-align: center !important;
    }
    
    .grid.list-view .card .img-box {
        width: 100% !important;
        height: auto !important;
    }
    
    .grid.list-view .card .price-range {
        justify-content: center !important;
    }
    
    .grid.list-view .card .product-colors {
        justify-content: center !important;
    }
    
    .grid.list-view .product-footer-row {
        align-items: center !important;
    }
}

@media (max-width: 380px) {
    .grid {
        grid-template-columns: 1fr !important;
    }
    
    .grid .card .img-box {
        max-width: 260px !important;
        margin: 0 auto !important;
    }
}


/* ============================================================================
   نهاية الملف
   ============================================================================ */