﻿/* ===== Layout centrado heredado ===== */
:root {
    --page-max: 1200px;
}

body.no-auth .main-content {
    margin-left: 0 !important;
    width: 100% !important;
}

body.no-auth .container-fluid {
    max-width: var(--page-max);
    margin-inline: auto !important;
    padding-inline: 16px !important;
}

body.no-auth .card {
    background: transparent;
    border: 0;
    box-shadow: none;
    margin: 0 auto;
}

/* ===== Nueva grilla para alinear y truncar ===== */
.res-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    border: 1px solid #eee;
    border-top: none;
    padding: 16px 20px;
}

.res-left {
    display: flex;
    gap: 10px;
    min-width: 0;
    align-items: flex-start;
}

.res-icon {
    font-size: 22px;
    color: #6F009E;
    width: 28px;
    text-align: center;
    flex: 0 0 28px;
    margin-top: 2px;
}

.res-name {
    color: #6F009E;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    word-break: break-word;
}

.res-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.res-price {
    font-weight: 700;
    white-space: nowrap;
    text-align: right;
}

.res-del {
    border: none;
    background: none;
    color: #ff5b5b;
    font-size: 16px;
    cursor: pointer;
}

.pkg-head {
    background: #ff5b5b;
    padding: 10px 20px;
    color: #fff;
    border-radius: 10px 10px 0 0;
    font-weight: 700;
}

.pkg-body {
    border: 1px solid #eee;
    border-top: none;
    padding: 20px;
}

.pkg-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: start;
}

.pkg-name {
    margin: 0 0 6px;
    font-weight: 700;
    color: #333;
}

.pkg-meta {
    margin: 0;
    color: #666;
}

.pkg-price {
    font-weight: 700;
    white-space: nowrap;
}

.res-total {
    padding: 20px;
    border: 1px solid #eee;
    border-top: none;
    border-radius: 0 0 10px 10px;
    font-weight: 700;
    text-align: right;
    width: 100%;
}

.res-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 8px 20px;
    border: 1px solid #eee;
    border-top: none;
    background: #fafbfc;
    color: #6c757d;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .02em;
}

    .res-head .label-right {
        white-space: nowrap;
    }



.res-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: #fff;
    border-radius: 10px 10px 0 0;
    font-weight: 700;
}

    .res-section-title.is-comps {
        background: #8000ff;
    }

.res-edit-btn {
    border: 1px solid rgba(255,255,255,.8);
    background: rgba(255,255,255,.14);
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 12px;
    cursor: pointer;
}

    .res-edit-btn:hover {
        background: #fff;
        color: #8000ff;
    }

.res-empty-comps {
    border: 1px solid #eee;
    border-top: none;
    padding: 18px 20px;
    color: #666;
    border-radius: 0 0 10px 10px;
}

#modalCambiarComplementos .modal-dialog {
    max-width: 1180px;
}

#modalCambiarComplementos .modal-body {
    background-color: #F4F3F7;
    max-height: 75vh;
    overflow-y: auto;
}

#modalCambiarComplementos #hs-complementos {
    padding: 0;
}

#modalCambiarComplementos .btn-ver-video {
    display: none !important;
}

@media (max-width: 576px) {
    .pkg-row {
        grid-template-columns: 1fr;
    }

    .pkg-price {
        text-align: left;
        margin-top: 8px;
        font-size: 1.1em;
        color: #6F009E;
    }

    .res-item {
        grid-template-columns: 1fr;
        padding: 15px;
    }

    .res-right {
        justify-content: space-between;
        margin-top: 10px;
        padding-left: 38px;
    }

    .res-price {
        text-align: left;
    }

    .res-head {
        display: none;
    }

    #resumen-complementos,
    .col-12.col-lg-4 > div {
        padding: 20px !important;
    }

    .res-section-title {
        flex-direction: column;
        align-items: flex-start;
    }

    .res-edit-btn {
        width: 100%;
    }
}

.res-comps-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border-left: 1px solid #eee;
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 14px 20px;
    background: #fff;
}

.res-comps-toolbar-title {
    font-weight: 700;
    color: #333;
    font-size: 14px;
    margin-bottom: 2px;
}

