/* 主体布局 */
.order-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 100px auto 2rem;
    padding: 0 1rem;
}

/* 菜品列表区域 */
.menu-section {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem;
}

/* 分类导航 */
.category-nav {
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.category-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    padding: 1rem 0;
}

.category-nav li {
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.3s;
}

.category-nav li:hover {
    background-color: #f8f9fa;
    color: #e74c3c;
}

.category-nav li.active {
    background-color: #e74c3c;
    color: white;
}

/* 菜品网格 */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* 菜品卡片 */
.menu-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.menu-item:hover {
    transform: translateY(-5px);
}

.menu-image {
    height: 200px;
    overflow: hidden;
}

.menu-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.menu-item:hover .menu-image img {
    transform: scale(1.1);
}

.menu-info {
    padding: 1rem;
}

.menu-info h3 {
    margin: 0 0 0.5rem;
    color: #2c3e50;
}

.description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.menu-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    color: #e74c3c;
    font-weight: bold;
    font-size: 1.2rem;
}

/* 数量控制 */
.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-control button {
    width: 24px;
    height: 24px;
    border: none;
    background: #f8f9fa;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.quantity-control button:hover {
    background: #e74c3c;
    color: white;
}

.quantity-control input {
    width: 40px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px;
}

/* 购物车区域 */
.cart-section {
    position: sticky;
    top: 100px;
    align-self: start;
}

.cart-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1.5rem;
}

.cart-container h2 {
    margin: 0 0 1.5rem;
    color: #2c3e50;
}

.cart-items {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: bold;
    color: #2c3e50;
}

.cart-item-price {
    color: #e74c3c;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-summary {
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: bold;
}

.total-price {
    color: #e74c3c;
}

.checkout-btn {
    width: 100%;
    padding: 0.8rem;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.checkout-btn:hover {
    background: #c0392b;
}

.checkout-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 订单表单 */
.order-form {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.order-form h2 {
    margin: 0 0 1.5rem;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.submit-btn {
    width: 100%;
    padding: 0.8rem;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-btn:hover {
    background: #c0392b;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .order-container {
        grid-template-columns: 1.5fr 1fr;
    }
}

@media (max-width: 768px) {
    .order-container {
        grid-template-columns: 1fr;
    }

    .cart-section {
        position: static;
        margin-top: 2rem;
    }

    .category-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .menu-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 480px) {
    .menu-meta {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .quantity-control {
        width: 100%;
        justify-content: space-between;
    }
} 