/* Checkout Page Styles */
.checkout-page {
    padding: 40px 0;
    background-color: #f9f9f9;
    min-height: 100vh;
}

.checkout-page h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

/* Checkout Steps */
.checkout-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
    max-width: 800px;
    margin: 0 auto 40px;
}

.checkout-steps::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 0;
    right: 0;
    height: 2px;
    background: #ddd;
    z-index: 1;
}

.step {
    text-align: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.step-number {
    width: 50px;
    height: 50px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: 600;
    color: #7f8c8d;
}

.step.active .step-number {
    background: #2ecc71;
    border-color: #2ecc71;
    color: white;
}

.step.completed .step-number {
    background: #2ecc71;
    border-color: #2ecc71;
    color: white;
}

.step.completed .step-number::after {
    content: '✓';
}

.step-label {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.step.active .step-label {
    color: #2c3e50;
    font-weight: 600;
}

/* Checkout Form */
.checkout-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.checkout-form-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.section-title {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2ecc71;
}

.address-options {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.address-option {
    flex: 1;
    padding: 20px;
    border: 2px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.address-option:hover {
    border-color: #2ecc71;
}

.address-option.selected {
    border-color: #2ecc71;
    background: #f0fff5;
}

.address-option i {
    font-size: 2rem;
    color: #2ecc71;
    margin-bottom: 10px;
}

/* Payment Methods */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.payment-method {
    padding: 20px;
    border: 2px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
}

.payment-method:hover {
    border-color: #2ecc71;
}

.payment-method.selected {
    border-color: #2ecc71;
    background: #f0fff5;
}

.payment-icon {
    width: 50px;
    height: 50px;
    background: #f8f9fa;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.payment-details {
    flex: 1;
}

.payment-details h4 {
    margin-bottom: 5px;
    color: #2c3e50;
}

.payment-details p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Order Summary */
.order-summary {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 100px;
    height: fit-content;
}

.summary-items {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.summary-item:last-child {
    border-bottom: none;
}

.item-name {
    flex: 1;
    color: #2c3e50;
}

.item-qty {
    color: #7f8c8d;
    margin-right: 10px;
}

.item-price {
    font-weight: 600;
    color: #2c3e50;
}

.summary-totals {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    color: #7f8c8d;
}

.total-row.final {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Delivery Time */
.delivery-time-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.time-option {
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.time-option:hover {
    border-color: #2ecc71;
}

.time-option.selected {
    border-color: #2ecc71;
    background: #f0fff5;
}

.time-option .time {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.time-option .fee {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Action Buttons */
.checkout-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.btn-back {
    background: white;
    color: #2c3e50;
    border: 2px solid #ddd;
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.btn-back:hover {
    border-color: #2ecc71;
    color: #2ecc71;
}

.btn-continue {
    background: #2ecc71;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.3s;
}

.btn-continue:hover {
    background: #27ae60;
}

/* Terms */
.terms-agreement {
    margin-top: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.terms-agreement input {
    margin-top: 5px;
}

.terms-agreement label {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.terms-agreement a {
    color: #3498db;
    text-decoration: none;
}

@media (max-width: 992px) {
    .checkout-container {
        grid-template-columns: 1fr;
    }
    
    .order-summary {
        position: static;
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .address-options {
        flex-direction: column;
    }
    
    .checkout-steps {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .checkout-steps::before {
        display: none;
    }
    
    .step {
        display: flex;
        align-items: center;
        gap: 15px;
        text-align: left;
        width: 100%;
    }
    
    .step-number {
        margin: 0;
    }
    
    .checkout-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn-back, .btn-continue {
        width: 100%;
        justify-content: center;
    }
}