.res-comps-toolbar-text {
    color: #6c757d;
    font-size: 13px;
}

.res-change-btn {
    color: #FF5252;
    border: 1px solid #FF5252;
    background: #fff;
    border-radius: 6px;
    font-weight: bold;
    padding: 7px 14px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

    .res-change-btn:hover {
        background: #FF5252;
        color: #fff;
    }

@media (max-width: 576px) {
    .res-comps-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .res-change-btn {
        width: 100%;
    }
}

.pkg-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border-left: 1px solid #eee;
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 14px 20px;
    background: #fff;
}

.pkg-toolbar-title {
    font-weight: 700;
    color: #333;
    font-size: 14px;
    margin-bottom: 2px;
}

.pkg-toolbar-text {
    color: #6c757d;
    font-size: 13px;
}

@media (max-width: 576px) {
    .pkg-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
}


/* =====================================================
     NUEVO ESTILO
===================================================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Montserrat', sans-serif !important;
    background-color: #f7f6fd;
    color: #4b4b68;
    display: flex;
    justify-content: center;
}

/* Contenedor Principal en 2 Columnas */
.checkout-layout {
    width: 100%;
    max-width: 1120px;
    grid-template-columns: 1fr 340px;
    gap: 28px;
    align-items: start;
}

/* =====================================================
     COLUMNA IZQUIERDA: SELECCIONES (ESTILO RECIBO)
     ===================================================== */
.selections-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Tarjeta base (idéntica a .receipt-card) */
.order-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 12px 35px rgba(36, 28, 93, 0.06);
    overflow: hidden;
    border: 1px solid #e7e6f3;
}

/* Barra superior en degradado de marca */
.brand-bar {
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, #241c5d 0%, #8b5cf6 50%, #FF5252 100%);
}

.card-body {
    padding: 28px 32px !important;
    display: block !important;
}

