/* ===== 1. المتغيرات العامة ===== */
:root {
    --bg-primary: #0a1a15;
    --bg-secondary: #1a2f28;
    --bg-card: rgba(26, 47, 40, 0.95);
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --gold: #d4af37;
    --gold-dark: #b38f2c;
    --gold-light: #f4e3b1;
    --nardoo: #2c5e4f;
    --nardoo-dark: #1a3a32;
    --nardoo-light: #3e826b;
    --purple: #9b59b6;
    --purple-dark: #8e44ad;
    --blue: #3498db;
    --blue-dark: #2980b9;
    --red: #e74c3c;
    --red-dark: #c0392b;
    --green: #25D366;
    --green-dark: #128C7E;
    --glass: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 10px 30px rgba(212, 175, 55, 0.3);
    --transition: all 0.3s ease;
}

body.light-mode {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.95);
    --text-primary: #2c3e50;
    --text-secondary: #34495e;
    --glass: rgba(0, 0, 0, 0.03);
    --glass-border: rgba(0, 0, 0, 0.1);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
    min-height: 100vh;
}

.container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===== 2. شريط تقدم التمرير ===== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
    z-index: 1001;
    transition: width 0.1s;
    box-shadow: 0 0 10px var(--gold);
}

.scroll-progress::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--gold-light));
    filter: blur(5px);
}

/* ===== 3. جسيمات متحركة ===== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--gold);
    border-radius: 50%;
    opacity: 0.5;
    animation: float-particle 10s infinite linear;
}

@keyframes float-particle {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

/* ===== 4. شاشة التحميل ===== */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s;
}

.loader-spinner {
    width: 80px;
    height: 80px;
    border: 5px solid var(--gold);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== 5. نظام الإشعارات Toast ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 2px solid var(--gold);
    border-radius: 15px;
    padding: 15px 25px;
    min-width: 300px;
    max-width: 400px;
    transform: translateX(400px);
    animation: slideInRight 0.3s forwards, slideOutRight 0.3s forwards 3s;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    animation: progress 3s linear;
}

@keyframes progress {
    from { width: 100%; }
    to { width: 0%; }
}

.toast.success { border-right: 5px solid #4ade80; }
.toast.error { border-right: 5px solid #f87171; }
.toast.warning { border-right: 5px solid #fbbf24; }
.toast.info { border-right: 5px solid #60a5fa; }

.toast-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.toast.success .toast-icon { background: #4ade80; color: white; }
.toast.error .toast-icon { background: #f87171; color: white; }
.toast.warning .toast-icon { background: #fbbf24; color: black; }
.toast.info .toast-icon { background: #60a5fa; color: white; }

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.toast-message {
    font-size: 14px;
    color: var(--text-secondary);
}

.toast-close {
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.toast-close:hover {
    color: var(--gold);
    transform: scale(1.1);
}

@keyframes slideInRight {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(400px); opacity: 0; }
}

/* ===== 6. سلة التسوق الجانبية ===== */
.cart-sidebar {
    position: fixed;
    top: 0;
    left: -400px;
    width: 400px;
    height: 100vh;
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    border-left: 2px solid var(--gold);
    z-index: 2000;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow);
}

.cart-sidebar.open {
    left: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--gold);
    margin-bottom: 20px;
}

.cart-header h3 {
    color: var(--gold);
    font-size: 24px;
}

.close-cart {
    color: var(--gold);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
}

.close-cart:hover {
    transform: scale(1.2);
    color: var(--gold-light);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: var(--glass);
    border-radius: 20px;
    margin-bottom: 15px;
    border: 1px solid var(--glass-border);
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    background: var(--nardoo);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-image i {
    font-size: 30px;
    color: var(--gold);
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-weight: 700;
    margin-bottom: 5px;
    font-size: 14px;
}

.cart-item-price {
    color: var(--gold);
    font-size: 14px;
}

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

.quantity-btn {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: var(--glass);
    border: 1px solid var(--gold);
    color: var(--gold);
    cursor: pointer;
    transition: var(--transition);
}

.quantity-btn:hover {
    background: var(--gold);
    color: var(--bg-primary);
}

.cart-footer {
    border-top: 2px solid var(--gold);
    padding-top: 20px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    color: var(--gold);
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 20px;
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 800;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.checkout-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 0 30px var(--green);
}

/* ===== 7. أيقونة السلة الثابتة ===== */
.fixed-cart {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-gold);
    z-index: 999;
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.fixed-cart:hover {
    transform: scale(1.1);
    animation: none;
}

.fixed-cart i {
    font-size: 24px;
    color: var(--bg-primary);
}

.fixed-cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--red);
    color: white;
    font-size: 12px;
    font-weight: 700;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-primary);
}

/* ===== 8. أزرار الصعود والهبوط ===== */
.navigation-buttons {
    position: fixed;
    bottom: 100px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
}

.nav-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--gold);
    color: var(--gold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}

.nav-btn:hover {
    background: var(--gold);
    color: var(--bg-primary);
    transform: scale(1.1);
    box-shadow: var(--shadow-gold);
}

.up-btn {
    animation: float 2s ease-in-out infinite;
}

.down-btn {
    animation: float 2s ease-in-out infinite reverse;
}

/* ===== 9. زر العودة للأعلى ===== */
.quick-top-btn {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--gold);
    border: none;
    color: var(--bg-primary);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: var(--shadow-gold);
    transition: var(--transition);
    z-index: 998;
    animation: bounce 2s infinite;
}

.quick-top-btn:hover {
    transform: scale(1.1);
    animation: none;
}

.quick-top-btn.show {
    display: flex;
}

/* ===== 10. الشريط العلوي ===== */
.top-bar {
    background: var(--bg-secondary);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gold);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.top-bar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.top-bar-item i {
    color: var(--gold);
}

.theme-toggle {
    background: var(--glass);
    border: 1px solid var(--gold);
    border-radius: 50px;
    padding: 5px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--gold);
    color: var(--bg-primary);
}

/* ===== 11. شريط المميزات المتحرك ===== */
.marquee-bar {
    background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-dark));
    padding: 10px 0;
    overflow: hidden;
    position: relative;
    border-bottom: 2px solid var(--gold);
    box-shadow: var(--shadow);
}

