/* الأساسيات */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-brown: #8B4513;
    --light-brown: #A0522D;
    --caramel: #D2691E;
    --beige: #F5F5DC;
    --gold: #FFD700;
    --white: #FFFFFF;
    --dark-text: #333333;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--beige);
    color: var(--dark-text);
    line-height: 1.6;
    direction: rtl;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* الهيدر */
.header {
    background: linear-gradient(135deg, var(--primary-brown), var(--light-brown));
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.logo {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* أقسام المنيو */
.menu-section {
    margin: 3rem 0;
    padding: 2rem 0;
    border-bottom: 2px solid var(--gold);
}

.menu-section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-size: 2rem;
    color: var(--primary-brown);
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 50%;
    transform: translateX(50%);
    width: 100px;
    height: 3px;
    background: var(--gold);
}

/* عناصر المنيو */
.menu-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.menu-item {
    background: var(--white);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: var(--gold);
}

.item-image {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.menu-item:hover .item-image img {
    transform: scale(1.05);
}

.item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-name {
    font-size: 1.4rem;
    color: var(--primary-brown);
    margin-bottom: 0.5rem;
}

.item-code {
    color: var(--light-brown);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.item-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--caramel);
    margin-bottom: 1rem;
}

/* عناصر التحكم بالكمية */
.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: auto;
}

.quantity-btn {
    background: var(--primary-brown);
    color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background: var(--light-brown);
    transform: scale(1.1);
}

.quantity-input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 2px solid var(--primary-brown);
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
}

/* ملخص الطلب */
.order-summary {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 1rem 0;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.1);
    border-top: 3px solid var(--gold);
    z-index: 1000;
}

.summary-title {
    color: var(--primary-brown);
    margin-bottom: 1rem;
    text-align: center;
}

.order-items {
    max-height: 150px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.total-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-brown);
    text-align: center;
    margin-bottom: 1rem;
}

.checkout-btn {
    background: linear-gradient(135deg, var(--primary-brown), var(--light-brown));
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
    width: 200px;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}

.checkout-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* نموذج الطلب */
.order-form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.order-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.order-form h3 {
    color: var(--primary-brown);
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--dark-text);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-brown);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.cancel-btn, .submit-btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn {
    background: #ccc;
    color: var(--dark-text);
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary-brown), var(--light-brown));
    color: var(--white);
}

.cancel-btn:hover, .submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* التجاوب مع الأجهزة المختلفة */
@media (max-width: 768px) {
    .logo {
        font-size: 2.5rem;
    }
    
    .menu-items {
        grid-template-columns: 1fr;
    }
    
    .order-summary {
        padding: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .cancel-btn, .submit-btn {
        width: 100%;
    }
    
    .menu-section {
        margin: 2rem 0;
        padding: 1rem 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .menu-item {
        padding: 1rem;
    }
    
    .item-image {
        height: 150px;
    }
}