/* Replica las medidas y colores del widget de WooCommerce sin cargar sus estilos globales ni su runtime. */
.kh-widget-example { width: 100%; max-width: 400px; margin: 0; }
.kh-widget { display: flex; flex-direction: column; width: 100%; height: 780px; overflow: hidden; border-radius: 20px; background: #F3F5FA; color: #111827; box-shadow: 0 12px 40px #11182738; font: 15px/1.45 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; }
.kh-widget-header { display: flex; align-items: center; flex-shrink: 0; gap: 12px; padding: 14px 12px 14px 16px; background: #4E73DF; color: #fff; }
.kh-widget-avatar { display: flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: #fff; }
.kh-widget-heading { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 2px; }
.kh-widget-heading strong { font-size: 16px; line-height: 20px; }
.kh-widget-heading span { font-size: 12px; line-height: 15.6px; color: #E8EDFF; }
.kh-widget button { display: flex; align-items: center; justify-content: center; padding: 0; border: 0; font: inherit; opacity: 1; }
.kh-widget-icon { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; background: transparent; color: #fff; }
.kh-widget-count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #fff; color: #354E98; font-size: 11px; font-weight: 700; line-height: 18px; }
.kh-widget-messages { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 16px; }
.kh-widget-welcome { display: flex; flex-direction: column; gap: 24px; padding-top: 4px; }
.kh-widget-intro { display: flex; flex-direction: column; gap: 6px; }
.kh-widget-intro h2 { font: 700 22px/28px Inter, system-ui, sans-serif; color: #111827; }
.kh-widget-intro p { font-size: 15px; line-height: 22px; color: #4B5563; }
.kh-widget-section { display: flex; flex-direction: column; gap: 12px; }
.kh-widget-label { font-size: 13px; font-weight: 600; color: #4B5563; }
.kh-widget-categories { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.kh-widget-category { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; text-decoration: none; }
.kh-widget-category img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 16px; }
.kh-widget-category span { color: #111827; font-size: 14px; font-weight: 600; line-height: 18px; text-align: center; }
.kh-widget-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.kh-widget-chips a { display: flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 1px solid #4E73DF; border-radius: 22px; background: #fff; color: #354E98; font-size: 14px; font-weight: 500; line-height: 18px; text-decoration: none; }
.kh-widget-chips a:hover { background: #EEF2FF; }
.kh-widget a:focus-visible { outline: 2px solid #2E59D9; outline-offset: 3px; }
.kh-widget-footer { display: flex; align-items: center; flex-shrink: 0; gap: 8px; padding: 12px 16px 16px; border-top: 1px solid #D9DEEA; background: #fff; }
.kh-widget-footer input { flex: 1; min-width: 0; width: 100%; height: 48px; padding: 0 18px; border: 1px solid #8E99B5; border-radius: 24px; background: #fff; color: #111827; font: inherit; }
.kh-widget-footer input::placeholder { color: #6B7280; opacity: 1; }
.kh-widget-footer button { flex: none; width: 48px; height: 48px; border-radius: 50%; background: #4E73DF; color: #fff; }
/* La maqueta conserva medidas reales en escritorio y se adapta al ancho móvil sin escalado tipográfico. */
.kh-hero-phone { position: relative; z-index: 1; width: 400px; max-width: 100%; margin-left: auto; }
@media (max-width: 1080px) { .kh-hero-phone { margin-inline: auto; } }
@media (max-width: 860px) { .kh-widget { height: 720px; } }
/* Conserva dos accesos por fila en teléfonos sin reducir las áreas táctiles de 44 px. */
@media (max-width: 420px) {
    .kh-widget-chips a { padding-inline: 12px; }
    .kh-widget-category span { font-size: 13px; }
}
/* Recorrido interactivo: selector de pasos + un solo chat con altura máxima fija y scroll interno, como el real. */
.kh-tour { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); align-items: center; gap: 24px 72px; width: 100%; max-width: 1040px; margin-inline: auto; }
.kh-tour-nav { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.kh-tour-tab { display: flex; align-items: flex-start; gap: 16px; width: 100%; min-height: 44px; padding: 18px 20px; border: 1.5px solid #D5DDD9; border-radius: 20px; background: #fff; color: #1D3B3C; font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.kh-tour-tab:hover { border-color: #7DBFBD; }
.kh-tour-tab:focus-visible { outline: 3px solid #4E73DF; outline-offset: 3px; }
.kh-tour-tab[aria-selected="true"] { border-color: #1D3B3C; background: #fff; box-shadow: 6px 6px 0 #1D3B3C; }
.kh-tour-num { display: flex; flex: none; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: #E4EFEA; color: #1B5E60; font: 650 17px/1 'Bricolage Grotesque', sans-serif; }
.kh-tour-tab[aria-selected="true"] .kh-tour-num { background: #4E73DF; color: #fff; }
.kh-tour-tab > span { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kh-tour-tab strong { font: 650 21px/1.2 'Bricolage Grotesque', sans-serif; letter-spacing: -.02em; }
.kh-tour-tab small { color: #435859; font-size: 15px; line-height: 1.5; }
.kh-tour-live { display: none; color: #435859; font-size: 16px; line-height: 1.55; text-align: center; }
.kh-tour-stage { display: flex; flex-direction: column; gap: 32px; min-width: 0; }
/* Sin JavaScript se muestran los cuatro chats apilados; cada uno conserva la misma altura máxima. */
.kh-step { display: block; width: 100%; max-width: 400px; margin-inline: auto; }
.kh-step .kh-widget { height: 620px; max-height: 80vh; min-height: 440px; }
/* Al terminar el scroll del ejemplo, permite continuar por la página con la misma rueda o gesto. */
.kh-step .kh-widget-messages { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: auto; scrollbar-width: thin; scrollbar-color: #B7C2E4 transparent; }
[data-kh-ready] .kh-tour-stage { align-items: center; }
[data-kh-ready] .kh-step[hidden] { display: none; }
.kh-widget-conversation { display: flex; flex-direction: column; gap: 16px; }
.kh-widget-conversation > * { flex-shrink: 0; }
.kh-widget-user { align-self: flex-end; max-width: 90%; padding: 10px 16px; border-radius: 20px 20px 4px 20px; background: #4E73DF; color: #fff; }
.kh-demo-product { display: flex; flex-direction: column; gap: 12px; padding: 12px; border: 1px solid #D9DEEA; border-radius: 16px; background: #fff; }
.kh-demo-product-row { display: flex; align-items: center; gap: 12px; }
.kh-demo-product-row > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kh-demo-product-row img { display: block; flex: none; width: 104px; height: 78px; aspect-ratio: 4 / 3; border-radius: 12px; object-fit: contain; }
.kh-widget h4 { margin: 0; font-size: 15px; line-height: 1.4; font-weight: 700; }
.kh-demo-product > p { color: #4B5563; font-size: 13px; line-height: 1.5; }
.kh-demo-price { display: block; margin-top: 4px; color: #15703A; font-size: 17px; }
/* Conserva la oferta y el precio anterior como texto legible además de las imágenes aportadas. */
.kh-demo-prices { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.kh-demo-prices s { color: #4B5563; font-size: 13px; }
.kh-demo-discount { display: inline-flex; align-self: flex-start; padding: 3px 8px; border-radius: 6px; background: #111827; color: #fff; font-size: 12px; font-weight: 600; }
.kh-demo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.kh-demo-button { display: flex; flex: 1 1 auto; align-items: center; justify-content: center; min-height: 44px; padding: 8px 12px; border: 1px solid #4E73DF; border-radius: 24px; background: #fff; color: #354E98; font-size: 13px; font-weight: 600; line-height: 18px; text-align: center; }
.kh-demo-button-primary { background: #4E73DF; color: #fff; }
.kh-demo-detail { gap: 16px; }
.kh-demo-option-group { display: flex; flex-direction: column; gap: 8px; }
.kh-demo-option-group p { font-size: 13px; }
.kh-demo-options { display: flex; flex-wrap: wrap; gap: 8px; }
.kh-demo-options span { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px 12px; border: 1px solid #8E99B5; border-radius: 10px; background: #fff; font-size: 14px; }
.kh-demo-options .is-selected { background: #4E73DF; border-color: #4E73DF; color: #fff; font-weight: 700; }
.kh-demo-specs { display: flex; flex-wrap: wrap; gap: 20px; padding-top: 4px; }
.kh-demo-specs > div { display: flex; flex-direction: column; gap: 4px; }
.kh-demo-specs span { font-size: 12px; color: #4B5563; }
.kh-demo-specs strong { font-size: 14px; }
.kh-demo-quantity { display: inline-flex; flex: none; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 8px 14px; border: 1px solid #8E99B5; border-radius: 24px; font-size: 14px; color: #111827; }
.kh-demo-cart-line { display: flex; gap: 12px; padding: 12px; border: 1px solid #D9DEEA; border-radius: 16px; background: #fff; }
.kh-demo-cart-line img { display: block; flex: none; width: 84px; height: 63px; aspect-ratio: 4 / 3; border-radius: 12px; object-fit: contain; }
.kh-demo-cart-line > div { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.kh-demo-cart-line p { font-size: 12px; color: #4B5563; }
.kh-demo-continue { color: #354E98; font-size: 14px; font-weight: 600; }
.kh-demo-cart-summary { display: flex; flex: none; flex-direction: column; gap: 8px; padding: 12px 16px 14px; border-top: 1px solid #D9DEEA; background: #fff; }
.kh-demo-cart-summary > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.kh-demo-cart-summary .kh-demo-total { padding-top: 8px; border-top: 1px solid #D9DEEA; font-size: 17px; }
.kh-demo-cart-summary .kh-demo-button { font-size: 14px; }
.kh-demo-note { max-width: 1040px; width: 100%; margin-inline: auto !important; font-size: 13px; color: #5B6E6E; }
/* Tablet y móvil: pasos en cuadrícula compacta sobre el chat; la descripción del paso activo va bajo el selector. */
@media (max-width: 960px) {
    .kh-tour { grid-template-columns: minmax(0, 1fr); max-width: 520px; gap: 20px; }
    .kh-tour-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    [data-kh-ready] .kh-tour-tab small { display: none; }
    [data-kh-ready] .kh-tour-live { display: block; }
    .kh-tour-tab { align-items: center; padding: 12px 14px; gap: 10px; border-radius: 16px; }
    .kh-tour-tab strong { font-size: 16px; }
    .kh-tour-num { width: 30px; height: 30px; font-size: 15px; }
    .kh-tour-tab[aria-selected="true"] { box-shadow: 4px 4px 0 #1D3B3C; }
}
@media (max-width: 420px) {
    .kh-tour-nav { gap: 8px; }
    .kh-tour-tab { padding: 10px; gap: 8px; }
    .kh-tour-tab strong { font-size: 15px; }
    .kh-step .kh-widget { height: 560px; }
    .kh-demo-product-row img { width: 84px; height: 63px; }
    .kh-demo-cart-line img { width: 64px; height: 48px; }
}
/* Planta de «Qué le configuras»: vertical, pegada al borde derecho y detrás de las tarjetas. */
.kh-deco-planta { right: 8px; top: 0; height: 100%; max-height: 1000px; opacity: .85; }
.kh-deco-planta img { display: block; width: auto; height: 100%; max-height: 1000px; }
/* Tira de fotos del producto (marcos 150×120, contain): mantiene las cuatro composiciones sin agrandar la tarjeta. */
.kh-demo-strip { display: flex; gap: 8px; margin-inline: -12px; padding-inline: 12px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.kh-demo-strip::-webkit-scrollbar { display: none; }
.kh-demo-strip img { display: block; flex: none; width: 150px; height: 120px; border-radius: 12px; background: #E3E8F4; object-fit: contain; scroll-snap-align: start; }
/* El envoltorio de cada chat es transparente salvo en escritorio. */
.kh-mini { display: contents; }
.kh-step-caption { display: none; }
/* Escritorio: las cuatro tarjetas fijas de la guía (264 px, chat a escala 0,66, sombra desplazada); selector oculto. */
@media (min-width: 1140px) {
    #atiende.kh-sec { padding-inline: 24px; }
    .kh-tour { display: block; max-width: 1200px; }
    .kh-tour .kh-tour-nav, .kh-tour .kh-tour-live { display: none; }
    .kh-tour .kh-tour-stage { display: grid; grid-template-columns: repeat(4, 264px); justify-content: space-between; align-items: start; gap: 0 16px; }
    .kh-tour .kh-step, .kh-tour .kh-step[hidden] { display: flex !important; flex-direction: column; align-items: flex-start; gap: 18px; max-width: none; margin: 0; }
    .kh-mini { display: block; flex: none; width: 264px; height: 515px; overflow: hidden; border-radius: 17px; background: #F3F5FA; box-shadow: 0 0 0 1.5px #1D3B3C, 10px 12px 0 rgba(29, 59, 60, .12); }
    .kh-step[data-kh-step="3"] .kh-mini { height: 568px; }
    .kh-mini .kh-widget { width: 400px; height: 780px; min-height: 0; max-height: none; border-radius: 0; box-shadow: none; transform: scale(.66); transform-origin: 0 0; }
    .kh-step[data-kh-step="3"] .kh-mini .kh-widget { height: 860px; }
    /* Las tarjetas fijas no necesitan un contenedor de scroll que intercepte la rueda sobre el ejemplo. */
    .kh-mini .kh-widget-messages { padding-block: 16px; overflow: clip; }
    .kh-mini .kh-widget-conversation { gap: 12px; }
    .kh-mini .kh-demo-detail { gap: 12px; }
    .kh-step-caption { display: flex; flex-direction: column; gap: 6px; }
    .kh-step-caption h3 { margin: 0; font: 650 22px/1.15 'Bricolage Grotesque', sans-serif; letter-spacing: -.02em; }
    .kh-step-caption p { color: #435859; font-size: 16px; line-height: 1.55; }
}
@media (min-width: 1321px) { #atiende.kh-sec { padding-inline: 120px; } }
/* El chat del inicio toma su alto natural para que la sección no reserve un bloque vacío de 780px. */
.kh-hero-phone .kh-widget { height: auto; }
.kh-hero-phone .kh-widget-messages { flex: none; overflow: visible; }
.kh-hero-stage { height: auto; }
/* La columna aísla el fondo decorativo detrás del texto sin alterar el flujo ni los controles. */
.kh-hero-grid > div:first-child { position: relative; z-index: 1; isolation: isolate; }
/* En PC la monstera se centra en el fondo del texto y deja de requerir espacio adicional bajo el inicio. */
@media (min-width: 1081px) {
    #inicio.kh-sec { padding-bottom: 56px !important; }
    .kh-hero-plant { position: absolute; left: 50%; top: 50%; width: min(100%, 520px); transform: translate(-50%, -50%); z-index: -1; opacity: .12; pointer-events: none; }
    .kh-hero-plant svg { width: 100%; height: auto; }
}
