/* =========================================================
   ENCABEZADO DEL CHECKOUT
========================================================= */

.checkout-header {
    padding: 80px 20px;

    background:
        linear-gradient(
            rgba(0, 0, 0, 0.65),
            rgba(0, 0, 0, 0.65)
        ),
        url("../img/local/ambiente.jpg")
        center center / cover no-repeat;

    color: #ffffff;

    text-align: center;
}


.checkout-header .subtitulo {
    color: #ffca28;
}


.checkout-header h1 {
    font-size: 48px;

    font-weight: 800;

    margin: 15px 0;
}


.checkout-header p {
    color: rgba(255, 255, 255, 0.90);

    font-size: 18px;

    margin-bottom: 0;
}


/* =========================================================
   SECCIÓN PRINCIPAL
========================================================= */

.checkout-section {
    background: #f7f7f7;

    min-height: 600px;
}


/* =========================================================
   TARJETAS
========================================================= */

.checkout-card,
.checkout-resumen {
    background: #ffffff;

    border-radius: 15px;

    padding: 30px;

    box-shadow:
        0 5px 20px
        rgba(0, 0, 0, 0.06);
}


.checkout-card h2,
.checkout-resumen h2 {
    margin-bottom: 30px;

    font-size: 26px;

    font-weight: 700;
}


/* =========================================================
   FORMULARIO
========================================================= */

.checkout-card label {
    font-weight: 700;

    margin-bottom: 7px;

    color: #333333;
}


.checkout-card .form-control,
.checkout-card .form-select {
    padding: 12px 14px;

    border: 1px solid #d9d9d9;

    border-radius: 10px;

    background-color: #ffffff;

    color: #222222;

    transition:
        border-color 0.20s ease,
        box-shadow 0.20s ease;
}


.checkout-card .form-control:focus,
.checkout-card .form-select:focus {
    border-color: #c62828;

    box-shadow:
        0 0 0 0.2rem
        rgba(198, 40, 40, 0.12);

    outline: none;
}


.checkout-card textarea.form-control {
    resize: vertical;

    min-height: 100px;
}


/* =========================================================
   TIPO DE ENTREGA Y MÉTODO DE PAGO
========================================================= */

.checkout-card .form-check {
    padding: 15px;

    border: 1px solid #e0e0e0;

    border-radius: 12px;

    margin-bottom: 10px;

    background: #ffffff;

    transition:
        border-color 0.20s ease,
        background 0.20s ease;
}


.checkout-card .form-check:hover {
    border-color: #c62828;

    background: #fffafa;
}


.checkout-card .form-check-input:checked {
    background-color: #c62828;

    border-color: #c62828;
}


.checkout-card .form-check-input:focus {
    border-color: #c62828;

    box-shadow:
        0 0 0 0.2rem
        rgba(198, 40, 40, 0.12);
}


/* =========================================================
   INFORMACIÓN ADICIONAL
========================================================= */

.checkout-card .alert {
    border-radius: 12px;
}


/* =========================================================
   BOTÓN CONFIRMAR
========================================================= */

.btn-confirmar {
    width: 100%;

    padding: 14px 20px;

    font-size: 17px;

    font-weight: 700;

    border-radius: 30px;

    background: #c62828;

    border: 1px solid #c62828;

    color: #ffffff;

    transition:
        background 0.20s ease,
        transform 0.20s ease;
}


.btn-confirmar:hover {
    background: #9e1f1f;

    border-color: #9e1f1f;

    color: #ffffff;

    transform: translateY(-1px);
}


.btn-confirmar:disabled {
    opacity: 0.60;

    cursor: not-allowed;

    transform: none;
}


/* =========================================================
   RESUMEN DEL PEDIDO
========================================================= */

.checkout-resumen {
    position: sticky;

    top: 90px;
}


.checkout-producto {
    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    gap: 15px;

    padding: 15px 0;

    border-bottom: 1px solid #eeeeee;
}


