/**
 * index.html — carrito, modales de planes y acordeón de diagnósticos.
 * El tema visual de portada vive en afs-integral-portada.css (no duplicar aquí).
 */

.boton-ver-planes,
.boton-ver-video {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    background: transparent;
    color: #ffffff;
    margin: 5px;
    text-decoration: none;
    border: none;
}
.boton-ver-planes {
    background: #4caf50;
    border: 2px solid #4caf50;
}
.boton-ver-video {
    background: #ff9800;
    border: 2px solid #ff9800;
}
.boton-ver-planes:hover,
.boton-ver-video:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}
.botones-servicio {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 15px 0 10px;
    flex-wrap: wrap;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}
.modal-contenido {
    background: #0b1a2a;
    padding: 2rem;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    border: 1px solid #3a4a5a;
    color: white;
}
.modal-titulo {
    font-size: 2rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-weight: 700;
}
.plan-item {
    background: #1e2e3e;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #3a4a5a;
    transition: transform 0.2s;
}
.plan-item:hover {
    transform: translateY(-2px);
    border-color: #4caf50;
}
.plan-info h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: white;
}
.plan-info p {
    color: #b0c4de;
    font-size: 0.9rem;
}
.plan-precio {
    font-size: 1.8rem;
    font-weight: 700;
    color: #4caf50;
    margin-right: 1rem;
}
.plan-btn {
    background: #4caf50;
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 4px 14px rgba(76, 175, 80, 0.28);
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease, filter 0.2s ease;
}
.plan-btn:hover {
    background: #45a049;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 22px rgba(76, 175, 80, 0.38);
    filter: brightness(1.05);
}
.plan-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 3px 12px rgba(76, 175, 80, 0.22);
}
.plan-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}
.cerrar-modal {
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: #b0c4de;
    line-height: 1;
}
.cerrar-modal:hover {
    color: white;
}

.carrito-flotante {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1500;
    cursor: pointer;
}
.carrito-icono {
    background: #4caf50;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.2s;
    border: 2px solid white;
}
.carrito-icono:hover {
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.34);
}
.carrito-contador {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff9800;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    border: 2px solid white;
}
.carrito-panel {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    background: #1e2e3e;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid #4caf50;
    display: none;
    color: white;
}
.carrito-flotante.activo .carrito-panel {
    display: block;
}
.carrito-panel h4 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    border-bottom: 1px solid #3a4a5a;
    padding-bottom: 0.5rem;
}
.lista-carrito {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
}
.carrito-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid #3a4a5a;
    font-size: 0.9rem;
}
.carrito-item-info {
    flex: 1;
}
.carrito-item-nombre {
    font-weight: 600;
    color: white;
}
.carrito-item-detalle {
    font-size: 0.8rem;
    color: #b0c4de;
}
.carrito-item-precio {
    font-weight: 700;
    color: #4caf50;
    margin-right: 10px;
}
.btn-eliminar-item {
    background: transparent;
    border: none;
    color: #ff6b6b;
    cursor: pointer;
    font-size: 1rem;
}
.carrito-total {
    font-weight: 700;
    font-size: 1.3rem;
    color: #4caf50;
    margin: 1rem 0;
    text-align: right;
}
.btn-adquirir {
    background: #4caf50;
    border: none;
    color: white;
    padding: 12px;
    border-radius: 30px;
    width: 100%;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: 2px solid #4caf50;
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease, filter 0.2s ease;
}
.btn-adquirir:hover {
    background: #45a049;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 24px rgba(76, 175, 80, 0.4);
    filter: brightness(1.05);
}
.btn-adquirir:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 3px 12px rgba(76, 175, 80, 0.25);
}
.btn-adquirir:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.grid-paquetes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: stretch;
}
@media (max-width: 768px) {
    .grid-paquetes {
        grid-template-columns: 1fr;
    }
}

.numero-indicador {
    flex-shrink: 0;
    display: inline-block;
    background: #4caf50;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
    width: 28px;
    height: 28px;
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
    border: 2px solid white;
}

