/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #222;
    background-color: #f6f7fb;
    direction: rtl;
}

/* Custom Scrollbar */
body::-webkit-scrollbar {
    width: 7px;
}

body::-webkit-scrollbar-track {
    border-radius: 10px;
    background: #f0f0f0;
}

body::-webkit-scrollbar-thumb {
    border-radius: 50px;
    background: #dfdbdb;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles - NEW DESIGN */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.header-main {
    padding: 15px 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(102, 126, 234, 0.3);
}

/* Header Top - ENHANCED DESIGN */
.header-top {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(102, 126, 234, 0.3);
}

.header-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.header-top::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.top-links {
    display: flex;
    gap: 25px;
}

.top-links a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 25px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
}

.top-links a::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;
}

.top-links a:hover::before {
    left: 100%;
}

.top-links a:hover {
    color: #ffffff;
    background: rgba(255,255,255,0.2);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    border-color: rgba(255,255,255,0.3);
}

.top-links i {
    font-size: 14px;
    transition: all 0.3s ease;
}

.top-links a:hover i {
    transform: scale(1.3) rotate(10deg);
    color: #ffd700;
}

.top-cart {
    background: rgba(255,255,255,0.15);
    padding: 10px 20px;
    border-radius: 30px;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

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

.top-cart:hover::before {
    left: 100%;
}

.top-cart:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border-color: rgba(255,255,255,0.5);
}

.top-cart span {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.top-cart i {
    font-size: 18px;
    animation: cartPulse 2s infinite;
    color: #ffd700;
}

@keyframes cartPulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.1) rotate(-5deg);
    }
    50% {
        transform: scale(1.2) rotate(0deg);
    }
    75% {
        transform: scale(1.1) rotate(5deg);
    }
}

/* Floating notification for cart */
.top-cart::after {
    content: '🛒';
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: #ff4757;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: white;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
    animation: bounce 1s infinite;
}

.top-cart:hover::after {
    opacity: 1;
    transform: scale(1);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* Responsive adjustments for header top */
@media (max-width: 768px) {
    .header-top {
        padding: 10px 0;
    }
    
    .top-links {
        gap: 15px;
    }
    
    .top-links a {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .top-cart {
        padding: 8px 16px;
    }
    
    .top-cart span {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .header-main {
        padding: 8px 0;
    }
    
    .header-content {
        gap: 5px;
        flex-direction: row;
        justify-content: space-between;
    }
    
    .logo {
        flex: 1;
        justify-content: flex-start;
        min-width: 0;
    }
    
    .logo h1 {
        font-size: 1.1rem;
        white-space: nowrap;
        overflow: visible;
        text-overflow: unset;
        max-width: none;
        min-width: 0;
    }
    
    .logo i {
        font-size: 1.5rem;
        flex-shrink: 0;
    }
    
    .header-actions {
        gap: 5px;
        justify-content: flex-end;
        align-items: center;
    }
    
    .mobile-menu-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
        display: flex !important;
        order: 1;
    }
    
    .user-info {
        display: none !important;
    }
    
    .cart-btn, .account-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .account-btn {
        display: flex !important;
        background: rgba(255,255,255,0.2);
        border: 1px solid rgba(255,255,255,0.3);
        color: white;
        border-radius: 8px;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
    }
    
    .account-btn:hover {
        background: rgba(255,255,255,0.3);
        transform: translateY(-2px);
    }
    
    .top-cart {
        padding: 4px 8px;
        font-size: 11px;
        display: flex; /* إظهار السعر في البار العلوي */
    }
    
    .top-cart span {
        font-size: 11px;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
    }
    
    .hero-content p {
        font-size: 14px;
    }
    
    .hero-stats {
        gap: 15px;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .category-card,
    .product-card {
        padding: 15px;
    }
    
    .product-info {
        padding: 10px;
    }
    
    .categories-grid,
    .subcategories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
    
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
    
    /* جعل شبكة الفئات الفرعية صف أفقي قابل للتمرير */
    .subcategories-grid {
        display: flex !important;
        flex-direction: row;
        gap: 16px;
        overflow-x: auto;
        padding-bottom: 10px;
        justify-content: flex-start;
        align-items: flex-start;
        width: 100%;
        scrollbar-width: thin;
    }
    /* كل عنصر دائرة فقط */
    .subcategory-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        background: none !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        min-width: unset !important;
        width: unset !important;
        height: unset !important;
        margin: 0 !important;
        cursor: pointer;
    }
    .subcategory-card img {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        margin-bottom: 6px;
        border: 2px solid #764ba2;
        object-fit: cover;
        box-shadow: 0 2px 8px rgba(118,75,162,0.10);
        transition: border 0.2s, box-shadow 0.2s;
    }
    .subcategory-card.selected img {
        border: 3px solid #e74c3c;
        box-shadow: 0 4px 16px rgba(231,76,60,0.15);
    }
    .subcategory-card h4 {
        font-size: 0.85rem;
        color: #2c3e50;
        margin: 0;
        text-align: center;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
    }
    .subcategory-card p {
        display: none !important;
    }
    
    .filters {
        flex-direction: column;
        gap: 15px;
    }
}

/* Header Main */
.header-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.header-main::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    position: relative;
    z-index: 2;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.logo a:hover {
    transform: scale(1.05);
}

.logo i {
    font-size: 2.5rem;
    color: #ffd700;
    animation: logoPulse 3s infinite;
    flex-shrink: 0;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 20px;
}

.main-nav a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
}

.main-nav a::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;
}