/* Título de Grupo / Sección */
.table-group-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1e1656;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Caja de Aviso y Cambio (Estilo .meta-box del recibo) */
.notice-box {
    background: #f7f6fd;
    border: 1px solid #e7e6f3;
    padding: 14px 18px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.notice-text h4 {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e1656;
    margin: 0 0 3px 0;
}

.notice-text p {
    font-size: 0.78rem;
    color: #63617e;
    margin: 0;
    line-height: 1.4;
}

/* Botón Cambiar (Estilo .btn-secondary del recibo) */
.btn-change {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    text-decoration: none;
    background: transparent;
    color: #241c5d;
    border: 1px solid #c4c1e7;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

    .btn-change:hover {
        background: #f0edf9;
        border-color: #241c5d;
    }

    .btn-change svg {
        width: 14px;
        height: 14px;
        stroke: currentColor;
        fill: none;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

/* Tablas de Productos (Mismo estilo que .receipt-table) */
.receipt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

    .receipt-table thead th {
        padding: 10px 0;
        border-bottom: 2px solid #e7e6f3;
        font-size: 0.7rem;
        font-weight: 700;
        color: #7b789e;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .receipt-table th.col-detail {
        text-align: left;
        width: 70%;
    }

    .receipt-table th.col-price {
        text-align: right;
        width: 30%;
    }

    .receipt-table tbody td {
        padding: 16px 0;
        border-bottom: 1px solid #e7e6f3;
        vertical-align: middle;
    }

    .receipt-table td.col-detail {
        color: #1e1656;
        font-weight: 600;
    }

    .receipt-table td.col-price {
        text-align: right;
        color: #1e1656;
        font-weight: 700;
        font-size: 0.95rem;
    }

.item-title {
    font-size: 1rem;
    font-weight: 800;
    color: #1e1656;
    margin: 0 0 6px 0;
}

.item-specs {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.8rem;
    color: #555273;
}

    .item-specs strong {
        color: #1e1656;
    }

/* Píldora de Modalidad (Exacta a la del recibo) */
.modality-pill {
    display: inline-block;
    background-color: #e0dcf8;
    color: #241c5d;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 4px;
}

/* Ítem de Capacitación con Icono y Papelera */
.training-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.training-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(139, 92, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b5cf6;
    flex-shrink: 0;
}

    .training-icon-box svg {
        width: 20px;
        height: 20px;
        fill: currentColor;
    }

.training-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e1656;
    margin: 0;
    line-height: 1.35;
}

.price-action-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-remove {
    background: transparent;
    border: none;
    color: #FF5252;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

    .btn-remove:hover {
        background: #fff1f1;
        transform: scale(1.1);
    }

    .btn-remove svg {
        width: 16px;
        height: 16px;
        stroke: currentColor;
        fill: none;
        stroke-width: 2;
    }

/* Total inferior en tarjeta */
.card-subtotal-footer {
    padding-top: 14px;
    text-align: right;
    font-size: 0.92rem;
    font-weight: 800;
    color: #1e1656;
}

/* =====================================================
     COLUMNA DERECHA: RESUMEN DEL PEDIDO (SIDEBAR)
     ===================================================== */
.summary-sidebar {
    position: sticky;
    top: 24px;
}

.summary-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 12px 35px rgba(36, 28, 93, 0.06);
    border: 1px solid #e7e6f3;
    overflow: hidden;
}

.summary-content {
    padding: 28px 24px 24px;
    text-align: center;
}

.summary-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1e1656;
    margin: 0 0 4px 0;
}

.summary-count {
    font-size: 0.78rem;
    color: #7b789e;
    font-weight: 600;
    margin: 0 0 18px 0;
}

/* Bloque de Totales (Mismo estilo que .totals-box del recibo) */
.summary-totals-box {
    background: #f0edf9;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #63617e;
    margin-bottom: 8px;
}

    .total-row.final {
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid #dcd9ee;
        font-size: 1.1rem;
        font-weight: 800;
        color: #241c5d;
        margin-bottom: 0;
    }

/* Botón Principal (Idéntico a .btn-primary del recibo) */
.btn-continue {
    width: 100%;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    text-decoration: none;
    border: none;
    background: linear-gradient(145deg, #241c5d 0%, #191246 100%);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(36, 28, 93, 0.25);
    transition: all 0.2s ease;
    margin-bottom: 20px;
}

    .btn-continue:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(36, 28, 93, 0.35);
    }

/* Bloque de Pago Seguro y Badges */
.security-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #1e1656;
}

    .security-badge svg {
        width: 15px;
        height: 15px;
        stroke: #22c55e;
        fill: none;
        stroke-width: 2.2;
    }

.payment-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.payment-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 26px;
    background: #ffffff;
    border: 1px solid #dcd9ee;
    border-radius: 6px;
    color: #241c5d;
    font-size: 1.15rem;
    box-shadow: 0 1px 3px rgba(36, 28, 93, 0.04);
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    cursor: default;
}

    .payment-badge:hover {
        transform: translateY(-2px);
        border-color: #241c5d;
        color: #FF5252;
    }

.verify-notice {
    font-size: 0.74rem;
    color: #7b789e;
    line-height: 1.45;
    margin: 0;
}

/* =====================================================
     ADAPTACIÓN RESPONSIVA
     ===================================================== */
@media (max-width: 900px) {
    .checkout-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .summary-sidebar {
        position: static;
    }
}

@media (max-width: 600px) {
    .card-body {
        padding: 20px 18px;
    }

    .notice-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .btn-change {
        width: 100%;
        justify-content: center;
    }

    /* Transformación de tabla a formato móvil */
    .receipt-table,
    .receipt-table thead,
    .receipt-table tbody,
    .receipt-table th,
    .receipt-table td,
    .receipt-table tr {
        display: block;
    }

        .receipt-table thead {
            display: none;
        }

        .receipt-table tbody td {
            border: none;
            padding: 6px 0;
            width: 100%;
        }

        .receipt-table td.col-price {
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-top: 1px solid #f0edf9;
            margin-top: 8px;
            padding-top: 10px;
        }

            .receipt-table td.col-price::before {
                content: "Precio:";
                font-weight: 600;
                color: #7b789e;
                font-size: 0.78rem;
                text-transform: uppercase;
            }
}