.recomendado-badge {
    background: #ffd700;
    color: #0b1a2a;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
    margin-left: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border: 1px solid #ffffff;
}
.credibilidad-badge {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.2rem 0.6rem;
    border-radius: 30px;
    margin-left: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border: 1px solid rgba(76, 175, 80, 0.3);
}
.estadistica-servicio {
    font-size: 0.75rem;
    color: #b0c4de;
    margin-top: 0.5rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.5rem;
}

.seccion-paquetes {
    padding: 2rem 0;
}

.titulo-paquetes {
    text-align: center;
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1rem;
}
.subtitulo-paquetes {
    text-align: center;
    color: #b0c4de;
    max-width: 800px;
    margin: 0 auto 3rem auto;
    font-size: 1.1rem;
}
.badge-entrada {
    background: #4caf50;
    color: white;
}
.badge-especializado {
    background: #9c27b0;
    color: white;
}
.badge-recomendado {
    background: #ffd700;
    color: #0b1a2a;
}

/* Acordeón catálogo */
.paquete-item {
    margin-bottom: 0.5rem !important;
    overflow: hidden;
    border-radius: 12px !important;
}
.paquete-item .cabecera-acordeon {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem;
    background: linear-gradient(145deg, #1e2e3e, #1a2a3a);
    cursor: pointer;
    width: 100%;
    border: none;
    text-align: left;
    color: white;
    font-weight: 600;
}
.paquete-item .cabecera-acordeon .info-titulo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.paquete-item .cabecera-acordeon .precio {
    color: #4caf50;
    font-weight: 700;
    margin-left: 10px;
}
.paquete-item .cabecera-acordeon i.fa-chevron-down {
    transition: transform 0.3s;
    color: #4caf50;
}
.paquete-item.expandido .cabecera-acordeon i.fa-chevron-down {
    transform: rotate(180deg);
}
.paquete-item .contenido-acordeon {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 0.8rem;
    background: rgba(0, 0, 0, 0.2);
}
.paquete-item.expandido .contenido-acordeon {
    max-height: 500px;
    padding: 0.8rem;
}
.paquete-item .contenido-acordeon .paquete-descripcion {
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}
.paquete-item .contenido-acordeon .botones-servicio {
    flex-direction: column;
    gap: 0.5rem;
}
.paquete-item .contenido-acordeon .video-miniatura {
    width: 100%;
}
.paquete-item .contenido-acordeon .video-miniatura .video-play {
    width: 36px;
    height: 36px;
    background: #c6a43f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}
.video-miniatura {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.video-play {
    width: 36px;
    height: 36px;
    background: #c6a43f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}
.video-texto {
    color: white;
    font-size: 0.9rem;
}
.video-texto small {
    color: #b0c4de;
}

.cantidad-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}
.cantidad-selector label {
    margin-right: 10px;
    color: #b0c4de;
}
.cantidad-selector select {
    padding: 8px 15px;
    border-radius: 30px;
    border: 1px solid #4caf50;
    background: #1e2e3e;
    color: white;
    font-size: 1rem;
    cursor: pointer;
}
.precio-total {
    font-size: 2rem;
    color: #4caf50;
    font-weight: 700;
    margin: 10px 0;
}
.regalo-checkbox {
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.regalo-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}
.regalo-campo {
    margin: 15px 0;
    display: block;
}
.regalo-campo input {
    width: 100%;
    padding: 12px;
    border-radius: 30px;
    border: 1px solid #4caf50;
    background: #1e2e3e;
    color: white;
    font-size: 1rem;
}
.acciones-modal {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-top: 25px;
    width: 100%;
    box-sizing: border-box;
}
/* Misma fila que inicio / pareja en vivo: evita que “Cancelar” baje por texto largo del primario */
.acciones-modal .plan-btn {
    padding: 10px 18px;
    font-size: 0.95rem;
    white-space: nowrap;
}
.acciones-modal .btn-cancelar {
    padding: 10px 22px;
    flex-shrink: 0;
    white-space: nowrap;
}
.btn-cancelar {
    background: transparent;
    border: 2px solid #ff6b6b;
    color: #ff6b6b;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}
.btn-cancelar:hover {
    background: #ff6b6b;
    color: white;
}
.regalo-icono {
    margin-left: 5px;
    color: #ffd700;
}
.btn-corregir-item {
    background: transparent;
    border: none;
    color: #ff9800;
    cursor: pointer;
    margin-left: 5px;
    font-size: 0.9rem;
    text-decoration: underline;
}

/* Catálogo mínimo (modal desde «Tres pasos»): solo nombre, precio, al carrito */
.modal-contenido--catalogo-rapido {
    max-width: min(560px, 94vw);
    padding: 1.25rem 1.35rem 1.5rem;
}
.catalogo-rapido-root {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: 0.25rem;
    clear: both;
}
.catalogo-rapido-fila {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.65rem 0.75rem;
    padding: 0.55rem 0.65rem;
    background: rgba(30, 46, 62, 0.65);
    border: 1px solid rgba(58, 74, 90, 0.9);
    border-radius: 12px;
}
.catalogo-rapido-nombre {
    font-size: 0.88rem;
    font-weight: 600;
    color: #e8f0f8;
    line-height: 1.35;
    min-width: 0;
}
.catalogo-rapido-precio {
    font-size: 0.82rem;
    font-weight: 700;
    color: #7ed991;
    white-space: nowrap;
    text-align: right;
}
.catalogo-rapido-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    border: none;
    background: #4caf50;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    box-shadow: 0 3px 12px rgba(76, 175, 80, 0.28);
    transition: background 0.2s ease, filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.catalogo-rapido-btn:hover {
    filter: brightness(1.08);
    background: #45a049;
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 6px 18px rgba(76, 175, 80, 0.38);
}
.catalogo-rapido-btn:active {
    transform: translateY(0) scale(0.97);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.22);
}
.catalogo-rapido-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}
@media (max-width: 520px) {
    .catalogo-rapido-fila {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    .catalogo-rapido-precio {
        text-align: left;
    }
    .catalogo-rapido-btn {
        width: 100%;
    }
}

/* Portada index: CI (1), pack pareja 12+13, pareja en vivo (14). Packs familia: 15+16+17, 18+19+20, 21+22. Servicio 2 (nutrición) ya no usa modal de compra en AFS; animación afs-carrito-feedback-cognitivo sigue en CI (1), pack pareja, pareja en vivo (14). */
@keyframes afsCarritoCognitivoPop {
    0% { transform: translateY(0) scale(1); }
    45% { transform: translateY(-2px) scale(1.06); }
    100% { transform: translateY(0) scale(1); }
}
#modalPlanes button.plan-btn.afs-carrito-feedback-cognitivo.afs-carrito-feedback-cognitivo--activo {
    animation: afsCarritoCognitivoPop 0.18s ease;
    filter: brightness(1.08);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
    min-width: min(100%, 15.5rem);
    box-sizing: border-box;
}
#modalPlanes button.plan-btn.afs-carrito-feedback-cognitivo:disabled {
    opacity: 1;
    cursor: default;
}

/* Página nutrición integración: botón con id nutriAgregarBtn (misma animación, mayor especificidad). */
#modalPlanes #nutriAgregarBtn.afs-carrito-feedback-cognitivo--activo {
    animation: afsCarritoCognitivoPop 0.18s ease;
    filter: brightness(1.08);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
    min-width: min(100%, 15.5rem);
    box-sizing: border-box;
}
#modalPlanes #nutriAgregarBtn:disabled {
    opacity: 1;
    cursor: default;
}

/* Botón verde del upsell en resultados (página carga este CSS). */
button.resultados-upsell-add {
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 4px 14px rgba(76, 175, 80, 0.3);
}
button.resultados-upsell-add:hover:not(:disabled) {
    filter: brightness(1.06);
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 22px rgba(76, 175, 80, 0.4);
}
button.resultados-upsell-add:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.25);
}
button.resultados-upsell-add:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

/* Predicción / CTAs verdes fuera de portada integral */
button.btn-contratar {
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 4px 18px rgba(30, 143, 94, 0.35);
}
button.btn-contratar:hover {
    transform: translateY(-2px) scale(1.02);
    filter: brightness(1.06);
    box-shadow: 0 10px 26px rgba(30, 143, 94, 0.45);
}
button.btn-contratar:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 3px 12px rgba(30, 143, 94, 0.3);
}
button.btn-contratar:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}
