/* static/css/checkout.css */

:root {
    --primary-color: #ff6b35;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --border-light: #e9ecef;
    --shadow-light: 0 4px 15px rgba(0,0,0,0.08);
}

body, main {
    background-color: var(--white);
}

.checkout-page {
    padding: 60px 20px;
    background-color: var(--white);
}

.checkout-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
}

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

.checkout-form-container {
    background: var(--white);
}

.order-summary-container {
    background-color: var(--bg-light);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.checkout-title,
.order-summary-container .checkout-subtitle {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 30px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    display: inline-block;
}

.order-summary-container .checkout-subtitle {
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-bottom: none;
    padding-bottom: 0;
}

.checkout-form-container .form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .checkout-form-container .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

.checkout-form-container .form-group {
    margin-bottom: 25px;
}

.checkout-form-container .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.checkout-form-container .form-group input,
.checkout-form-container .form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-dark);
    background-color: var(--white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.checkout-form-container .form-group input:focus,
.checkout-form-container .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.2);
}

.checkout-form-container .error-message {
    color: #e63946;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none; /* Initially hidden */
}

.cart-items-list {
    margin-bottom: 20px;
}

.cart-item-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.cart-item-summary .item-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-item-summary .item-name {
    font-weight: 500;
    color: var(--text-dark);
}

.cart-item-summary .item-price {
    font-weight: 600;
    color: var(--text-dark);
}

.remove-item-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 0.8rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.remove-item-btn:hover {
    color: #e63946;
}

#cart-items-summary {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

#cart-items-summary .cart-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-dark);
}

#cart-items-summary .item-details {
    flex-grow: 1;
    margin-left: 15px;
}

#cart-items-summary .item-name {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-dark);
}

#cart-items-summary .item-meta {
    font-size: 0.9rem;
    color: var(--text-light);
}

#cart-items-summary .item-price {
    font-weight: 600;
    white-space: nowrap;
    color: var(--text-dark);
}

.cart-total-summary {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--border-light);
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    color: var(--text-dark);
}

.place-order-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(45deg, #ff6b35, #ff8c5a);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    text-transform: uppercase;
}

.place-order-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

.place-order-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
} 

/* Enhanced Cart Item Styles */
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.cart-item:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.item-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

.item-details {
    flex: 1;
}

.item-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.item-type {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
    font-weight: 500;
}

.item-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.price-amount {
    font-size: 1.3rem;
    font-weight: 700;
    color: #059669;
    font-family: 'Segoe UI', sans-serif;
}

.remove-item {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.remove-item:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: scale(1.02);
}

.remove-icon {
    font-size: 0.9rem;
}

.remove-text {
    font-size: 0.75rem;
}

/* Enhanced Cart Summary */
.cart-summary {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid #667eea;
    margin-top: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.summary-label {
    font-size: 1rem;
    color: #374151;
    font-weight: 500;
}

.summary-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
}

.delivery-free {
    color: #059669;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.total-row {
    border-top: 2px solid #667eea;
    margin-top: 0.5rem;
    padding-top: 1rem;
}

.total-row .summary-label {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
}

.total-amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: #059669;
    font-family: 'Segoe UI', sans-serif;
}

/* Responsive Cart Items */
@media (max-width: 768px) {
    .cart-item {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .item-info {
        width: 100%;
    }
    
    .item-price {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    .price-amount {
        font-size: 1.2rem;
    }
    
    .remove-item {
        padding: 0.5rem 1rem;
    }
} 