:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --success: #27ae60;
    --warning: #f39c12;
    --light: #f5f5f5;
    --dark: #34495e;
    --gray: #95a5a6;
    --border-radius: 10px;
    --box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* شريط التنقل */
.navbar {
    background: var(--primary);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.logo {
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.nav-links a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
    padding: 5px 10px;
    border-radius: 5px;
}

.nav-links a:hover {
    color: var(--secondary);
    background: rgba(255,255,255,0.1);
}

.cart-icon {
    position: relative;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    transition: var(--transition);
}

.cart-icon:hover {
    color: var(--secondary);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* الهيدر */
.header {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 80px 20px;
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.header p {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

.search-box {
    max-width: 600px;
    margin: 30px auto;
    display: flex;
}

.search-box input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-size: 16px;
    outline: none;
}

.search-box button {
    background: var(--success);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
}

.search-box button:hover {
    background: #219653;
}

/* الفلاتر */
.filters {
    background: white;
    padding: 20px;
    margin: 20px 5%;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--light);
    border: 2px solid transparent;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn:hover {
    background: var(--secondary);
    color: white;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

/* المنتجات */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 40px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.product {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.product:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.product img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.product h3 {
    color: var(--primary);
    margin: 10px 0;
    font-size: 1.3em;
    height: 50px;
    overflow: hidden;
}

.product p {
    color: var(--gray);
    font-size: 0.95em;
    line-height: 1.5;
    height: 70px;
    overflow: hidden;
    margin-bottom: 15px;
}

.price {
    color: var(--accent);
    font-weight: bold;
    font-size: 22px;
    margin: 15px 0;
}

.old-price {
    color: var(--gray);
    text-decoration: line-through;
    font-size: 16px;
    margin-right: 10px;
}

.discount {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.rating {
    color: var(--warning);
    margin: 10px 0;
    font-size: 14px;
}

.btn-cart {
    background: var(--success);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
}

.btn-cart:hover {
    background: #219653;
    transform: scale(1.02);
}

.btn-cart:active {
    transform: scale(0.98);
}

/* قسم العروض */
.offers-section {
    padding: 40px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    color: var(--primary);
    margin-bottom: 40px;
    font-size: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.offers-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.offer-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--box-shadow);
}

/* سلة التسوق */
.cart-sidebar {
    position: fixed;
    top: 0;
    left: -400px;
    width: 350px;
    height: 100%;
    background: white;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    padding: 20px;
    transition: left 0.3s ease;
    overflow-y: auto;
    z-index: 1001;
}

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

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

.close-cart {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--accent);
    transition: var(--transition);
}

.close-cart:hover {
    transform: rotate(90deg);
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light);
}

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

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

.quantity-btn {
    background: var(--light);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 18px;
}

.checkout-btn {
    background: var(--secondary);
    margin-top: 20px;
}

.checkout-btn:hover {
    background: #2980b9;
}

/* الفوتر */
footer {
    background: var(--dark);
    color: white;
    padding: 40px 5%;
    margin-top: 50px;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.footer-section h3 {
    border-bottom: 2px solid var(--secondary);
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: white;
}

.footer-section a {
    color: #ddd;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--secondary);
    padding-right: 5px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 24px;
    margin: 20px 0;
}

.social-icons a {
    color: white;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icons a:hover {
    color: var(--secondary);
    background: rgba(255,255,255,0.2);
    transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 992px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .products {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .cart-sidebar {
        width: 100%;
        left: -100%;
    }
    
    .filters {
        margin: 10px;
        padding: 15px;
    }
    
    .filter-btn {
        padding: 8px 15px;
        font-size: 13px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 60px 15px;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-box input,
    .search-box button {
        border-radius: var(--border-radius);
        width: 100%;
    }
    
    .products {
        grid-template-columns: 1fr;
    }
}