/* =========================================
   CHECKOUT
========================================= */

.checkout-container {
    width: 100%;
    max-width: 1200px;

    margin: 45px auto 80px;

    padding: 0 20px;

    box-sizing: border-box;
}


/* =========================================
   ENCABEZADO
========================================= */

.checkout-header {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 30px;

    margin-bottom: 35px;
}


.checkout-subtitle {
    display: block;

    margin-bottom: 6px;

    color: #048ABF;

    font-size: .72rem;

    font-weight: 600;

    letter-spacing: 1.5px;
}


.checkout-header h1 {
    margin: 0 0 8px;

    color: #222;

    font-size: 1.9rem;

    font-weight: 600;
}


.checkout-header p {
    margin: 0;

    color: #777;

    font-size: .9rem;
}


/* =========================================
   PASOS
========================================= */

.checkout-steps {
    display: flex;

    align-items: center;

    min-width: 280px;
}


.checkout-step {
    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 5px;

    color: #aaa;
}


.checkout-step span {
    width: 30px;
    height: 30px;

    border-radius: 50%;

    display: flex;

    align-items: center;
    justify-content: center;

    background-color: #eee;

    font-size: .8rem;

    font-weight: 600;
}


.checkout-step small {
    font-size: .65rem;
}


.checkout-step.active {
    color: #048ABF;
}


.checkout-step.active span {
    background-color: #048ABF;

    color: #fff;
}


.checkout-step-line {
    width: 55px;

    height: 2px;

    margin: 0 8px 18px;

    background-color: #e5e5e5;
}


/* =========================================
   CONTENIDO PRINCIPAL
========================================= */

.checkout-content {
    display: grid;

    grid-template-columns: minmax(0, 1fr) 380px;

    gap: 30px;

    align-items: start;
}


.checkout-form-column {
    display: flex;

    flex-direction: column;

    gap: 25px;
}


/* =========================================
   TARJETAS
========================================= */

.checkout-card {
    padding: 30px;

    background-color: #fff;

    border-radius: 16px;

    box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
}


/* =========================================
   ENCABEZADO TARJETA
========================================= */

.checkout-card-header {
    display: flex;

    align-items: flex-start;

    gap: 15px;

    margin-bottom: 28px;
}


.checkout-number {
    width: 34px;
    height: 34px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background-color: #048ABF;

    color: #fff;

    font-size: .85rem;

    font-weight: 600;
}


.checkout-card-header h2 {
    margin: 0 0 5px;

    color: #222;

    font-size: 1.15rem;

    font-weight: 600;
}


.checkout-card-header p {
    margin: 0;

    color: #777;

    font-size: .82rem;

    line-height: 1.5;
}


/* =========================================
   CAMPOS
========================================= */

.checkout-fields {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 20px;
}


.checkout-field {
    display: flex;

    flex-direction: column;

    gap: 7px;
}


.checkout-field-full {
    grid-column: span 2;
}


.checkout-field label {
    color: #444;

    font-size: .82rem;

    font-weight: 500;
}


.checkout-field label span {
    color: #999;

    font-weight: 400;
}