.checkout-producto:last-child {
    border-bottom: none;
}


.checkout-producto div {
    display: flex;

    flex-direction: column;

    min-width: 0;
}


.checkout-producto strong {
    font-size: 15px;

    color: #333333;
}


.checkout-producto span {
    color: #777777;

    font-size: 14px;

    margin-top: 5px;
}


.checkout-producto > strong {
    flex-shrink: 0;

    color: #c62828;
}


/* =========================================================
   TOTALES
========================================================= */

.resumen-linea {
    display: flex;

    justify-content: space-between;

    gap: 15px;

    margin-bottom: 15px;
}


.resumen-total {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 15px;

    font-size: 23px;

    margin-top: 20px;

    padding-top: 20px;

    border-top: 1px solid #dddddd;
}


.resumen-total strong {
    color: #c62828;

    font-size: 27px;
}


/* =========================================================
   CHECKOUT VACÍO
========================================================= */

.checkout-vacio {
    text-align: center;

    padding: 40px 20px;
}


.checkout-vacio h3 {
    margin-bottom: 10px;

    font-weight: 700;
}


.checkout-vacio p {
    color: #666666;

    margin-bottom: 20px;
}


/* =========================================================
   INFORMACIÓN DE PAGO
========================================================= */

#informacion-pago {
    width: 100%;

    margin-top: 5px;
}


#informacion-pago > .alert {
    background: transparent;

    border: none;

    padding: 0;

    margin: 0;
}


#detalle-metodo-pago {
    width: 100%;
}


/* =========================================================
   TARJETA GENERAL DE PAGO
========================================================= */

.pago-box {
    width: 100%;

    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 16px;

    padding: 22px;

    box-shadow:
        0 4px 18px
        rgba(0, 0, 0, 0.06);
}


.pago-titulo {
    display: flex;

    align-items: center;

    gap: 8px;

    font-size: 21px;

    font-weight: 800;

    color: #111827;

    margin-bottom: 18px;
}


.pago-descripcion {
    margin: 0;

    color: #374151;

    line-height: 1.6;

    font-size: 15px;
}


/* =========================================================
   CONTENIDO MÉTODO DE PAGO
========================================================= */

.pago-contenido {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        190px;

    gap: 25px;

    align-items: center;
}


.pago-datos {
    min-width: 0;
}


/* =========================================================
   FILAS DE DATOS
========================================================= */

.pago-fila {
    display: flex;

    align-items: center;

    justify-content: space-between;

    flex-wrap: wrap;

    gap: 10px 15px;

    padding: 13px 0;

    border-bottom: 1px solid #eeeeee;
}


.pago-fila:last-child {
    border-bottom: none;
}


.pago-fila span {
    min-width: 125px;

    color: #6b7280;

    font-size: 14px;
}


.pago-fila strong {
    flex: 1;

    color: #111827;

    font-size: 17px;

    font-weight: 700;

    word-break: break-word;
}


/* =========================================================
   BOTÓN COPIAR
========================================================= */

.btn-copiar-pago {
    border: none;

    border-radius: 8px;

    padding: 8px 12px;

    background: #f3f4f6;

    color: #111827;

    font-size: 13px;

    font-weight: 700;

    cursor: pointer;

    white-space: nowrap;

    transition:
        background 0.20s ease,
        transform 0.20s ease;
}


.btn-copiar-pago:hover {
    background: #e5e7eb;

    transform: translateY(-1px);
}


.btn-copiar-pago:active {
    transform: translateY(0);
}


.btn-copiar-pago:disabled {
    opacity: 0.70;

    cursor: default;

    transform: none;
}


/* =========================================================
   QR
========================================================= */

.pago-qr-container {
    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 8px;
}


.pago-qr {
    display: block;

    width: 175px;

    height: 175px;

    max-width: 100%;

    object-fit: contain;

    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 14px;

    padding: 8px;
}


