.checkout-body {
    background-color: #f5f5f5;
}

.checkout-header {
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
}

.checkout-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkout-header .logo {
    position: static;
    transform: none;
    font-size: 1.5rem;
}

.secure-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: #4a4a4a;
}

.checkout-grid {
    align-items: flex-start;
    gap: 4rem;
    padding-top: 3rem;
    padding-bottom: 5rem;
}

.checkout-form-section {
    flex: 1.2;
}

.checkout-summary {
    flex: 0.8;
    position: sticky;
    top: 2rem;
}

.checkout-step {
    margin-bottom: 3rem;
    font-family: var(--font-body);
}

.step-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1.5rem;
}

.checkout-step h2 {
    font-family: var(--font-body);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.checkout-step p.subtitle {
    margin-top: -1rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-group.half {
    flex: 1;
}

.form-input {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid #d9d9d9;
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.3s;
    background-color: #fff;
}

.form-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 1px var(--accent-color);
    outline: none;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

input[type="checkbox"] {
    accent-color: var(--accent-color);
    width: 16px; height: 16px;
}

/* Payment Methods */
.payment-methods {
    border: 1px solid #d9d9d9;
    border-radius: 5px;
    background: #fff;
    overflow: hidden;
}

.payment-method {
    display: block;
    border-bottom: 1px solid #d9d9d9;
}

.payment-method:last-child {
    border-bottom: none;
}

.payment-method.selected {
    background-color: #fafbfc;
}

.method-header {
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    font-weight: 500;
}

input[type="radio"] {
    accent-color: var(--accent-color);
    width: 18px; height: 18px;
}

.card-icons {
    margin-left: auto;
    display: flex;
    gap: 0.5rem;
}

.card-icon {
    width: 38px; height: 24px;
    border-radius: 3px;
    background-size: cover;
    background-position: center;
}

.card-icon.visa { background-image: url('https://upload.wikimedia.org/wikipedia/commons/4/41/Visa_Logo.png'); background-color: #fff; box-shadow: 0 0 2px rgba(0,0,0,0.2); }
.card-icon.mc { background-image: url('https://upload.wikimedia.org/wikipedia/commons/2/2a/Mastercard-logo.svg'); background-color: #fff; box-shadow: 0 0 2px rgba(0,0,0,0.2); }

.method-details {
    padding: 1.25rem;
    background-color: #fafbfc;
    border-top: 1px solid #eaeaea;
}

.submit-btn {
    width: 100%;
    font-size: 1.1rem;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.return-link {
    display: block;
    text-align: center;
    color: var(--accent-color);
    text-decoration: underline;
    font-size: 0.9rem;
}

/* Summary Card */
.summary-card {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.checkout-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.item-img-wrapper {
    position: relative;
    width: 65px; height: 65px;
    border-radius: 8px;
    border: 1px solid #eaeaea;
    background: #f5f5f5;
}

.item-img-wrapper img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.item-qty {
    position: absolute;
    top: -8px; right: -8px;
    background-color: rgba(114, 114, 114, 0.9);
    color: #fff;
    width: 20px; height: 20px;
    border-radius: 50%;
    font-size: 0.75rem;
    display: flex; align-items: center; justify-content: center;
}

.item-info {
    flex: 1;
    font-family: var(--font-body);
}

.item-info h4 {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.item-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.item-price {
    font-weight: 500;
    font-size: 0.95rem;
}

.discount-code {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 0;
    border-top: 1px solid #eaeaea;
    border-bottom: 1px solid #eaeaea;
    margin-bottom: 1.5rem;
}

.totals {
    font-family: var(--font-body);
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: #4a4a4a;
    font-size: 0.95rem;
}

.total-row.final {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eaeaea;
    font-size: 1.1rem;
    color: var(--text-primary);
    align-items: center;
}

.price-val strong {
    font-size: 1.5rem;
    margin-left: 0.5rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: flex; justify-content: center; align-items: center;
    z-index: 9999;
    opacity: 0; visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1; visibility: visible;
}

.modal-box {
    background: #fff;
    padding: 3rem 2rem;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transform: scale(0.9);
    transition: all 0.3s;
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

.success-icon {
    width: 60px; height: 60px;
    margin-bottom: 1rem;
    animation: dash 2s ease-in-out;
}

@keyframes dash {
    0% { stroke-dasharray: 100; stroke-dashoffset: 100; }
    100% { stroke-dasharray: 100; stroke-dashoffset: 0; }
}

.modal-box h2 {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
}

.modal-box p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Mobile */
@media (max-width: 900px) {
    .checkout-grid {
        flex-direction: column-reverse;
        gap: 2rem;
        padding-top: 1.5rem;
    }
    .checkout-summary, .checkout-form-section {
        flex: 1;
        width: 100%;
    }
    .checkout-summary {
        position: static;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .checkout-header .checkout-container {
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
    }

    .checkout-container {
        padding: 0 1rem;
    }
    
    .form-row {
        flex-direction: column !important;
        gap: 0 !important;
    }
    
    .form-group.half {
        width: 100% !important;
    }
    
    .discount-code {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .discount-code .btn {
        width: 100%;
        padding: 1rem;
    }

    .total-row {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .total-row span:last-child {
        text-align: left !important;
        width: 100%;
        font-weight: 600;
    }

    .total-row.final {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.8rem;
    }

    .total-row.final span:last-child {
        text-align: left !important;
        width: 100%;
    }

    .price-val strong {
        display: block;
        margin-left: 0;
        margin-top: 5px;
        font-size: 1.8rem !important;
    }

    .summary-card {
        padding: 1rem !important;
    }

    .checkout-item {
        gap: 0.8rem;
    }
}
