/* Ventana del mini asesor y orden de las capas (vista previa, 28-10-2026; propuestas 5 y 6).
   La carga views/layout.xml solo en la vista previa, junto con static/src/v2/popup_asesor.js.
   En pantallas anchas, una ventana centrada de 520 px; en el celular, una hoja que sube desde
   abajo y deja ver la página detrás. Colores y ritmo de la marca: verde, crema y oro. */

.hm-pa { position: fixed; inset: 0; z-index: 1300; pointer-events: none; }
.hm-pa__velo {
    position: absolute; inset: 0; background: rgba(10, 46, 27, .32);
    opacity: 0; transition: opacity .35s cubic-bezier(.16, 1, .3, 1);
}
.hm-pa__caja {
    position: absolute; left: 50%; top: 50%; width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
    overflow: auto; overscroll-behavior: contain; outline: none;
    background: #F4F1E8; color: #0A2E1B; border-radius: 16px;
    box-shadow: 0 40px 80px -30px rgba(10, 46, 27, .55), 0 0 0 1px rgba(10, 46, 27, .08);
    transform: translate(-50%, -46%) scale(.97); opacity: 0;
    transition: transform .5s cubic-bezier(.16, 1, .3, 1), opacity .35s ease;
}
.hm-pa.is-abierta { pointer-events: auto; }
.hm-pa.is-abierta .hm-pa__velo { opacity: 1; }
.hm-pa.is-abierta .hm-pa__caja { transform: translate(-50%, -50%) scale(1); opacity: 1; }

.hm-pa__x {
    position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%;
    background: rgba(10, 46, 27, .06); color: #0A2E1B; cursor: pointer; display: grid; place-items: center;
}
.hm-pa__x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.hm-pa__x:hover { background: rgba(10, 46, 27, .12); }
.hm-pa__cuerpo { padding: 28px 28px 22px; }

