/* تنظیمات کلی و ریست */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Tahoma, 'Segoe UI', Geneva, Verdana, sans-serif;
}

body {
    background: #63a3ac; /* رنگ پس‌زمینه ملایم‌تر */
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

/* هدر و ناوبری */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 2px solid #ff6b6b;
    margin-bottom: 25px;
    flex-wrap: wrap; /* برای موبایل */
}

.header h1 {
    font-size: 1.5rem;
    color: #4ecdc4;
}

.cart-link {
    background: #ff6b6b;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.cart-link:hover {
    animation: none;
    transform: scale(1.05);
    background: #ff5252;
}

.cart-count {
    background: white;
    color: #ff6b6b;
    padding: 2px 8px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 14px;
}

/* صفحه اصلی */
.welcome {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.2);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.menu-card {
    background: white;
    color: #333;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    border-radius: 15px;
    border: 1px solid #eee;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.menu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.menu-card img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 3px solid #f0f0f0;
}

.menu-card h3 {
    margin-bottom: 10px;
    color: #667eea;
}

.menu-card p {
    font-size: 0.9rem;
    color: #666;
}

.offer {
    background: #fff3cd;
    color: #856404;
    padding: 15px;
    text-align: center;
    border-radius: 10px;
    margin-top: 30px;
    border: 1px solid #ffeeba;
    animation: pulse 3s infinite;
}

/* لیست غذاها (صفحه غذاها) */
.food-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.food-card {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    background: white;
    transition: all 0.3s ease;
    position: relative;
}

.food-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.food-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.food-card:hover img {
    transform: scale(1.05);
}

.price {
    color: #ff6b6b;
    font-size: 16px;
    font-weight: bold;
    margin: 10px 0;
}

.add-btn {
    background: #4ecdc4;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
    transition: all 0.2s;
}

.add-btn:hover {
    background: #45b7aa;
    transform: scale(1.02);
}

.add-btn:active {
    transform: scale(0.95);
}

/* سبد خرید و فرم */
.cart-container {
    margin-top: 20px;
}

.cart-header, .cart-item {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 0.5fr;
    gap: 10px;
    align-items: center;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.cart-header {
    background: #667eea;
    color: white;
    font-weight: bold;
}

.cart-item {
    background: #f8f9fa;
    border: 1px solid #eee;
}

.cart-total {
    background: #ff6b6b;
    color: white;
    padding: 20px;
    border-radius: 10px;
    font-size: 22px;
    font-weight: bold;
    text-align: center;
    margin: 20px 0;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.customer-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin: 30px 0;
    border: 1px solid #eee;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #444;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
}

.form-group input:focus {
    border-color: #4ecdc4;
    outline: none;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.2);
}

.btn {
    background: #4ecdc4;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    margin: 5px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.3);
}

.btn-primary {
    background: #ff6b6b;
}

.btn-primary:hover {
    background: #ff5252;
}

.remove-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
}

.empty-cart {
    text-align: center;
    padding: 50px;
    background: #f8f9fa;
    border-radius: 15px;
    color: #888;
}

.back-link {
    text-align: center;
    margin: 30px 0;
   
}

.back-link a {
    color: #050000;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
     background-color: #4ecdc4;
    border-radius: 25px;
    text-decoration: none;
}

.back-link a:hover {
    color: #667eea;
}

/* فاکتور */
.customer-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border-right: 4px solid #667eea;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
}

.cart-table th, .cart-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.cart-table th {
    background: #f0f0f0;
    color: #555;
}

.cart-table tr:last-child td {
    border-bottom: none;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
    }
    
    .menu-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .cart-header, .cart-item {
        grid-template-columns: 2fr 1fr 1fr; /* حذف ستون حذف در موبایل */
        font-size: 14px;
    }
    
    .cart-header > :nth-child(4), 
    .cart-item > :nth-child(4) {
        display: none; /* مخفی کردن دکمه حذف در موبایل */
    }
    
    .food-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .food-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-header, .cart-item {
        grid-template-columns: 1fr 1fr;
        text-align: center;
    }
    
    .cart-header > :nth-child(3), 
    .cart-item > :nth-child(3) {
        display: none;
    }
    
    .btn {
        width: 100%;
        margin: 5px 0;
    }
}

/* انیمیشن‌ها */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 107, 107, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.food-card, .menu-card {
    animation: fadeInUp 0.5s ease-out;
}