.main-nav a:hover::before {
    left: 100%;
}

.main-nav a:hover {
    background: rgba(255,255,255,0.2);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    border-color: rgba(255,255,255,0.3);
}

.main-nav i {
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.main-nav a:hover i {
    transform: scale(1.3) rotate(10deg);
    color: #ffd700;
}

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

.cart-btn, .account-btn, .logout-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.2);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-btn:hover, .account-btn:hover, .logout-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    border-color: rgba(255,255,255,0.5);
}

.logout-btn {
    background: rgba(220, 53, 69, 0.2);
    border-color: rgba(220, 53, 69, 0.3);
}

.logout-btn:hover {
    background: rgba(220, 53, 69, 0.4);
    border-color: rgba(220, 53, 69, 0.6);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.15);
    padding: 8px 15px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.user-info:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.user-name {
    color: white;
    font-weight: 600;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.cart-count-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    font-size: 12px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('images/الماجد-فن.png') center/cover;
    opacity: 0.1;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hero-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.hero-content h2 i {
    font-size: 2rem;
    color: #ffd700;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.15);
    padding: 15px 25px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

.stat:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.25);
}

.stat i {
    font-size: 24px;
    color: #ffd700;
}

.stat span {
    font-weight: 600;
    font-size: 16px;
}

/* Categories Section */
.categories-section {
    padding: 60px 0;
    background: #fff;
    margin-bottom: 40px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: #764ba2;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.section-title i {
    color: #764ba2;
    font-size: 1.8rem;
}

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