.pago-qr-container small {
    color: #6b7280;

    font-size: 13px;

    font-weight: 700;

    text-align: center;
}


/* =========================================================
   AVISO DE PAGO
========================================================= */

.pago-aviso {
    margin-top: 15px;

    margin-bottom: 0;

    padding: 12px 14px;

    border-radius: 10px;

    background: #f9fafb;

    color: #374151;

    font-size: 14px;

    line-height: 1.5;
}


/* =========================================================
   EFECTIVO
========================================================= */

.pago-efectivo {
    border-color: #22c55e;

    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f0fdf4 100%
        );
}


.pago-efectivo .pago-titulo {
    color: #15803d;
}


/* =========================================================
   YAPE
========================================================= */

.pago-yape {
    border-color: #8b5cf6;

    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #faf5ff 100%
        );
}


.pago-yape .pago-titulo {
    color: #6d28d9;
}


.pago-yape .pago-aviso {
    background: #faf5ff;

    color: #6b21a8;
}


/* =========================================================
   PLIN
========================================================= */

.pago-plin {
    border-color: #14b8a6;

    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f0fdfa 100%
        );
}


.pago-plin .pago-titulo {
    color: #0f766e;
}


.pago-plin .pago-aviso {
    background: #f0fdfa;

    color: #115e59;
}


/* =========================================================
   TRANSFERENCIA
========================================================= */

.pago-transferencia {
    border-color: #2563eb;

    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #eff6ff 100%
        );
}


.pago-transferencia .pago-titulo {
    color: #1d4ed8;
}


.pago-transferencia-datos {
    width: 100%;
}


.pago-transferencia .pago-aviso {
    background: #eff6ff;

    color: #1e3a8a;
}


/* =========================================================
   PEDIDO EXITOSO
========================================================= */

.pedido-exitoso {
    background: #f7f7f7;

    min-height: 70vh;

    display: flex;

    align-items: center;

    padding: 70px 20px;
}


.pedido-exitoso-card {
    width: 100%;

    max-width: 700px;

    margin: auto;

    background: #ffffff;

    border-radius: 20px;

    padding: 50px;

    text-align: center;

    box-shadow:
        0 10px 30px
        rgba(0, 0, 0, 0.08);
}


/* =========================================================
   ICONO DE ÉXITO
========================================================= */

.icono-exito {
    width: 80px;

    height: 80px;

    margin: 0 auto 25px;

    border-radius: 50%;

    background: #28a745;

    color: #ffffff;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 45px;

    font-weight: bold;
}


.pedido-exitoso-card h1 {
    font-size: 40px;

    margin-bottom: 15px;

    font-weight: 800;
}


.pedido-exitoso-card > p {
    color: #666666;

    font-size: 17px;
}


/* =========================================================
   NÚMERO DEL PEDIDO
========================================================= */

.numero-pedido {
    margin: 30px 0;

    padding: 20px;

    background: #eee8d8;

    border-radius: 12px;
}


.numero-pedido span {
    display: block;

    color: #666666;

    margin-bottom: 8px;
}


.numero-pedido strong {
    display: block;

    font-size: 28px;

    color: #c62828;

    word-break: break-word;
}


/* =========================================================
   DATOS DEL PEDIDO EXITOSO
========================================================= */

.pedido-detalle {
    text-align: left;

    margin-top: 25px;
}


.pedido-detalle-linea {
    display: flex;

    justify-content: space-between;

    gap: 15px;

    padding: 10px 0;

    border-bottom: 1px solid #eeeeee;
}


.pedido-detalle-linea:last-child {
    border-bottom: none;
}


.pedido-detalle-linea strong {
    text-align: right;
}


/* =========================================================
   ACCIONES DEL PEDIDO
========================================================= */

.acciones-pedido {
    display: flex;

    justify-content: center;

    gap: 15px;

    margin-top: 30px;

    flex-wrap: wrap;
}


.acciones-pedido .btn {
    min-width: 170px;

    border-radius: 30px;

    font-weight: 700;

    padding: 11px 22px;
}


