/* =====================================================================
   SENA Market · Piso de venta del simulador
   ===================================================================== */
body.modo-simulador { height: 100vh; height: 100dvh; overflow: hidden; background: #DDE3E0; }

.sim { height: 100%; display: grid; grid-template-rows: auto 1fr; }

/* ---------- Barra superior ---------- */
.sim-barra {
    display: flex; align-items: center; gap: 18px; padding: 10px 18px;
    background: var(--azul); color: #fff; border-bottom: 4px solid var(--verde); z-index: 30;
}
.sim-barra__marca { display: flex; align-items: center; gap: 10px; min-width: 0; margin-right: auto; }
.sim-barra__marca div { min-width: 0; }
.sim-barra__marca strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sim-barra__marca small { opacity: .75; font-size: .78rem; }
.sim-barra__reloj {
    display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 1.25rem;
    font-variant-numeric: tabular-nums; background: rgba(255, 255, 255, .1); padding: 6px 12px; border-radius: 10px;
}
.sim-barra__reloj.alerta { background: var(--amarillo); color: var(--azul); }
.sim-barra__reloj.critico { background: var(--rojo); color: #fff; animation: latido 1s infinite; }
@keyframes latido { 50% { transform: scale(1.06); } }
.sim-barra__progreso { width: 190px; }
.sim-barra__progreso .barra { background: rgba(255, 255, 255, .2); margin: 0 0 3px; }
.sim-barra__progreso small { font-size: .78rem; opacity: .9; }
.sim-barra__acciones { display: flex; align-items: center; gap: 10px; }
.interruptor { display: flex; background: rgba(255, 255, 255, .12); border-radius: 10px; padding: 3px; }
.interruptor button { border: 0; background: transparent; color: #fff; padding: 7px 10px; border-radius: 8px; font-weight: 700; cursor: pointer; font-size: .82rem; }
.interruptor button.activo { background: #fff; color: var(--azul); }
.sim-salir { margin: 0; }
.sim-salir button {
    width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .3);
    background: transparent; color: #fff; cursor: pointer; font-size: 1rem;
}
.sim-salir button:hover { background: var(--rojo); border-color: var(--rojo); }

/* ---------- Cuerpo: estiba | góndola | planimetría ---------- */
.sim-cuerpo { display: grid; grid-template-columns: 350px minmax(0, 1fr); min-height: 0; }

/* ---------- Estiba ---------- */
.estiba {
    display: flex; flex-direction: column; min-height: 0; background: #fff;
    border-right: 1px solid var(--gris-2); z-index: 20;
}
.estiba__cabeza {
    display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 18px;
    background:
        repeating-linear-gradient(90deg, #C99A5B 0 18px, #B7874A 18px 20px) bottom / 100% 8px no-repeat,
        #fff;
}
.estiba__cabeza h2 { margin: 0; font-size: 1.05rem; }
.estiba__cabeza small { color: var(--gris-5); font-weight: 600; }
.estiba__cerrar { display: none; border: 0; background: var(--gris-1); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 1rem; }
.estiba__buscar { margin: 8px 16px; padding: 9px 12px; border-radius: 10px; border: 2px solid var(--gris-2); font: inherit; }
.estiba__buscar:focus { outline: none; border-color: var(--verde); }
.estiba__lista { flex: 1; overflow-y: auto; padding: 8px 12px 12px; display: grid; gap: 10px; align-content: start; }
.estiba.sobre { background: #FFF6E5; }
.estiba__vacia { text-align: center; color: var(--gris-5); padding: 30px 10px; }
.estiba__vacia span { display: block; font-size: 2.4rem; }
.estiba__ayuda { margin: 0; padding: 10px 16px; font-size: .76rem; color: var(--gris-5); border-top: 1px solid var(--gris-2); background: var(--gris-1); }

.producto {
    display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; align-items: center; gap: 10px;
    padding: 12px 10px 10px; border-radius: 12px; border: 2px solid var(--gris-2); background: #fff;
    text-align: left; cursor: grab; transition: border-color .12s, box-shadow .12s;
}
.producto:hover, .producto:focus-visible { border-color: var(--verde); box-shadow: 0 4px 12px rgba(0, 0, 0, .08); outline: none; }
.producto:active { cursor: grabbing; }
.producto.seleccionado { border-color: var(--verde); background: var(--verde-claro); box-shadow: 0 0 0 3px rgba(57, 169, 0, .25); }
.producto > .pkg { --k: 1.25; justify-self: center; }
.producto__info { min-width: 0; }
.producto__info strong { display: block; font-size: .92rem; color: var(--azul); line-height: 1.2; }
.producto__info small { display: block; font-size: .78rem; color: var(--gris-5); }
.producto__lado { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.producto__cant { background: var(--azul); color: #fff; font-weight: 800; border-radius: 8px; padding: 3px 8px; font-size: .88rem; }
.producto__ficha {
    width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--gris-3); background: #fff;
    color: var(--azul); font-weight: 800; cursor: pointer; font-size: .95rem; line-height: 1;
}
.producto__ficha:hover { border-color: var(--azul); background: var(--azul); color: #fff; }

/* Características del producto */
.rasgos { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.rasgos i {
    font-style: normal; font-size: .7rem; font-weight: 700; color: var(--azul); white-space: nowrap;
    background: var(--gris-1); border: 1px solid var(--gris-2); padding: 1px 6px; border-radius: 99px;
}
.rasgos .rasgo--refrigerado { background: #E3F2FB; border-color: #B6DCF1; }
.rasgos .rasgo--congelado { background: #DDF1FC; border-color: #93CDEB; }
.rasgos .rasgo--fresco { background: var(--verde-claro); border-color: #bfe3a8; }
.rasgos .rasgo--fragil { background: #FFF3CD; border-color: #F2D675; color: #8a5a00; }
.rasgos .rasgo--precio { background: #FFF9C4; border-color: #E8DB7A; }

/* ---------- Tienda ---------- */
.tienda {
    min-height: 0; overflow: auto; padding: 0 22px 90px;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, .04) 1px, transparent 1px) 0 0 / 56px 56px,
        linear-gradient(rgba(0, 0, 0, .04) 1px, transparent 1px) 0 0 / 56px 56px,
        #E9EDEB;
}

/* Recorrido: anterior · mueble actual · siguiente · planimetría */
.recorrido {
    position: sticky; top: 0; z-index: 6; margin: 0 -22px 16px; padding: 12px 22px;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr) minmax(0, 1fr) auto; gap: 10px; align-items: stretch;
    background: rgba(233, 237, 235, .94); backdrop-filter: blur(4px); border-bottom: 1px solid var(--gris-2);
}
.recorrido__paso {
    display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 12px; border-radius: 12px;
    border: 2px solid var(--gris-3); background: #fff; color: var(--azul); font: inherit; font-weight: 700; font-size: .8rem;
    cursor: pointer; text-align: left;
}
.recorrido__paso > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recorrido__paso small { display: block; font-size: .66rem; color: var(--gris-5); text-transform: uppercase; letter-spacing: .06em; }
.recorrido__paso--sig { flex-direction: row-reverse; text-align: right; }
.recorrido__paso:hover, .recorrido__paso.sobre { border-color: var(--verde); background: var(--verde-claro); }
.recorrido__paso--vacio { visibility: hidden; }
.recorrido__actual {
    --cat: var(--azul);
    display: flex; align-items: center; gap: 12px; min-width: 0; padding: 6px 14px 6px 6px; border-radius: 12px;
    background: var(--azul); color: #fff; box-shadow: inset 0 -5px 0 var(--cat), var(--sombra);
}
.recorrido__codigo {
    flex: none; width: 46px; height: 46px; border-radius: 10px; background: var(--verde); display: grid; place-items: center;
    font-size: 1.5rem; font-weight: 800;
}
.recorrido__actual div { min-width: 0; flex: 1; }
.recorrido__actual small { display: block; font-size: .72rem; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recorrido__actual strong { display: block; font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recorrido__pos { flex: none; font-size: .75rem; font-weight: 700; background: rgba(255, 255, 255, .15); padding: 3px 9px; border-radius: 99px; }
.recorrido__pos b { color: #B9F08F; }
.recorrido__mapa {
    border: 0; border-radius: 12px; background: var(--amarillo); color: var(--azul); font: inherit; font-weight: 800;
    padding: 0 16px; cursor: pointer; font-size: .9rem; box-shadow: var(--sombra);
}
.recorrido__mapa:hover { filter: brightness(1.05); }

/* ---------- Mueble (una góndola por página) ---------- */
.mueble { --cat: #00304D; display: flex; flex-direction: column; min-width: 0; max-width: 1500px; margin: 0 auto; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .14)); }
.mueble__aviso {
    background: var(--cat); color: #fff; border-radius: 10px 10px 0 0; padding: 12px 18px;
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap; position: relative;
}
.mueble__aviso strong { font-size: 1.2rem; text-transform: uppercase; letter-spacing: .02em; text-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.mueble__icono { font-size: 1.6rem; }
.mueble__lado { margin-left: auto; font-size: .75rem; font-weight: 700; background: rgba(0, 0, 0, .25); padding: 3px 10px; border-radius: 99px; }
.mueble__cuerpo {
    position: relative;
    background:
        /* parales de los módulos de 1,2 m */
        repeating-linear-gradient(90deg, transparent 0 calc(25% - 5px), #A8B3AF calc(25% - 5px) 25%),
        /* lámina perforada del fondo */
        radial-gradient(circle, rgba(0, 0, 0, .13) 1.4px, transparent 1.7px) 0 0 / 16px 16px,
        #F3F5F4;
    border: 10px solid #A8B3AF; border-top: 0; border-bottom: 0;
}
/* La góndola ocupa todo el alto disponible de la pantalla */
.vista-mueble .mueble { min-height: calc(100vh - 190px); min-height: calc(100dvh - 190px); }
.vista-mueble .mueble__cuerpo { flex: 1; display: flex; flex-direction: column; }
.vista-mueble .nivel { flex: 1; }
.mueble__base { height: 20px; background: linear-gradient(#8F9B97, #6f7b77); border-radius: 0 0 6px 6px; }

/* Nivel (entrepaño) */
.nivel {
    --cenefa: linear-gradient(#ffffff 0 30%, var(--verde) 30% 62%, #c3cbc8 62%);
    position: relative; min-height: 150px; padding: 14px 14px 22px 82px;
    display: flex; flex-direction: column; justify-content: flex-end;
    transition: background .12s, box-shadow .12s;
}
.nivel::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 18px; background: var(--cenefa); box-shadow: 0 3px 4px rgba(0, 0, 0, .15); }
.nivel__rotulo {
    position: absolute; left: 8px; top: 50%; transform: translateY(-50%); z-index: 2;
    width: 64px; text-align: center; font-weight: 800; color: var(--azul); font-size: 1.05rem;
    background: #fff; border-radius: 8px; padding: 6px 0; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); line-height: 1.1;
}
.nivel__rotulo small { display: block; font-size: .58rem; font-weight: 700; color: var(--gris-5); text-transform: uppercase; letter-spacing: -.02em; padding: 0 3px; white-space: normal; }
.nivel__productos { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; min-height: 100px; position: relative; z-index: 1; }
.nivel__vacio { align-self: center; margin: auto; font-size: .85rem; color: #8d9894; font-weight: 700; opacity: 0; transition: opacity .15s; }
body.arrastrando .nivel__vacio, body.con-seleccion .nivel__vacio { opacity: 1; }
body.arrastrando .nivel, body.con-seleccion .nivel { box-shadow: inset 0 0 0 2px rgba(57, 169, 0, .25); cursor: copy; }
.nivel.sobre, body.con-seleccion .nivel:hover { background: rgba(57, 169, 0, .14); box-shadow: inset 0 0 0 3px var(--verde); }

/* Producto exhibido: frentes + etiqueta de precio en la cenefa */
.vista-mueble .pkg { --k: 1.6; }
.exhibido {
    display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 2px; border: 0; background: none;
    cursor: grab; border-radius: 6px; outline-offset: 3px; margin-bottom: -18px;
}
.exhibido__caras { display: flex; align-items: flex-end; transition: transform .12s; }
.exhibido__caras .pkg + .pkg { margin-left: -12px; }
.exhibido__precio {
    display: grid; grid-template-columns: auto auto; column-gap: 6px; align-items: baseline; position: relative; z-index: 2;
    background: #FFF9C4; border: 1px solid #E8DB7A; border-left: 5px solid var(--rojo);
    padding: 1px 7px 2px; border-radius: 3px; max-width: 220px; box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}
.exhibido__precio b { font-size: .95rem; color: var(--azul); font-weight: 800; }
.exhibido__precio em { font-style: normal; font-size: .72rem; font-weight: 800; color: var(--verde-osc); justify-self: end; }
.exhibido__precio small { grid-column: 1 / -1; font-size: .64rem; font-weight: 600; color: var(--gris-5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.exhibido:hover .exhibido__caras { transform: translateY(-3px); }
.exhibido.seleccionado { outline: 3px solid var(--verde); background: rgba(57, 169, 0, .12); }

/* Nevera: puertas de vidrio, marcos y luz fría */
.mueble--nevera .mueble__cuerpo {
    border-color: #D8DEE2; border-width: 12px;
    background: linear-gradient(#EAF6FD, #D6ECF8);
    box-shadow: inset 0 14px 22px -10px rgba(80, 229, 249, .8);
}
.mueble--nevera .mueble__cuerpo::after {
    content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 3;
    background:
        repeating-linear-gradient(90deg, transparent 0 calc(25% - 8px), #C9D3D9 calc(25% - 8px) 25%),
        repeating-linear-gradient(115deg, transparent 0 60px, rgba(255, 255, 255, .22) 60px 90px, transparent 90px 260px);
}
.mueble--nevera .nivel { --cenefa: linear-gradient(#C3D4DE 0 30%, var(--verde) 30% 62%, #9FB2BE 62%); }
.mueble--nevera .mueble__base { background: linear-gradient(#5E6E78, #3e4c55); }
.mueble--nevera .mueble__aviso::after { content: '❄ 2 a 4 °C'; font-size: .75rem; font-weight: 700; background: rgba(255, 255, 255, .2); padding: 3px 10px; border-radius: 99px; }

/* Congelador horizontal (isla) */
.mueble--congelador .mueble__cuerpo {
    border: 14px solid #F4F7F9; border-top: 0; border-bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .7), transparent 25%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, .6), transparent 25%),
        linear-gradient(#CFE9F7, #B4DCF1);
    box-shadow: inset 0 0 18px rgba(0, 80, 130, .25);
}
.mueble--congelador .nivel { --cenefa: linear-gradient(#E8F4FA 0 40%, #7FB8D6 40%); min-height: 170px; }
.mueble--congelador .mueble__base { height: 30px; background: linear-gradient(#FFFFFF, #CBD5DB); border: 1px solid #b5c1c8; }
.mueble--congelador .mueble__aviso::after { content: '❄ −18 °C'; font-size: .75rem; font-weight: 700; background: rgba(255, 255, 255, .2); padding: 3px 10px; border-radius: 99px; }

/* Exhibidor de fruver: canastillas de madera */
.mueble--fruver .mueble__cuerpo {
    border-color: #8B5E34;
    background: repeating-linear-gradient(90deg, #F6EBDD 0 calc(33.33% - 6px), #8B5E34 calc(33.33% - 6px) 33.33%);
}
.mueble--fruver .nivel { --cenefa: repeating-linear-gradient(90deg, #C99A5B 0 26px, #A77B45 26px 28px); min-height: 170px; }
.mueble--fruver .mueble__base { background: linear-gradient(#8B5E34, #6b4524); }
.mueble--fruver .mueble__aviso::after { content: '🍃 Fresco'; font-size: .75rem; font-weight: 700; background: rgba(255, 255, 255, .2); padding: 3px 10px; border-radius: 99px; }

/* ---------- Planimetría (panel lateral o superpuesta) ---------- */
.mapa { display: none; flex-direction: column; min-height: 0; background: #fff; border-left: 1px solid var(--gris-2); z-index: 20; }
.mapa__cabeza { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--gris-2); }
.mapa__cabeza div { flex: 1; min-width: 0; }
.mapa__cabeza strong { display: block; color: var(--azul); font-size: .95rem; }
.mapa__cabeza small { color: var(--gris-5); font-size: .74rem; }
.mapa__btn { flex: none; width: 34px; height: 34px; border-radius: 9px; border: 2px solid var(--gris-2); background: #fff; color: var(--azul); cursor: pointer; font-size: 1rem; font-weight: 800; }
.mapa__btn:hover { border-color: var(--azul); }
.mapa__cerrar { display: none; }
.mapa__lienzo { flex: none; padding: 10px; background: #F7F9F8; display: grid; place-items: center; }
.mapa__lista { flex: 1; min-height: 0; overflow-y: auto; list-style: none; margin: 0; padding: 8px 10px; display: grid; gap: 4px; align-content: start; border-top: 1px solid var(--gris-2); }
.mapa__lista button {
    --cat: var(--gris-3);
    width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 9px; cursor: pointer;
    border: 1px solid transparent; border-left: 4px solid var(--cat); background: #fff; font: inherit; text-align: left; color: var(--azul);
}
.mapa__lista button:hover, .mapa__lista button.sobre { background: var(--gris-1); border-color: var(--gris-2); border-left-color: var(--cat); }
.mapa__lista button.activo { background: var(--verde-claro); border-color: var(--verde); border-left-color: var(--cat); }
.mapa__lista b { flex: none; min-width: 26px; height: 26px; border-radius: 7px; background: var(--azul); color: #fff; display: grid; place-items: center; font-size: .8rem; }
.mapa__lista span { flex: 1; min-width: 0; font-size: .82rem; font-weight: 700; line-height: 1.15; }
.mapa__lista small { display: block; font-size: .7rem; font-weight: 600; color: var(--gris-5); }
.mapa__lista em { font-style: normal; font-size: .72rem; font-weight: 800; color: #fff; background: var(--verde); border-radius: 99px; padding: 1px 7px; }
.mapa.abierto .mapa__lista, .mapa.ampliado .mapa__lista { display: none; }
.mapa.abierto .mapa__lienzo, .mapa.ampliado .mapa__lienzo { flex: 1; min-height: 0; }
.mapa__leyenda { list-style: none; margin: 0; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .74rem; color: var(--gris-5); border-top: 1px solid var(--gris-2); }
.mapa__leyenda li { display: flex; align-items: center; gap: 6px; }
.ley { display: inline-grid; place-items: center; }
.ley--conteo { width: 18px; height: 18px; border-radius: 50%; background: var(--verde); color: #fff; font-weight: 800; font-size: .65rem; }
.ley--frente { width: 18px; height: 4px; background: var(--amarillo); border-radius: 2px; }

.planimetria--interactiva .pl-mueble { cursor: pointer; outline: none; }
.planimetria--interactiva .pl-mueble:hover .pl-mueble__caja,
.planimetria--interactiva .pl-mueble:focus-visible .pl-mueble__caja { stroke: #00304D; stroke-width: .14; }
.pl-mueble.activo .pl-mueble__caja { stroke: #39A900; stroke-width: .24; }
.pl-mueble.sobre .pl-mueble__caja { stroke: #FDC300; stroke-width: .26; }
.pl-yo { pointer-events: none; transition: transform .3s ease; }
.pl-yo__onda { fill: rgba(57, 169, 0, .3); transform-box: fill-box; transform-origin: center; animation: pl-onda 1.6s ease-out infinite; }
.pl-yo__punto { fill: #39A900; stroke: #fff; stroke-width: .08; }
.pl-yo text { font-size: .5px; }
@keyframes pl-onda { from { transform: scale(.45); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
/* En el panel pequeño los rótulos de los muebles no se alcanzan a leer: se muestran al ampliar */
.mapa:not(.abierto):not(.ampliado) .pl-mueble__txt,
.mapa:not(.abierto):not(.ampliado) .pl-pasillo__txt { display: none; }

/* Planimetría superpuesta (botón “Planimetría” o ampliar) */
.mapa.abierto, .mapa.ampliado {
    display: flex; position: fixed; inset: 4vh 4vw; z-index: 75; border-radius: 16px; border: 0;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
}
.mapa.abierto .mapa__cerrar, .mapa.ampliado .mapa__cerrar { display: block; }
.mapa.abierto .mapa__lienzo svg, .mapa.ampliado .mapa__lienzo svg { max-height: 100%; width: auto; max-width: 100%; height: 100%; }
body.mapa-abierto::after { content: ''; position: fixed; inset: 0; background: rgba(0, 48, 77, .55); z-index: 74; }

/* ---------- Barra de selección (modo táctil) ---------- */
.seleccion {
    position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 60;
    display: flex; align-items: center; gap: 12px; max-width: calc(100% - 24px);
    background: var(--azul); color: #fff; padding: 10px 12px 10px 14px; border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .3); border: 2px solid var(--verde);
}
.seleccion > span { display: flex; align-items: center; gap: 12px; font-size: .85rem; line-height: 1.3; }
.seleccion small { opacity: .8; }
.seleccion .pkg { --k: 1; }
.seleccion button { border: 0; border-radius: 8px; padding: 8px 12px; font-weight: 700; cursor: pointer; background: rgba(255, 255, 255, .15); color: #fff; white-space: nowrap; }
.seleccion [data-devolver] { background: var(--amarillo); color: var(--azul); }

/* ---------- Botón flotante de estiba (móvil) ---------- */
.fab-estiba {
    display: none; position: fixed; left: 14px; bottom: 16px; z-index: 55;
    background: var(--verde); color: #fff; border: 0; border-radius: 99px; padding: 12px 18px;
    font-weight: 800; box-shadow: 0 8px 20px rgba(57, 169, 0, .45); cursor: pointer; font-size: .95rem;
}
.fab-estiba b { background: #fff; color: var(--verde-osc); border-radius: 99px; padding: 1px 8px; margin-left: 4px; }
body.con-seleccion .fab-estiba { display: none !important; }

/* ---------- Modal, ficha técnica, carga y avisos ---------- */
.modal { border: 0; border-radius: 16px; padding: 0; max-width: 440px; width: calc(100% - 32px); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.modal::backdrop { background: rgba(0, 48, 77, .55); backdrop-filter: blur(2px); }
.modal__caja { padding: 24px; border-top: 6px solid var(--verde); }
.modal__acciones { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }

.ficha { max-width: 520px; }
.ficha__cabeza { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.ficha__foto { flex: none; width: 120px; height: 130px; display: grid; place-items: center; border-radius: 14px; background: radial-gradient(circle at 50% 35%, #fff, #E6EAE8); }
.ficha__foto .pkg { --k: 1.8; }
.ficha__cabeza small { color: var(--gris-5); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; }
.ficha__cabeza h2 { margin: 2px 0 4px; font-size: 1.3rem; }
.ficha__cabeza p { margin: 0; color: var(--azul); font-weight: 600; }
.ficha__datos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.ficha__datos div { background: var(--gris-1); border-radius: 10px; padding: 8px 12px; }
.ficha__datos dt { font-size: .7rem; font-weight: 700; color: var(--gris-5); text-transform: uppercase; letter-spacing: .04em; }
.ficha__datos dd { margin: 2px 0 0; font-weight: 700; color: var(--azul); }
.ficha__pista { margin: 14px 0 0; font-size: .82rem; color: var(--gris-5); }

.cargando { position: fixed; inset: 0; z-index: 90; background: rgba(0, 48, 77, .6); display: grid; place-items: center; }
.cargando__caja { background: #fff; border-radius: 16px; padding: 28px 36px; text-align: center; font-weight: 700; color: var(--azul); }
.spinner { width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 50%; border: 5px solid var(--gris-2); border-top-color: var(--verde); animation: girar .8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }

.toast {
    position: fixed; top: 150px; left: 50%; transform: translate(-50%, -20px); opacity: 0; pointer-events: none;
    background: var(--verde-osc); color: #fff; padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: .85rem;
    z-index: 80; transition: .2s; max-width: calc(100% - 24px); box-shadow: 0 8px 20px rgba(0, 0, 0, .2);
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--rojo); }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (min-width: 1400px) {
    .sim-cuerpo { grid-template-columns: 350px minmax(0, 1fr) 400px; }
    .mapa { display: flex; }
}

@media (max-width: 1250px) {
    .sim-cuerpo { grid-template-columns: 310px minmax(0, 1fr); }
    .vista-mueble .pkg { --k: 1.4; }
    .recorrido { grid-template-columns: auto minmax(0, 1fr) auto auto; }
    .recorrido__paso > span:last-child { display: none; }
}

@media (max-width: 900px) {
    .sim-barra { flex-wrap: wrap; gap: 8px 12px; padding: 8px 12px; }
    .sim-barra__marca { flex: 1 1 100%; order: 0; }
    .sim-barra__marca img { width: 28px; height: 28px; }
    .sim-barra__reloj { font-size: 1.05rem; padding: 4px 10px; }
    .sim-barra__progreso { flex: 1; width: auto; min-width: 90px; }
    .sim-barra__acciones { gap: 6px; }
    .sim-barra__acciones .btn { padding: 8px 12px; }
    .interruptor button { padding: 6px 8px; }

    .sim-cuerpo { grid-template-columns: 1fr; }
    .estiba {
        position: fixed; inset: auto 0 0 0; height: 80vh; height: 80dvh; border-radius: 18px 18px 0 0;
        transform: translateY(105%); transition: transform .25s ease; box-shadow: 0 -12px 40px rgba(0, 0, 0, .3); z-index: 70;
    }
    .estiba.abierta { transform: translateY(0); }
    .estiba__cerrar { display: grid; place-items: center; }
    .estiba__lista { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
    body.estiba-abierta::after { content: ''; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 65; }
    .fab-estiba { display: block; }

    .tienda { padding: 0 10px 90px; }
    .recorrido { margin: 0 -10px 12px; padding: 8px 10px; gap: 6px; }
    .recorrido__paso { padding: 8px 10px; }
    .recorrido__codigo { width: 38px; height: 38px; font-size: 1.2rem; }
    .recorrido__actual strong { font-size: .95rem; }
    .recorrido__pos { display: none; }
    .recorrido__mapa { padding: 0 12px; }
    .recorrido__mapa span { display: none; }
    .mapa.abierto { inset: 8px; }
    .vista-mueble .pkg { --k: 1.2; }
    .nivel { min-height: 120px; padding-left: 70px; }
    .nivel__rotulo { width: 54px; font-size: .95rem; }
    .toast { top: auto; bottom: 80px; }
}

@media (max-width: 480px) {
    .sim-barra__progreso small { display: none; }
    .vista-mueble .pkg { --k: 1; }
    .nivel { min-height: 104px; padding-left: 62px; }
    .exhibido__precio { max-width: 140px; }
    .exhibido__precio small { max-width: 120px; }
    .ficha__datos { grid-template-columns: 1fr; }
    .producto { grid-template-columns: 64px minmax(0, 1fr) auto; }
    .producto > .pkg { --k: 1.05; }
}

@media (hover: none) {
    .producto { cursor: pointer; }
}

/* Con zoom, el panel pequeño de planimetría también muestra los nombres de los muebles */
.mapa:not(.abierto):not(.ampliado) .mapa__lienzo.con-zoom .pl-mueble__txt,
.mapa:not(.abierto):not(.ampliado) .mapa__lienzo.con-zoom .pl-pasillo__txt { display: inline; }
.mapa__lienzo.zoom-plano { position: relative; }
.mapa:not(.abierto):not(.ampliado) .zoom-plano__botones { right: 6px; bottom: 6px; }
.mapa:not(.abierto):not(.ampliado) .zoom-plano__botones button { width: 28px; height: 28px; font-size: 1rem; }