.marquee-content {
    display: flex;
    animation: marquee 30s linear infinite;
    width: fit-content;
}

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

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

.marquee-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 30px;
    color: var(--bg-primary);
    font-weight: 700;
    white-space: nowrap;
    border-left: 2px solid rgba(0,0,0,0.2);
}

.marquee-item i {
    font-size: 18px;
    color: var(--bg-primary);
}

.marquee-progress {
    width: 60px;
    height: 4px;
    background: rgba(0,0,0,0.2);
    border-radius: 2px;
    overflow: hidden;
}

.marquee-progress-fill {
    height: 100%;
    background: var(--bg-primary);
    border-radius: 2px;
}

.float-item { animation: float 2s ease-in-out infinite; }
.bounce-item { animation: bounce 2s ease-in-out infinite; }
.pulse-item { animation: pulse 2s ease-in-out infinite; }
.rotate-item i { animation: rotate 4s linear infinite; }
.glow-item { animation: textGlow 2s infinite; }
.shadow-pulse-item { animation: shadowPulse 2s infinite; }

/* ===== 12. الهيدر الرئيسي ===== */
.main-header {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    padding: 20px 0;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--gold);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-5deg);
    transition: var(--transition);
    box-shadow: var(--shadow-gold);
}

.logo:hover .logo-icon {
    transform: rotate(0deg) scale(1.1);
}

.logo-icon i {
    font-size: 30px;
    color: var(--bg-primary);
}

.logo-text h1 {
    font-size: 32px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.logo-text span {
    color: var(--gold-light);
    font-size: 14px;
    font-weight: 600;
}

/* ===== 13. البحث ===== */
.search-wrapper {
    flex: 0 1 400px;
    position: relative;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--glass);
    border: 2px solid var(--glass-border);
    border-radius: 50px;
    padding: 5px 5px 5px 20px;
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 20px var(--gold);
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 0;
    color: var(--text-primary);
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

.search-box button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--gold);
    border: none;
    color: var(--bg-primary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 18px;
}

.search-box button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--gold);
}

.search-indicator {
    position: absolute;
    bottom: -25px;
    right: 0;
    font-size: 12px;
    color: var(--gold);
    animation: pulse 1.5s infinite;
}

/* ===== 14. أزرار الإجراءات ===== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--gold);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    position: relative;
}

.action-btn:hover {
    background: var(--gold);
    color: var(--bg-primary);
    transform: translateY(-3px);
    border-color: var(--gold);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--gold);
    color: var(--bg-primary);
    font-size: 12px;
    font-weight: 700;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== 15. القائمة الرئيسية ===== */
