   :root {
            --primary: #3cbbeb;
            --primary-light: #66d4f2;
            --secondary: #ced5d5;
            --accent: #845c3c;
            --white: #ffffff;
            --text-dark: #845c3c;
            --navbar-bg: #ffffff;
            --navbar-shadow: rgba(132, 92, 60, 0.15);
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Rubik', sans-serif;
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            min-height: 100vh;
            overflow-x: hidden;
            color: var(--text-dark);
        }
        
        /* Smooth Animations */
        .fade-in {
            animation: fadeIn 0.8s ease-in;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .slide-in {
            animation: slideIn 0.6s ease-out;
        }
        
        @keyframes slideIn {
            from { transform: translateX(-50px); opacity: 0; }
            to { transform: translateX(0); opacity: 1; }
        }
        
        /* Header - White Navbar */
        .navbar {
            background: var(--navbar-bg) !important;
            box-shadow: 0 5px 30px var(--navbar-shadow);
            padding: 0.8rem 0;
            position: sticky;
            top: 0;
            z-index: 1000;
            backdrop-filter: blur(10px);
            border-bottom: 3px solid var(--primary);
        }
        
        .navbar-brand {
            display: flex;
            align-items: center;
            gap: 1rem;
            transition: transform 0.3s ease;
        }
        
        .navbar-brand:hover {
            transform: scale(1.05);
        }
        
        .navbar-brand img {
            height: 55px;
            filter: drop-shadow(0 3px 8px rgba(60,187,235,0.3));
            transition: all 0.3s ease;
        }
        
        .navbar-brand:hover img {
            filter: drop-shadow(0 5px 15px rgba(60,187,235,0.4));
        }
        
        .nav-link {
            color: var(--text-dark) !important;
            font-weight: 500;
            margin: 0 0.5rem;
            padding: 0.5rem 1rem !important;
            transition: all 0.3s ease;
            position: relative;
            border-radius: 8px;
        }
        
        .nav-link:hover {
            background: rgba(60,187,235,0.1);
            color: var(--primary) !important;
            transform: translateY(-2px);
        }
        
        .nav-link.active {
            background: rgba(60,187,235,0.2);
            color: var(--primary) !important;
            font-weight: 600;
        }
        
        .nav-link i {
            margin-left: 0.3rem;
            font-size: 1.1rem;
        }
        
        .btn-login {
            background: var(--primary);
            color: var(--white);
            border: 2px solid var(--primary);
            padding: 0.6rem 1.8rem;
            border-radius: 30px;
            font-weight: 600;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(60,187,235,0.4);
        }
        
        .btn-login:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(60,187,235,0.6);
            background: var(--primary-light);
            border-color: var(--primary-light);
            color: var(--white);
        }
        
        .navbar-toggler {
            border: none;
            padding: 0.5rem;
            color: var(--text-dark);
        }
        
        .navbar-toggler:focus {
            box-shadow: none;
        }
        
        /* Balance Display */
        .balance-container {
            padding: 1.5rem 0;
            background: linear-gradient(180deg, rgba(60,187,235,0.05) 0%, transparent 100%);
        }
        
        .balance-display {
            background: linear-gradient(135deg, var(--accent) 0%, #6b4628 100%);
            color: var(--white);
            padding: 1.2rem 2.5rem;
            border-radius: 20px;
            display: inline-flex;
            align-items: center;
            gap: 0.8rem;
            box-shadow: 0 8px 30px rgba(132, 92, 60, 0.4);
            animation: balancePulse 3s ease-in-out infinite;
            position: relative;
            overflow: hidden;
        }
        
        .balance-display::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
            animation: rotateGlow 8s linear infinite;
        }
        
        @keyframes balancePulse {
            0%, 100% { transform: scale(1); box-shadow: 0 8px 30px rgba(132, 92, 60, 0.4); }
            50% { transform: scale(1.03); box-shadow: 0 12px 40px rgba(132, 92, 60, 0.6); }
        }
        
        @keyframes rotateGlow {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }
        
        .balance-icon {
            font-size: 2rem;
            position: relative;
            z-index: 1;
        }
        
        .balance-text {
            font-size: 1rem;
            font-weight: 500;
            position: relative;
            z-index: 1;
        }
        
        .balance-amount {
            font-size: 1.8rem;
            font-weight: 800;
            position: relative;
            z-index: 1;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
        }
        
        /* Banner Section */
        .banner-section {
            background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
            color: var(--white);
            padding: 1.5rem;
            text-align: center;
            overflow: hidden;
            position: relative;
            box-shadow: 0 4px 20px rgba(60, 187, 235, 0.3);
        }
        
        .banner-section::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
            animation: shimmer 3s infinite;
        }
        
        @keyframes shimmer {
            0%, 100% { transform: translateX(-100%); }
            50% { transform: translateX(100%); }
        }
        
        .banner-text {
    animation: slideText 25s linear infinite;
    white-space: nowrap;
    display: inline-block;
    direction: rtl;          /* مهم جدًا */
    unicode-bidi: plaintext; /* يحافظ على ترتيب الجملة */
    text-align: right;
}
        
     @keyframes slideText {
    from { transform: translateX(-100%); }
    to   { transform: translateX(100%); }
}
        
        .banner-image {
            max-width: 100%;
            max-height: 200px;
            height: auto;
            border-radius: 15px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.3);
            position: relative;
            z-index: 1;
        }
        
        /* Section Title */
        .section-title {
            font-size: 2rem;
            font-weight: 800;
            color: var(--primary);
            text-align: center;
            margin-bottom: 2rem;
            position: relative;
            padding-bottom: 1rem;
        }
        
        .section-title::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 80px;
            height: 4px;
            background: linear-gradient(90deg, transparent, var(--primary-light), transparent);
            border-radius: 2px;
        }
        
        /* Products Header */
        .products-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 2rem;
            flex-wrap: wrap;
            gap: 1rem;
        }
        
        .view-all-btn {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
            border: none;
            color: var(--white);
            padding: 0.8rem 2rem;
            border-radius: 30px;
            font-weight: 600;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            transition: all 0.3s ease;
            box-shadow: 0 5px 20px rgba(60,187,235,0.3);
            font-size: 1rem;
        }
        
        .view-all-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 30px rgba(60,187,235,0.5);
            color: var(--white);
            text-decoration: none;
        }
        
        .view-all-btn i {
            font-size: 1.2rem;
            transition: transform 0.3s ease;
        }
        
        .view-all-btn:hover i {
            transform: translateX(-5px);
        }
        
        /* Auction Section */
        .auction-section {
            background: var(--white);
            border-radius: 25px;
            padding: 2.5rem;
            margin: 3rem auto;
            box-shadow: 0 15px 60px rgba(0,0,0,0.15);
            max-width: 1200px;
            position: relative;
            overflow: hidden;
            animation: fadeIn 0.8s ease-in;
            border: 3px solid rgba(60,187,235,0.1);
        }
        
        .auction-card {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
            border-radius: 20px;
            padding: 2.5rem;
            color: var(--white);
            cursor: pointer;
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            position: relative;
            overflow: hidden;
            border: 3px solid transparent;
        }
        
        .auction-card:hover {
            transform: translateY(-10px) scale(1.02);
            box-shadow: 0 20px 60px rgba(60, 187, 235, 0.4);
            border-color: rgba(255,255,255,0.3);
        }
        
        .auction-card::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
            animation: rotateGlow 12s linear infinite;
        }
        
        .auction-image {
            width: 100%;
            max-width: 320px;
            height: 320px;
            object-fit: cover;
            border-radius: 20px;
            margin-bottom: 1.5rem;
            box-shadow: 0 10px 40px rgba(0,0,0,0.3);
            border: 4px solid rgba(255,255,255,0.2);
            transition: all 0.3s ease;
        }
        
        .auction-card:hover .auction-image {
            transform: scale(1.05);
            box-shadow: 0 15px 50px rgba(0,0,0,0.4);
        }
        
        .auction-badge {
            position: absolute;
            top: 15px;
            right: 15px;
            background: var(--accent);
            color: var(--white);
            padding: 0.5rem 1rem;
            border-radius: 25px;
            font-weight: 600;
            font-size: 0.9rem;
            box-shadow: 0 4px 15px rgba(132, 92, 60, 0.5);
            animation: badgePulse 2s ease-in-out infinite;
        }
        
        @keyframes badgePulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.1); }
        }
        
        .auction-title {
            font-size: 2rem;
            font-weight: 700;
            margin-bottom: 1.5rem;
            text-shadow: 2px 2px 8px rgba(0,0,0,0.2);
            position: relative;
            z-index: 1;
        }
        
        .countdown-timer {
            background: rgba(255,255,255,0.25);
            backdrop-filter: blur(10px);
            padding: 1.5rem;
            border-radius: 15px;
            margin: 1.5rem 0;
            font-size: 1.4rem;
            font-weight: 700;
            text-align: center;
            box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
            position: relative;
            z-index: 1;
        }
        
        .auction-info {
            display: flex;
            gap: 2rem;
            justify-content: center;
            flex-wrap: wrap;
            margin: 1.5rem 0;
            position: relative;
            z-index: 1;
        }
        
        .info-item {
            background: rgba(255,255,255,0.15);
            padding: 1rem 1.5rem;
            border-radius: 12px;
            backdrop-filter: blur(5px);
            transition: all 0.3s ease;
        }
        
        .info-item:hover {
            background: rgba(255,255,255,0.25);
            transform: translateY(-3px);
        }
        
        .waiting-message {
            text-align: center;
            padding: 3rem;
        }
        
        .waiting-icon {
            font-size: 5rem;
            color: var(--primary);
            animation: bounce 2s ease-in-out infinite;
        }
        
        @keyframes bounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-20px); }
        }
        
        /* Products Section */
        .products-section {
            max-width: 1200px;
            margin: 3rem auto;
            padding: 0 1rem;
        }
        
        .product-card {
            background: var(--white);
            border-radius: 20px;
            overflow: hidden;
            box-shadow: 0 8px 30px rgba(0,0,0,0.12);
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            cursor: pointer;
            margin-bottom: 2rem;
            border: 2px solid transparent;
            position: relative;
        }
        
        .product-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, var(--primary), var(--primary-light));
            transform: scaleX(0);
            transition: transform 0.4s ease;
        }
        
        .product-card:hover {
            transform: translateY(-12px);
            box-shadow: 0 20px 50px rgba(60, 187, 235, 0.25);
            border-color: var(--primary);
        }
        
        .product-card:hover::before {
            transform: scaleX(1);
        }
        
        .product-image {
            width: 100%;
            height: 280px;
            object-fit: cover;
            transition: all 0.5s ease;
        }
        
        .product-card:hover .product-image {
            transform: scale(1.1);
        }
        
        .product-body {
            padding: 1.8rem;
        }
        
        .product-name {
            font-size: 1.3rem;
            font-weight: 700;
            color: var(--text-dark);
            margin-bottom: 0.8rem;
            transition: color 0.3s ease;
        }
        
        .product-card:hover .product-name {
            color: var(--primary);
        }
        
        .product-price {
            font-size: 1.6rem;
            font-weight: 800;
            color: var(--primary);
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .btn-view-product {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
            border: none;
            color: var(--white);
            padding: 0.9rem 2rem;
            border-radius: 30px;
            font-weight: 600;
            transition: all 0.3s ease;
            width: 100%;
            box-shadow: 0 5px 20px rgba(60, 187, 235, 0.3);
        }
        
        .btn-view-product:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 30px rgba(60, 187, 235, 0.5);
            background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
            color: var(--white);
        }
        
        /* Modal & Buttons */
        .modal-content {
            border-radius: 25px;
            border: none;
            overflow: hidden;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
        }
        
        .modal-header {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
            color: var(--white);
            border-radius: 25px 25px 0 0;
            padding: 1.5rem 2rem;
        }
        
        .form-control, .form-select {
            border-radius: 12px;
            border: 2px solid #e0e0e0;
            padding: 0.8rem 1.2rem;
            transition: all 0.3s ease;
        }
        
        .form-control:focus, .form-select:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 0.2rem rgba(60, 187, 235, 0.25);
        }
        
        .btn-primary {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
            border: none;
            border-radius: 30px;
            padding: 0.9rem 2.5rem;
            font-weight: 700;
            transition: all 0.3s ease;
            box-shadow: 0 5px 20px rgba(60, 187, 235, 0.3);
        }
        
        .btn-primary:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 30px rgba(60, 187, 235, 0.5);
        }
        
        /* Toast */
        .toast {
            border-radius: 15px;
            box-shadow: 0 8px 30px rgba(0,0,0,0.25);
            border: none;
            backdrop-filter: blur(10px);
        }
        
        .toast-header {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
            color: var(--white);
            border-radius: 15px 15px 0 0;
            border-bottom: none;
        }
        /* Mobile Product Improvements */
