:root {
    --primary-color: #dc143c;
    --secondary-color: #8b0000;
    --accent-color: #228b22;
    --dark-color: #2c1810;
    --light-color: #ffffff;
    --gray-light: #f8f9fa;
    --gray-medium: #6c757d;
    --text-dark: #212529;
    --border-color: #dee2e6;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 5px 20px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    text-align: right;
    color: var(--text-dark);
    background-color: var(--light-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 16px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--light-color);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: var(--accent-color);
    color: var(--light-color);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--light-color);
}

/* Header & Navbar */
.top-bar {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 8px 0;
    font-size: 14px;
}

.navbar {
    background-color: var(--light-color);
    box-shadow: var(--shadow);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand img {
    height: 60px;
}

.nav-link {
    color: var(--text-dark);
    font-weight: 500;
    padding: 8px 15px;
    margin: 0 5px;
    border-radius: 5px;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background-color: rgba(220, 20, 60, 0.1);
}

.cart-icon {
    position: relative;
    font-size: 24px;
    color: var(--primary-color);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--accent-color);
    color: var(--light-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Hero Section */
.hero {
    background: url('../images/hero-bg.png') center center / cover no-repeat;
    color: var(--light-color);
    padding: 120px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 56px;
    font-weight: bold;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 22px;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
    .hero {
        padding: 80px 0;
        min-height: 400px;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .hero p {
        font-size: 18px;
    }
}

/* Categories */
.categories {
    padding: 80px 0;
    background-color: var(--gray-light);
}

.category-card {
    background-color: var(--light-color);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    margin-bottom: 30px;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.category-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.category-card-body {
    padding: 20px;
    text-align: center;
}

.category-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Products */
.products {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
}

.product-card {
    background-color: var(--light-color);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    margin-bottom: 30px;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--accent-color);
    color: var(--light-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
}

.product-badge.featured {
    background-color: var(--warning-color);
}

.product-badge.discount {
    background-color: var(--primary-color);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    position: relative;
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-body {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 10px;
    min-height: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    color: var(--gray-medium);
    font-size: 14px;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.price-current {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
}

.price-old {
    font-size: 16px;
    color: var(--gray-medium);
    text-decoration: line-through;
    margin-right: 10px;
}

.add-to-cart {
    width: 100%;
    padding: 10px;
    font-size: 14px;
}

@media (max-width: 768px) {
    .product-image {
        height: 180px;
    }
    
    .product-body {
        padding: 12px;
    }
    
    .product-title {
        font-size: 14px;
        min-height: 38px;
    }
    
    .price-current {
        font-size: 16px;
    }
    
    .price-old {
        font-size: 14px;
    }
    
    .add-to-cart {
        padding: 8px;
        font-size: 13px;
    }
    
    .product-overlay {
        opacity: 0 !important;
    }
}

/* Services Section */
.services {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--light-color);
}

.service-box {
    text-align: center;
    padding: 40px 20px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    transition: var(--transition);
    margin-bottom: 30px;
}

.service-box:hover {
    transform: translateY(-10px);
    background-color: rgba(255,255,255,0.2);
}

.service-icon {
    font-size: 50px;
    margin-bottom: 20px;
}

.service-box h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 60px 0 20px;
}

.footer-widget {
    margin-bottom: 30px;
}

.footer-widget h4 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 20px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--light-color);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-right: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    margin-top: 40px;
    text-align: center;
}

/* Cart */
.cart-item {
    background-color: var(--light-color);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    background-color: var(--light-color);
    color: var(--primary-color);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
}

.quantity-btn:hover {
    background-color: var(--primary-color);
    color: var(--light-color);
}

.cart-summary {
    background-color: var(--light-color);
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.summary-row.total {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
    border-bottom: none;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: var(--light-color);
    animation: spin 1s ease-in-out infinite;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .section-title h2 {
        font-size: 28px;
    }
    
    .product-image {
        height: 200px;
    }
    
    .cart-item {
        flex-direction: column;
        text-align: center;
    }
    
    .cart-summary {
        position: static;
        margin-top: 30px;
    }
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-confirmed {
    background-color: #cfe2ff;
    color: #084298;
}

.status-preparing {
    background-color: #fff3cd;
    color: #856404;
}

.status-ready {
    background-color: #d1e7dd;
    color: #0f5132;
}

.status-completed {
    background-color: #d1e7dd;
    color: #0f5132;
}

.status-cancelled {
    background-color: #f8d7da;
    color: #842029;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--light-color);
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.3s ease;
}

.close {
    color: var(--gray-medium);
    float: left;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close:hover {
    color: var(--primary-color);
}