/* ===========================
   Contenedor principal
=========================== */

.payment-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 50px 20px;
    background: #f5f7fa;
    min-height: calc(100vh - 100px);
}


/* ===========================
   Tarjeta
=========================== */

.payment-card {
    width: 100%;
    max-width: 650px;
    background: #ffffff;
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
}


/* ===========================
   Títulos
=========================== */

.payment-card h2 {
    margin: 0;
    font-size: 30px;
    color: #222;
}

.payment-description {
    margin-top: 10px;
    color: #666;
    font-size: 15px;
}

.payment-summary,
.customer-info,
.payment-method {
    margin-top: 35px;
}

.payment-summary h3,
.customer-info h3,
.payment-method h3 {
    margin-bottom: 20px;
    font-size: 20px;
    color: #333;
}


/* ===========================
   Productos
=========================== */

.payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid #e9e9e9;
}

.payment-item-left {
    display: flex;
    align-items: center;
    gap: 18px;
}


/* Imagen producto */

.payment-item-image {
    width: 90px;
    height: 90px;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f5f5;
    border: 1px solid #e5e5e5;
    flex-shrink: 0;
}

.payment-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* Información producto */

.payment-item-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.payment-item-info strong {
    font-size: 17px;
    color: #222;
}

.payment-item-info span {
    color: #777;
    font-size: 14px;
}


/* Precio */

.payment-item-price {
    font-size: 20px;
    font-weight: 700;
    color: #1565c0;
    white-space: nowrap;
}


/* ===========================
   Total
=========================== */

.payment-total {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #ececec;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-total span {
    font-size: 18px;
    color: #444;
}

.payment-total strong {
    font-size: 28px;
    color: #1565c0;
}


/* ===========================
   Datos cliente / envío
=========================== */

.info-box {
    background: #f8f9fb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.info-box h3 {
    font-size: 18px;
    margin-bottom: 15px;
}


.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row span {
    color: #777;
    font-size: 14px;
}

.info-row strong {
    color: #222;
    font-size: 15px;
    text-align: right;
}


/* ===========================
   Método de pago
=========================== */

.payment-method {
    display: block;
    visibility: visible;
    opacity: 1;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    background: #fff;
    transition: .25s;
}

.payment-option:hover {
    border-color: #1565c0;
    background: #f7fbff;
}

.payment-option input[type="radio"] {
    transform: scale(1.2);
}

.payment-option span {
    color: #333;
    font-size: 16px;
}


/* ===========================
   Botón pago
=========================== */

.btn-payment {
    width: 100%;
    margin-top: 30px;
    padding: 15px;
    border: none;
    border-radius: 8px;
    background: #1565c0;
    color: white;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: .3s;
}

.btn-payment:hover {
    background: #0d47a1;
}


/* ===========================
   Volver carrito
=========================== */

.back-cart {
    display: block;
    margin-top: 20px;
    text-align: center;
    color: #1565c0;
    text-decoration: none;
    font-weight: 600;
}


/* ===========================
   Responsive
=========================== */

@media(max-width:600px){

    .payment-card {
        padding:25px;
    }

    .payment-item {
        flex-direction:column;
        align-items:flex-start;
        gap:12px;
    }

    .payment-item-price {
        align-self:flex-end;
    }

    .payment-item-left {
        gap:12px;
    }

    .payment-item-image {
        width:70px;
        height:70px;
    }

    .payment-total strong {
        font-size:24px;
    }

    .info-row {
        flex-direction:column;
        gap:5px;
    }

}

.form-error {
    color: red;
    font-size: 14px;
}




.payment-result {
    display: flex;
    justify-content: center;
    padding: 60px 20px;
    background: #f5f7fa;
    min-height: calc(100vh - 120px);
}

.payment-result-card {
    width: 100%;
    max-width: 650px;
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

.payment-result-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.payment-result-card h1 {
    margin-bottom: 15px;
    color: #c62828;
}

.payment-result-message {
    color: #666;
    margin-bottom: 30px;
}

.payment-detail {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #ececec;
}

.payment-detail:last-of-type {
    margin-bottom: 30px;
}

.payment-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.payment-actions .btn-payment,
.payment-actions .back-cart {
    text-decoration: none;
}


.payment-pending .payment-result-icon{
    background:#fff8e1;
    color:#f9a825;
}

.payment-pending h1{
    color:#f57f17;
}

.payment-pending .payment-result-card{
    border-top:5px solid #fbc02d;
}

.payment-success .payment-result-icon{
    background:#e8f5e9;
    color:#2e7d32;
}

.payment-success h1{
    color:#2e7d32;
}

.payment-success .payment-result-card{
    border-top:5px solid #43a047;
}