/* =========================================================
   RESPONSIVE TABLET
========================================================= */

@media (max-width: 991px) {

    .checkout-resumen {
        position: static;

        margin-top: 20px;
    }


    .pago-contenido {
        grid-template-columns:
            minmax(0, 1fr)
            170px;
    }


    .pago-qr {
        width: 160px;

        height: 160px;
    }

}


/* =========================================================
   RESPONSIVE MÓVIL
========================================================= */

@media (max-width: 768px) {

    .checkout-header {
        padding: 60px 15px;
    }


    .checkout-header h1 {
        font-size: 36px;
    }


    .checkout-header p {
        font-size: 16px;
    }


    .checkout-card,
    .checkout-resumen {
        padding: 22px;
    }


    .checkout-card h2,
    .checkout-resumen h2 {
        font-size: 23px;

        margin-bottom: 22px;
    }


    /* PAGO */

    .pago-box {
        padding: 18px;
    }


    .pago-titulo {
        font-size: 19px;
    }


    .pago-contenido {
        grid-template-columns: 1fr;
    }


    .pago-qr-container {
        margin-top: 5px;
    }


    .pago-qr {
        width: 190px;

        height: 190px;
    }


    .pago-fila {
        align-items: flex-start;
    }


    /* PEDIDO EXITOSO */

    .pedido-exitoso {
        padding: 50px 15px;
    }


    .pedido-exitoso-card {
        padding: 35px 25px;
    }


    .pedido-exitoso-card h1 {
        font-size: 32px;
    }


    .numero-pedido strong {
        font-size: 24px;
    }

}


/* =========================================================
   RESPONSIVE CELULAR PEQUEÑO
========================================================= */

@media (max-width: 480px) {

    .checkout-header {
        padding: 50px 15px;
    }


    .checkout-header h1 {
        font-size: 31px;
    }


    .checkout-card,
    .checkout-resumen {
        padding: 17px;

        border-radius: 12px;
    }


    .checkout-card .form-check {
        padding: 12px;
    }


    .checkout-producto {
        gap: 10px;
    }


    .checkout-producto > strong {
        font-size: 14px;
    }


    .resumen-total {
        font-size: 19px;
    }


    .resumen-total strong {
        font-size: 23px;
    }


    /* =====================================================
       PAGOS EN CELULAR
    ====================================================== */

    .pago-box {
        padding: 15px;

        border-radius: 12px;
    }


    .pago-titulo {
        font-size: 18px;

        margin-bottom: 12px;
    }


    .pago-fila {
        flex-direction: column;

        align-items: stretch;

        gap: 6px;

        padding: 11px 0;
    }


    .pago-fila span {
        min-width: 0;

        font-size: 13px;
    }


    .pago-fila strong {
        font-size: 16px;
    }


    .btn-copiar-pago {
        width: 100%;

        margin-top: 4px;

        padding: 10px;
    }


    .pago-qr {
        width: 180px;

        height: 180px;
    }


    .pago-aviso {
        font-size: 13px;

        padding: 10px 12px;
    }


    /* =====================================================
       PEDIDO EXITOSO
    ====================================================== */

    .pedido-exitoso {
        padding: 35px 12px;
    }


    .pedido-exitoso-card {
        padding: 28px 18px;

        border-radius: 15px;
    }


    .icono-exito {
        width: 68px;

        height: 68px;

        font-size: 38px;
    }


    .pedido-exitoso-card h1 {
        font-size: 28px;
    }


    .numero-pedido {
        padding: 17px;
    }


    .numero-pedido strong {
        font-size: 21px;
    }


    .pedido-detalle-linea {
        flex-direction: column;

        gap: 3px;
    }


    .pedido-detalle-linea strong {
        text-align: left;
    }


    .acciones-pedido {
        flex-direction: column;
    }


    .acciones-pedido .btn {
        width: 100%;

        min-width: 0;
    }

}