/* ═══════════════════════════════════════════════════════════
   0. CSS CUSTOM PROPERTIES — Tema Vivo
═══════════════════════════════════════════════════════════ */
:root {
    /* ── Tipografía Inter ────────────────────────────────── */
    --vivo-font: 'Inter', system-ui, -apple-system, sans-serif;
    --vivo-fs-hero: 40px;
    --vivo-fs-heading: clamp(32px, 4vw, 30px);
    --vivo-fs-heading-seccion: 25px;
    --vivo-fs-card-title: 20px;
    --vivo-fs-subtitle: 16px;
    --vivo-fs-body: 14px;
    --vivo-fs-caption: 13px;
    --vivo-fw-bold: 700;
    --vivo-fw-medium: 500;
    --vivo-fw-regular: 400;
    /* ── Brand / Primary ────────────────────────────────── */
    --vivo-primary: #E84E0F;
    --vivo-primary-light: #FCD1BF;
    --vivo-primary-lightest: #FEF0E7;
    --vivo-primary-dark: #c43d0c;
    --vivo-primary-darker: #b33a0b;
    --vivo-light: #fff3ee;
    --vivo-tint: #fff5f0;
    --vivo-warm: #ffe8da;
    --vivo-pale: var(--vivo-primary-light);
    --vivo-border: #f5c6ac;
    --vivo-dark: #6B1A00;
    --vivo-shadow-xs: rgba(232, 78, 15, 0.12);
    --vivo-shadow-sm: rgba(232, 78, 15, 0.15);
    --vivo-shadow-md: rgba(232, 78, 15, 0.18);
    --vivo-shadow-lg: rgba(232, 78, 15, 0.25);
    --vivo-bg-alpha: rgba(232, 78, 15, 0.10);
    /* ── Neutros compartidos ─────────────────────────────── */
    --vivo-text-primary: #000000;
    --vivo-text-secondary: #5D5D5D;
    --vivo-text-placeholder: #929292;
    --vivo-surface-card: #ECECEC;
    --vivo-surface-resumen: #F9F9F9;
    --vivo-surface-footer: #585858;
    --vivo-border-default: #D9D9D9;
    /* ── Estados de pedido ──────────────────────────────── */
    --vivo-estado-pagado: #E4C82E;
    --vivo-estado-completado: #3A9F1E;
    --vivo-estado-cancelado: #D20000;
    --vivo-estado-error-pago: #000000;
    /* Bootstrap primary override */
    --bs-primary: var(--vivo-primary);
    --bs-primary-rgb: 232, 78, 15;
    /* Bootstrap link override */
    --bs-link-color: var(--vivo-primary);
    --bs-link-color-rgb: 232, 78, 15;
    --bs-link-hover-color: var(--vivo-primary-dark);
    --bs-link-hover-color-rgb: 196, 61, 12;
    /* Bootstrap accordion override */
    --bs-accordion-active-color: var(--vivo-primary);
    --bs-accordion-active-bg: var(--vivo-tint);
    --bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem var(--vivo-shadow-lg);
    --bs-accordion-border-color: var(--vivo-border);
    /* Icono chevron en estado expandido con color primario */
    --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23E84E0F'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

@media (max-width: 575px) {
    :root {
        --vivo-fs-heading-seccion: 19px;
        --vivo-fs-card-title: 16px;
    }
}

/* ───────────────────────────────────────────────────────────
   Tema SM — clase aplicada via ClaseCssPrincipal de la tienda
   Admin: Tiendas → Clase CSS principal = "tema-sm"
─────────────────────────────────────────────────────────── */
body.tema-sm {
    --vivo-primary:          #E0130C;
    --vivo-primary-light:    #F98A86;
    --vivo-primary-lightest: #FDD0CE;
    --vivo-primary-dark:     #b30f09;
    --vivo-primary-darker:   #920c08;
    --vivo-light:          #fff0f0;
    --vivo-tint:           #fff5f5;
    --vivo-warm:           #fce3e2;
    --vivo-pale:           var(--vivo-primary-light);
    --vivo-border:         #f5b4b2;
    --vivo-dark:           #3a3a3a;
    --vivo-shadow-xs:      rgba(224, 19, 12, 0.12);
    --vivo-shadow-sm:      rgba(224, 19, 12, 0.15);
    --vivo-shadow-md:      rgba(224, 19, 12, 0.18);
    --vivo-shadow-lg:      rgba(224, 19, 12, 0.25);
    --vivo-bg-alpha:       rgba(224, 19, 12, 0.10);

    /* Secundario azul SM */
    --vivo-secondary:       #0077A3;
    --vivo-secondary-light: #D8E0E9;

    /* Footer copyright */
    --footer-copyright-bg: #000000;

    /* Bootstrap overrides */
    --bs-primary:          var(--vivo-primary);
    --bs-primary-rgb:      224, 19, 12;
    --bs-link-color:       var(--vivo-primary);
    --bs-link-color-rgb:   224, 19, 12;
    --bs-link-hover-color: var(--vivo-primary-dark);
    --bs-link-hover-color-rgb: 179, 15, 9;
    --bs-accordion-active-color:         var(--vivo-primary);
    --bs-accordion-active-bg:            var(--vivo-tint);
    --bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem var(--vivo-shadow-lg);
    --bs-accordion-border-color:         var(--vivo-border);
    --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23E0130C'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");

    /* Bootstrap secondary → azul SM */
    --bs-secondary:     var(--vivo-secondary);
    --bs-secondary-rgb: 0, 119, 163;
}

/* form-control focus — usa el primary de cada tema en lugar del azul Bootstrap */
.form-control:focus {
    border-color: var(--vivo-primary);
    box-shadow: 0 0 0 .25rem rgba(var(--bs-primary-rgb), .25);
}


/* Pack cards — iconos informativos en azul SM */
body.tema-sm .pack-card__oficial i,
body.tema-sm .pack-card__header-label i,
body.tema-sm .pack-card__header-student .bi-person-fill {
    color: var(--vivo-secondary);
    /*background-color: var(--vivo-secondary);*/
}

/* Resumen carrito — iconos de features en azul SM */
body.tema-sm .resumen-features .feature-item i,
body.tema-sm .resumen-features .feature-item [class^="icon-"] {
    color: var(--vivo-secondary);
    background-color: var(--vivo-secondary);
}

/* Badge carrito en negro en tema SM */
body.tema-sm .cart-badge {
    background: #000;
}

/* Home — numeración de pasos en azul SM */
body.tema-sm .paso-numero {
    color: var(--vivo-secondary);
}

/* Home — ola SVG de pasos en azul SM */
body.tema-sm .pasos-wave path,
body.tema-sm .pasos-wave polyline,
body.tema-sm .pasos-wave line {
    stroke: var(--vivo-secondary);
}

/* Home — títulos y burbujas de pasos en azul SM */
body.tema-sm .paso-titulo {
    color: var(--vivo-secondary);
}
body.tema-sm .paso-burbuja {
    background-color: var(--vivo-secondary-light);
    color: var(--vivo-secondary);
}
body.tema-sm .paso-burbuja [class^="icon-"] {
    background-color: var(--vivo-secondary);
}

/* Bloque contacto en tema SM: fondo gris-azulado, título negro */
body.tema-sm .bloque-contacto {
    background-color: var(--vivo-secondary-light);
    border-top-color: rgba(0, 119, 163, 0.2);
}
body.tema-sm .bloque-contacto-titulo {
    color: #1a1a1a;
}
body.tema-sm .bloque-contacto-telefono {
    color: var(--vivo-secondary);
}

/* Video card en tema SM: icono y título azul SM */
body.tema-sm .video-card-play-overlay {
    background-color: var(--vivo-secondary);
}
body.tema-sm .video-card-titulo {
    color: var(--vivo-secondary);
}
body.tema-sm .video-carousel-dot.activo {
    background-color: var(--vivo-secondary);
}

/* btn-secondary y btn-outline-secondary en azul SM */
body.tema-sm .btn-secondary {
    --bs-btn-color:              #fff;
    --bs-btn-bg:                 var(--vivo-secondary);
    --bs-btn-border-color:       var(--vivo-secondary);
    --bs-btn-hover-color:        #fff;
    --bs-btn-hover-bg:           #005f82;
    --bs-btn-hover-border-color: #005f82;
    --bs-btn-active-color:       #fff;
    --bs-btn-active-bg:          #005880;
    --bs-btn-active-border-color:#005880;
    --bs-btn-disabled-bg:        var(--vivo-secondary);
    --bs-btn-disabled-border-color: var(--vivo-secondary);
}
body.tema-sm .btn-outline-secondary {
    --bs-btn-color:              var(--vivo-secondary);
    --bs-btn-border-color:       var(--vivo-secondary);
    --bs-btn-hover-color:        #fff;
    --bs-btn-hover-bg:           var(--vivo-secondary);
    --bs-btn-hover-border-color: var(--vivo-secondary);
    --bs-btn-active-color:       #fff;
    --bs-btn-active-bg:          var(--vivo-secondary);
    --bs-btn-active-border-color:var(--vivo-secondary);
    --bs-btn-disabled-color:     var(--vivo-secondary);
    --bs-btn-disabled-border-color: var(--vivo-secondary);
}

/* Filtro de modalidad/asignatura en azul SM */
body.tema-sm .filtro-pill {
    border-color: var(--vivo-secondary);
    color: var(--vivo-secondary);
}
body.tema-sm .filtro-pill:hover {
    background: var(--vivo-secondary-light);
}
body.tema-sm .filtro-pill.activo {
    background: var(--vivo-secondary);
    border-color: var(--vivo-secondary);
    color: #fff;
}


/* ═══════════════════════════════════════════════════════════
   1. BASE
═══════════════════════════════════════════════════════════ */
html {
    font-size: 14px;
}

body {
    font-family: var(--vivo-font);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.page-content {
    flex: 1;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

/* ═══════════════════════════════════════════════════════════
   2. BOOTSTRAP OVERRIDES
═══════════════════════════════════════════════════════════ */

/* Focus ring global */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus,
.form-control:focus, .form-select:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--vivo-shadow-lg);
}

/* form-select focus border */
.form-select:focus {
    border-color: var(--vivo-primary);
}

/* btn-link con colores Vivo */
.btn-link {
    --bs-btn-color:       var(--vivo-primary);
    --bs-btn-hover-color: var(--vivo-primary-dark);
}

/* Accordion hover */
.accordion-button:hover {
    background-color: var(--vivo-light);
}

/* Accordion body: borde superior usa el color de borde Vivo */
.accordion-body.border-top {
    border-color: var(--vivo-border) !important;
}

/* Checkbox / radio */
.form-check-input:checked {
    background-color: var(--vivo-primary);
    border-color: var(--vivo-primary);
}

.form-check-input:focus {
    border-color: var(--vivo-primary);
    box-shadow: 0 0 0 0.25rem var(--vivo-shadow-lg);
}

/* Checkbox de selección en la pantalla de devolución parcial (pack completo o libro suelto):
   más grande y con cursor de mano para que quede claro que es seleccionable. */
.check-seleccion-devolucion {
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
}

.check-seleccion-devolucion:disabled {
    cursor: default;
}

/* Botón primario */
.btn-primary {
    --bs-btn-bg:                    var(--vivo-primary);
    --bs-btn-border-color:          var(--vivo-primary);
    --bs-btn-hover-bg:              var(--vivo-primary-dark);
    --bs-btn-hover-border-color:    var(--vivo-primary-dark);
    --bs-btn-active-bg:             var(--vivo-primary-darker);
    --bs-btn-active-border-color:   var(--vivo-primary-darker);
    --bs-btn-disabled-bg:           var(--vivo-primary);
    --bs-btn-disabled-border-color: var(--vivo-primary);
    --bs-btn-focus-shadow-rgb:      232, 78, 15;
}

/* Botón outline primario */
.btn-outline-primary {
    --bs-btn-color:              var(--vivo-primary);
    --bs-btn-border-color:       var(--vivo-primary);
    --bs-btn-hover-color:        #fff;
    --bs-btn-hover-bg:           var(--vivo-primary);
    --bs-btn-hover-border-color: var(--vivo-primary);
    --bs-btn-active-color:       #fff;
    --bs-btn-active-bg:          var(--vivo-primary-darker);
    --bs-btn-active-border-color:var(--vivo-primary-darker);
    --bs-btn-focus-shadow-rgb:   232, 78, 15;
}

/* Alert info */
.alert-info {
    --bs-alert-color:        #495057;
    --bs-alert-bg:           #F8F9FA;
    --bs-alert-border-color: #dee2e6;
}

/* ═══════════════════════════════════════════════════════════
   3. FORM CONTROLS
═══════════════════════════════════════════════════════════ */

/* Placeholder global: gris claro para distinguirlo del texto real */
.form-control::placeholder,
.form-select::placeholder,
input::placeholder,
textarea::placeholder {
    color: #7B8794;
    opacity: 1;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Autofill override */
input:not([type="checkbox"]):not([type="radio"]):focus-visible,
input:not([type="checkbox"]):not([type="radio"]):focus,
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px white inset !important;
    box-shadow: 0 0 0 1000px white inset !important;
    font-size: 14px !important;
    outline: none !important;
}

/* Validation feedback */
.invalid-feedback {
    color: #FF3D00;
}

.input-group .form-control.is-invalid {
    z-index: 1;
}

/* Input con etiqueta solapada (floating label) */
.input-etiqueta-solapada {
    position: relative;
}

.input-etiqueta-solapada label {
    position: absolute;
    top: -10px;
    left: 15px;
    background: white;
    padding: 0 10px;
    font-size: 14px;
    opacity: 0;
    transition: all 0.2s ease;
    background-color: #fff;
    z-index: 99;
}

.input-etiqueta-solapada textarea:focus,
.input-etiqueta-solapada input:focus {
    border: 1px solid var(--vivo-primary);
    outline: none;
    box-shadow: none;
}

.input-etiqueta-solapada .input-group input {
    border-right: 0;
}

.input-etiqueta-solapada .input-group button {
    border-top-right-radius: 6px !important;
    border-bottom-right-radius: 6px !important;
}

.input-etiqueta-solapada .input-group:focus-within input,
.input-etiqueta-solapada .input-group:focus-within button {
    border-color: var(--vivo-primary);
}

.input-etiqueta-solapada textarea:focus + label,
.input-etiqueta-solapada .input-group:focus-within label,
.input-etiqueta-solapada input:focus + label,
.input-etiqueta-solapada input:focus ~ label {
    opacity: 1;
    color: var(--vivo-primary);
}

.input-etiqueta-solapada textarea:focus::placeholder,
.input-etiqueta-solapada input:focus::placeholder,
.input-etiqueta-solapada .input-group:focus-within input::placeholder {
    opacity: 0;
}

.select-etiqueta-solapada {
    position: relative;
}

.select-etiqueta-solapada label {
    position: absolute;
    top: -10px;
    left: 15px;
    background-color: #fff;
    padding: 0 10px;
    font-size: 14px;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 99;
    pointer-events: none;
}

.select-etiqueta-solapada select:focus + label {
    opacity: 1;
    color: var(--vivo-primary);
}

.input-etiqueta-solapada.has-value label,
.input-etiqueta-solapada input:not(:placeholder-shown) + label,
.input-etiqueta-solapada input:not(:placeholder-shown) ~ label,
.input-etiqueta-solapada .input-group:has(input:not(:placeholder-shown)) label {
    opacity: 1;
}

.input-etiqueta-solapada:has(input:disabled) label,
.select-etiqueta-solapada:has(select:disabled) label {
    background-color: #e9ecef;
}

.input-etiqueta-solapada.has-value input:focus + label,
.input-etiqueta-solapada.has-value input:focus ~ label,
.input-etiqueta-solapada.has-value .input-group:focus-within label {
    color: var(--vivo-primary);
}

.select-etiqueta-solapada.has-value label {
    opacity: 1;
}

.select-etiqueta-solapada.has-value select:focus + label {
    color: var(--vivo-primary);
}

/* ═══════════════════════════════════════════════════════════
   4. GLOBAL UI
═══════════════════════════════════════════════════════════ */

/* Loading */
div#loading {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(125, 125, 125, 0.5);
    color: #ff0040;
}