.category-card {
    background: #fff;
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    overflow: hidden;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.category-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    position: relative;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.category-card:hover .category-image {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 35px rgba(0,0,0,0.25);
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.category-card:hover .category-image img {
    transform: scale(1.1);
}

.category-card h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.category-card p {
    color: #666;
    font-size: 14px;
}

/* Main Content */
.main-content {
    padding: 30px 0;
}

/* Filters */
.filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding: 18px 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.results-info {
    color: #888;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-actions {
    display: flex;
    gap: 10px;
}

.show-all-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.show-all-btn:hover {
    background: linear-gradient(135deg, #20c997, #28a745);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40,167,69,0.3);
}

.show-all-btn i {
    font-size: 16px;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-options i {
    color: #667eea;
    font-size: 16px;
}

.sort-options select {
    padding: 8px 18px;
    border: 1.5px solid #d1d5db;
    border-radius: 7px;
    background: #f8f9fa;
    color: #222;
    font-size: 15px;
    font-weight: 500;
    transition: border 0.2s;
}

.sort-options select:focus {
    border: 1.5px solid #667eea;
    outline: none;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.product-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.product-image {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-image:hover img {
    transform: scale(1.1);
}

.product-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.product-image:hover::before {
    opacity: 1;
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    margin-bottom: 10px;
    text-decoration: none;
    display: block;
    transition: color 0.2s;
}

.product-title:hover {
    color: #007bff;
}

.product-price {
    color: #28a745;
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 15px;
}

.add-to-cart-btn {
    background: linear-gradient(90deg, #764ba2 60%, #667eea 100%);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-to-cart-btn:hover {
    background: linear-gradient(90deg, #667eea 60%, #764ba2 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.add-to-cart-btn i {
    font-size: 14px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.page-link {
    padding: 10px 16px;
    border: none;
    background: #f0f0f0;
    color: #764ba2;
    font-weight: 600;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
}

.page-link.active, .page-link:hover {
    background: #764ba2;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(118, 75, 162, 0.3);
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 24px rgba(0,0,0,0.13);
    z-index: 2000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    border-top-left-radius: 18px;
    border-bottom-left-radius: 18px;
}

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

/* Prevent cart from closing when clicking inside */
.cart-sidebar * {
    pointer-events: auto;
}

.cart-sidebar {
    pointer-events: auto;
}

.cart-header {
    padding: 22px 24px 16px 24px;
    border-bottom: 1.5px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-size: 21px;
    font-weight: 700;
    color: #007bff;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: #dc3545;
    transform: scale(1.1);
}

.cart-items {
    flex: 1;
    padding: 18px 24px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 12px;
    background: #f8f9fa;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.cart-item:hover {
    transform: translateX(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.cart-item-image {
    width: 60px;
    height: 60px;
    background: #e9ecef;
    border-radius: 10px;
    margin-left: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

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

/* إضافة كلاسات جديدة للعناصر في السلة */
.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.cart-item-controls span {
    font-weight: 600;
    color: #495057;
    min-width: 20px;
    text-align: center;
}

.quantity-btn {
    background: #fff;
    border: 1.5px solid #d1d5db;
    color: #007bff;
    font-size: 16px;
    border-radius: 6px;
    width: 30px;
    height: 30px;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background: #007bff;
    color: #fff;
    border: 1.5px solid #007bff;
    transform: scale(1.1);
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.clear-cart-btn {
    text-align: center;
    padding: 10px;
    border-top: 1px solid #e9ecef;
}

.clear-cart-btn button {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.clear-cart-btn button:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* Login Modal */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.login-modal.open {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: #fff;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease;
}

.modal-header {
    padding: 25px 30px 20px 30px;
    border-bottom: 1.5px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: #007bff;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.modal-body {
    padding: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #495057;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus {
    border-color: #007bff;
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.form-group.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group.checkbox input {
    width: auto;
    margin: 0;
}

.login-btn {
    background: linear-gradient(90deg, #007bff 60%, #0056b3 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    padding: 15px 0;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-btn:hover {
    background: linear-gradient(90deg, #0056b3 60%, #007bff 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,123,255,0.3);
}

.form-links {
    margin-top: 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-links a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.form-links a:hover {
    color: #0056b3;
    transform: translateX(-5px);
}

/* Footer */
.footer {
    background: #2c3e50;
    color: #fff;
    padding: 50px 0 20px 0;
    margin-top: 80px;
}

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

.footer-section h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #764ba2;
}

.footer-section p {
    color: #bdc3c7;
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section ul li a:hover {
    color: #3498db;
    transform: translateX(-5px);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: #34495e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #3498db;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    color: #95a5a6;
}

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

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

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Responsive Design - Mobile Optimizations */
@media (max-width: 768px) {
    /* Container adjustments */
    .container {
        padding: 0 12px;
        max-width: 100%;
    }
    
    /* Header optimizations */
    .header-main {
        padding: 8px 0;
        position: sticky;
        top: 0;
        z-index: 1000;
    }
    
    .header-content {
        gap: 8px;
        align-items: center;
        flex-direction: row;
        justify-content: space-between;
        min-height: 50px;
    }
    
    .logo {
        flex: 1;
        justify-content: flex-start;
        min-width: 0;
        max-width: 60%;
    }
    
    .logo h1 {
        font-size: 1.1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        margin: 0;
        line-height: 1.2;
    }
    
    .logo i {
        font-size: 1.4rem;
        flex-shrink: 0;
        margin-left: 6px;
    }
    
    .main-nav {
        display: none;
    }
    
    .header-actions {
        gap: 6px;
        justify-content: flex-end;
        align-items: center;
        flex-shrink: 0;
    }
    
    .user-info {
        display: none !important;
    }
    
    .mobile-menu-btn {
        display: flex !important;
        order: 1;
        width: 38px;
        height: 38px;
        font-size: 16px;
        border-radius: 8px;
        background: rgba(255,255,255,0.2);
        border: 1px solid rgba(255,255,255,0.3);
    }
    
    .cart-btn, .account-btn {
        width: 38px;
        height: 38px;
        font-size: 16px;
        border-radius: 8px;
    }
    
    .account-btn {
        display: flex !important;
        background: rgba(255,255,255,0.2);
        border: 1px solid rgba(255,255,255,0.3);
        color: white;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
    }
    
    .account-btn:hover {
        background: rgba(255,255,255,0.3);
        transform: translateY(-2px);
    }
    
    .top-cart {
        display: none !important;
    }
    
    /* Hero section adjustments */
    .hero-section {
        padding: 20px 0;
        min-height: 200px;
    }
    
    .hero-content {
        text-align: center;
        padding: 20px 0;
    }
    
    .hero-content h2 {
        font-size: 1.6rem;
        margin-bottom: 15px;
        line-height: 1.3;
    }
    
    .hero-content p {
        font-size: 14px;
        margin-bottom: 20px;
        line-height: 1.5;
    }
    
    .hero-stats {
        gap: 15px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .stat {
        padding: 12px 16px;
        min-width: 120px;
    }
    
    .stat i {
        font-size: 1.5rem;
    }
    
    .stat span {
        font-size: 14px;
    }
    
    /* Section titles */
    .section-title {
        font-size: 1.4rem;
        margin-bottom: 20px;
        text-align: center;
    }
    
    /* Categories grid */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 30px;
    }
    
    .category-card {
        padding: 15px 12px;
        border-radius: 12px;
        min-height: 120px;
    }
    
    .category-image {
        height: 80px;
        margin-bottom: 10px;
    }
    
    .category-image img {
        border-radius: 8px;
    }
    
    .category-card h4 {
        font-size: 14px;
        margin: 0;
        line-height: 1.3;
    }
    
    /* Products grid */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .product-card {
        padding: 12px;
        border-radius: 12px;
        min-height: 200px;
    }
    
    .product-image {
        height: 120px;
        margin-bottom: 10px;
    }
    
    .product-image img {
        border-radius: 8px;
    }
    
    .product-info {
        padding: 8px 0;
    }
    
    .product-title {
        font-size: 14px;
        margin-bottom: 8px;
        line-height: 1.3;
    }
    
    .product-price {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .add-to-cart-btn {
        padding: 8px 12px;
        font-size: 13px;
        border-radius: 8px;
        width: 100%;
    }
    
    /* Filters */
    .filters {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
        padding: 15px;
        background: #f8f9fa;
        border-radius: 12px;
    }
    
    .results-info {
        text-align: center;
        font-size: 14px;
    }
    
    .sort-options {
        width: 100%;
    }
    
    .sort-options select {
        width: 100%;
        padding: 10px 12px;
        font-size: 14px;
        border-radius: 8px;
    }
    
    /* Subcategories */
    .subcategories-section {
        margin-top: 25px;
        padding: 20px 0;
    }
    
    .subcategories-section .section-title {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    
    .subcategories-dropdown select {
        width: 100%;
        padding: 12px 16px;
        font-size: 14px;
        border-radius: 10px;
    }
    
    /* Subcategories grid - horizontal scroll */
    .subcategories-grid {
        display: flex !important;
        flex-direction: row;
        gap: 12px;
        overflow-x: auto;
        padding: 10px 0;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }
    
    .subcategories-grid::-webkit-scrollbar {
        height: 4px;
    }
    
    .subcategories-grid::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 2px;
    }
    
    .subcategories-grid::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 2px;
    }
    
    .subcategory-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        background: none !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        min-width: 80px !important;
        width: 80px !important;
        height: auto !important;
        margin: 0 !important;
        cursor: pointer;
        flex-shrink: 0;
    }
    
    .subcategory-card img {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        margin-bottom: 8px;
        border: 2px solid #e9ecef;
        object-fit: cover;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        transition: all 0.3s ease;
    }
    
    .subcategory-card.selected img {
        border: 3px solid #764ba2;
        box-shadow: 0 4px 16px rgba(118,75,162,0.2);
        transform: scale(1.05);
    }
    
    .subcategory-card h4 {
        font-size: 12px;
        color: #495057;
        margin: 0;
        text-align: center;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
        line-height: 1.2;
    }
    
    .subcategory-card p {
        display: none !important;
    }
    
    /* Cart sidebar */
    .cart-sidebar {
        width: 100%;
        right: -100%;
        border-radius: 0;
    }
    
    .cart-sidebar.open {
        right: 0;
    }
    
    .cart-header {
        padding: 15px 20px;
    }
    
    .cart-header h3 {
        font-size: 18px;
    }
    
    .cart-items {
        padding: 15px 20px;
    }
    
    .cart-item {
        padding: 12px;
        margin-bottom: 12px;
        border-radius: 10px;
    }
    
    .cart-item-image {
        width: 50px;
        height: 50px;
    }
    
    .cart-item-image img {
        border-radius: 6px;
    }
    
    .cart-item-details {
        margin-right: 12px;
    }
    
    .cart-item-controls {
        gap: 8px;
    }
    
    .quantity-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: center;
    }
    
    .footer-section h4 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .footer-section p,
    .footer-section ul li a {
        font-size: 14px;
    }
    
    /* Pagination */
    .pagination {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 30px;
    }
    
    .page-link {
        padding: 8px 12px;
        font-size: 14px;
        border-radius: 6px;
        min-width: 35px;
    }
    

    
    /* Mobile menu */
    .mobile-menu {
        width: 280px;
        right: -280px;
    }
    
    .mobile-menu.open {
        right: 0;
    }
    
    .mobile-menu-header {
        padding: 15px 20px;
    }
    
    .mobile-menu-header h3 {
        font-size: 18px;
    }
    
    .mobile-menu-content {
        padding: 15px 20px;
    }
    
    .mobile-menu-content a {
        padding: 10px 14px;
        font-size: 15px;
    }
    
    .mobile-menu-content i {
        font-size: 15px;
        width: 22px;
    }
    
    /* Modals */
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header {
        padding: 20px 25px 15px;
    }
    
    .modal-header h3 {
        font-size: 16px;
    }
    
    .modal-body {
        padding: 20px 25px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 16px;
        font-size: 16px;
    }
    
    .form-actions {
        gap: 10px;
        margin-top: 20px;
    }
    
    .form-actions button {
        padding: 12px;
        font-size: 15px;
    }
    
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .pagination {
        gap: 6px;
        margin-top: 25px;
    }
    
    .page-link {
        padding: 6px 10px;
        font-size: 13px;
        min-width: 32px;
    }
}

/* Landscape orientation fixes for mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        padding: 15px 0;
        min-height: 150px;
    }
    
    .hero-content h2 {
        font-size: 1.4rem;
        margin-bottom: 10px;
    }
    
    .hero-content p {
        font-size: 13px;
        margin-bottom: 15px;
    }
    
    .hero-stats {
        gap: 12px;
    }
    
    .stat {
        padding: 8px 12px;
        min-width: 100px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .category-card {
        padding: 10px 8px;
        min-height: 100px;
    }
    
    .category-image {
        height: 60px;
        margin-bottom: 6px;
    }
    
    .category-card h4 {
        font-size: 12px;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .product-card {
        padding: 8px;
        min-height: 160px;
    }
    
    .product-image {
        height: 80px;
        margin-bottom: 6px;
    }
    
    .product-title {
        font-size: 12px;
        margin-bottom: 4px;
    }
    
    .product-price {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .add-to-cart-btn {
        padding: 5px 8px;
        font-size: 11px;
    }
}

/* High DPI displays optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .category-image img,
    .product-image img,
    .subcategory-card img,
    .cart-item-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .category-card,
    .product-card,
    .subcategory-card,
    .cart-btn,
    .account-btn,
    .mobile-menu-btn,
    .add-to-cart-btn,
    .quantity-btn,
    .page-link {
        min-height: 44px;
        min-width: 44px;
    }
    
    .mobile-menu-content a {
        min-height: 48px;
        display: flex;
        align-items: center;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        min-height: 44px;
    }
    
    .form-actions button {
        min-height: 48px;
    }
}

/* استيراد خط عربي جميل */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');

/* Subcategories Section */
.subcategories-section {
    margin-top: 40px;
    padding: 30px 0;
    border-top: 1px solid #e9ecef;
}

.subcategories-section .section-title {
    margin-bottom: 25px;
    color: #764ba2;
}

.subcategories-section .section-title i {
    color: #764ba2;
}

.subcategories-dropdown {
    display: flex;
    justify-content: center;
    align-items: center;
}

.subcategories-dropdown select {
    width: 100%;
    max-width: 400px;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    text-align: right;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.subcategories-dropdown select:focus {
    outline: none;
    border-color: #764ba2;
    box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.1);
    transform: translateY(-2px);
}

.subcategories-dropdown select:hover {
    border-color: #764ba2;
    box-shadow: 0 6px 20px rgba(118, 75, 162, 0.15);
}

.subcategories-dropdown option {
    padding: 10px;
    font-weight: 500;
    color: #495057;
    background: #fff;
}

.subcategories-dropdown option:hover {
    background: #f8f9fa;
}

/* Responsive design for subcategories dropdown */
@media (max-width: 768px) {
    .subcategories-dropdown select {
        max-width: 100%;
        font-size: 14px;
        padding: 12px 16px;
    }
    
    .subcategories-section {
        margin-top: 30px;
        padding: 20px 0;
    }
    
    .subcategories-section .section-title {
        margin-bottom: 20px;
        font-size: 18px;
    }
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #007bff;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    max-width: 300px;
    opacity: 0;
    transform: translateY(-100px);
    transition: all 0.3s ease;
}

.notification.success {
    background: #28a745;
}

.notification.error {
    background: #dc3545;
}

.notification.info {
    background: #17a2b8;
}

.notification i {
    font-size: 18px;
}

/* Remove button for cart items */
.remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.remove-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

.subcategory-card.selected {
    border-color: #e74c3c;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe6e6 100%);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.2);
    transform: translateY(-3px);
}

.subcategory-card.selected h4 {
    color: #e74c3c;
}

.subcategory-card.selected img {
    border-color: #e74c3c;
    transform: scale(1.05);
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.05) rotate(-2deg);
    }
    50% {
        transform: scale(1.1) rotate(0deg);
    }
    75% {
        transform: scale(1.05) rotate(2deg);
    }
}

/* 1. أيقونة فئات المنتجات وعناوين الأقسام */
.section-title,
.section-title i {
    color: #764ba2;
}

/* 2. زر إضافة للسلة */
.add-to-cart-btn {
    background: linear-gradient(90deg, #764ba2 60%, #667eea 100%);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.add-to-cart-btn:hover {
    background: linear-gradient(90deg, #667eea 60%, #764ba2 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

/* 3. زر العودة لأعلى الصفحة */
.scroll-to-top {
    background: #764ba2 !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 4px 16px rgba(118, 75, 162, 0.3) !important;
}
.scroll-to-top:hover {
    background: #667eea !important;
}

/* 4. Pagination numbers */
.page-link {
    color: #764ba2;
}
.page-link.active, .page-link:hover {
    background: #764ba2;
    color: #fff;
    box-shadow: 0 4px 12px rgba(118, 75, 162, 0.3);
}

/* 6. عناوين الفوتر */
.footer-section h4 {
    color: #764ba2;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #e9ecef;
    color: #667eea;
    font-size: 18px;
    border-radius: 12px;
    width: 40px;
    height: 40px;
    display: none; /* إخفاء الزر في الشاشات الكبيرة */
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.mobile-menu-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: 2px solid #667eea;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.25);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 24px rgba(0,0,0,0.13);
    z-index: 2001;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    border-top-left-radius: 18px;
    border-bottom-left-radius: 18px;
}

.mobile-menu.open {
    right: 0;
}

.mobile-menu-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-header h3 {
    color: #764ba2;
    margin: 0;
    font-size: 18px;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    color: #dc3545;
    transform: scale(1.1);
}

.mobile-menu-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.mobile-menu-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-content li {
    margin-bottom: 15px;
}

.mobile-menu-content a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #333;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.mobile-menu-content a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    transform: translateX(-5px);
}

.mobile-menu-content i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}



/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 25px 30px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 20px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #dc3545;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Cairo', sans-serif;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding: 20px 30px;
    border-top: 1px solid #e9ecef;
}

/* Order Summary */
.order-summary {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.order-summary h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 18px;
}

.order-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.order-item-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
}

.order-item-info {
    flex: 1;
}

.order-item-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.order-item-quantity {
    color: #6c757d;
    font-size: 14px;
}

.order-total {
    font-weight: 700;
    color: #667eea;
    font-size: 1.1rem;
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 15px;
}

.user-info-display {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.user-info-display h4 {
    color: #495057;
    margin-bottom: 10px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-info-display h4 i {
    color: #667eea;
}

.user-info-display p {
    margin: 5px 0;
    color: #6c757d;
    font-size: 14px;
}

.user-info-display p strong {
    color: #495057;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Cart Total and Checkout Button */
.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 700;
    color: #495057;
    font-size: 18px;
}

.cart-total span:first-child {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkout-btn {
    background: linear-gradient(90deg, #28a745 60%, #218838 100%);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    padding: 15px 0;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.checkout-btn:hover {
    background: linear-gradient(90deg, #218838 60%, #28a745 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(40,167,69,0.3);
}

/* Mobile Menu - Enhanced */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: -4px 0 24px rgba(0,0,0,0.2);
    z-index: 2001;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.mobile-menu.open {
    right: 0;
}

.mobile-menu-header {
    padding: 20px 25px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.05);
    border-top-left-radius: 20px;
}

.mobile-menu-header h3 {
    color: #ffffff;
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.mobile-menu-close {
    background: rgba(255,255,255,0.2);
    border: none;
    font-size: 20px;
    color: #ffffff;
    cursor: pointer;
    padding: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.mobile-menu-close:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.mobile-menu-content {
    flex: 1;
    padding: 20px 25px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.mobile-menu-content::-webkit-scrollbar {
    width: 4px;
}

.mobile-menu-content::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}

.mobile-menu-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}

.mobile-menu-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-content li {
    margin-bottom: 8px;
}

.mobile-menu-content a {
    display: flex;
    align-items: center;
    gap: 15px;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    padding: 16px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 16px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
}

.mobile-menu-content a::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;
}

.mobile-menu-content a:hover::before {
    left: 100%;
}

.mobile-menu-content a:hover {
    background: rgba(255,255,255,0.15);
    color: #ffffff;
    transform: translateX(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border-color: rgba(255,255,255,0.3);
}

.mobile-menu-content i {
    font-size: 18px;
    width: 24px;
    text-align: center;
    transition: all 0.3s ease;
    color: #ffd700;
}

.mobile-menu-content a:hover i {
    transform: scale(1.2) rotate(10deg);
    color: #ffffff;
}





/* Mobile Menu Button - Enhanced */
.mobile-menu-btn {
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 100%);
    border: 2px solid rgba(255,255,255,0.3);
    color: #ffffff;
    font-size: 18px;
    border-radius: 12px;
    width: 42px;
    height: 42px;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

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

.mobile-menu-btn:hover::before {
    left: 100%;
}

.mobile-menu-btn:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.2) 100%);
    color: #ffffff;
    border: 2px solid rgba(255,255,255,0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.mobile-menu-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.mobile-menu-btn i {
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.mobile-menu-btn:hover i {
    transform: scale(1.1);
}

/* Enhanced animations */
@keyframes cartPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* Mobile menu animation */
.mobile-menu.open .mobile-menu-content li {
    animation: slideInFromRight 0.3s ease forwards;
    opacity: 0;
}

.mobile-menu.open .mobile-menu-content li:nth-child(1) { animation-delay: 0.1s; }
.mobile-menu.open .mobile-menu-content li:nth-child(2) { animation-delay: 0.2s; }
.mobile-menu.open .mobile-menu-content li:nth-child(3) { animation-delay: 0.3s; }
.mobile-menu.open .mobile-menu-content li:nth-child(4) { animation-delay: 0.4s; }
.mobile-menu.open .mobile-menu-content li:nth-child(5) { animation-delay: 0.5s; }



/* Responsive adjustments for mobile */
@media (max-width: 480px) {
    
    .mobile-menu {
        width: 280px;
        right: -280px;
    }
    
    .mobile-menu.open {
        right: 0;
    }
    
    .mobile-menu-header {
        padding: 15px 20px 12px;
    }
    
    .mobile-menu-header h3 {
        font-size: 18px;
    }
    
    .mobile-menu-content {
        padding: 15px 20px;
    }
    
    .mobile-menu-content a {
        padding: 14px 18px;
        font-size: 15px;
        gap: 12px;
    }
    
    .mobile-menu-content i {
        font-size: 16px;
        width: 22px;
    }
    
    .mobile-menu-btn {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
}

/* Hide mobile menu button on desktop */
@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none !important;
    }
}

/* Show mobile menu button on mobile */
@media (max-width: 768px) {
    .top-cart {
        display: none !important;
    }
    
    .mobile-menu-btn {
        display: flex !important;
    }
}

/* Mobile User Menu */
.mobile-user-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    z-index: 2000;
    transition: right 0.3s ease;
    box-shadow: -5px 0 20px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
}

.mobile-user-menu.open {
    right: 0;
}

.mobile-user-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
}

.mobile-user-menu-header h3 {
    margin: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-user-menu-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.mobile-user-menu-close:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.mobile-user-menu-content {
    padding: 20px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.2);
}

.user-profile i {
    font-size: 3rem;
    color: #ffd700;
}

.user-profile span {
    font-size: 1.1rem;
    font-weight: 600;
}

.mobile-user-menu-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-user-menu-content li {
    margin-bottom: 10px;
}

.mobile-user-menu-content a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

.mobile-user-menu-content a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(-5px);
}

.mobile-user-menu-content i {
    font-size: 1.2rem;
    color: #ffd700;
}

/* Mobile User Menu Responsive */
@media (max-width: 480px) {
    .mobile-user-menu {
        width: 100%;
        right: -100%;
    }
    
    .mobile-user-menu-header {
        padding: 15px;
    }
    
    .mobile-user-menu-header h3 {
        font-size: 1.1rem;
    }
    
    .mobile-user-menu-content {
        padding: 15px;
    }
    
    .user-profile {
        padding: 15px;
    }
    
    .user-profile i {
        font-size: 2.5rem;
    }
    
    .user-profile span {
        font-size: 1rem;
    }
    
    .mobile-user-menu-content a {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
}