.hm-pa__ceja { display: flex; justify-content: space-between; gap: 12px; margin: 0 48px 10px 0; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #8A5A0B; }
.hm-pa__ceja span { color: rgba(10, 46, 27, .55); letter-spacing: .04em; }
.hm-pa__progreso { height: 3px; margin: 0 0 16px; border-radius: 3px; background: rgba(10, 46, 27, .1); overflow: hidden; }
.hm-pa__progreso span { display: block; height: 100%; background: #E2A93B; transition: width .4s cubic-bezier(.16, 1, .3, 1); }
.hm-pa h2 { margin: 0 40px 6px 0; font-size: clamp(24px, 3vw, 30px); line-height: 1.12; letter-spacing: -.01em; color: #0A2E1B; outline: none; text-wrap: balance; }
.hm-pa__bajada { margin: 0 0 4px; font-size: 15px; color: rgba(10, 46, 27, .78); }
.hm-pa__bajada b { color: #0A2E1B; }
.hm-pa__pregunta { margin: 16px 0 0; font-size: 15px; font-weight: 600; }

.hm-pa__opciones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.hm-pa__opciones--una { grid-template-columns: 1fr; }
.hm-pa__opcion {
    min-height: 52px; padding: 10px 14px; text-align: left; font: inherit; font-size: 15px; color: #0A2E1B;
    background: #FFFFFF; border: 1.5px solid rgba(10, 46, 27, .14); border-radius: 10px; cursor: pointer;
    transition: border-color .2s, background-color .2s, transform .2s cubic-bezier(.16, 1, .3, 1);
}
.hm-pa__opcion:hover { border-color: #073D2B; background: #FBFAF5; }
.hm-pa__opcion:active { transform: scale(.98); }
.hm-pa__opcion:focus-visible, .hm-pa__x:focus-visible, .hm-pa__ahora-no:focus-visible, .hm-pa__atras:focus-visible { outline: 2px solid #E2A93B; outline-offset: 2px; }

.hm-pa__pie { display: flex; gap: 10px; margin-top: 16px; }
.hm-pa__ahora-no {
    flex: 1; min-height: 46px; border: 0; border-radius: 10px; background: transparent; cursor: pointer;
    font: inherit; font-size: 14.5px; color: rgba(10, 46, 27, .7); text-decoration: underline; text-underline-offset: 3px;
}
.hm-pa__atras { min-height: 46px; padding: 0 16px; border: 1.5px solid rgba(10, 46, 27, .18); border-radius: 10px; background: transparent; font: inherit; font-size: 14.5px; color: #0A2E1B; cursor: pointer; }

/* Resultado */
.hm-pa__producto {
    display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 14px;
    margin-top: 14px; padding: 12px 14px; background: #FFFFFF; border-radius: 12px; box-shadow: 0 0 0 1px rgba(10, 46, 27, .08);
}
.hm-pa__producto img { width: 76px; height: 76px; object-fit: contain; }
.hm-pa__producto b { display: block; font-size: 17px; line-height: 1.25; }
.hm-pa__producto small { display: block; font-size: 13px; color: rgba(10, 46, 27, .7); line-height: 1.35; margin-top: 2px; }
.hm-pa__rol { display: block; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #2F7D47; }
.hm-pa__precio { display: block; margin-top: 4px; font-weight: 600; }
.hm-pa__agregar { min-height: 44px; padding: 0 16px; border: 0; border-radius: 10px; background: #073D2B; color: #F4F1E8; font: inherit; font-weight: 600; cursor: pointer; }
.hm-pa__agregar:hover { background: #0A2E1B; }
.hm-pa__complemento { margin: 10px 0 0; font-size: 14px; color: rgba(10, 46, 27, .78); }
.hm-pa__complemento a { color: #073D2B; font-weight: 600; }
.hm-pa__nota { margin: 4px 0 0; font-size: 13px; color: rgba(10, 46, 27, .65); }

.hm-pa__correo { margin-top: 16px; padding: 14px; border-radius: 12px; background: #0A2E1B; color: #F4F1E8; }
.hm-pa__correo p { margin: 0 0 10px; font-size: 14.5px; }
.hm-pa__fila { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.hm-pa__fila input { min-height: 46px; padding: 10px 12px; border: 0; border-radius: 10px; font: inherit; font-size: 15px; color: #0A2E1B; background: #F4F1E8; }
.hm-pa__fila button { min-height: 46px; padding: 0 16px; border: 0; border-radius: 10px; background: #E2A93B; color: #2A1E07; font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; }
.hm-pa__fila button:hover { background: #EBBA5A; }
.hm-pa__correo label { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: 12.5px; opacity: .88; }
.hm-pa__error { margin: 8px 0 0 !important; font-size: 13px; color: #FFB4A0; }
.hm-pa__codigo { font-size: 20px; font-weight: 700; letter-spacing: .08em; color: #E2A93B; }
.hm-pa__completa { display: inline-block; margin-top: 14px; font-size: 14.5px; font-weight: 600; color: #073D2B; }
.hm-pa__legal { margin: 10px 0 0; font-size: 11.5px; color: rgba(10, 46, 27, .55); }

/* Una capa a la vez: mientras la ventana está abierta, WhatsApp y el lanzador se apartan. */
body.hm-pa-abierta [data-hm-fabs], body.hm-pa-abierta .hm-wa-flotante { opacity: 0 !important; pointer-events: none !important; }

/* Celular: hoja desde abajo, la página se sigue viendo arriba. */
@media (max-width: 760px) {
    .hm-pa__caja {
        left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-height: 86vh; border-radius: 18px 18px 0 0;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        transform: translateY(100%); opacity: 1;
    }
    .hm-pa.is-abierta .hm-pa__caja { transform: translateY(0); }
    .hm-pa__caja::before { content: ""; display: block; width: 40px; height: 4px; margin: 10px auto 0; border-radius: 4px; background: rgba(10, 46, 27, .18); }
    .hm-pa__cuerpo { padding: 14px 18px 16px; }
    .hm-pa__x { top: 14px; right: 10px; }
    .hm-pa__opcion { min-height: 48px; font-size: 14.5px; }
    .hm-pa__producto { grid-template-columns: 60px minmax(0, 1fr); }
    .hm-pa__producto img { width: 60px; height: 60px; }
    .hm-pa__agregar { grid-column: 1 / -1; width: 100%; }
    .hm-pa__fila { grid-template-columns: 1fr; }

    /* Aviso de cookies más bajo (propuesta 6): menos texto encima y los dos botones en una fila. */
    html[data-hm-previa] [data-hm-cookies] h2 { font-size: 14px !important; }
    html[data-hm-previa] [data-hm-cookies] p { font-size: 12px !important; margin-bottom: 8px !important; }
    html[data-hm-previa] [data-hm-cookies-acciones] { flex-wrap: wrap !important; }
    html[data-hm-previa] [data-hm-cookies-acciones] > button { flex: 1 1 40%; padding: 9px 8px !important; font-size: 13px !important; }
}
@media (prefers-reduced-motion: reduce) {
    .hm-pa__velo, .hm-pa__caja, .hm-pa__progreso span { transition: none; }
}
/* El título recibe el foco al abrir (lectores de pantalla), sin marco visible. */
.hm-pa h2:focus, .hm-pa h2:focus-visible, .hm-pa__caja:focus { outline: none !important; box-shadow: none !important; }
