﻿
.checkout-page {
    padding: 20px 0;
    max-width: 1200px;
    margin: 0 auto;
}

.checkout-header {
    margin-bottom: 30px;
}

    .checkout-header h1 {
        margin: 0 0 20px 0;
        color: #333;
    }

.checkout-steps {
    display: flex;
    align-items: center;
    gap: 20px;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 20px;
    background: #f8f9fa;
    color: #6c757d;
    transition: all 0.3s ease;
}

    .step.active {
        background: #007bff;
        color: white;
    }

    .step.completed {
        background: #28a745;
        color: white;
    }

    .step span:first-child {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.2);
        font-weight: bold;
        font-size: 12px;
    }

.checkout-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

.form-section {
    margin-bottom: 30px;
    padding: 25px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

    .form-section h3 {
        margin: 0 0 20px 0;
        color: #333;
        border-bottom: 2px solid #007bff;
        padding-bottom: 10px;
    }

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

    .form-group.full-width {
        grid-column: 1 / -1;
    }

    .form-group label {
        margin-bottom: 5px;
        font-weight: 500;
        color: #333;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 14px;
        transition: border-color 0.3s ease;
    }

        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: #007bff;
            box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
        }

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.payment-method {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
}

    .payment-method:hover {
        border-color: #007bff;
    }

    .payment-method input[type="radio"] {
        display: none;
    }

        .payment-method input[type="radio"]:checked + label {
            border-color: #007bff;
            background: #f8f9ff;
        }

    .payment-method label {
        display: block;
        padding: 20px;
        cursor: pointer;
        margin: 0;
    }

.payment-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

    .payment-info i {
        font-size: 24px;
        color: #007bff;
        width: 30px;
    }

    .payment-info strong {
        display: block;
        margin-bottom: 5px;
        color: #333;
    }

    .payment-info p {
        margin: 0;
        color: #666;
        font-size: 14px;
    }

.checkout-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.btn-back {
    color: #6c757d;
    text-decoration: none;
    padding: 12px 20px;
    border: 1px solid #6c757d;
    border-radius: 4px;
    transition: all 0.3s ease;
}

    .btn-back:hover {
        background: #6c757d;
        color: white;
        text-decoration: none;
    }

.btn-place-order {
    background: #28a745;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

    .btn-place-order:hover {
        background: #218838;
    }

    .btn-place-order:disabled {
        background: #6c757d;
        cursor: not-allowed;
    }

.order-summary {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
}

    .order-summary h3 {
        margin: 0 0 20px 0;
        color: #333;
        border-bottom: 2px solid #007bff;
        padding-bottom: 10px;
    }

.order-items {
    margin-bottom: 20px;
}

.order-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

    .order-item:last-child {
        border-bottom: none;
    }

.item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #eee;
}

.item-info {
    flex: 1;
}

    .item-info h4 {
        margin: 0 0 8px 0;
        font-size: 14px;
        line-height: 1.4;
    }

.item-price {
    margin-bottom: 5px;
}

.sale-price {
    color: #dc3545;
    font-weight: bold;
    margin-right: 8px;
}

.original-price {
    color: #999;
    text-decoration: line-through;
    font-size: 12px;
}

.price {
    color: #333;
    font-weight: bold;
}

.item-quantity {
    font-size: 12px;
    color: #666;
}

.item-total {
    font-weight: bold;
    color: #333;
    text-align: right;
}

.order-totals {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-bottom: 20px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 5px 0;
}

    .total-row.discount {
        color: #dc3545;
    }

    .total-row.grand-total {
        font-size: 18px;
        font-weight: bold;
        color: #333;
        border-top: 2px solid #eee;
        padding-top: 15px;
        margin-top: 15px;
    }

.order-security {
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
}

    .security-item i {
        color: #28a745;
        width: 16px;
    }

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    min-width: 300px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .checkout-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .checkout-steps {
        flex-direction: column;
        align-items: stretch;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .checkout-actions {
        flex-direction: column;
        gap: 15px;
    }
}

.order-success-page {
    padding: 40px 0;
    max-width: 800px;
    margin: 0 auto;
}

.success-content {
    text-align: center;
}

.success-icon {
    font-size: 80px;
    color: #28a745;
    margin-bottom: 20px;
    animation: checkmark 0.6s ease-in-out;
}

@keyframes checkmark {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.success-content h1 {
    color: #28a745;
    margin-bottom: 15px;
    font-size: 2.5em;
}

.success-message {
    font-size: 18px;
    color: #666;
    margin-bottom: 40px;
    line-height: 1.6;
}

.order-info-card,
.payment-info-card,
.next-steps,
.contact-support {
    background: white;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: left;
}

    .order-info-card h3,
    .payment-info-card h3,
    .next-steps h3,
    .contact-support h3 {
        margin: 0 0 20px 0;
        color: #333;
        border-bottom: 2px solid #007bff;
        padding-bottom: 10px;
    }

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    color: #666;
    font-weight: 500;
}

.detail-row .value {
    font-weight: bold;
    color: #333;
}


.skeleton-loader {
    border-radius: 4px;
    animation: skeleton-loading 1.5s infinite ease-in-out;
}

@keyframes skeleton-loading {
    0%, 100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

.loading-placeholder {
    pointer-events: none;
}