.checkout-field input,
.checkout-field textarea {
    width: 100%;

    padding: 11px 13px;

    box-sizing: border-box;

    border: 1px solid #dfe3e5;

    border-radius: 8px;

    outline: none;

    color: #333;

    font-size: .88rem;

    font-family: inherit;

    background-color: #fff;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}


.checkout-field textarea {
    resize: vertical;

    min-height: 100px;
}


.checkout-field input::placeholder,
.checkout-field textarea::placeholder {
    color: #aaa;
}


.checkout-field input:focus,
.checkout-field textarea:focus {
    border-color: #048ABF;

    box-shadow: 0 0 0 3px rgba(4, 138, 191, .10);
}


/* ERROR */

.checkout-field input.is-invalid {
    border-color: #dc3545;
}


.checkout-error {
    color: #dc3545;

    font-size: .75rem;
}


/* =========================================
   MÉTODOS DE PAGO
========================================= */

.payment-options {
    display: flex;

    flex-direction: column;

    gap: 12px;
}


.payment-option {
    display: block;

    margin: 0;

    cursor: pointer;
}


.payment-option input {
    position: absolute;

    opacity: 0;

    pointer-events: none;
}


.payment-option-content {
    display: flex;

    align-items: center;

    gap: 15px;

    padding: 16px;

    border: 1px solid #e1e5e7;

    border-radius: 10px;

    background-color: #fff;

    transition:
        border-color .2s ease,
        background-color .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}


.payment-option:hover .payment-option-content {
    border-color: #048ABF;

    transform: translateY(-2px);

    box-shadow: 0 5px 15px rgba(0, 0, 0, .06);
}


/* OPCIÓN SELECCIONADA */

.payment-option input:checked + .payment-option-content {
    border-color: #048ABF;

    background-color: #f3fbfe;

    box-shadow: 0 4px 14px rgba(4, 138, 191, .10);
}


/* ICONO */

.payment-icon {
    width: 42px;
    height: 42px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background-color: #f0f7fa;

    color: #048ABF;
}


.payment-icon i {
    font-size: 1.2rem;
}


/* TEXTO */

.payment-text {
    flex: 1;

    display: flex;

    flex-direction: column;

    gap: 4px;
}


.payment-text strong {
    color: #333;

    font-size: .9rem;

    font-weight: 600;
}


.payment-text small {
    color: #777;

    font-size: .75rem;

    line-height: 1.45;
}


/* CHECK */

.payment-check {
    width: 22px;
    height: 22px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 1px solid #d5dadd;

    border-radius: 50%;

    color: transparent;

    font-size: .7rem;

    transition:
        background-color .2s ease,
        border-color .2s ease,
        color .2s ease;
}


.payment-option input:checked
+ .payment-option-content
.payment-check {
    background-color: #048ABF;

    border-color: #048ABF;

    color: #fff;
}


/* =========================================
   RESUMEN
========================================= */

.checkout-summary {
    width: 100%;

    padding: 25px;

    box-sizing: border-box;

    background-color: #fff;

    border-radius: 16px;

    box-shadow: 0 6px 20px rgba(0, 0, 0, .08);

    position: sticky;

    top: 20px;
}


.checkout-summary-header {
    display: flex;

    justify-content: space-between;

    align-items: center;

    padding-bottom: 18px;

    border-bottom: 1px solid #eee;
}


.checkout-summary-header h2 {
    margin: 0;

    color: #222;

    font-size: 1.15rem;

    font-weight: 600;
}


.checkout-summary-header span {
    color: #777;

    font-size: .75rem;
}


/* =========================================
   PRODUCTOS RESUMEN
========================================= */

.checkout-summary-items {
    max-height: 330px;

    overflow-y: auto;

    padding-right: 5px;
}


.checkout-summary-item {
    display: flex;

    justify-content: space-between;

    gap: 15px;

    padding: 18px 0;

    border-bottom: 1px solid #f0f0f0;
}


.checkout-summary-product {
    display: flex;

    flex-direction: column;

    gap: 5px;

    min-width: 0;
}


.checkout-summary-product strong {
    color: #333;

    font-size: .85rem;

    line-height: 1.4;
}


.checkout-summary-product small {
    color: #888;

    font-size: .72rem;

    line-height: 1.5;
}


.checkout-item-price {
    flex-shrink: 0;

    color: #333;

    font-size: .8rem;

    white-space: nowrap;
}


/* =========================================
   TOTALES
========================================= */

.checkout-totals {
    padding-top: 20px;
}


.checkout-total-line {
    display: flex;

    justify-content: space-between;

    margin-bottom: 14px;

    color: #666;

    font-size: .85rem;
}


.checkout-total-line strong {
    color: #333;
}


.checkout-shipping {
    color: #048ABF;

    font-size: .8rem;
}


.checkout-total-divider {
    height: 1px;

    margin: 20px 0;

    background-color: #eee;
}


.checkout-final-total {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 25px;
}


.checkout-final-total span {
    color: #333;

    font-size: 1rem;

    font-weight: 600;
}


.checkout-final-total strong {
    color: #048ABF;

    font-size: 1.4rem;

    font-weight: 700;
}


/* =========================================
   BOTÓN CONFIRMAR
========================================= */

.checkout-confirm-button {
    width: 100%;

    min-height: 50px;

    border: none;

    border-radius: 8px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    background-color: #048ABF;

    color: #fff;

    font-size: .9rem;

    font-weight: 600;

    cursor: pointer;

    transition:
        background-color .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}


.checkout-confirm-button:hover {
    background-color: #03779f;

    transform: translateY(-2px);

    box-shadow: 0 7px 16px rgba(4, 138, 191, .20);
}


.checkout-confirm-button i {
    transition: transform .2s ease;
}


.checkout-confirm-button:hover i {
    transform: translateX(3px);
}


/* =========================================
   SEGURIDAD
========================================= */

.checkout-security {
    display: flex;

    align-items: flex-start;

    justify-content: center;

    gap: 7px;

    margin-top: 16px;

    color: #888;

    font-size: .7rem;

    line-height: 1.45;

    text-align: center;
}


.checkout-security i {
    color: #048ABF;

    font-size: .9rem;

    flex-shrink: 0;
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 991px) {

    .checkout-header {
        flex-direction: column;

        align-items: flex-start;
    }


    .checkout-content {
        grid-template-columns: 1fr;
    }


    .checkout-summary {
        position: static;

        max-width: 600px;

        margin: 0 auto;
    }

}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 576px) {

    .checkout-container {
        margin-top: 25px;
        margin-bottom: 50px;

        padding: 0 12px;
    }


    .checkout-header h1 {
        font-size: 1.5rem;
    }


    .checkout-header p {
        font-size: .82rem;
    }


    .checkout-steps {
        width: 100%;

        min-width: 0;

        justify-content: space-between;
    }


    .checkout-step-line {
        flex: 1;

        width: auto;
    }


    .checkout-card {
        padding: 22px 17px;

        border-radius: 12px;
    }


    .checkout-fields {
        grid-template-columns: 1fr;

        gap: 16px;
    }


    .checkout-field-full {
        grid-column: span 1;
    }


    .checkout-card-header {
        margin-bottom: 22px;
    }


    .checkout-card-header h2 {
        font-size: 1.05rem;
    }


    .payment-option-content {
        padding: 13px;

        gap: 10px;
    }


    .payment-icon {
        width: 38px;
        height: 38px;
    }


    .payment-text strong {
        font-size: .82rem;
    }


    .payment-text small {
        font-size: .7rem;
    }


    .checkout-summary {
        padding: 20px 17px;

        border-radius: 12px;
    }

}