/* Error global */
.msg-error {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    background-color: #dc3545;
    color: #fff;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 500px;
}

.msg-error .btn-close {
    filter: invert(1);
    cursor: pointer;
}

/* Modal de alerta (warning) */
.modal-alerta {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-top: 4px solid #ffc107;
    padding: 24px 24px 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    z-index: 1120;
    width: 90%;
    max-width: 460px;
    text-align: center;
}

.modal-alerta__icono {
    font-size: 2rem;
    color: #ffc107;
    margin-bottom: 12px;
}

.modal-alerta__mensaje {
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 20px;
}


/* Enlace */
.enlace {
    color: var(--vivo-primary);
    text-decoration: none;
}

/* Pointer */
.pointer { cursor: pointer; }

/* Alta usuario / ficha */
.ficha {
    color: var(--vivo-text-secondary);
    font-size: 14px;
    padding: 10px 20px;
    margin-top: 20px;
}

ul.errores-validacion {
    color: #dc3545;
    padding-left: 20px;
}

/* ═══════════════════════════════════════════════════════════
   5. AUTH PAGES (Login / Alta-Usuario)
═══════════════════════════════════════════════════════════ */

/* Login card */
#login .card {
    border-radius: 10px;
}


#login .card a {
    text-decoration: none;
    color: var(--vivo-primary);
}

/* Página de autenticación */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 3rem 1rem 4rem;
    min-height: 60vh;
}

.auth-page__inner {
    width: 100%;
    max-width: 580px;
    background: white;
    border-radius: 12px;
    padding: 2.2rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.09);
}

@media (max-width: 767px) {
    .auth-page {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 20px 10px;
    }

    .auth-page__inner {
        padding: 1.5rem;
    }
}

/* Auth Panel: título */
.auth-panel__titulo {
    font-size: var(--vivo-fs-heading-seccion);
    font-weight: var(--vivo-fw-bold);
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-panel__subtitulo {
    font-size: 1rem;
    color: #5d5d5d;
    text-align: start;
   margin-bottom: 1.25rem;
    line-height: 1.5;
}

.auth-panel__colegio {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--vivo-primary, #E84E0F);
}
.auth-panel__colegio .icon-school { width: 0.95rem; height: 0.95rem; vertical-align: -0.125em; }

/* Auth Panel: social login */
.auth-panel__social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.auth-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid #dee2e6;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-social-btn:hover {
    border-color: var(--vivo-primary);
    box-shadow: 0 2px 8px var(--vivo-shadow-xs);
}

/* Auth Panel: divider */
.auth-panel__divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    color: #999;
    font-size: 0.85rem;
}

.auth-panel__divider::before,
.auth-panel__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #dee2e6;
}

/* Auth Panel: toggle link */
.auth-panel__toggle-link {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: var(--vivo-primary);
    font-size: 0.95rem;
    cursor: pointer;
    text-align: center;
    padding: 0;
}

.auth-panel__toggle-link:hover {
    text-decoration: underline;
}

/* Auth: icono circular decorativo */
.auth-icono {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--vivo-bg-alpha);
    margin-bottom: 1rem;
}

.auth-icono i {
    font-size: 1.6rem;
    color: var(--vivo-primary);
}

