/* Checkout Modal Styles */
.checkout-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.checkout-modal.active {
    display: flex !important;
}

.checkout-content {
    background: white;
    border-radius: 15px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.checkout-header {
    padding: 25px 30px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #8B4513;
    color: white;
    border-radius: 15px 15px 0 0;
}

.checkout-header h2 {
    margin: 0;
    font-size: 1.8em;
}

.close-checkout {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10001;
}

.close-checkout:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.close-checkout:active {
    transform: scale(0.95);
}

.close-checkout i {
    pointer-events: none;
}

.checkout-body {
    padding: 30px;
}

/* Progress Steps */
.checkout-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 0 20px;
}

.checkout-progress .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
}

.checkout-progress .step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 60%;
    width: 80%;
    height: 2px;
    background: #ddd;
    z-index: 1;
}

.checkout-progress .step.active:not(:last-child)::after,
.checkout-progress .step.completed:not(:last-child)::after {
    background: #8B4513;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ddd;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
}

.step.active .step-number {
    background: #8B4513;
    color: white;
}

.step.completed .step-number {
    background: #28a745;
    color: white;
}

.step-label {
    font-size: 12px;
    color: #666;
    text-align: center;
}

.step.active .step-label {
    color: #8B4513;
    font-weight: bold;
}

/* Checkout Content */
.checkout-content {
    min-height: 400px;
}

.checkout-step {
    display: none;
}

.checkout-step.active {
    display: block;
}

.checkout-step h3 {
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #8B4513;
    padding-bottom: 10px;
}

/* Cart Items in Checkout */
.checkout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 10px;
}

.checkout-item .item-info h4 {
    margin: 0 0 5px 0;
    color: #333;
}

.checkout-item .item-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.checkout-item .item-price {
    font-weight: bold;
    color: #8B4513;
}

/* Cart Totals */
.cart-totals {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.total-row.final-total {
    border-top: 2px solid #8B4513;
    padding-top: 10px;
    font-weight: bold;
    font-size: 18px;
    color: #8B4513;
}

/* Form Styles */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8B4513;
}

/* Payment Methods */
.payment-methods {
    margin-top: 20px;
}

.payment-options {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.payment-method {
    border: 2px solid #ddd;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.payment-method:hover {
    border-color: #8B4513;
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.1);
}

.payment-method.active {
    border-color: #8B4513;
    background: #f8f5f0;
}

.payment-method input[type="radio"] {
    display: none;
}

.payment-method input[type="radio"]:checked + label {
    color: #8B4513;
}

.payment-method label {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    margin: 0;
    width: 100%;
}

.payment-method label i {
    width: 50px;
    height: 50px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #8B4513;
}

.payment-info h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1.1em;
}

.payment-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.payment-details {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.bank-details h4 {
    color: #8B4513;
    margin-bottom: 15px;
}

.bank-info {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.bank-info p {
    margin: 8px 0;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.bank-info p:last-child {
    border-bottom: none;
}

.card-details, .apple-pay-details {
    text-align: center;
    padding: 20px;
}

.card-details i, .apple-pay-details i {
    font-size: 24px;
    color: #8B4513;
    margin-left: 10px;
}

/* Bank Details */
.bank-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.bank-details h4 {
    margin-bottom: 15px;
    color: #333;
}

.bank-info p {
    margin-bottom: 8px;
    color: #666;
}

/* Order Confirmation */
.confirmation-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.confirmation-section h4 {
    margin-bottom: 15px;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
}

.confirmation-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

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

.confirmation-total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #8B4513;
    text-align: center;
    font-size: 18px;
    color: #8B4513;
}

/* Navigation Buttons */
.checkout-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding: 20px 30px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 0 0 15px 15px;
}

.footer-left, .footer-center, .footer-right {
    flex: 1;
    display: flex;
}

.footer-left {
    justify-content: flex-start;
}

.footer-center {
    justify-content: center;
}

.footer-right {
    justify-content: flex-end;
}

.checkout-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn-primary, .btn-secondary {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #8B4513;
    color: white;
}

.btn-primary:hover {
    background: #A0522D;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-cancel {
    padding: 12px 25px;
    border: 2px solid #dc3545;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: #dc3545;
}

.btn-cancel:hover {
    background: #dc3545;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .checkout-modal-content {
        width: 98%;
        margin: 10px;
    }
    
    .checkout-progress {
        padding: 0 10px;
    }
    
    .step-label {
        font-size: 10px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .checkout-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .checkout-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-left, .footer-center, .footer-right {
        justify-content: center;
    }
    
    .btn-cancel {
        width: 100%;
        justify-content: center;
    }
    
    .payment-method label {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

/* Thank You Page Styles */
.thank-you-section {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    font-size: 80px;
    color: #27ae60;
    margin-bottom: 20px;
    animation: bounce 1s ease-in-out;
}

.thank-you-section h2 {
    color: #8B4513;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.thank-you-section p {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 30px;
}

.order-info {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.info-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
    font-size: 1.1em;
}

.info-item i {
    color: #8B4513;
    width: 20px;
}

.order-number {
    background: #8B4513;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    font-weight: bold;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@media (max-width: 768px) {
    .thank-you-section h2 {
        font-size: 2em;
    }
    
    .success-icon {
        font-size: 60px;
    }
    
    .info-item {
        font-size: 1em;
    }
}