.nav-menu {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
    backdrop-filter: blur(10px);
    border-radius: 60px;
    padding: 15px 25px;
    margin: 20px 0;
    border: 2px solid var(--gold);
    box-shadow: var(--shadow-gold);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    border-radius: 40px;
    transition: var(--transition);
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: var(--gold);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: -1;
}

.nav-link:hover::before {
    transform: translateX(0);
}

.nav-link:hover {
    color: var(--bg-primary);
}

.nav-link:hover i {
    color: var(--bg-primary);
    transform: scale(1.1);
}

.nav-link.active {
    background: var(--gold);
    color: var(--bg-primary);
    box-shadow: 0 0 20px var(--gold);
}

.nav-link.active i {
    color: var(--bg-primary);
}

.nav-link i {
    color: var(--gold);
    transition: var(--transition);
    font-size: 16px;
}

/* ===== 16. نص متحرك (Typing Animation) ===== */
.typing-container {
    text-align: center;
    margin: 20px 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--gold);
    min-height: 60px;
}

.typing-cursor {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ===== 17. لوحة التاجر ===== */
.merchant-panel {
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    border-radius: 30px;
    padding: 25px;
    margin: 20px 0;
    color: white;
    box-shadow: 0 10px 30px rgba(155, 89, 182, 0.3);
    border: 2px solid var(--gold);
}

.merchant-panel h3 {
    color: white;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.merchant-panel .stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.merchant-panel .stat-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 15px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.merchant-panel .stat-item .number {
    font-size: 28px;
    font-weight: 800;
    color: var(--gold);
}

/* ===== 18. شبكة المنتجات ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin: 30px 0;
}

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

.product-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.5s ease forwards;
}

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

.product-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--bg-primary);
    padding: 5px 15px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 0 15px var(--gold);
}

.merchant-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    color: white;
    padding: 5px 12px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 0 15px var(--purple);
}

/* ===== 19. معرض الصور ===== */
.product-gallery {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.swiper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--nardoo-dark), var(--nardoo));
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swiper-pagination-bullet {
    background: var(--gold);
    width: 8px;
    height: 8px;
    opacity: 0.7;
}

.swiper-pagination-bullet-active {
    background: var(--gold);
    opacity: 1;
    width: 20px;
    border-radius: 10px;
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--gold);
    background: rgba(0, 0, 0, 0.5);
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 14px;
}

.product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    color: var(--gold);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
    line-height: 1.4;
    height: 44px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price {
    font-size: 24px;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-price small {
    font-size: 14px;
    color: var(--gold-light);
    font-weight: 400;
}

.product-stock {
    font-size: 13px;
    margin-bottom: 15px;
    padding: 5px 10px;
    border-radius: 20px;
    display: inline-block;
    align-self: flex-start;
    font-weight: 600;
}

.in-stock {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
    border: 1px solid #4ade80;
}

.low-stock {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid #fbbf24;
}

.out-of-stock {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
    border: 1px solid #f87171;
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.add-to-cart {
    flex: 2;
    padding: 12px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border: none;
    border-radius: 25px;
    color: var(--bg-primary);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
}

.add-to-cart:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--gold);
}

.add-to-cart:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wishlist-btn {
    flex: 1;
    padding: 12px;
    background: var(--glass);
    border: 1px solid var(--gold);
    border-radius: 25px;
    color: var(--gold);
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.wishlist-btn:hover {
    background: var(--gold);
    color: var(--bg-primary);
    transform: scale(1.05);
}

/* ===== 20. شارة الوقت ===== */
.product-time-badge {
    position: absolute;
    top: 60px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    color: var(--gold);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    z-index: 3;
    border: 1px solid var(--gold);
    display: flex;
    align-items: center;
    gap: 5px;
    animation: fadeIn 0.5s;
}

.product-time-badge i {
    font-size: 10px;
    color: var(--gold-light);
}

/* ===== 21. معلومات التاجر ===== */
.product-merchant-info {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    padding: 3px 8px;
    background: var(--glass);
    border-radius: 15px;
    width: fit-content;
}

.product-merchant-info i {
    color: var(--gold);
    font-size: 10px;
}

/* ===== 22. تقييم النجوم ===== */
.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.stars-container {
    display: flex;
    gap: 2px;
    direction: ltr;
}

.star {
    color: #ddd;
    font-size: 14px;
    transition: var(--transition);
}

.star.filled {
    color: var(--gold);
    text-shadow: 0 0 5px var(--gold);
}

.star.half {
    position: relative;
    color: #ddd;
}

.star.half::before {
    content: '★';
    position: absolute;
    left: 0;
    width: 50%;
    overflow: hidden;
    color: var(--gold);
}

.rating-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
    padding: 2px 8px;
    border-radius: 15px;
}