.auth-icono--success { background: rgba(25, 135, 84, 0.12); }
.auth-icono--success i { color: #198754; }
.auth-icono--warning { background: rgba(255, 193, 7, 0.15); }
.auth-icono--warning i { color: #ffc107; }
.auth-icono--warning [class^="icon-"] { background-color: #ffc107; }
.auth-icono--error { background: rgba(220, 53, 69, 0.10); }
.auth-icono--error i { color: #dc3545; }

/* Verificación de email pendiente — mensaje post-registro */
.verificacion-pendiente {
    text-align: center;
    padding: 1.5rem 0;
}

.verificacion-pendiente__icono {
    font-size: 2.5rem;
    color: var(--vivo-primary);
    display: block;
    margin-bottom: 0.5rem;
}

body.tema-sm .verificacion-pendiente__icono {
    color: var(--vivo-primary);
}

/* Auth: tipografía páginas secundarias */
.auth-page__inner h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.35rem;
}

.auth-page__inner .auth-descripcion,
.auth-panel .auth-descripcion {
    font-size: 0.9rem;
    color: #5d5d5d;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.auth-volver {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.auth-page__inner .auth-volver,
.auth-panel .auth-volver {
    font-size: 0.85rem;
    color: #6c757d;
    text-decoration: none;
    transition: color 0.15s;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.auth-page__inner .auth-volver:hover,
.auth-panel .auth-volver:hover {
    color: var(--vivo-primary);
}

.auth-page__inner .auth-nota,
.auth-panel .auth-nota {
    font-size: 0.78rem;
    color: #6c757d;
    margin-top: 1.25rem;
}

/* Auth Panel: tabs */
.auth-panel__tabs {
    display: flex;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 1.75rem;
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 0.65rem 0.5rem;
    font-size: 0.925rem;
    color: #6c757d;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    text-align: center;
}

.auth-tab:hover { color: var(--vivo-primary); }

.auth-tab--active {
    color: var(--vivo-primary);
    font-weight: 600;
    border-bottom-color: var(--vivo-primary);
}

/* Auth Panel: mensaje carrito */
.auth-panel__mensaje-carrito {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-top: 1.25rem;
    padding: 0.875rem 1rem;
    background: #fff8f5;
    border: 1px solid #f3cbb8;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #5d5d5d;
    line-height: 1.5;
}

.auth-panel__mensaje-carrito .bi {
    color: var(--vivo-primary);
    font-size: 1rem;
    margin-top: 1px;
}

/* Modal de autenticación (desde carrito) */
.modal-auth-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

.modal-auth {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1050;
    width: min(580px, 94vw);
    max-height: 90vh;
    overflow-y: auto;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.modal-auth__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.modal-auth__header h5 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════
   6. MI CUENTA
═══════════════════════════════════════════════════════════ */

/* Título de página */
.mi-cuenta h1 {
    font-weight: var(--vivo-fw-bold);
    font-size: var(--vivo-fs-heading);
    margin-bottom: 24px;
}

/* Título sección "Productos vistos recientemente" */
.productos-vistos h3 {
    font-size: var(--vivo-fs-heading-seccion);
    font-weight: var(--vivo-fw-bold);
}

/* Menú lateral */
.nombre-cliente {
    margin-bottom: 20px;
}

.nombre-cliente .iniciales {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background-color: var(--vivo-primary);
    color: #fff;
    font-weight: 700;
    font-size: 22px;
    flex-shrink: 0;
}

body.tema-sm .nombre-cliente .iniciales {
    background-color: var(--vivo-secondary);
}

.nombre-cliente .nombre {
    display: block;
    font-weight: 700;
    font-size: 18px;
    color: #000;
}

.mi-cuenta-nav {
    border-radius: 10px;
    border-color: #E8E8E8;
    overflow: hidden;
}

.nav-menu-item {
    display: flex;
    align-items: center;
    padding: 11px 16px;
    color: #555;
    text-decoration: none;
    border-left: 3px solid transparent;
    font-size: 15px;
    transition: background 0.15s, border-left-color 0.15s, color 0.15s;
}

.nav-menu-item:hover {
    background-color: var(--vivo-light);
    color: var(--vivo-primary);
    border-left-color: var(--vivo-pale);
}

.nav-menu-item.active {
    color: var(--vivo-primary);
    font-weight: 600;
    border-left-color: var(--vivo-primary);
    background-color: var(--vivo-light);
}

.nav-menu-item i {
    width: 20px;
    text-align: center;
    margin-right: 10px;
    font-size: 1.05rem;
}

/* Enlace cerrar sesión */
.nav-menu-item--peligro {
    color: #dc3545 !important;
    border-left-color: transparent !important;
}

.nav-menu-item--peligro:hover {
    color: #dc3545 !important;
    background-color: #fff5f5;
    border-left-color: transparent !important;
}

/* Botón toggle móvil del menú "Mi cuenta" — mismo estilo que los desplegables de FAQs */
.mi-cuenta-nav-toggle {
    background-color: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px !important;
    padding: 1rem 1.25rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: #1a1a1a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.mi-cuenta-nav-toggle:hover,
.mi-cuenta-nav-toggle:focus {
    background-color: #fff;
    color: var(--vivo-primary);
    border-color: #e8e8e8;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.mi-cuenta-nav-toggle[aria-expanded="true"] {
    color: var(--vivo-primary);
    box-shadow: none;
    border-radius: 12px 12px 0 0 !important;
}

.mi-cuenta-nav-toggle .icon-chevron-down {
    background-color: currentColor;
    transition: transform 0.2s ease;
}

.mi-cuenta-nav-toggle[aria-expanded="true"] .icon-chevron-down {
    transform: rotate(180deg);
}

/* Contenido Mi Cuenta */
.mis-datos {
    padding: 10px 10px;
}


.mis-datos .cabecera {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--vivo-surface-card);
}

.mis-datos .cabecera-icono {
    color: var(--vivo-primary);
    font-size: 2rem;
    line-height: 1;
}

.mis-datos .cabecera h2 {
    margin-bottom: 4px;
    font-size: var(--vivo-fs-card-title);
    font-weight: var(--vivo-fw-bold);
}

.mis-datos .cabecera p {
    color: var(--vivo-text-secondary);
    margin: 0;
    font-size: 14px;
}

.mis-datos .ficha {
    background-color: #fff;
    border: 1px solid var(--bs-border-color);
    border-radius: 10px;
    padding: 16px 20px;
    margin-top: 16px;
}

.mis-datos .ficha h3 {
    font-size: var(--vivo-fs-subtitle);
    font-weight: var(--vivo-fw-bold);
    color: #333;
}

@media (max-width: 768px) {
    .mis-datos {
        padding: 0px;
    }

    .mis-datos .ficha {
        padding: 15px;
    }
}

.ficha-titulo {
    margin-bottom: 12px;
}

.campo-lista {
    display: flex;
    flex-direction: column;
}

.campo-fila {
    padding: 8px 0;
}
.campo-fila:last-child {
    border-bottom: none;
}

.campo-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 3px;
}

.campo-valor-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.campo-valor {
    font-size: 14px;
    color: #333;
}

.campo-modificar {
    color: #999;
    font-size: 13px;
    white-space: nowrap;
    padding: 0;
    text-decoration: none !important;
    flex-shrink: 0;
}
.campo-modificar:hover {
    color: var(--vivo-primary);
}

.campo-borrar {
    color: #dc3545;
    font-size: 13px;
    white-space: nowrap;
    padding: 0;
    text-decoration: none !important;
    flex-shrink: 0;
}
.campo-borrar:hover {
    color: #b02a37;
}

.campo-input-wrap {
    flex: 1;
    min-width: 0;
    max-width: 75%;
}

@media (max-width: 575px) {
    .campo-valor-row { flex-wrap: wrap; }
    .campo-input-wrap { max-width: 100%; }
    .campo-acciones { width: 100%; justify-content: flex-end; }
}

.campo-acciones {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    align-items: flex-start;
}

.campo-metodo-registro {
    margin-top: 12px;
    text-align: right;
}

.mis-datos-separador {
    border-color: #e8e8e8;
    margin: 4px 0 0;
}

.mensaje-ok {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin-top: 10px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 3px solid #16a34a;
    border-radius: 6px;
    color: #15803d;
    font-size: 13px;
}

.mensaje-ok i {
    font-size: 15px;
    flex-shrink: 0;
}

.errores-form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fff5f5;
    border: 1px solid #fecaca;
    border-left: 3px solid #dc3545;
    border-radius: 6px;
    color: #b91c1c;
    font-size: 13px;
}

.errores-form i {
    font-size: 15px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* btn-outline-secondary dentro de mis-datos, compra-page y carrito actúa como outline-primary
   (los componentes React usan btn-outline-secondary; migrar a btn-outline-primary en futuro) */
.mis-datos .btn-outline-secondary,
.compra-page .btn-outline-secondary,
.carrito-page .btn-outline-secondary {
    border-color: var(--vivo-primary);
    color: var(--vivo-primary);
}

.mis-datos .btn-outline-secondary:hover,
.compra-page .btn-outline-secondary:hover,
.carrito-page .btn-outline-secondary:hover {
    background-color: var(--vivo-primary);
    border-color: var(--vivo-primary);
    color: #fff;
}

/* Caja pedido */
.caja-pedido .ficha {
    border: 1px solid var(--vivo-surface-card);
    border-radius: 10px;
    background-color: #fff;
    padding: 16px 20px;
}

.caja-pedido .ficha h3 {
    font-size: var(--vivo-fs-subtitle);
    font-weight: var(--vivo-fw-bold);
    color: #333;
}

.caja-pedido .badge {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
}

.caja-pedido .btn-link {
    color: var(--vivo-primary);
    text-decoration: none;
    font-size: 14px;
}

.caja-pedido .btn-link:hover {
    color: var(--vivo-primary-dark);
}

/* Filtros estado */
.botones-estado {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.botones-estado .nav-link {
    color: var(--vivo-text-secondary);
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 5px 16px;
    font-size: 14px;
    transition: border-color 0.15s, color 0.15s;
}

.botones-estado .nav-link:hover {
    border-color: var(--vivo-primary);
    color: var(--vivo-primary);
}

.botones-estado .nav-link.active {
    background-color: var(--vivo-primary);
    border-color: var(--vivo-primary);
    color: #fff;
}

/* Pedidos: badge estado */
.pedido-estado-badge {
    background-color: var(--vivo-primary);
    color: #fff;
    font-weight: var(--vivo-fw-medium);
    font-size: var(--vivo-fs-caption);
    white-space: nowrap;
}

/* Pedidos: badge por estado */
.pedido-estado-badge--pagado { background-color: var(--vivo-estado-pagado); color: #000; }
.pedido-estado-badge--completado { background-color: var(--vivo-estado-completado); }
.pedido-estado-badge--cancelado { background-color: var(--vivo-estado-cancelado); }
.pedido-estado-badge--error-pago { background-color: var(--vivo-estado-error-pago); }

/* Pedidos tema-sm: filtros y badge en azul secundario */
body.tema-sm .botones-estado .nav-link:hover {
    border-color: var(--vivo-secondary);
    color: var(--vivo-secondary);
}

body.tema-sm .botones-estado .nav-link.active {
    background-color: var(--vivo-secondary);
    border-color: var(--vivo-secondary);
    color: #fff;
}

/* Pedido list item */
.pedido-item__meta {
    font-size: var(--vivo-fs-caption);
    color: var(--vivo-text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.pedido-item__meta .icon-student {
    background-color: var(--vivo-text-secondary);
    flex-shrink: 0;
    width: 0.85rem;
    height: 0.85rem;
}

.pedido-item__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    flex-shrink: 0;
}

.pedido-item__acciones {
    border-top: 1px solid var(--vivo-border-default);
    /*background: var(--vivo-surface-resumen);*/
    background: white;
    padding: 8px 16px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    border-radius: 0 0 12px 12px;
}

.pedido-item__acciones .btn {
    display: inline-flex;
    align-items: center;
}

.pedido-item__acciones .btn-link:hover:not(:disabled) .icon-trash {
    background-color: var(--vivo-primary-dark);
}

.pedido-item__acciones .icon-trash {
    width: 0.8rem;
    height: 0.8rem;
    vertical-align: middle;
}

/* Pedido detalle — secciones internas de la pack-card */
.pedido-detalle__section {
    padding: 12px 16px;
    font-size: var(--vivo-fs-body);
}

.pedido-detalle__subtitulo {
    display: block;
    font-size: var(--vivo-fs-subtitle);
    font-weight: 600;
    color: var(--vivo-text-primary);
}

.pedido-detalle__descuento-nombre {
    color: var(--vivo-text-secondary);
}

.pedido-detalle__descuento-icono {
    font-size: 12px;
}

.pedido-detalle__descuento-importe {
    color: #198754;
}

.pedido-detalle__campos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
}

@media (max-width: 575px) {
    .pedido-detalle__campos-grid {
        grid-template-columns: 1fr;
    }
}

.pedido-detalle__section--articulos {
    padding-bottom: 16px;
}

.pedido-detalle__section--articulos .pack-card__separador {
    display: none;
}

.pedido-detalle__meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    gap: 12px;
}

@media (max-width: 575px) {
    .pedido-detalle__meta-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ═══════════════════════════════════════════════════════════
   7. NAVEGACIÓN
═══════════════════════════════════════════════════════════ */

/* Selector de idioma */
.selector-idiomas {
    list-style-type: none;
    display: flex;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 400;
    margin: 0;
    padding: 0;
}

.selector-idiomas a {
    text-decoration: none;
    color: var(--bs-body-color) !important;
    opacity: 0.55;
}

.selector-idiomas a.activo {
    font-weight: 700;
    opacity: 1;
}

.selector-idiomas a:hover {
    opacity: 1;
}

/* Enlace de navegación Catálogo en navbar */
.nav-catalogo {
    color: var(--bs-body-color) !important;
    text-decoration: none;
}

.nav-catalogo:hover {
    color: var(--vivo-primary) !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.nav-catalogo.activo {
    color: var(--vivo-primary) !important;
}

/* Top bar */
.top-bar {
    font-weight: var(--vivo-fw-bold);
    font-size: var(--vivo-fs-subtitle);
    background-color: var(--vivo-primary);
    color: #fff;
    padding: 10px 0;
}

@media (max-width: 575px) {
    .top-bar { font-size: 13px; padding: 8px 0; }
}

.avisos-home {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* Navbar */
.navbar.bg-white {
    padding: 10px 0;
    overflow: visible;
}

header {
    overflow: visible;
}

.menu-mi-cuenta .dropdown-menu {
    position: absolute;
    z-index: 1050;
}

/* Barra de navegación inferior (móvil), estilo app nativa */
.bottom-tab-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    display: flex;
    background-color: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

#icono-carrito-mobile {
    flex: 1;
    display: flex;
}

.bottom-tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 13px 4px 10px;
    min-height: 64px;
    border: none;
    background: none;
    color: var(--bs-secondary-color);
    text-decoration: none;
}

.bottom-tab-item i {
    font-size: 1.35rem;
    line-height: 1;
}

.bottom-tab-item .icon-user,
.bottom-tab-item .icon-cart {
    background-color: currentColor;
    width: 1.35rem;
    height: 1.35rem;
    position: relative;
}

.bottom-tab-label {
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1;
}

.bottom-tab-item.activo,
.bottom-tab-item[aria-expanded="true"] {
    color: var(--vivo-secondary, var(--vivo-primary));
}

/* El icono del carrito reutiliza .icono-carrito-wrapper (con borde/fondo en el header desktop);
   en la barra inferior debe verse como un tab plano más, sin el "chip" con borde. */
.bottom-tab-bar .icono-carrito-wrapper {
    background: none;
    border: none;
    border-radius: 0;
    padding: 13px 4px 10px;
    display: flex;
    flex-direction: column;
    color: var(--bs-secondary-color);
}

.bottom-tab-bar .icono-carrito-wrapper:hover,
.bottom-tab-bar .icono-carrito-wrapper:disabled,
.bottom-tab-bar .icono-carrito-wrapper[disabled] {
    background: none !important;
    border: none !important;
    color: var(--bs-secondary-color);
    opacity: 1 !important;
    cursor: pointer;
}

.bottom-tab-bar .icono-carrito-wrapper:hover .icon-cart,
.bottom-tab-bar .icono-carrito-wrapper:disabled .icon-cart,
.bottom-tab-bar .icono-carrito-wrapper[disabled] .icon-cart {
    background-color: currentColor;
}

.bottom-tab-bar .icono-carrito-wrapper.activo,
.bottom-tab-bar .icono-carrito-wrapper.activo:hover,
.bottom-tab-bar .icono-carrito-wrapper.activo:disabled,
.bottom-tab-bar .icono-carrito-wrapper.activo[disabled] {
    color: var(--vivo-secondary, var(--vivo-primary));
}

/* Panel "Menú": bottom sheet anclado sobre la barra inferior */
.bottom-sheet-menu {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 64px;
    z-index: 1039;
    background-color: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
    padding: 16px;
}

.selector-idiomas--sheet {
    justify-content: center;
    gap: 20px;
}

/* Deja espacio para que la barra inferior no tape el contenido ni el footer */
@media (max-width: 991.98px) {
    body {
        padding-bottom: 64px;
    }
}

.menu-mi-cuenta .dropdown-toggle::after {
    display: none;
}

.logo-temporal {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--vivo-primary) !important;
    text-decoration: none;
}

.logo-temporal i {
    font-size: 1.6rem;
}

.nav-mi-cuenta {
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-bienvenido {
    flex: 1;
    text-align: center;
    font-size: var(--vivo-fs-subtitle);
    font-weight: var(--vivo-fw-bold);
    color: var(--vivo-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 16px;
}

.btn-header-usuario {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
    color: var(--vivo-primary);
    text-decoration: none;
    border: 1px solid var(--vivo-primary);
    border-radius: 10px;
    line-height: 1;
    transition: color 0.15s, background-color 0.15s;
}

.btn-header-usuario:hover {
    color: white !important;
    background-color: var(--vivo-primary);
}

.btn-header-usuario:hover * {
    color: white !important;
}

.menu-mi-cuenta .dropdown-menu {
    padding: 10px;
    margin-top: 6px;
    box-shadow: 0px 10px 40px 0px rgba(0, 0, 0, 0.15);
    border: none;
    border-radius: 10px;
    min-width: 195px;
}

    .menu-mi-cuenta .dropdown-menu .dropdown-item-primary,
    .menu-mi-cuenta .dropdown-menu .dropdown-item-secondary {
        display: block;
        padding: 12px 15px;
        font-size: 15px;
        color: #111;
        border-radius: 8px;
        background-color: transparent;
        text-decoration: none;
        transition: background-color 0.15s;
        margin-bottom: 2px;
    }

        .menu-mi-cuenta .dropdown-menu .dropdown-item-primary:hover,
        .menu-mi-cuenta .dropdown-menu .dropdown-item-primary:active,
        .menu-mi-cuenta .dropdown-menu .dropdown-item-secondary:hover,
        .menu-mi-cuenta .dropdown-menu .dropdown-item-secondary:active {
            background-color: #f5f5f5;
            color: #111;
            font-weight: 600;
        }

        .menu-mi-cuenta .dropdown-menu .dropdown-item-primary.active {
            background-color: #f5f5f5;
            color: #111;
        }

    .menu-mi-cuenta .dropdown-menu .dropdown-divider-pale {
        border-color: var(--vivo-surface-card);
        margin: 4px 8px;
    }

/* ═══════════════════════════════════════════════════════════
   8. HOME
═══════════════════════════════════════════════════════════ */

/* Bloque buscar libros */
.bloque-buscar-libros {
    background-color: color-mix(in srgb, var(--vivo-pale) 20%, transparent);
    padding: 40px 0;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.bloque-buscar-libros .container {
    position: relative;
    z-index: 1;
    width: 100%;
}

.buscar-libros-ilustracion {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--bs-breakpoint-xxl, 1320px);
    pointer-events: none;
    z-index: 0;
}

.buscar-libros-card {
    border-radius: 12px;
    border: none;
    min-height: 370px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
}

@media (max-width: 575px) {
    .bloque-buscar-libros {
        padding: 15px 5px;
    }

    .buscar-libros-card { min-height: auto; }
}

.buscar-libros-paso-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.buscar-libros-preview-scroll {
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preview-asignatura-grupo {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.preview-asignatura-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bs-secondary-color);
    padding: 0 0 2px 0;
}

.preview-asignatura-label::before {
    content: '';
    display: inline-block;
    width: 3px;
    align-self: stretch;
    min-height: 16px;
    background: var(--vivo-primary);
    border-radius: 2px;
    flex-shrink: 0;
}

.preview-libros-lista {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.preview-libro-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--vivo-surface-resumen);
    border-radius: 5px;
}

.preview-libro-icono {
    color: var(--vivo-primary);
    font-size: 1.05rem;
    flex-shrink: 0;
}
.icon-book.preview-libro-icono { width: 1.05rem; height: 1.05rem; flex-shrink: 0; }

.preview-libro-titulo {
    font-size: 0.84rem;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
    color: var(--bs-body-color);
}

.preview-libro-precio {
    font-size: 0.84rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--vivo-primary-dark);
}

.buscar-libros-total {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    border-top: 1px solid var(--bs-border-color);
    padding-top: 10px;
    margin-top: 6px;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.buscar-libros-titulo {
    font-size: var(--vivo-fs-heading-seccion);
    font-weight: var(--vivo-fw-bold);
    color: black;
    margin-bottom: 6px;
}

.buscar-libros-subtitulo {
    color: var(--vivo-surface-footer);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.buscar-libros-subtitulo--pregunta {
    font-size: var(--vivo-fs-card-title);
    font-weight: 600;
    color: var(--bs-body-color);
    margin-bottom: 4px;
}

.btn-buscar-libros {
    background-color: var(--vivo-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.15s;
}

.btn-buscar-libros:hover {
    background-color: var(--vivo-primary-dark);
    color: #fff;
}

.buscar-libros-tabs {
    display: flex;
    gap: 8px;
}

.buscar-libros-tab {
    flex: 1;
    padding: 4px 16px;
    border: 1.5px solid var(--bs-border-color);
    border-radius: 8px;
    background: transparent;
    color: var(--bs-secondary-color);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

/* Mantener label solapado visible cuando el input tiene valor */
.buscar-libros-card .input-etiqueta-solapada input:not(:placeholder-shown) + label,
.buscar-libros-card .input-etiqueta-solapada input:not(:placeholder-shown) ~ label {
    opacity: 1;
}

.buscar-libros-form-section {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--bs-secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0;
    padding-top: 4px;
}

.buscar-libros-form-separator {
    border: 0;
    border-top: 1px solid var(--bs-border-color);
    margin: 0;
}

.buscar-libros-tab.activo {
    background-color: var(--vivo-primary);
    border-color: var(--vivo-primary);
    color: #fff;
    box-shadow: 0 3px 8px -2px rgba(0, 0, 0, 0.18);
}

.buscar-libros-tab:not(.activo):hover {
    border-color: var(--bs-secondary-color);
    background-color: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}

.alumno-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.alumno-cards__label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.alumno-card {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1.5px solid var(--bs-border-color);
    border-radius: 8px;
    background: var(--bs-tertiary-bg);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, background-color 0.15s;
}

.alumno-card.seleccionado {
    border-color: var(--vivo-primary);
    background-color: var(--vivo-light);
}

.alumno-card:not(.seleccionado):hover {
    border-color: var(--vivo-border);
    background-color: var(--vivo-tint);
}

.alumno-card__iniciales {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bs-border-color);
    color: var(--bs-secondary-color);
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
    transition: background-color 0.15s, color 0.15s;
}

.alumno-card.seleccionado .alumno-card__iniciales {
    background-color: var(--vivo-primary);
    color: var(--bs-white, #fff);
}

.alumno-card__info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.alumno-card__nombre {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--bs-body-color);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.alumno-card.seleccionado .alumno-card__nombre {
    color: var(--vivo-primary-dark);
}

.alumno-card__nivel {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--bs-secondary-color);
    margin-top: 1px;
}

.alumno-card.seleccionado .alumno-card__nivel {
    color: var(--bs-body-color);
}

.alumno-card__radio {
    margin-left: auto;
    font-size: 1rem;
    color: var(--bs-border-color);
    flex-shrink: 0;
    transition: color 0.15s;
}

.alumno-card.seleccionado .alumno-card__radio {
    color: var(--vivo-primary);
}

/* ── Paso selección paquete ──────────────────────────────── */

.paso-alumno-cabecera {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.paso-alumno-cabecera__centro {
    text-align: center;
}

.paso-alumno-cabecera__badge {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.paso-alumno-cabecera .btn-volver {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.btn-volver {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: none;
    background: transparent;
    color: var(--vivo-primary);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0;
    cursor: pointer;
    margin-bottom: 16px;
}

.btn-volver:hover {
    color: var(--vivo-primary-dark);
}

.paquete-card {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border: 1.5px solid var(--bs-border-color);
    border-radius: 8px;
    background: var(--bs-tertiary-bg);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, background-color 0.15s;
}

.paquete-card:hover:not(:disabled) {
    border-color: var(--vivo-primary);
    background-color: var(--vivo-light);
}

.paquete-card:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.paquete-card__nombre {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--bs-body-color);
}

.paquete-card__derecha {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: 12px;
}

.paquete-card__precio {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--vivo-primary-dark);
}

.paquete-card__icono {
    color: var(--bs-secondary-color);
    font-size: 0.85rem;
}

.paquete-card:hover:not(:disabled) .paquete-card__icono {
    color: var(--vivo-primary);
}

/* ── Paso confirmación ───────────────────────────────────── */

.confirmacion-paso {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px 0 4px;
    gap: 10px;
}

.confirmacion-icono {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--vivo-light);
    border: 2px solid var(--vivo-primary);
    color: var(--vivo-primary);
    font-size: 1.6rem;
    margin-bottom: 4px;
}

.confirmacion-alumno {
    font-size: 0.92rem;
    color: var(--bs-secondary-color);
    margin: 0;
}

.confirmacion-separador {
    width: 40px;
    height: 2px;
    background-color: var(--vivo-border);
    border-radius: 2px;
    margin: 4px 0;
}

.confirmacion-acciones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    margin-top: 6px;
}

.confirmacion-btn-carrito {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--bs-btn-padding-y-sm, 0.25rem) var(--bs-btn-padding-x-sm, 0.5rem);
    border: 1.5px solid var(--vivo-primary);
    border-radius: 8px;
    color: var(--vivo-primary);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.15s, color 0.15s;
}

.confirmacion-btn-carrito:hover {
    background-color: var(--vivo-light);
    color: var(--vivo-primary-dark);
}
.confirmacion-btn-carrito .icon-cart { width: 1rem; height: 1rem; }


/* Bloque iconos */
#bloque-iconos {
    padding: 55px 0;
    text-align: center;
}

#bloque-iconos .row {
    justify-content: center;
}

.bloque-icono-item {
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
}

.bloque-icono-i {
    font-size: 1.8rem;
    color: var(--vivo-primary);
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
}

.icon-pack, .icon-lock, .icon-book, .icon-clock, .icon-user, .icon-student, .icon-cart, .icon-creditcard, .icon-home, .icon-edit, .icon-school, .icon-flag, .icon-play, .icon-trash, .icon-plus, .icon-less, .icon-chevron-up, .icon-chevron-down, .icon-chevron-left, .icon-chevron-right, .icon-eye, .icon-eye-off, .icon-pin, .icon-mail, .icon-phone {
    display: inline-block;
    background-color: var(--vivo-primary);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}
.icon-pack        { -webkit-mask-image: url('/img/icons/icon-pack.svg');        mask-image: url('/img/icons/icon-pack.svg');        width: 2rem;    height: 2rem; }
.icon-lock        { -webkit-mask-image: url('/img/icons/icon-lock.svg');        mask-image: url('/img/icons/icon-lock.svg');        width: 2rem;    height: 2rem; }
.icon-book        { -webkit-mask-image: url('/img/icons/icon-book.svg');        mask-image: url('/img/icons/icon-book.svg');        width: 2rem;    height: 2rem; }
.icon-clock       { -webkit-mask-image: url('/img/icons/icon-clock.svg');       mask-image: url('/img/icons/icon-clock.svg');       width: 2rem;    height: 2rem; }
.icon-user        { -webkit-mask-image: url('/img/icons/icon-user.svg');        mask-image: url('/img/icons/icon-user.svg');        width: 1.3rem;  height: 1.3rem; }
.icon-student     { -webkit-mask-image: url('/img/icons/icon-student.svg');     mask-image: url('/img/icons/icon-student.svg');     width: 1.3rem;  height: 1.3rem; }
.icon-cart        { -webkit-mask-image: url('/img/icons/icon-cart.svg');        mask-image: url('/img/icons/icon-cart.svg');        width: 1.4rem;  height: 1.4rem; }
.icon-creditcard  { -webkit-mask-image: url('/img/icons/icon-creditcard.svg');  mask-image: url('/img/icons/icon-creditcard.svg');  width: 2.2rem;  height: 1.6rem; }
.icon-home        { -webkit-mask-image: url('/img/icons/icon-home.svg');        mask-image: url('/img/icons/icon-home.svg');        width: 1rem;    height: 1.05rem; }
.icon-edit        { -webkit-mask-image: url('/img/icons/icon-edit.svg');        mask-image: url('/img/icons/icon-edit.svg');        width: 1.15rem; height: 1.15rem; }
.icon-school      { -webkit-mask-image: url('/img/icons/icon-school.svg');      mask-image: url('/img/icons/icon-school.svg');      width: 2rem;    height: 2rem; }
.icon-flag        { -webkit-mask-image: url('/img/icons/icon-flag.svg');        mask-image: url('/img/icons/icon-flag.svg');        width: 1.6rem;  height: 2rem; }
.icon-play        { -webkit-mask-image: url('/img/icons/icon-play.svg');        mask-image: url('/img/icons/icon-play.svg');        width: 2.8rem;  height: 2.8rem; }
.icon-trash       { -webkit-mask-image: url('/img/icons/icon-trash.svg');       mask-image: url('/img/icons/icon-trash.svg');       width: 1.1rem;  height: 1.1rem; }
.enlace-borrar .icon-trash { width: 1rem; height: 1rem; background-color: var(--bs-danger, #dc3545); }
/* icon-creditcard — color y tamaño por contexto (hereda currentColor + em del padre) */
.btn .icon-creditcard,
.wizard-paso__circulo .icon-creditcard,
.seccion-header-icon .icon-creditcard,
.cabecera-icono .icon-creditcard,
.resumen-pago-metodo .icon-creditcard { background-color: currentColor; width: 1em; height: 0.73em; }
.cabecera-icono .icon-home { background-color: currentColor; width: .9em; height: .9em; }
.btn .icon-edit { background-color: currentColor; width: 1.05em; height: 1.05em; }
.campo-modificar .icon-edit:not(.me-1) { width: 1.1em; height: 1.1em; }
.btn .icon-plus { background-color: currentColor; width: 0.85em; height: 0.85em; }
.compra-ko__icon .icon-creditcard { background-color: var(--vivo-primary); width: 1em; height: 0.73em; }
.resumen-features .feature-item .icon-creditcard { width: 19px; height: 14px; }
.enlace-borrar:hover .icon-trash { background-color: #a71d2a; }
.icon-plus        { -webkit-mask-image: url('/img/icons/icon-plus.svg');        mask-image: url('/img/icons/icon-plus.svg');        width: 1rem;    height: 1rem; }
.icon-less        { -webkit-mask-image: url('/img/icons/icon-less.svg');        mask-image: url('/img/icons/icon-less.svg');        width: 1rem;    height: 1rem; }
.icon-cart--empty { width: 2.5rem; height: 2.5rem; background-color: var(--bs-secondary); opacity: 0.5; }
.icon-chevron-up   { -webkit-mask-image: url('/img/icons/icon-chevron-up.svg');   mask-image: url('/img/icons/icon-chevron-up.svg');   width: 0.9rem;  height: 0.52rem; }
.icon-chevron-down  { -webkit-mask-image: url('/img/icons/icon-chevron-down.svg');  mask-image: url('/img/icons/icon-chevron-down.svg');  width: 0.9rem;  height: 0.52rem; }
.icon-chevron-left  { -webkit-mask-image: url('/img/icons/icon-chevron-left.svg');  mask-image: url('/img/icons/icon-chevron-left.svg');  width: 0.5em; height: 0.875em; vertical-align: -0.125em; flex-shrink: 0; }
.icon-chevron-right { -webkit-mask-image: url('/img/icons/icon-chevron-right.svg'); mask-image: url('/img/icons/icon-chevron-right.svg'); width: 0.5em; height: 0.875em; vertical-align: -0.125em; flex-shrink: 0; }
.btn:has(.icon-chevron-left),
.btn:has(.icon-chevron-right) { display: inline-flex; align-items: center; justify-content: center; }
.btn-sm .icon-chevron-left,
.btn-sm .icon-chevron-right { width: 0.46em; height: 0.8em; }
.icon-eye          { -webkit-mask-image: url('/img/icons/icon-eye.svg');           mask-image: url('/img/icons/icon-eye.svg');           width: 1.1rem;  height: 0.81rem; background-color: #6c757d; vertical-align: middle; }
.icon-eye-off      { -webkit-mask-image: url('/img/icons/icon-eye-off.svg');       mask-image: url('/img/icons/icon-eye-off.svg');       width: 1.1rem;  height: 1.1rem;  background-color: #6c757d; vertical-align: middle; }
.icon-pin          { -webkit-mask-image: url('/img/icons/icon-pin.svg');          mask-image: url('/img/icons/icon-pin.svg');          width: 1em; height: 1em;     background-color: currentColor; vertical-align: -0.125em; flex-shrink: 0; }
.icon-mail         { -webkit-mask-image: url('/img/icons/icon-mail.svg');         mask-image: url('/img/icons/icon-mail.svg');         width: 1.1em;  height: 1.1em;     background-color: currentColor; vertical-align: -0.125em; flex-shrink: 0; }
.icon-phone        { -webkit-mask-image: url('/img/icons/icon-phone.svg');        mask-image: url('/img/icons/icon-phone.svg');        width: 1em;    height: 1em;       background-color: currentColor; vertical-align: -0.125em; flex-shrink: 0; }
.btn-outline-secondary:hover .icon-eye,
.btn-outline-secondary:hover .icon-eye-off,
.btn-outline-secondary:active .icon-eye,
.btn-outline-secondary:active .icon-eye-off { background-color: white; }
.campo-input-wrap .icon-eye,
.campo-input-wrap .icon-eye-off { background-color: var(--vivo-primary); width: 0.85rem; height: 0.85rem; }
.input-group > .btn-outline-secondary { display: inline-flex; align-items: center; justify-content: center; }
.btn.text-muted .icon-chevron-up,
.btn.text-muted .icon-chevron-down,
.btn.text-muted .icon-chevron-left,
.btn.text-muted .icon-chevron-right { background-color: #6c757d; }
.btn-outline-primary:hover .icon-chevron-up,
.btn-outline-primary:hover .icon-chevron-down,
.btn-outline-primary:hover .icon-chevron-left,
.btn-outline-primary:hover .icon-chevron-right,
.btn-outline-primary:active .icon-chevron-up,
.btn-outline-primary:active .icon-chevron-down,
.btn-outline-primary:active .icon-chevron-left,
.btn-outline-primary:active .icon-chevron-right,
.btn-outline-primary:focus-visible .icon-chevron-up,
.btn-outline-primary:focus-visible .icon-chevron-down,
.btn-outline-primary:focus-visible .icon-chevron-left,
.btn-outline-primary:focus-visible .icon-chevron-right { background-color: white; }
.pack-card__toggle:hover .icon-chevron-up,
.pack-card__toggle:hover .icon-chevron-down { background-color: var(--vivo-primary-dark); }
.auth-volver .icon-chevron-left,
.auth-volver .icon-chevron-right { background-color: #6c757d; }
.auth-volver:hover .icon-chevron-left,
.auth-volver:hover .icon-chevron-right { background-color: var(--vivo-primary); }
.pedido-detalle__volver .icon-chevron-left { background-color: #6c757d; }
.pedido-detalle__volver:hover { color: var(--vivo-primary-dark) !important; }
.pedido-detalle__volver:hover .icon-chevron-left { background-color: var(--vivo-primary-dark); }
.paquete-card .icon-chevron-right { background-color: var(--bs-secondary-color, #6c757d); }
.paquete-card:hover:not(:disabled) .icon-chevron-right { background-color: var(--vivo-primary); }
.btn-primary .icon-chevron-left,
.btn-primary .icon-chevron-right { background-color: white; }
.btn-outline-secondary:hover .icon-chevron-left,
.btn-outline-secondary:hover .icon-chevron-right,
.btn-outline-secondary:active .icon-chevron-left,
.btn-outline-secondary:active .icon-chevron-right { background-color: white; }
.btn-header-usuario:hover .icon-user,
.btn-header-usuario:active .icon-user { background-color: white; }
.nav-menu-item .icon-user { background-color: currentColor; width: 1.2rem; height: 1rem; }
.dropdown-item .icon-user { background-color: currentColor; width: 1em; height: 1.1em; vertical-align: -0.1em; }
.cabecera-icono .icon-user { background-color: currentColor; width: 0.82em; height: 0.92em; }
.resumen-totales .resumen-row .icon-user { background-color: currentColor; width: 0.9em; height: 1em; }
.icono-carrito-wrapper:hover .icon-cart { background-color: white; }
.btn-add-carrito .icon-cart         { width: 1rem; height: 1rem; }
.btn-add-carrito:hover .icon-cart   { background-color: white; }
.btn-buscar-libros .icon-cart       { background-color: white; width: 1rem; height: 1rem; }
.carrito-header h1 .icon-cart       { background-color: #212529; width: 2.2rem; height: 2.2rem; }

.bloque-icono-titulo {
    font-weight: 700;
    font-size: 0.9rem;
    color: #000;
    margin-bottom: 4px;
}

.bloque-icono-texto {
    font-size: 0.8rem;
    color: var(--vivo-surface-footer);
    line-height: 1.4;
}

/* Cómo funciona (pasos) */
.como-funciona {
    padding: 50px 0 40px;
}

.como-funciona-titulo {
    font-size: var(--vivo-fs-heading);
    font-weight: var(--vivo-fw-bold);
    color: #000;
    margin-bottom: 8px;
}

.como-funciona-subtitulo {
    color: var(--vivo-surface-footer);
    font-size: 0.95rem;
    margin-bottom: 40px;
}

.pasos-container {
    position: relative;
    height: 465px;
}

.pasos-wave {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.paso {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    z-index: 2;
}

.paso-1 { top: 30px; left: 0; width: 26%; height: 300px; }
.paso-2 { top: 45px; left: 30%; width: 25%; height: 325px; }
.paso-3 { top: 40px; left: 64%; width: 35%; height: 315px; }

/* Paso 3: la etiqueta se desplaza para alinearse con la ola SVG */
.paso-3 .paso-etiqueta { margin-left: clamp(0px, 8vw, 115px); width: calc(100% - clamp(0px, 8vw, 115px)); }

.paso-etiqueta {
    align-self: flex-start;
    width: 100%;
    display: flex;
    align-items: flex-end;
    gap: 4px;
    background-color: #fff;
    border-radius: 8px;
    padding: 4px 0;
}

.paso-info {
    flex: 1;
    min-width: 0;
}

.paso-burbuja {
    background-color: var(--vivo-pale);
    clip-path: url(#hex-clip);
    width: 76px;
    height: 90px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--vivo-primary);
    font-size: 2rem;
    flex-shrink: 0;
}

.paso-titulo {
    font-size: var(--vivo-fs-heading-seccion);
    font-weight: 700;
    color: var(--vivo-primary);
    margin-bottom: 6px;
}

.paso-numero {
    font-size: clamp(80px, 12vw, 160px);
    font-weight: 700;
    color: var(--vivo-primary);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
    line-height: 1;
    flex-shrink: 0;
}

.paso-texto {
    color: #444;
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 1080px) {
    .pasos-container { height: 430px; }
    .paso-1 { height: 310px; }
    .paso-2 { top: 30px; height: 302px; }
    .paso-3 { top: 30px; height: 302px; }
    .paso-burbuja { width: 68px; height: 80px; font-size: 1.8rem; }
}

@media (max-width: 900px) {
    .pasos-container { height: 370px; }
    .paso-1 { height: 265px; }
    .paso-2 { top: 24px; height: 259px; }
    .paso-3 { top: 24px; height: 259px; }
    .paso-burbuja { width: 58px; height: 69px; font-size: 1.5rem; }
    .paso-titulo { font-size: 0.95rem; }
    .paso-texto { font-size: 0.78rem; }
}

@media (max-width: 768px) {
    .como-funciona {
        padding: 0;
    }

    .pasos-container {
        height: auto;
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    .pasos-wave { display: none; }

    .paso {
        position: static;
        width: 100% !important;
        height: auto !important;
        flex-direction: row;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 16px;
    }

    .paso-1 { flex-direction: row-reverse; }
    .paso-etiqueta { flex: 1; }
    .paso-3 .paso-etiqueta { margin-left: 0; }
    .paso-numero { display: none; }
}

/* Video card — formato vertical con thumbnail y carousel dots */
.video-card {
    display: block;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    transition: box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
}
.video-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
    text-decoration: none;
    color: inherit;
}
.video-card-thumb {
    background-color: #e8eaec;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.video-card-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s;
    pointer-events: none;
}
.video-card:hover .video-card-play-overlay {
    opacity: 0.75;
}
.video-card-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0);
    transition: background 0.2s;
    pointer-events: none;
    z-index: 1;
}
.video-card:hover .video-card-thumb::after {
    background: rgba(255, 255, 255, 0.65);
}
.video-card-play-overlay {
    z-index: 2;
}
.video-card-body {
    padding: 0.75rem 1rem 1rem;
    text-align: center;
}
.video-card-titulo {
    color: var(--vivo-primary);
    font-weight: var(--vivo-fw-bold);
    font-size: var(--vivo-fs-body);
    margin-bottom: 0.2rem;
    line-height: 1.4;
}
.video-card-categoria {
    color: #777;
    font-size: 0.78rem;
}

/* Carousel dots */
.video-carousel-dots {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 1.25rem;
    align-items: center;
}
.video-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ccc;
    cursor: pointer;
    border: none;
    padding: 0;
    transition: background-color 0.2s, transform 0.2s;
    flex-shrink: 0;
}
.video-carousel-dot.activo {
    background-color: var(--vivo-primary);
    transform: scale(1.4);
}

/* Bloque Contacto */
.bloque-contacto {
    background-color: #fff1e8;
    border-top: 1px solid var(--vivo-border);
    padding: 3rem 0;
    margin-top: 3rem;
}

.bloque-contacto-titulo {
    color: var(--vivo-primary);
    font-size: var(--vivo-fs-heading-seccion);
    font-weight: var(--vivo-fw-bold);
    margin-bottom: 1.25rem;
}

.bloque-contacto-texto {
    color: #444;
    line-height: 1.7;
    margin-bottom: 0.9rem;
}

.bloque-contacto-telefono {
    color: var(--vivo-primary);
    font-weight: 600;
    text-decoration: none;
}

.bloque-contacto-telefono:hover {
    text-decoration: underline;
}

.bloque-contacto .form-control {
    border-color: var(--vivo-border);
    background-color: #fff;
}

.bloque-contacto .form-control:focus {
    border-color: var(--vivo-primary);
    box-shadow: 0 0 0 0.2rem var(--vivo-shadow-sm);
}

.bloque-contacto-ok {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2.5rem 1rem;
    text-align: center;
    color: #2c6e2c;
    background-color: #f0faf0;
    border: 1px solid #b6d9b6;
    border-radius: 8px;
}

.bloque-contacto-ok .bi {
    font-size: 2.5rem;
    color: #2c6e2c;
}

/* Contenido web CMS — tipografía y responsive.
   El HTML llega tal cual se guardó desde el editor de Nexo, que a menudo incrusta su propia
   font-family por elemento (paste-from-Word, etc.); forzamos la tipografía de Vivo con !important
   para que no se cuele la del editor. */
.contenido-web-body,
.contenido-web-body *,
.bloque-faqs .accordion-body,
.bloque-faqs .accordion-body *,
.avisos-home,
.avisos-home * {
    font-family: var(--vivo-font) !important;
}

.contenido-web-body a {
    color: var(--vivo-primary);
}

/* Bloque FAQs — accordion estilo card (coherente con buscar-libros-card) */
.bloque-faqs .accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.bloque-faqs .accordion-item {
    border: none;
    border-radius: 12px !important;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid #e8e8e8 !important;
    overflow: hidden;
}
.bloque-faqs .accordion-button {
    font-weight: 500;
    font-size: 0.95rem;
    color: #1a1a1a;
    background-color: #fff;
    border-radius: 12px !important;
    padding: 1rem 1.25rem;
}
.bloque-faqs .accordion-button:not(.collapsed) {
    color: var(--vivo-primary);
    background-color: #fff;
    box-shadow: none !important;
    border-radius: 12px 12px 0 0 !important;
}
.bloque-faqs .accordion-button:focus {
    box-shadow: 0 0 0 0.2rem var(--vivo-shadow-sm);
}
.bloque-faqs .accordion-body {
    padding: 0.75rem 1.25rem 1rem;
    color: #555;
    font-size: 0.9rem;
    line-height: 1.6;
}
.bloque-faqs .accordion-body.border-top {
    border-color: #f0f0f0 !important;
}
.bloque-faqs .accordion-body p {
    margin-bottom: 0;
}
.bloque-faqs .pagination,
.mis-datos .pagination {
    --bs-pagination-color:             var(--vivo-primary);
    --bs-pagination-hover-color:       var(--vivo-primary-dark);
    --bs-pagination-focus-color:       var(--vivo-primary);
    --bs-pagination-focus-box-shadow:  0 0 0 0.25rem var(--vivo-shadow-sm);
    --bs-pagination-active-bg:         var(--vivo-primary);
    --bs-pagination-active-border-color: var(--vivo-primary);
}
.bloque-faqs-explora {
    margin-top: 2rem;
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════
   9. CARRITO — Icono con badge
═══════════════════════════════════════════════════════════ */
.icono-carrito-wrapper {
    position: relative;
    background-color: #fff;
    border: 1px solid var(--vivo-primary);
    border-radius: 9px;
    padding: 6px 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--vivo-primary);
    transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

.icono-carrito-wrapper:hover {
    background-color: var(--vivo-primary);
    color: #fff;
}

.icono-carrito-wrapper:disabled,
.icono-carrito-wrapper[disabled] {
    background-color: var(--vivo-secondary, var(--vivo-primary)) !important;
    border-color: var(--vivo-secondary, var(--vivo-primary)) !important;
    opacity: .7 !important;
    cursor: not-allowed;
    color: #fff;
}

.icono-carrito-wrapper:disabled .icon-cart,
.icono-carrito-wrapper[disabled] .icon-cart {
    background-color: white;
}

.icono-carrito-icon-wrap {
    display: inline-flex;
}

@media (max-width: 991.98px) {
    .icono-carrito-icon-wrap {
        position: relative;
    }
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background: #000;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
}

@media (max-width: 991.98px) {
    .cart-badge {
        top: -8px;
        right: -12px;
        width: 16px;
        height: 16px;
    }
}

.enlace-borrar {
    text-decoration: none;
    color: var(--bs-danger, #dc3545);
    display: flex;
    align-items: center;
    font-size: 13px;
    white-space: nowrap;
}
.enlace-borrar:hover {
    color: #a71d2a;
}


.botones-cantidad {
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    font-weight: 400;
    border-radius: 17.5px;
    border: 1px solid #D9D9D9;
    background: white;
    user-select: none;
    height: 35px;
}

.botones-cantidad .boton-menos,
.botones-cantidad .boton-mas {
    cursor: pointer;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
}

.botones-cantidad .boton-menos .icon-less { width: 0.625rem; height: 0.625rem; }
.botones-cantidad .boton-mas .icon-plus   { width: 0.625rem; height: 0.625rem; }

.botones-cantidad .cantidad {
    color: var(--vivo-primary);
    font-weight: 700;
    font-size: 16px;
    min-width: 28px;
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════
   11. CATÁLOGO — Layout
═══════════════════════════════════════════════════════════ */
.catalogo-wrap {
    display: flex;
    min-height: calc(100vh - 120px);
    margin: 0 -12px;
}

.catalogo-sidebar {
    width: 280px;
    min-width: 220px;
    flex-shrink: 0;
    padding: 23px 24px 0 0;
    border-right: 1px solid #dee2e6;
}

.catalogo-main {
    flex: 1;
    padding: 20px 5px 20px 24px;
}

@media (max-width: 768px) {
    .catalogo-wrap { flex-direction: column; margin: 0; }
    .catalogo-sidebar {
        width: 100%;
        min-width: unset;
        border-right: none;
        border-bottom: none;
        padding: 15px 15px 0;
    }
    .catalogo-main {
        flex: 1;
        padding: 20px 15px;
    }
}

@media (max-width: 575px) {
    .catalogo-sidebar {
        padding: 0;
    }
    .catalogo-main {
        padding: 16px 0;
    }
}

/* Título y subtítulo del grado seleccionado */
.catalogo-grado-titulo {
    font-size: var(--vivo-fs-heading-seccion);
    font-weight: var(--vivo-fw-bold);
    color: #1a1a1a;
    line-height: 1.1;
}

.catalogo-grado-subtitulo {
    font-size: var(--vivo-fs-card-title);
    font-weight: 600;
    color: #555;
}

/* Barra de filtros por asignatura */
.catalogo-filtros {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.catalogo-filtros-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.catalogo-filtros-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filtro-pill {
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--vivo-primary);
    background: #fff;
    color: var(--vivo-primary);
    transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap;
}

.filtro-pill:hover {
    background: var(--vivo-light);
}

.filtro-pill.activo {
    background: var(--vivo-primary);
    color: #fff;
}

/* Pestañas Paquetes / Libros sueltos */
.catalogo-tabs {
    border-bottom: 2px solid var(--vivo-border);
    gap: 4px;
}
.catalogo-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    color: #6c757d;
    font-weight: 600;
    padding: .5rem 1rem;
    margin-bottom: -2px;
    transition: color .15s, border-color .15s;
}
.catalogo-tabs .nav-link:hover {
    color: var(--vivo-primary);
    border-bottom-color: var(--vivo-border);
}
.catalogo-tabs .nav-link.active {
    color: var(--vivo-primary);
    border-bottom-color: var(--vivo-primary);
    background: transparent;
}
.catalogo-tabs .nav-link .icon-pack { width: 0.875rem; height: 1.1rem; vertical-align: -0.125em; background-color: currentColor; }
.catalogo-tabs .nav-link .icon-book { width: 0.875rem; height: 1.1rem; vertical-align: -0.125em; background-color: currentColor; }
.catalogo-seccion-titulo .icon-pack { width: 1rem; height: 1rem; vertical-align: -0.125em; }
.conteo-libros .icon-pack { width: 0.8rem; height: 0.8rem; vertical-align: -0.125em; background-color: currentColor; }
.conteo-libros .icon-book { width: 0.8rem; height: 0.8rem; vertical-align: -0.125em; background-color: currentColor; }

/* Cabecera de sección de asignatura */
.catalogo-seccion-titulo {
    font-size: 1rem;
    font-weight: 700;
    color: #222;
    border-bottom: 2px solid var(--vivo-border);
    padding-bottom: 8px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.catalogo-seccion-count {
    font-size: 0.8rem;
    font-weight: 400;
    color: #aaa;
}

/* Sidebar árbol de categorías */
ul.arbol-categorias {
    list-style: none;
    padding: 10px;
    margin: 0;
    border-radius: 10px;
    border: 1px solid var(--vivo-border-default);
    /*box-shadow: 0 10px 40px 0 rgba(0, 0, 0, .15);*/
}

ul.arbol-categorias ul {
    list-style: none;
    padding: 0;
    margin-top: 12px;
}

ul.arbol-categorias > li {
    font-weight: 700;
    padding: 10px;
    padding-top: 16px;
    margin-bottom: 4px;
    border-radius: 8px;
}

ul.arbol-categorias > li > span {
    display: block;
    position: relative;
    padding-left: 44px;
    margin-bottom: 4px;
}

ul.arbol-categorias > li > span::before {
    content: "";
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-block;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

@media (max-width: 768px) {
    ul.arbol-categorias > li {
        padding-top: 10px;
    }

    ul.arbol-categorias > li > span {
        padding-left: 34px;
    }

    ul.arbol-categorias > li > span::before {
        width: 22px;
        height: 22px;
        border-radius: 6px;
    }
}

ul.arbol-categorias li.categoria-0 > span::before { background-color: #FAB96D; }
ul.arbol-categorias li.categoria-1 > span::before { background-color: #FF7D6A; }
ul.arbol-categorias li.categoria-2 > span::before { background-color: var(--vivo-primary); }
ul.arbol-categorias li.categoria-3 > span::before { background-color: #2F6BAF; }
ul.arbol-categorias li.categoria-4 > span::before { background-color: #00A2A3; }
ul.arbol-categorias li.categoria-5 > span::before { background-color: #FAB96D; }
ul.arbol-categorias li.categoria-6 > span::before { background-color: #FF7D6A; }

.paquete-cat-0, .paquete-cat-5 { background: linear-gradient(135deg, #fafafa, #fef0d5); }
.paquete-cat-1, .paquete-cat-6 { background: linear-gradient(135deg, #fafafa, #ffe8e5); }
.paquete-cat-2              { background: linear-gradient(135deg, #fafafa, #fde8de); }
.paquete-cat-3              { background: linear-gradient(135deg, #fafafa, #dae8f7); }
.paquete-cat-4              { background: linear-gradient(135deg, #fafafa, #d5f0f0); }
.paquete-icon { width: 3.5rem; height: 3.5rem; flex-shrink: 0; }
.paquete-cat-0 .paquete-icon, .paquete-cat-5 .paquete-icon { background-color: #FAB96D; }
.paquete-cat-1 .paquete-icon, .paquete-cat-6 .paquete-icon { background-color: #FF7D6A; }
.paquete-cat-2 .paquete-icon { background-color: #E84E0F; }
.paquete-cat-3 .paquete-icon { background-color: #2F6BAF; }
.paquete-cat-4 .paquete-icon { background-color: #00A2A3; }

ul.arbol-categorias > li.selected { background: var(--vivo-surface-resumen); }

ul.arbol-categorias ul li {
    font-weight: 400;
    padding: 2px 0;
}

ul.arbol-categorias ul li a {
    display: block;
    padding: 5px 8px;
    text-decoration: none;
    color: #444;
    font-size: 0.875rem;
    border-radius: 6px;
    transition: color .15s, background .15s;
}

ul.arbol-categorias ul li a:hover {
    color: var(--vivo-primary);
    background: var(--vivo-tint);
}

ul.arbol-categorias ul li.selected a {
    color: var(--vivo-primary);
    font-weight: 700;
    background: var(--vivo-tint);
}

.conteo-libros {
    color: #aaa;
    font-size: 0.8rem;
}


/* Grid de libros */
.producto-card {
    height: 100%;
    min-height: 300px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid var(--vivo-surface-card);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow .2s;
}

.producto-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, .12);
}

.producto-card a.img-producto {
    display: block;
    height: 220px;
    align-content: center;
    text-align: center;
    overflow: hidden;
    position: relative;
    background: #fafafa;
}

.producto-card a.img-producto img {
    max-height: 100%;
    max-width: 100%;
    padding: 12px;
    margin: 0 auto;
    object-fit: contain;
    display: block;
}

.producto-card a.img-producto .overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .82);
    color: #000;
    font-weight: 600;
    font-size: 14px;
    opacity: 0;
    transition: opacity .2s ease;
    z-index: 1;
}

.producto-card a.img-producto:hover .overlay {
    opacity: 1;
}

.badge-digital-overlay {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #e8f4fd;
    color: #2980b9;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    line-height: 1.4;
    pointer-events: none;
    z-index: 2;
}

.badge-devolucion-completa {
    background: #fdecea;
    color: #dc3545;
}

.producto-card .titulo {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px 12px;
}

.producto-card .titulo .precio-normal {
    font-size: 15px;
    font-weight: 700;
    color: var(--vivo-primary);
    margin-bottom: 2px;
}

.precio-campana {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.precio-tachado {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
    font-weight: 400;
}

.precio-descuento {
    font-size: 15px;
    font-weight: 700;
    color: var(--vivo-surface-footer);
}

.item-precio .precio-tachado {
    font-size: 13px;
}

.producto-card .titulo a,
.producto-card .titulo .abrir-detalle-paquete {
    font-size: 13px;
    text-decoration: none;
    color: #222;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.producto-card .titulo a span,
.producto-card .titulo .abrir-detalle-paquete {
    font-weight: 600;
}

.producto-card .titulo a:hover span,
.producto-card .titulo .abrir-detalle-paquete:hover {
    color: var(--vivo-primary);
}

/* Lomos decorativos — sección libros destacados */
.bloque-destacados {
    overflow: hidden;
}

.lomos-col {
    align-self: stretch;
}

.lomos-container {
    position: relative;
    width: 110px;
    height: 100%;
    min-height: 300px;
}

.lomo-grande {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 90%;
    background: var(--vivo-primary);
    border-radius: 6px;
}

.lomo-chico {
    position: absolute;
    left: 70px;
    bottom: 0;
    width: 45px;
    height: 70%;
    background: rgba(var(--bs-primary-rgb), .32);
    border-radius: 6px;
    transform: rotate(-5deg);
    transform-origin: bottom center;
}

/* Hover en tarjeta del catálogo */
.img-produto {
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.img-produto img {
    transition: transform .2s ease;
}

.img-produto:hover img {
    transform: scale(1.04);
}

/* Libro detalle — modal */
.libro-detalle-img {
    max-width: 100%;
    object-fit: contain;
    /* Desktop: altura generosa */
    max-height: 320px;
}

@media (max-width: 768px) {
    .libro-detalle-img {
        /* Móvil: imagen centrada y acotada para no ocupar toda la pantalla */
        max-height: 180px;
        width: auto;
    }
}


.libro-detalle-placeholder {
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: #ccc;
    background: #f8f9fa;
    border-radius: 8px;
}

.libro-detalle-precio {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--vivo-primary);
}

.libro-detalle-descripcion div {
    line-height: 1.7;
}

/* ═══════════════════════════════════════════════════════════
   12. CARRITO — Página completa
═══════════════════════════════════════════════════════════ */
.carrito-page {
    max-width: 1300px;
    margin: 0 auto;
    padding: 24px 0 35px 0;
}

@media (max-width: 575px) {
    .carrito-page { padding: 16px 0 24px 0; }
}

.carrito-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.carrito-header h1 {
    font-size: var(--vivo-fs-heading);
    font-weight: var(--vivo-fw-bold);
    font-family: var(--vivo-font);
    color: var(--vivo-text-primary);
}

.carrito-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.carrito-items {
    flex: 1;
    min-width: 0;
}

.carrito-resumen {
    width: 400px;
    flex-shrink: 0;
    align-self: flex-start;
    position: sticky;
    top: 16px;
}

.carrito-resumen__box {
    background: #fff;
    border: 1px solid var(--vivo-border-default);
    border-radius: 12px;
    padding: 12px;
    overflow: hidden;
    /*box-shadow: 0 4px 16px rgba(0,0,0,.06);*/
}

.carrito-resumen__contenido {
    background: var(--vivo-surface-resumen);
    padding: 15px 15px 10px;
    border-radius: 10px;
}

.carrito-resumen__acciones {
    padding: 16px 20px 5px;
}

.carrito-resumen__box h5 {
    font-size: var(--vivo-fs-heading-seccion);
}

@media (max-width: 991px) {
    .carrito-content { flex-direction: column; }
    .carrito-resumen { width: 100%; position: static; }
    .carrito-items { width: 100%; }
}

.carrito-resumen--checkout { width: 100%; }

@media (max-width: 991px) {
    .carrito-resumen--checkout { position: static; }

    .item-carrito {
        flex-wrap: wrap;
    }
    .item-carrito__info {
        flex: 1 1 0;
        min-width: 0;
    }
    .item-carrito__acciones {
        flex-basis: 100%;
        align-self: auto;
        display: flex;
        flex-direction: row !important;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
    }
    .item-carrito__acciones > .item-carrito__btn-borrar {
        display: none;
    }
    .item-carrito__acciones .botones-cantidad {
        order: 1;
        margin-top: 0;
    }
    .item-carrito__acciones .item-precio {
        order: 0;
        flex: 1;
    }
    .item-carrito__selector-wrap {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .item-carrito__precio-ud {
        display: none;
    }
    .pack-card__thumbs {
        order: -1;
        padding-bottom: 5px;
        padding-top: 5px;
        justify-content: center !important;
    }
    .pack-card__student-meta {
        width: 100%;
    }
}

@media (max-width: 479px) {
    .item-carrito {
        flex-direction: column;
        align-items: stretch;
    }
    .item-carrito__cover {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    .item-carrito__img {
        width: 80px;
        height: 108px;
    }
    .item-carrito__info {
        width: 100%;
    }
    .item-carrito__acciones {
        flex-basis: auto;
        width: 100%;
        display: flex;
        flex-direction: row !important;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
    }
    .item-carrito__acciones > .item-carrito__btn-borrar {
        display: none;
    }
    .item-carrito__acciones .botones-cantidad {
        order: 1;
        margin-top: 0;
    }
    .item-carrito__acciones .item-precio {
        order: 0;
        flex: 1;
    }
    .item-carrito__precio-ud {
        display: none;
    }
    .item-carrito__selector-wrap {
        width: 100% !important;
    }

    .pack-card__asignar-row {
        width: 100% !important;
    }
}

/* Toolbar */
.carrito-toolbar {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--vivo-border-default);
    margin-bottom: 4px;
}

/* Grupos (por curso / por estudiante) */
.carrito-grupo {
    margin-top: 8px;
}

.carrito-grupo__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0 8px;
    border-bottom: 2px solid var(--vivo-primary);
    margin-bottom: 4px;
    color: #333;
}

.carrito-grupo__header i {
    color: var(--vivo-primary);
}

/* Precio total dentro de bloques de paquete */
.carrito-pack-total .fw-bold {
    color: var(--vivo-primary);
}

.carrito-pack-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #fff3ef;
    border-top: 1px solid var(--vivo-border);
    font-size: 14px;
}

/* Bloque paquete (dentro del grupo de estudiante) */
.carrito-pack-bloque {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin: 8px 0;
    overflow: hidden;
}

.carrito-pack-bloque__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #e9ecef;
    border-bottom: 1px solid #dee2e6;
}

.carrito-pack-bloque .lista-carrito {
    padding: 0 12px;
}

.carrito-pack-bloque .item-carrito {
    padding: 12px 0;
}

.carrito-grupo__header--paquete {
    border-bottom-color: #6c757d;
}

.carrito-grupo__header--paquete i {
    color: #6c757d;
}

.paquete-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #495057;
    background: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 2px 8px;
    margin-left: 8px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.paquete-badge i {
    color: #495057;
    font-size: 12px;
}

.btn-eliminar-paquete {
    font-size: 12px;
    padding: 2px 10px;
    white-space: nowrap;
}

/* Lista de items */
.lista-carrito {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lista-carrito--2col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.lista-carrito--2col .item-carrito__cover { width: 64px; }
.lista-carrito--2col .item-carrito__img   { width: 64px; height: 86px; }
.lista-carrito--2col .item-carrito__placeholder { width: 64px; height: 86px; }

@media (min-width: 992px) {
    .lista-carrito--2col {
        grid-template-columns: 1fr 1fr;
    }
}

.item-carrito {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    background: var(--vivo-surface-resumen);
    border-radius: 10px;
    padding: 10px;
}

/* Checkbox de devolución de un libro suelto: barra propia arriba de la fila, igual que
   la del paquete completo (pack-card__seleccionar) — checkbox y texto en la misma línea. */
.item-carrito__seleccionar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 100%;
    order: -1;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
}

/* Libro dentro de pack (solo lectura, sin controles) */
.item-carrito--pack-libro {
    background: var(--vivo-surface-resumen);
}

/* Portada */
.item-carrito__cover {
    flex-shrink: 0;
    width: 105px;
    position: relative;
}

.item-carrito__img {
    width: 105px;
    height: 138px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

.item-carrito__placeholder {
    width: 85px;
    height: 115px;
    border-radius: 8px;
    background: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-carrito__badge-dto {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #F70000;
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 5px;
    padding: 2px 5px;
    line-height: 1.3;
    pointer-events: none;
}

/* Info (título, ISBN, editorial, selector) */
.item-carrito__info {
    flex: 1;
    min-width: 0;
}

.item-carrito__selector-wrap {
    margin-top: 8px;
    width: 80%;
}

.item-carrito__acciones .botones-cantidad {
    margin-top: auto;
}

.item-carrito__precio-ud {
    font-size: var(--vivo-fs-caption);
    color: var(--vivo-text-primary);
    margin-top: 4px;
}

.item-carrito__selector-wrap .form-select {
    background-color: white;
    border: 1px solid var(--vivo-border-default);
    border-radius: 9.5px;
    font-size: 13px;
}

/* Controles (precio/ud, cantidad, total, borrar) */
.item-carrito__acciones {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 8px;
    align-self: stretch;
}

.item-carrito__acciones > .item-carrito__btn-borrar {
    order: -1;
}

.item-carrito__btn-borrar {
    border: 1.5px solid var(--vivo-border-default);
    border-radius: 5px;
    background: white;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: var(--vivo-fs-body);
    font-weight: 600;
    color: var(--vivo-text-primary);
    transition: border-color .15s;
}

.item-carrito__btn-borrar:hover {
    border-color: #dc3545;
}

.item-carrito__btn-borrar .icon-trash {
    width: 1rem;
    height: 1rem;
    background-color: #5D5D5D;
}

.item-carrito__btn-borrar:hover .icon-trash {
    background-color: #dc3545;
}

.item-titulo {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.35;
    margin-bottom: 4px;
}

.sin-asignar {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    color: var(--vivo-primary);
    background: var(--vivo-bg-alpha);
    border-radius: 4px;
    padding: 1px 7px;
    margin-left: 6px;
    vertical-align: middle;
}

.item-meta {
    font-size: var(--vivo-fs-caption);
    color: #777;
    margin-bottom: 2px;
}

.item-meta span {
    font-weight: 600;
    color: #555;
}

.item-meta--estudiante {
    color: var(--vivo-fw-bold);
    font-size: var(--vivo-fs-caption);
}

.item-meta--estudiante .icon-student {
    width: 1.4em;
    height: 1.4em;
    background-color: currentColor;
    vertical-align: middle;
}

.item-precio {
    font-size: 15px;
    font-weight: 700;
    color: var(--vivo-text-primary);
    white-space: nowrap;
}

/* Resumen lateral */
.resumen-totales .resumen-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 14px;
}

    .resumen-totales .resumen-row .label {
        color: var(--vivo-surface-footer);
    }

.resumen-totales .resumen-row .valor { font-weight: 600; }

.resumen-totales .resumen-row .por-calcular {
    color: var(--vivo-surface-footer);
    font-size: 13px;
}

.resumen-totales .resumen-row.total-final {
    font-size: 15px;
    font-weight: 700;
    padding-top: 10px;
    margin-top: 10px;
}

.resumen-totales .resumen-row.total-final .valor {
    font-size: var(--vivo-fs-card-title);
}

.cupon-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.cupon-input-row .form-control {
    flex: 1;
    min-width: 0;
}

.cupon-input-row .btn {
    flex-shrink: 0;
    padding-left: 15px;
    padding-right: 15px;
}

.cupon-input-row .form-control::placeholder {
    font-style: italic;
}

.cupon-section .form-control:focus {
    border-color: var(--vivo-primary);
    box-shadow: 0 0 0 .2rem var(--vivo-shadow-sm);
}

/* ═══════════════════════════════════════════════════════════
   13. DESCUENTOS — Estilos compartidos
═══════════════════════════════════════════════════════════ */
.descuento-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #d1e7dd;
    color: #0a5c36;
    border-radius: 50rem;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
}

.descuento-nombre {
    font-size: 11px;
    color: #6c757d;
    font-weight: 400;
}

.resumen-row--descuento {
    color: #198754;
    align-items: flex-start !important;
}

.resumen-row--descuento .valor {
    color: #198754;
    font-weight: 600;
}

.cupon-card {
    background: #f0faf4;
    border: 1px solid #d1e7dd;
    border-radius: 0.5rem;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cupon-card__icon { color: #198754; font-size: 13px; flex-shrink: 0; }
.cupon-card__codigo { font-weight: 600; font-size: 14px; color: #0a5c36; }

.cupon-card__quitar {
    color: #6c757d;
    padding: 2px 6px;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    transition: color .15s;
    margin-left: auto;
    flex-shrink: 0;
}

.cupon-card__quitar:hover:not(:disabled) { color: #222; }
.cupon-card__quitar:disabled { opacity: .45; cursor: not-allowed; }

/* ═══════════════════════════════════════════════════════════
   14. RESUMEN COMPRA — Grupos de estudiante, packs y libros
═══════════════════════════════════════════════════════════ */
.grupo-card {
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    overflow: hidden;
}

.grupo-card__header {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-size: 13px;
}

.grupo-card__header .bi-person-fill { color: var(--vivo-primary); }
.grupo-card__header .bi { font-size: 13px; flex-shrink: 0; }

.grupo-card__body { padding: 10px 14px; }

.pack-cabecera {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0 8px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 4px;
}

.pack-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--vivo-light);
    color: var(--vivo-primary);
    font-size: 11px;
    font-weight: 600;
    border-radius: 50rem;
    padding: 3px 9px;
    white-space: nowrap;
}

.pack-precio { font-weight: 700; font-size: 13px; color: var(--vivo-primary); }

.pack-libros { list-style: none; padding-left: 4px; margin: 0; }
.pack-libros li {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    font-size: 12px;
    color: #666;
}
.pack-libros li + li { border-top: 1px solid #f5f5f5; }
.pack-libros .bi { font-size: 10px; flex-shrink: 0; }

.libro-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    font-size: 13px;
}
.libro-item + .libro-item { border-top: 1px solid #f0f0f0; }

.libro-meta {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 3px;
}
.libro-meta__tag {
    font-size: 10px;
    background: #f3f3f3;
    color: #888;
    border-radius: 4px;
    padding: 1px 6px;
    line-height: 1.6;
}

.resumen-features {
    margin-top: 16px;
    padding-top: 6px;
}

.resumen-features .feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--vivo-surface-footer);
    margin-bottom: 8px;
}

.resumen-features .feature-item i {
    color: var(--vivo-primary);
    font-size: 15px;
    flex-shrink: 0;
}
.resumen-features .feature-item [class^="icon-"] {
    width: 14px;
    height: 14px;
    background-color: var(--vivo-primary);
    flex-shrink: 0;
}

/* Sección header (ResumenCompra) */
.seccion-header-icon {
    background: var(--vivo-light);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    color: var(--vivo-primary);
}

.seccion-header-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #666;
}

/* Ficha seleccionada/activa */
.ficha--activo {
    border-color: var(--vivo-border-default) !important;
}

/* Ficha tipo radio: sin borde por defecto, línea fina en hover/activo */
.mis-datos .ficha.ficha--radio,
.compra-page .ficha.ficha--radio {
    border-color: transparent;
    margin-top: 8px;
    transition: border-color 0.15s;
}
.mis-datos .ficha.ficha--radio:hover,
.compra-page .ficha.ficha--radio:hover {
    border-color: #ccc;
}
.mis-datos .ficha.ficha--radio.ficha--activo,
.compra-page .ficha.ficha--radio.ficha--activo {
    border-color: var(--vivo-primary);
}

/* Modal de añadir dirección: sin margen superior en la ficha interna */
.modal-agregar-direccion .ficha {
    margin-top: 0;
}

/* Modal de añadir estudiante: estilos de ficha coherentes con .mis-datos */
.modal-agregar-estudiante .ficha {
    margin-top: 0;
}
.modal-agregar-estudiante .ficha h3 {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

/* Validación: el label del checkbox de condiciones no hereda el color rojo */
.mis-datos .form-check-input.is-invalid ~ .form-check-label,
.compra-page .form-check-input.is-invalid ~ .form-check-label {
    color: inherit;
}

/* ═══════════════════════════════════════════════════════════
   PÁGINA DE COMPRA (CHECKOUT)
═══════════════════════════════════════════════════════════ */
.compra-page .ficha {
    padding: 0;
    margin-top: 0;
}

.compra-page .ficha h3 {
    font-size: var(--vivo-fs-heading-seccion);
    font-weight: var(--vivo-fw-bold);
    color: #333;
}

/* ficha--radio recupera border y background para la interacción visual */
.compra-page .ficha.ficha--radio {
    border: 1px solid transparent;
    border-radius: 10px;
    background-color: #fff;
    padding: 10px 16px;
    transition: background-color 0.15s, border-color 0.15s;
}

.compra-page .ficha.ficha--radio .form-check-input {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}
.compra-page .ficha.ficha--radio:hover {
    border-color: transparent;
    background-color: var(--vivo-surface-resumen);
}

.compra-page .ficha.ficha--radio.ficha--activo {
    border-color: transparent;
    background-color: var(--vivo-surface-resumen);
}

.compra-page .resumen-compra .ficha.ficha--radio.ficha--activo {
    border: none;
}

/* Mayor especificidad → restaura ficha como tarjeta dentro de modales */
.compra-page .modal .ficha {
    background-color: #fff;
    border: 1px solid var(--vivo-border-default);
    border-radius: 10px;
    padding: 16px 20px;
    margin-top: 0;
}

.compra-page .modal .ficha h3 {
    font-size: var(--vivo-fs-heading-seccion);
    font-weight: var(--vivo-fw-bold);
    color: #333;
}

.compra-page .ficha--pregunta h3 {
    font-size: var(--vivo-fs-subtitle);
    font-weight: var(--vivo-fw-semibold);
    color: #333;
}

/* ── Opciones de envío ── */
.envio-opcion__nombre {
    font-size: var(--vivo-fs-subtitle);
    font-weight: var(--vivo-fw-bold);
}

.envio-opcion__desc {
    font-size: 13px;
    margin-top: 0.25rem;
}

.envio-opcion__precio {
    font-size: var(--vivo-fs-body);
    font-weight: 600;
    margin-top: 0.25rem;
}

.ficha--disabled {
    opacity: 0.45;
    pointer-events: none;
}

.fs-caption {
    font-size: var(--vivo-fs-caption);
}

.envio-opcion__icono {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    background-color: currentColor;
    color: var(--vivo-primary);
    opacity: 0.35;
    transition: opacity 0.15s;
}

.ficha--activo .envio-opcion__icono {
    opacity: 1;
}

.envio-opcion__icono.icon-creditcard {
    width: 1.9rem;
    height: 1.6rem;
}

@media (max-width: 992px) {
    .envio-opcion__icono {
        width: 1.5rem;
        height: 1.5rem;
    }

    .envio-opcion__icono.icon-creditcard {
        width: 1.7rem;
        height: 1.3rem;
    }
}

.pago-opcion__icono-bi {
    flex-shrink: 0;
    font-size: 1.75rem;
    color: var(--vivo-primary);
    opacity: 0.35;
    transition: opacity 0.15s;
}

.ficha--activo .pago-opcion__icono-bi {
    opacity: 1;
}

/* ═══════════════════════════════════════════════════════════
   15. CATÁLOGO — Botón añadir / control cantidad
═══════════════════════════════════════════════════════════ */
.btn-add-carrito {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    padding: 7px 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--vivo-primary);
    background: transparent;
    border: 1.5px solid var(--vivo-primary);
    border-radius: 50px;
    cursor: pointer;
    transition: background .15s, color .15s;
    white-space: nowrap;
}

.btn-add-carrito:hover {
    background: var(--vivo-primary);
    color: #fff;
}

.btn-add-carrito--remove .icon-trash { background-color: var(--bs-danger, #dc3545); }
.btn-add-carrito--remove:hover .icon-trash { background-color: #fff; }

.solo-paquetes-badge {
    display: inline-flex;
    align-items: center;
    font-size: .75rem;
    color: #6c757d;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: .25rem .75rem;
    white-space: nowrap;
}
.solo-paquetes-badge .icon-pack { width: 0.75rem; height: 0.75rem; background-color: currentColor; }

.sin-precio-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    color: #92400e;
    border: 1px solid #fcd34d;
    border-radius: 20px;
    padding: .5rem .75rem;
    white-space: nowrap;
    background-color: #fffbeb;
    width: 100%;
}

/* ── Modal detalle paquete ──────────────────────────────── */
.paquete-detalle-icono {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.paquete-detalle-icono .paquete-icon { width: 2.5rem; height: 2.5rem; }

.libro-paquete-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow .15s, border-color .15s;
    cursor: pointer;
}
.libro-paquete-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
    border-color: #ced4da;
}

.libro-paquete-img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
    background: #fafafa;
}

.libro-paquete-placeholder {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #dee2e6;
}

.libro-paquete-titulo {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.carrito-qty-control {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--vivo-primary);
    border-radius: 50px;
    overflow: hidden;
    user-select: none;
}

.btn-qty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--vivo-primary);
    transition: background .12s;
    flex-shrink: 0;
}

.btn-qty:hover { background: var(--vivo-light); }
.btn-qty--remove:hover { color: var(--vivo-primary-dark); }

.qty-number {
    min-width: 28px;
    text-align: center;
    font-weight: 700;
    font-size: 15px;
    color: var(--vivo-primary);
    line-height: 34px;
}

/* ═══════════════════════════════════════════════════════════
   16. WIZARD DE COMPRA
═══════════════════════════════════════════════════════════ */
.wizard-progreso {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 16px 8px 8px;
    list-style: none;
    margin: 0;
}

#compra-root .wizard-progreso {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 30px 8px;
    list-style: none;
    margin: 0 auto;
    width: 100%;
}

@media (min-width: 992px) {
    #compra-root .wizard-progreso { width: 60%; }
}

.wizard-paso__contenido {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 60px;
}

.wizard-paso__circulo {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    border: 2px solid #dee2e6;
    background: #fff;
    color: #adb5bd;
    transition: all 0.2s;
}

.wizard-paso__contenido.activo .wizard-paso__circulo {
    border-color: var(--vivo-primary);
    background: var(--vivo-primary);
    color: #fff;
}

.wizard-paso__contenido.completado .wizard-paso__circulo {
    border-color: var(--vivo-primary);
    background: #fff;
    color: var(--vivo-primary);
}

.wizard-paso__btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.wizard-paso__btn:hover .wizard-paso__circulo {
    background-color: var(--vivo-light);
}

.wizard-paso__label {
    font-size: 11px;
    color: #adb5bd;
    text-align: center;
    white-space: nowrap;
}

.wizard-paso__contenido.activo .wizard-paso__label {
    color: var(--vivo-primary);
    font-weight: 600;
}

.wizard-paso__contenido.completado .wizard-paso__label {
    color: #333;
}

.wizard-paso__linea {
    flex: 1;
    height: 2px;
    background: #dee2e6;
    margin: 0 8px;
    margin-top: 18px;
    min-width: 24px;
    transition: background 0.2s;
}

.wizard-paso__linea.completada {
    background: var(--vivo-primary);
}

@media (max-width: 575px) {
    .wizard-paso__label { font-size: 10px; }
    .wizard-paso__circulo { width: 32px; height: 32px; font-size: 12px; }
    .wizard-paso__linea { margin-top: 15px; }
    #compra-root .wizard-progreso {
        padding: 20px 8px;
        width: 100%;
    }
}

.modal .wizard-progreso { 
    width: 85% !important;
    margin: 0 auto;  
    padding: 20px 0;
}

/* Variante compacta — usada en BuscarLibros */
.wizard-progreso--sm {
    padding: 8px 4px 6px;
    margin-bottom: 20px !important;
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}
.wizard-progreso--sm .wizard-paso__contenido {
    gap: 4px;
    min-width: 52px;
}
.wizard-progreso--sm .wizard-paso__circulo {
    width: 30px;
    height: 30px;
    font-size: 12px;
    border-width: 2px;
}
.wizard-progreso--sm .wizard-paso__label {
    font-size: 11px;
}
.wizard-progreso--sm .wizard-paso__linea {
    margin-top: 15px;
    margin-left: 6px;
    margin-right: 6px;
}

.wizard-nav .btn-link {
    padding: 0.5rem 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

/* Alertas inline */
.wizard-alerta {
    border-radius: 10px;
    padding: 14px 16px;
    margin-top: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
    animation: wizardAlertaIn 0.25s ease;
}

.wizard-alerta .btn-close { font-size: 10px; margin-top: 2px; flex-shrink: 0; }
.wizard-alerta strong { font-size: 14px; }
.wizard-alerta ul { font-size: 13px; }

.wizard-alerta--error {
    background: #fdf0f0;
    border: 1px solid #f5c6cb;
    color: #842029;
}

.wizard-alerta--error > i {
    color: #dc3545;
    font-size: 1.1rem;
    margin-top: 1px;
}

.wizard-alerta--aviso {
    background: #fff8f0;
    border: 1px solid var(--vivo-pale);
    color: var(--vivo-dark);
}

.wizard-alerta--aviso > i {
    color: var(--vivo-primary);
    font-size: 1.1rem;
    margin-top: 1px;
}

/* wizard-alerta usado inline dentro de ficha (sin margen top global) */
.ficha .wizard-alerta {
    margin-top: 12px;
}

@keyframes wizardAlertaIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Página CompraKo ── */
.compra-ko {
    max-width: 600px;
    margin: 40px auto;
    text-align: center;
    padding: 0 16px;
}

.compra-ko__circulo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--vivo-light);
    border: 2px solid var(--vivo-primary);
    color: var(--vivo-primary);
    font-size: 1.8rem;
    margin: 0 auto 20px;
}

.compra-ko__titulo {
    font-size: var(--vivo-fs-heading-seccion);
    font-weight: 700;
    margin-bottom: 16px;
    color: #333;
}

.compra-ko__mensaje {
    color: #555;
    line-height: 1.7;
    margin-bottom: 28px;
}

.compra-ko__mensaje p { font-size: var(--vivo-fs-body); margin-bottom: 10px; }
.compra-ko__mensaje p:last-child { margin-bottom: 0; }

.compra-ko__referencia { color: #888; }

.compra-ko__acciones {
    margin-top: 8px;
}

/* ── Página CompraOk ── */
.compra-ok {
    max-width: 600px;
    margin: 40px auto;
    text-align: center;
    padding: 0 16px;
}

.compra-ok__circulo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--vivo-light);
    border: 2px solid var(--vivo-primary);
    color: var(--vivo-primary);
    font-size: 1.8rem;
    margin: 0 auto 20px;
}

.compra-ok__titulo {
    font-size: var(--vivo-fs-heading-seccion);
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
}

.compra-ok__mensaje {
    color: #555;
    line-height: 1.7;
    margin-bottom: 28px;
}

.compra-ok__mensaje p { font-size: var(--vivo-fs-body); margin-bottom: 10px; }
.compra-ok__mensaje p:last-child { margin-bottom: 0; }

.compra-ok__fecha { color: var(--vivo-primary); }

.compra-ok__acciones {
    margin-top: 8px;
}

/* ═══════════════════════════════════════════════════════════
   17. FOOTER
═══════════════════════════════════════════════════════════ */
.footer {
    background-color: #3a3a3a;
    color: #a0a0a0;
    padding: 48px 0 0;
    position: inherit !important;
    white-space: normal;
}

.footer--sin-contenido {
    padding-top: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    padding-bottom: 40px;
    align-items: start;
}

.footer-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Mismo espaciado (25px) entre el listado de enlaces y el bloque de rrss que el que
   ya usa .footer-lista entre sus propios <li>, para que ambos se vean como un único ritmo vertical. */
.footer-col-contenido {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.footer-titulo {
    font-size: var(--vivo-fs-subtitle);
    font-weight: var(--vivo-fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
    margin-bottom: 16px;
}

/* Título del footer convertido en desplegable en móvil (ver script en _PiePagina.cshtml) */
.footer-titulo-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.footer-titulo-toggle .icon-chevron-down {
    background-color: currentColor;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.footer-titulo-toggle[aria-expanded="true"] .icon-chevron-down {
    transform: rotate(180deg);
}

@media (max-width: 767px) {
    .footer-titulo-toggle {
        cursor: pointer;
        margin-bottom: 0;
        padding: 14px 0;
    }
}

.footer-lista {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.footer a { color: #fff !important; text-decoration: none; }
.footer a:hover { opacity: 0.75; color: #fff !important; }
.footer-lista a { font-size: 0.9rem; transition: opacity 0.15s; }

.footer-rrss { display: flex; gap: 16px; }
.footer-rrss a { font-size: 1.25rem; transition: opacity 0.15s; }

.footer-contacto li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    color: #fff;
    white-space: wrap;
}
.footer-contacto li i {
    flex-shrink: 0;
}
.footer-contacto li a,
.footer-contacto li span {
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

.footer-copyright {
    background-color: #000;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-copyright p {
    text-align: center;
    color: var(--vivo-secondary-light);
    font-size: 0.82rem;
    margin: 0;
    padding: 12px;
}

@media (max-width: 991px) and (min-width: 768px) {
    .footer-grid { gap: 24px; }
}

@media (max-width: 767px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        padding-bottom: 10px;
    }

    /* En móvil el footer pierde el fondo oscuro: pasa a mezclarse con el fondo
       claro de la página, y cada sección se distingue por su propio borde. */
    .footer {
        background-color: transparent;
        color: #555;
        padding: 15px 0 0;
    }

    /* Cada .footer-col se convierte en una tarjeta con borde tipo accordion de FAQs
       (.bloque-faqs .accordion-item), en lugar del texto en mayúsculas sobre fondo oscuro. */
    .footer-col {
        background-color: #fff;
        border: 1px solid #e8e8e8;
        border-radius: 12px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
        overflow: hidden;
    }

    .footer-titulo-toggle {
        padding: 14px 16px;
        color: #1a1a1a;
        font-size: 0.95rem;
        font-weight: 500;
        text-transform: none;
        letter-spacing: normal;
    }

    .footer-titulo-toggle[aria-expanded="true"] {
        color: var(--vivo-primary);
    }

    .footer-titulo-toggle .icon-chevron-down {
        background-color: #6c757d;
    }

    .footer-titulo-toggle[aria-expanded="true"] .icon-chevron-down {
        background-color: var(--vivo-primary);
    }

    .footer-col-contenido {
        padding: 14px 14px;
        border-top: 1px solid #f0f0f0;
        gap: 20px;
    }

    .footer-lista {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .footer a,
    .footer-contacto li {
        color: #333 !important;
    }

    .footer a:hover {
        color: var(--vivo-primary) !important;
        opacity: 1;
    }

    .footer-copyright {
        background-color: transparent;
        border-top: 1px solid #e8e8e8;
    }
}

/* ═══════════════════════════════════════════════════════════
   18. MODALES UTILITARIOS (ModalConfirm, debug modal)
═══════════════════════════════════════════════════════════ */

/* Fondo oscuro reutilizable */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

.modal-body { font-size: var(--vivo-fs-body); }
.modal .modal-title {
    font-family: var(--vivo-font);
    font-size: var(--vivo-fs-heading-seccion);
    font-weight: 700;
}

/* Diálogo de confirmación */
.modal-confirm {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-top: 4px solid var(--bs-danger);
    padding: 24px 24px 20px;
    border-radius: 12px;
    z-index: 1050;
    width: 90%;
    max-width: 380px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.modal-confirm__icono {
    font-size: 2rem;
    color: var(--bs-danger);
    margin-bottom: 12px;
}

.modal-confirm__mensaje {
    font-size: 0.95rem;
    color: #333;
}

/* Neutralizar overrides de contexto (.mis-datos, .carrito-page) dentro del modal:
   el botón Cancelar debe verse gris neutro, no el color secundario de marca (teal) ni el naranja de página. */
.modal-confirm .btn-outline-secondary {
    border-color: #adb5bd;
    color: #6c757d;
}
.modal-confirm .btn-outline-secondary:hover {
    border-color: #6c757d;
    color: #fff;
    background-color: #6c757d;
}

/* Diálogo de mensaje informativo (display.tsx) */
.modal-mensaje {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    color: #000;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    z-index: 1120;
}

.modal-overlay--mensaje {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1100;
}

/* ═══════════════════════════════════════════════════════════
   19. CARRITO — Pack cards (rediseño visual)
═══════════════════════════════════════════════════════════ */
.pack-card {
    border: 1px solid var(--vivo-border-default);
    border-radius: 12px;
    margin-bottom: 20px;
    background: #fff;
    overflow: hidden;
}

.pack-card:last-child {
    margin-bottom: 0;
}

.pack-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 11px 5px 13px;
    /*background: var(--vivo-surface-resumen);*/
    background: white;
    border-bottom: 1px solid var(--vivo-border-default);
}

.pack-card__header-label {
    font-size: var(--vivo-fs-body);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
}

.pack-card__header .btn-link {
    font-size: 14px;
    padding: 0;
}

.pack-card__header .btn-link:hover {
    color: #a71d2a;
}

.pack-card__seleccionar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--vivo-surface-resumen);
    border-bottom: 1px solid var(--vivo-border-default);
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
}

.pack-card__seleccionar input {
    flex-shrink: 0;
}

.pack-card__student {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 16px 10px;
    gap: 12px;
}

@media (max-width: 767px) {
    .pack-card__student {
        flex-direction: column;
        align-items: center;
    }
}

.pack-card__student-meta {
    flex: 1;
    min-width: 0;
}

.pack-card__student-nombre {
    font-weight: 400;
    font-size: 1rem;
    color: #1a1a1a;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
}

.pack-card__student-nombre .icon-student {
    width: 1.3em;
    height: 1.3em;
    flex-shrink: 0;
    margin: 0 10px 0 0;
}

.pack-card__student-nombre em {
    font-style: italic;
    font-weight: 700;
    font-size: var(--vivo-fs-body);
    color: #333;
}

.pack-card__student-nombre em::before {
    content: '·';
    margin: 0 0.45rem;
    font-style: normal;
    font-weight: 400;
    color: #666;
}

.pack-card__oficial {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: var(--vivo-fs-caption);
    color: #333;
    margin-top: 4px;
}

    .pack-card__oficial i,
    .pack-card__oficial .icon-book {
        color: var(--vivo-primary);
        background-color: var(--vivo-primary);
        width: 1.4em;
        height: 1.4em;
        flex-shrink: 0;
        margin: 0 5.5px 0 1.4px;
    }

.pack-card__nota {
    font-size: 12px;
    font-style: italic;
    color: var(--vivo-text-placeholder);
    margin-top: 5px;
}

.pack-card__nota--licencias {
    font-style: normal;
    color: #555;
}

.pack-card__ahorro-padre {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #198754;
    background: #d1e7dd;
    border-radius: 6px;
    padding: 2px 8px;
}

.pack-card__thumbs {
    display: flex;
    align-items: flex-end;
    flex-shrink: 0;
    min-width: 134px;
    padding-bottom: 4px;
}

.pack-card__thumb {
    width: 54px;
    height: 73px;
    border-radius: 6px;
    border: 2px solid white;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.pack-card__thumb:nth-child(1) {
    transform: rotate(-5deg) translateY(5px);
    z-index: 1;
    margin-right: -14px;
}

.pack-card__thumb:nth-child(2) {
    z-index: 3;
    margin-right: -14px;
}

.pack-card__thumb:nth-child(3) {
    transform: rotate(5deg) translateY(5px);
    z-index: 2;
}

.pack-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pack-card__asignar {
    padding: 3px 16px 14px;
}

.pack-card__asignar-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

@media (max-width: 767px) {
    .pack-card__asignar-row {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    .pack-card__toggle {
        width: 100%;
        justify-content: center;
    }
}

.pack-card__asignar-selector {
    width: 50%;
}

@media (max-width: 767px) {
    .pack-card__asignar-selector {
        width: 100%;
    }
}

.pack-card__asignar-selector .form-select {
    background-color: white;
    border: 1px solid var(--vivo-border-default);
    border-radius: 9.5px;
    font-size: 13px;
}

.pack-card__toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    padding: 0;
    border: none;
    background: none;
    color: var(--vivo-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s;
}

.pack-card__toggle:hover {
    color: var(--vivo-primary-dark);
}

.pack-card__books {
    border-top: 1px solid var(--vivo-border-default);
}

.pack-card__books-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px;
}

@media (max-width: 575px) {
    .pack-card__books-grid {
        grid-template-columns: 1fr;
    }
}

.pack-card__book-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--vivo-surface-resumen);
    border-radius: 10px;
}

.pack-card__book-cover-wrap {
    flex-shrink: 0;
    width: 64px;
}

.pack-card__book-img {
    width: 64px;
    height: 86px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

.pack-card__book-placeholder {
    width: 64px;
    height: 86px;
    border-radius: 8px;
    background: var(--vivo-surface-resumen);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pack-card__book-info {
    flex: 1;
    min-width: 0;
}

.pack-card__book-titulo {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    margin-bottom: 4px;
    color: #222;
}

.pack-card__footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-top: 1px solid var(--vivo-border-default);
    /*background: var(--vivo-surface-resumen);*/
    background: white;
    font-size: 14px;
}

.pack-card__separador {
    border-top: 2px dashed var(--vivo-border-default);
    margin: 0 16px;
}

/* Paquete completamente devuelto: mismo fondo levemente oscurecido que ya usa el resto
   del sitio (--vivo-surface-resumen) para diferenciarlo del blanco del resto de la tarjeta. */
.pack-card__pack--devuelto,
.pack-card__pack--devuelto .pack-card__footer,
.pack-card__sueltos.pack-card__pack--devuelto {
    background: var(--vivo-surface-resumen);
}

.pack-card__footer-label {
    color: #666;
}

.pack-card__footer-precio {
    font-weight: 700;
    font-size: 15px;
    color: #1a1a1a;
}

/* Resumen — fila por estudiante */
.resumen-pack-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 14px;
}

.resumen-pack-item:last-child {
    border-bottom: none;
}

.resumen-pack-item .label { color: #444; }
.resumen-pack-item .valor { font-weight: 600; }

.resumen-envio-gratuito {
    color: #198754;
    font-weight: 600;
    font-size: 13px;
}

/* Sección de libros sueltos dentro de la tarjeta */
.pack-card__sueltos {
    background: transparent;
}

.pack-card__sueltos--adicional {
    border-top: 2px dashed var(--vivo-border-default);
}

.pack-card__sueltos-header {
    display: flex;
    align-items: center;
    padding: 10px 16px 6px;
    font-size: var(--vivo-fs-body);
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
}

.pack-card__sueltos-student {
    padding: 14px 16px 0;
    font-weight: 700;
    font-size: 1rem;
    color: #1a1a1a;
}

.pack-card__sueltos-student em {
    font-style: italic;
    font-weight: 400;
    font-size: 0.9rem;
    color: #555;
}

/* Botón añadir alumno */
.btn-anadir-alumno {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    border: 1.5px dashed var(--vivo-border-default);
    border-radius: 10px;
    background: transparent;
    color: #777;
    font-size: 14px;
    cursor: pointer;
    transition: border-color .15s, color .15s;
    margin-top: 4px;
    text-decoration: none;
}

.btn-anadir-alumno:hover {
    border-color: var(--vivo-primary);
    color: var(--vivo-primary);
}

/* ═══════════════════════════════════════════════════════════
   20. PACK-CARD — Cabecera con nombre de estudiante (vistas de sólo lectura)
═══════════════════════════════════════════════════════════ */

/* Variante del header de pack-card para mostrar el nombre del estudiante
   (sin uppercase, con icono coloreado). Usada en ResumenCompra, CompraOk,
   PedidoSapDetalle donde el header identifica al alumno en lugar del tipo de tarjeta. */
.pack-card__header-student {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--vivo-fs-body);
    font-weight: 600;
    color: #333;
}

.pack-card__header-student .bi-person-fill {
    color: var(--vivo-primary);
}

/* Imagen de portada dentro de un ítem del modal (reemplaza estilos inline) */
.modal-item-img {
    border-radius: 6px;
    display: block;
    max-width: 100%;
    height: auto;
}

/* Icono estrellas pequeño (reemplaza style fontSize inline) */
.bi-stars--sm {
    font-size: 11px;
}

.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    white-space: nowrap;
}


/* =============================================================
   CART TOAST - Notificacion al anadir al carrito
   ============================================================= */
.cart-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1090;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-left: 4px solid var(--vivo-primary);
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.13);
    padding: 12px 14px;
    min-width: 270px;
    max-width: 340px;
    transform: translateX(calc(100% + 32px));
    opacity: 0;
    transition: transform 0.32s cubic-bezier(.22,.68,0,1.2), opacity 0.28s ease;
    pointer-events: none;
}

.cart-toast--visible {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.cart-toast__icon {
    flex-shrink: 0;
    color: var(--vivo-primary);
    font-size: 1.35rem;
    line-height: 1;
}

.cart-toast__img {
    flex-shrink: 0;
    width: 40px;
    height: 52px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.cart-toast__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cart-toast__label {
    font-size: 12px;
    font-weight: 700;
    color: var(--vivo-primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cart-toast__titulo {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.cart-toast__close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 2px;
    transition: color 0.15s;
}

.cart-toast__close:hover {
    color: var(--vivo-primary);
}

/* Ahorro padre en resumen del carrito */
.resumen-ahorro-padre {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #146c43;
    background: #d1e7dd;
    border-radius: 20px;
    padding: 3px 10px;
}

@media (min-width: 992px) {
    .border-lg-end {
        border-right: 1px solid #dee2e6 !important;
    }
    /* En grid de 2 col, si la última fila está completa (N par), el ítem izquierda también pierde border-bottom */
    .row-cols-lg-2 > .item-carrito:nth-last-child(2):nth-child(odd) {
        border-bottom: none;
    }
}
