/* Cart Page Styles */
.cart-section {
    padding: 3rem 0;
    min-height: 70vh;
}

.cart-header {
    text-align: center;
    margin-bottom: 2rem;
}

.cart-header h1 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.cart-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 992px) {
    .cart-container {
        grid-template-columns: 2fr 1fr;
    }
}

/* Cart Items */
.cart-items {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

body.dark-mode .cart-items {
    background: #2d3748;
    color: #e2e8f0;
}

.empty-cart {
    text-align: center;
    padding: 3rem;
}

.empty-cart i {
    font-size: 4rem;
    color: var(--light-gray);
    margin-bottom: 1rem;
}

.empty-cart h3 {
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.empty-cart p {
    color: var(--gray);
    margin-bottom: 2rem;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--light-gray);
    transition: var(--transition);
}

body.dark-mode .cart-item {
    border-bottom: 1px solid #4a5568;
}

.cart-item:hover {
    background: rgba(0,0,0,0.02);
}

body.dark-mode .cart-item:hover {
    background: rgba(255,255,255,0.02);
}

.cart-item:last-child {
    border-bottom: none;
}

.item-image {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, #667eea 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.item-details {
    flex: 1;
}

.item-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--primary);
}

.item-price {
    color: var(--gray);
    font-size: 0.9rem;
}

.item-restaurant {
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 0.25rem;
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--light-gray);
    border-radius: 20px;
    padding: 4px;
}

body.dark-mode .quantity-control {
    background: #4a5568;
}

.quantity-btn {
    background: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    color: var(--dark);
    transition: var(--transition);
}

body.dark-mode .quantity-btn {
    background: #2d3748;
    color: #e2e8f0;
}

.quantity-btn:hover {
    background: var(--primary);
    color: white;
}

body.dark-mode .quantity-btn:hover {
    background: var(--primary);
    color: white;
}

.quantity {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    color: var(--dark);
}

body.dark-mode .quantity {
    color: #e2e8f0;
}

.item-total {
    font-weight: 700;
    color: var(--primary);
    min-width: 80px;
    text-align: right;
}

.remove-btn {
    background: none;
    border: none;
    color: #ff4444;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.remove-btn:hover {
    background: rgba(255, 68, 68, 0.1);
}

/* Clear Cart Button */
.clear-cart-container {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--light-gray);
    text-align: center;
}

body.dark-mode .clear-cart-container {
    border-top: 2px solid #4a5568;
}

/* Cart Summary */
.cart-summary {
    position: sticky;
    top: 100px;
}

.summary-card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

body.dark-mode .summary-card {
    background: #2d3748;
    color: #e2e8f0;
}

.summary-card h3 {
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.summary-details {
    margin-bottom: 2rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--light-gray);
}

body.dark-mode .summary-row {
    border-bottom: 1px solid #4a5568;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row.total {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--light-gray);
}

body.dark-mode .summary-row.total {
    border-top: 2px solid #4a5568;
}

.restaurant-info {
    background: var(--light);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

body.dark-mode .restaurant-info {
    background: #4a5568;
}

.restaurant-info h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.delivery-note {
    background: #FFF3CD;
    color: #856404;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 8px;
    border-left: 4px solid #FFC107;
}

body.dark-mode .delivery-note {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid #d97706;
}

.delivery-note i {
    color: #856404;
}

body.dark-mode .delivery-note i {
    color: #92400e;
}

.btn-block {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlide 0.3s ease;
    transition: var(--transition);
}

body.dark-mode .modal-content {
    background: #2d3748;
    color: #e2e8f0;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--light-gray);
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
    transition: var(--transition);
}

body.dark-mode .modal-header {
    background: #2d3748;
    border-bottom: 1px solid #4a5568;
}

.modal-header h2 {
    color: var(--primary);
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--light-gray);
    color: var(--dark);
}

body.dark-mode .modal-close {
    color: #cbd5e0;
}

body.dark-mode .modal-close:hover {
    background: #4a5568;
    color: #e2e8f0;
}

.modal-body {
    padding: 1.5rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary);
}

.form-group label i {
    color: var(--secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
    color: var(--dark);
}

body.dark-mode .form-group input,
body.dark-mode .form-group textarea,
body.dark-mode .form-group select {
    background: #4a5568;
    border: 2px solid #4a5568;
    color: #e2e8f0;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group textarea:focus,
body.dark-mode .form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(144, 205, 244, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.order-summary {
    background: var(--light);
    padding: 1rem;
    border-radius: var(--radius);
    margin: 1.5rem 0;
    transition: var(--transition);
}

body.dark-mode .order-summary {
    background: #4a5568;
}

.order-summary h4 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.modal-order-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

body.dark-mode .modal-order-item {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.modal-order-item:last-child {
    border-bottom: none;
}

.modal-order-restaurant {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-gray);
    color: var(--primary);
}

body.dark-mode .modal-order-restaurant {
    border-bottom: 2px solid #4a5568;
}

.modal-order-restaurant i {
    font-size: 1.2rem;
}

.order-total {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    color: var(--primary);
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid rgba(0,0,0,0.1);
}

body.dark-mode .order-total {
    border-top: 2px solid rgba(255,255,255,0.1);
}

.note {
    text-align: center;
    color: var(--gray);
    font-size: 0.9rem;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.note i {
    color: var(--accent);
}

/* Responsive Cart */
@media (max-width: 768px) {
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .item-image {
        width: 100%;
        height: 120px;
    }
    
    .item-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .modal-content {
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }
}