/* ===== 23. خيارات الفرز ===== */
.sort-options {
    display: flex;
    justify-content: flex-end;
    margin: 20px 0;
}

.sort-select {
    background: var(--glass);
    border: 2px solid var(--gold);
    border-radius: 30px;
    padding: 10px 25px;
    color: var(--text-primary);
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
}

.sort-select:hover {
    background: var(--gold);
    color: var(--bg-primary);
}

.sort-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* ===== 24. لوحة التحكم ===== */
.dashboard-section {
    margin: 40px 0;
}

.dashboard-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.dashboard-tab {
    padding: 12px 25px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.dashboard-tab:hover,
.dashboard-tab.active {
    background: var(--gold);
    color: var(--bg-primary);
    border-color: var(--gold);
}

.dashboard-content {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--glass);
    border: 1px solid var(--gold);
    border-radius: 30px;
    padding: 25px;
    text-align: center;
}

.stat-card i {
    font-size: 40px;
    color: var(--gold);
    margin-bottom: 15px;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--gold);
}

.stat-card .stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.chart-container {
    height: 400px;
    margin: 30px 0;
}

/* ===== 25. النوافذ المنبثقة ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    z-index: 3000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--bg-secondary);
    border: 2px solid var(--gold);
    border-radius: 30px;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
}

.modal-lg {
    max-width: 1000px;
}

/* ===== 26. الفوتر ===== */
.footer {
    background: var(--bg-secondary);
    padding: 60px 0 30px;
    margin-top: 60px;
    border-top: 3px solid var(--gold);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: var(--gold);
    font-size: 20px;
    margin-bottom: 20px;
}

.footer-col p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-col i {
    color: var(--gold);
    width: 20px;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--gold-dark);
}

/* ===== 27. الجداول ===== */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    padding: 15px 10px;
    text-align: right;
    border-bottom: 2px solid var(--gold);
    color: var(--gold);
    font-weight: 700;
}

td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--glass-border);
}

/* ===== 28. تأثيرات حركية وتحسينات للشاشات الصغيرة ===== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

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

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes textGlow {
    0%, 100% { text-shadow: 0 0 10px var(--gold); }
    50% { text-shadow: 0 0 20px var(--gold), 0 0 30px var(--gold-dark); }
}

@keyframes shadowPulse {
    0%, 100% { box-shadow: 0 0 20px var(--gold); }
    50% { box-shadow: 0 0 40px var(--gold); }
}

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

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

.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

.glow-text {
    text-shadow: 0 0 10px var(--gold);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--bg-primary);
    border: none;
    padding: 12px 30px;
    border-radius: 40px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--gold);
}

.btn-outline-gold {
    background: transparent;
    border: 2px solid var(--gold);
    color: var(--gold);
    padding: 10px 25px;
    border-radius: 40px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-outline-gold:hover {
    background: var(--gold);
    color: var(--bg-primary);
}

.admin-only {
    display: block;
}

.merchant-only {
    display: block;
}

.mouse-effect {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gold);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s;
    mix-blend-mode: difference;
}

.mouse-effect-dot {
    position: fixed;
    width: 4px;
    height: 4px;
    background: var(--gold);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: 0.1s;
}

.mouse-effect.hover {
    transform: scale(2);
    background: rgba(212, 175, 55, 0.1);
}

@media (max-width: 768px) {
    .fixed-cart {
        bottom: 80px;
        right: 15px;
        width: 50px;
        height: 50px;
    }
    
    .fixed-cart i {
        font-size: 20px;
    }
    
    .navigation-buttons {
        bottom: 80px;
        left: 15px;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .quick-top-btn {
        bottom: 20px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .typing-container {
        font-size: 18px;
    }
    
    .marquee-item {
        padding: 0 15px;
        font-size: 12px;
    }
    
    .marquee-progress {
        width: 40px;
    }
    
    .product-time-badge {
        font-size: 10px;
        padding: 3px 8px;
        top: 50px;
        right: 10px;
    }
    
    .sort-select {
        width: 100%;
        text-align: center;
    }
}
