:root {
    --bg-body: #f1f5f9;
    --surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --primary: #0f172a;
    --primary-hover: #1e293b;
    --accent-bg: #f8fafc;
    --radius-lg: 16px;
    --radius-md: 10px;
}

body {
    margin: 0;
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    padding: 32px 0 100px 0; /* Espacio extra abajo para no tapar contenido en mobile */
}

.checkout-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

.header-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.03);
}

.badge-empresa {
    display: inline-block;
    background: var(--accent-bg);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 10px;
}

.titulo-curso {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 0 0 8px;
    color: var(--text-main);
}

.descripcion-curso {
    color: var(--text-muted);
    font-size: 13.5px;
    line-height: 1.5;
    margin: 0;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

.main-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.03);
}

.section-header {
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.section-header h2 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 2px;
}

.section-header p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.qty-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--accent-bg);
    border: 1px solid var(--border);
    padding: 14px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.qty-box .label {
    font-size: 13.5px;
    font-weight: 600;
}

.qty-box .sublabel {
    font-size: 11.5px;
    color: var(--text-muted);
}

.qty-controls {
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
}

.qty-controls button {
    width: 38px;
    height: 38px;
    border: 0;
    background: transparent;
    font-weight: 600;
    font-size: 18px;
    color: var(--text-main);
}

.qty-controls button:active {
    background: var(--accent-bg);
}

.qty-controls input {
    width: 38px;
    height: 38px;
    border: 0;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    outline: none;
}

.participante-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 14px;
}

.participante-card:focus-within {
    border-color: var(--text-main);
}

.participante-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.ticket-badge {
    background: var(--accent-bg);
    border: 1px solid var(--border);
    color: var(--text-main);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.p-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

.form-label {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 4px;
}

.form-control {
    height: 42px; /* Mayor altura táctil */
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
    padding: 8px 12px;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08) !important;
}

.side-panel {
    position: sticky;
    top: 24px;
}

.summary-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.03);
}

.summary-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 10px;
    color: var(--text-muted);
}

.summary-row.total {
    border-top: 1px dashed var(--border);
    padding-top: 10px;
    margin-top: 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}

.summary-row.total span:last-child {
    font-size: 20px;
    letter-spacing: -0.5px;
}

.btn-submit {
    width: 100%;
    height: 48px;
    background: var(--primary);
    color: #fff;
    border: 0;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    margin-top: 14px;
}

/* Optimización Responsive Mobile */
@media (max-width: 900px) {
    body {
        padding: 16px 0 110px 0;
    }

    .checkout-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .titulo-curso {
        font-size: 20px;
    }

    /* Fijar la card de resumen abajo en pantallas móviles estilo App */
    .side-panel {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 999;
        top: auto;
    }

    .summary-card {
        border-radius: 16px 16px 0 0;
        border-bottom: 0;
        box-shadow: 0 -8px 25px rgba(15, 23, 42, 0.12);
        padding: 16px 20px;
        background: #ffffff;
    }

    .summary-title, 
    .summary-row:not(.total) {
        display: none; /* Oculta detalles secundarios para ahorrar espacio vertical */
    }

    .summary-row.total {
        border-top: 0;
        padding-top: 0;
        margin-top: 0;
        align-items: center;
    }

    .btn-submit {
        margin-top: 8px;
    }
}
@media (max-width: 767.98px) {

    .checkout-wrapper {
        padding-bottom: 180px;
        overflow: visible;
    }

    .checkout-grid {
        display: block;
    }

    .main-panel {
        width: 100%;
    }

    .side-panel {
        position: fixed !important;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        z-index: 1050;
        padding: 0;
        margin: 0;
        background: #fff;
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.10);
    }

    .summary-card {
        position: static !important;
        width: 100%;
        max-height: none !important;
        height: auto !important;
        overflow: visible !important;
        border-radius: 16px 16px 0 0;
        padding: 15px;
    }

    /* Ocultamos detalles que ocupan demasiado espacio abajo */
    .summary-title,
    .summary-row:not(.total),
    .summary-card .mt-3 {
        /* Si querés mantener el cupón visible, eliminá esta regla */
    }

    .summary-card .btn-submit {
        width: 100%;
    }

    .input-group {
        width: 100%;
    }

    .input-group .form-control {
        min-width: 0;
    }
}