@media (max-width: 576px) {
    
    .product-card {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        height: auto;
    }
    
    .product-image-container {
        width: 35%;
        flex-shrink: 0;
    }
    
    .product-image {
        height: 100%;
        min-height: 130px;
        object-fit: cover;
    }
    
    .product-body {
        padding: 1rem;
        width: 65%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    .product-name {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }
    
    .product-desc {
        font-size: 0.85rem;
        color: #6c757d;
        line-height: 1.4;
        margin-bottom: 0.5rem;
    }
    
    .product-price {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .btn-view-product {
        padding: 0.5rem;
        font-size: 0.85rem;
        border-radius: 20px;
    }
}
        /* Footer */
        footer {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
            color: var(--white);
            padding: 2rem 0;
            margin-top: 4rem;
            text-align: center;
            box-shadow: 0 -5px 30px rgba(60, 187, 235, 0.3);
        }
        
        /* Loading */
        .loading-spinner {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 3px solid rgba(255,255,255,0.3);
            border-radius: 50%;
            border-top-color: var(--white);
            animation: spin 1s ease-in-out infinite;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        
        /* Responsive */
        @media (max-width: 768px) {
            .products-header {
                justify-content: center;
                text-align: center;
            }
            
            .view-all-btn {
                margin-top: 1rem;
            }
            
            .navbar-brand img {
                height: 45px;
            }
            
            .balance-amount {
                font-size: 1.4rem;
            }
        }
        
        html {
            scroll-behavior: smooth;
        }
        
        .nav-balance {
    display: flex;
    gap: 0.5rem;
    white-space: nowrap;
}

.balance-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.6rem;
    background: #f8f9fa;
    border-radius: 10px;
    font-size: 0.85rem;
}

.balance-item i {
    font-size: 1.1rem;
    color: #0d6efd;
}

.balance-item.reserved {
    background: #fff3cd;
}

@media (max-width: 768px) {
    .nav-balance {
        display: none;
    }
}

.nav-balance-inline {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

.nav-balance-inline .balance {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.6rem;
    border-radius: 10px;
    background: #f8f9fa;
}

.nav-balance-inline .balance i {
    font-size: 1.1rem;
}

.nav-balance-inline .available i {
    color: #198754; /* أخضر */
}

.nav-balance-inline .reserved i {
    color: #dc3545; /* أحمر */
}

.balance-separator {
    color: #999;
    font-weight: bold;
}
.toast.bg-success {
    background: linear-gradient(135deg, #198754, #28a745);
}

.toast.bg-danger {
    background: linear-gradient(135deg, #dc3545, #b02a37);
}

.toast.bg-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #000 !important;
}

.toast.bg-info {
    background: linear-gradient(135deg, #0dcaf0, #0aa2c0);
}
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s ease;
}

.popup-box {
    position: relative;
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: slideUp 0.6s ease;
}

.popup-image {
    width: 100%;
    height: auto;
    display: block;
}

.popup-close {
    position: absolute;
    top: 8px;
    left: 12px;
    background: rgba(0,0,0,0.7);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    padding: 0 10px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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