﻿.checkout-page {
    min-height: 100vh;
    background: #f7f8fa;
    padding: 32px 20px 70px;
}

.checkout-container {
    width: min(1180px, 100%);
    margin: auto;
}

.checkout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 35px;
}

.checkout-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #4b5563;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: .2s ease;
}

    .checkout-back:hover {
        color: #111827;
    }

.checkout-secure {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6b7280;
}

    .checkout-secure i {
        font-size: 22px;
    }

    .checkout-secure strong {
        display: block;
        color: #111827;
        font-size: 13px;
    }

    .checkout-secure small {
        display: block;
        margin-top: 2px;
        font-size: 11px;
    }


.checkout-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 28px;
    align-items: start;
}


.checkout-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

    .checkout-title h1 {
        margin: 0;
        color: #111827;
        font-size: 32px;
        font-weight: 750;
        letter-spacing: -.7px;
    }

    .checkout-title p {
        margin: 5px 0 0;
        color: #6b7280;
        font-size: 14px;
    }

.checkout-step {
    width: 43px;
    height: 43px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: #111827;
    color: white;
    font-size: 12px;
    font-weight: 700;
}


.checkout-card,
.checkout-summary {
    background: #fff;
    border: 1px solid #e8eaee;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(17, 24, 39, .045);
}


.checkout-card {
    padding: 28px;
}

.checkout-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

    .checkout-card-header h2 {
        margin: 0;
        color: #111827;
        font-size: 18px;
        font-weight: 700;
    }

    .checkout-card-header p {
        margin: 5px 0 0;
        color: #6b7280;
        font-size: 13px;
    }

.stripe-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 8px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 11px;
    font-weight: 700;
}


.stripe-element-wrapper {
    padding: 4px 0 12px;
}


.payment-error {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 14px;
    margin: 12px 0 16px;
    border-radius: 10px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #be123c;
    font-size: 13px;
}


.checkout-pay-button {
    width: 100%;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 12px;
    border: 0;
    border-radius: 12px;
    background: #111827;
    color: white;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}

    .checkout-pay-button:hover:not(:disabled) {
        background: #1f2937;
        transform: translateY(-1px);
        box-shadow: 0 8px 20px rgba(17, 24, 39, .16);
    }

    .checkout-pay-button:disabled {
        opacity: .65;
        cursor: not-allowed;
    }


.checkout-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 17px;
    color: #9ca3af;
    font-size: 10px;
    font-weight: 600;
}

    .checkout-trust span {
        display: flex;
        align-items: center;
        gap: 5px;
    }


.checkout-sidebar {
    position: sticky;
    top: 25px;
}

.checkout-summary {
    padding: 23px;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #eef0f3;
}

    .summary-header h2 {
        margin: 0;
        color: #111827;
        font-size: 17px;
        font-weight: 700;
    }

    .summary-header span {
        color: #9ca3af;
        font-size: 11px;
        font-weight: 600;
    }


.summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 17px 0;
    border-bottom: 1px solid #f0f1f3;
}

.summary-product {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

    .summary-product img,
    .summary-image-placeholder {
        width: 52px;
        height: 52px;
        flex: 0 0 52px;
        border-radius: 11px;
        object-fit: cover;
    }

.summary-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #9ca3af;
}

.summary-product strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 190px;
    color: #374151;
    font-size: 12px;
}

.summary-product small {
    display: block;
    margin-top: 4px;
    color: #9ca3af;
    font-size: 10px;
}

.summary-item > strong {
    white-space: nowrap;
    color: #111827;
    font-size: 12px;
}


.summary-lines {
    padding: 18px 0;
    border-bottom: 1px solid #eef0f3;
}

    .summary-lines > div {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 10px;
        color: #6b7280;
        font-size: 12px;
    }

        .summary-lines > div:last-child {
            margin-bottom: 0;
        }

    .summary-lines strong {
        color: #374151;
    }

.summary-discount,
.summary-discount strong {
    color: #059669 !important;
}


.summary-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
}

    .summary-total span {
        color: #374151;
        font-size: 13px;
        font-weight: 600;
    }

    .summary-total strong {
        color: #111827;
        font-size: 24px;
        font-weight: 800;
        letter-spacing: -.5px;
    }


.summary-secure {
    display: flex;
    gap: 10px;
    margin-top: 22px;
    padding: 13px;
    border-radius: 12px;
    background: #f8fafc;
}

    .summary-secure i {
        color: #059669;
        font-size: 18px;
    }

    .summary-secure strong {
        display: block;
        color: #374151;
        font-size: 11px;
    }

    .summary-secure span {
        display: block;
        margin-top: 3px;
        color: #9ca3af;
        font-size: 10px;
    }


.checkout-loading {
    min-height: 330px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

    .checkout-loading h3 {
        margin: 18px 0 5px;
        color: #111827;
    }

    .checkout-loading p {
        margin: 0;
        color: #9ca3af;
        font-size: 13px;
    }


.checkout-spinner,
.button-spinner {
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,.3);
    border-top-color: currentColor;
    animation: checkout-spin .7s linear infinite;
}

.checkout-spinner {
    width: 34px;
    height: 34px;
    color: #111827;
    border-color: #e5e7eb;
    border-top-color: #111827;
}

.button-spinner {
    width: 16px;
    height: 16px;
}


.checkout-error {
    display: flex;
    gap: 15px;
}

.checkout-error-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #fff1f2;
    color: #e11d48;
}

.checkout-error h3 {
    margin: 0 0 5px;
    color: #111827;
}

.checkout-error p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
}

.checkout-retry {
    margin-top: 14px;
    border: 0;
    background: transparent;
    color: #111827;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}


@keyframes checkout-spin {
    to {
        transform: rotate(360deg);
    }
}


@media (max-width: 900px) {

    .checkout-content {
        grid-template-columns: 1fr;
    }

    .checkout-sidebar {
        position: static;
    }
}


@media (max-width: 600px) {

    .checkout-page {
        padding: 20px 12px 50px;
    }

    .checkout-header {
        margin-bottom: 25px;
    }

    .checkout-title h1 {
        font-size: 25px;
    }

    .checkout-card {
        padding: 20px;
        border-radius: 16px;
    }

    .checkout-card-header {
        align-items: flex-start;
        gap: 15px;
    }

    .stripe-badge {
        display: none;
    }

    .checkout-trust {
        flex-direction: column;
        gap: 7px;
    }
}
