/* Estilos propios de mueble-parametrico.html (se suman a cadcam-herramientas.css) */
.mp-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .mp-layout { grid-template-columns: minmax(0, 1fr); } }
/* Botones sobre cada columna: el código encima de los sliders; «Valores de ejemplo» y las descargas encima del 3D */
.mp-barra { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mp-barra-der { justify-content: flex-end; }
@media (max-width: 900px) {
  .mp-barra-der { order: 1; }   /* en el móvil, las descargas bajan junto a la vista 3D */
  .mp-panel { order: 0; }
  .mp-principal { order: 2; }
}
.mp-panel { position: sticky; top: 96px; max-height: calc(100vh - 110px); overflow-y: auto; }
@media (max-width: 900px) { .mp-panel { position: static; max-height: none; } }
/* En el móvil los sliders van encima del 3D: hasta que se pintan, se reserva su sitio para que el 3D no salte */
@media (max-width: 900px) { .mp-panel:empty { min-height: 100vh; } }
.mp-grupo { color: #f59e0b; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; margin: 16px 0 8px; }
.mp-panel .mp-grupo:first-child { margin-top: 0; }
.mp-giro { display: flex; align-items: center; gap: 6px; min-width: 170px; }
.mp-giro + .mp-giro { margin-top: 6px; }
.mp-giro b { min-width: 24px; color: #e5e7eb; font-size: 12px; }
.mp-giro input[type=range] { width: 90px; accent-color: #f59e0b; padding: 0; }
.mp-giro input[type=number] { width: 58px; text-align: right; padding: 3px 5px; }
.mp-oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mp-param { margin-bottom: 12px; }
.mp-param-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.herr-card .mp-param-cab label { display: inline; color: #e5e7eb; font-size: 13px; }
.mp-val { display: flex; align-items: center; gap: 4px; color: #9ca3af; font-size: 12px; white-space: nowrap; }
.herr-card .mp-val input { width: 78px; text-align: right; padding: 4px 7px; font-size: 13px; }
.herr-card input[type=range] { width: 100%; padding: 0; border: 0; background: transparent; accent-color: #f59e0b; margin: 6px 0 0; }
.mp-ayuda { font-size: 11px; color: #9ca3af; margin-top: 2px; line-height: 1.4; }
#v3d { position: relative; height: 460px; border-radius: 12px; overflow: hidden; background: #141414; border: 1px solid #2d2d2d; }
#v3d canvas { display: block; touch-action: none; }
@media (max-width: 600px) { #v3d { height: 320px; } }
.mp-btn3d { position: absolute; top: 10px; right: 10px; z-index: 1; }
.mp-avisos { list-style: none; margin: 0 0 16px; padding: 0; }
.mp-avisos li { padding: 10px 14px; border-radius: 10px; margin-bottom: 8px; font-size: 13px; }
.mp-avisos li.err { border-left: 4px solid #ef4444; background: #2a1414; color: #fecaca; }
.mp-avisos li.av { border-left: 4px solid #f59e0b; background: #1f1a10; color: #fde68a; }
.herr-datos .mp-dato-ancho b { font-size: 14px; }
.mp-leyenda { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: #9ca3af; margin: 10px 0 4px; }
.mp-leyenda i { display: inline-block; width: 18px; height: 3px; vertical-align: middle; margin-right: 5px; }
.mp-pasos { margin: 0; padding-left: 20px; font-size: 14px; color: #d1d5db; list-style: decimal; }
.mp-pasos li { margin: 5px 0; line-height: 1.5; }
.mp-pasos b { color: #fff; }
.herr-card .mp-et { display: block; color: #e5e7eb; font-size: 13px; margin-bottom: 4px; }
.herr-card .mp-campo { width: 100%; }
.mp-etiqueta { font-size: 9px; font-weight: 800; letter-spacing: .06em; padding: 1px 5px; border-radius: 4px; margin-left: 4px; background: rgba(56, 189, 248, .15); color: #7dd3fc; vertical-align: middle; }
.herr-tabs button.on .mp-etiqueta { background: rgba(0, 0, 0, .15); color: #111; }
#tabs { display: flex; flex-direction: column; gap: 6px; overflow: visible; }
.mp-grupo-tabs { display: flex; gap: 4px; align-items: center; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #3f3f46 transparent; padding-bottom: 2px; }
.mp-gratis { font-size: 9px; font-weight: 800; letter-spacing: .06em; padding: 1px 5px; border-radius: 4px; margin-left: 4px; background: rgba(16, 185, 129, .15); color: #6ee7b7; vertical-align: middle; }
.herr-tabs button.on .mp-gratis { background: rgba(0, 0, 0, .15); color: #111; }
.mp-acceso { border-radius: 12px; padding: 10px 14px; font-size: 13px; margin-bottom: 10px; }
.mp-acceso.ok { border: 1px solid rgba(16, 185, 129, .35); background: rgba(16, 185, 129, .08); color: #d1fae5; }
.herr-pago { margin-bottom: 10px; }
/* Ventana del código de acceso */
.mp-modal { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .65); display: flex; align-items: center; justify-content: center; padding: 16px; }
.mp-modal[hidden] { display: none; }
.mp-modal-caja { background: #1a1a1a; border: 1px solid #2d2d2d; border-radius: 16px; padding: 22px; width: 100%; max-width: 420px; color: #e5e7eb; }
.mp-modal-caja h3 { color: #fff; font-weight: 800; font-size: 18px; margin: 0 0 6px; }
.mp-modal-caja p { color: #9ca3af; font-size: 13px; margin: 0 0 12px; line-height: 1.45; }
.mp-modal-caja input { width: 100%; background: #111; border: 1px solid #2d2d2d; color: #fff; border-radius: 8px; padding: 10px 12px; font-size: 16px; margin-bottom: 10px; }
.mp-modal-caja .fila { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mp-modal-caja .enlace { background: none; border: 0; color: #f59e0b; font-size: 13px; font-weight: 700; cursor: pointer; padding: 6px 0; text-decoration: underline; text-underline-offset: 2px; }
.mp-modal-caja .error { color: #f87171; font-size: 13px; min-height: 18px; margin-bottom: 6px; }
.mp-modal-caja code { display: block; background: #111; border: 1px solid #2d2d2d; border-radius: 8px; padding: 10px 12px; font-size: 13px; word-break: break-all; color: #fbbf24; margin-bottom: 10px; }
.mp-grupo-et { font-size: 10px; font-weight: 800; letter-spacing: .08em; color: #f59e0b; min-width: 44px; }
/* Botones de los modelos: píldoras finas; el elegido, con contorno ámbar en vez de bloque macizo */
#tabs .mp-grupo-tabs { gap: 6px; }
#tabs button { padding: 5px 12px; font-size: 13px; font-weight: 600; line-height: 1.35; border-radius: 999px; background: transparent; border: 1px solid #2d2d2d; color: #a1a1aa; transition: color .15s, border-color .15s, background-color .15s; }
#tabs button:hover { color: #fff; border-color: #52525b; }
#tabs button.on { background: rgba(245, 158, 11, .14); border-color: #f59e0b; color: #fbbf24; }
#tabs button.on .mp-gratis, #tabs button.on .mp-etiqueta { background: rgba(16, 185, 129, .18); color: #6ee7b7; }
/* En ordenador los modelos pasan a una segunda línea (con la etiqueta a la izquierda) en vez de desplazarse de lado */
@media (min-width: 768px) {
  .mp-grupo-tabs { flex-wrap: wrap; overflow-x: visible; position: relative; padding-left: 48px; }
  .mp-grupo-et { position: absolute; left: 0; top: 7px; }
}
.mp-botones { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.mp-btn3d { display: flex; gap: 6px; }

/* Tema de día: vista 3D y planos sobre fondo blanco */
.mp-claro #v3d { background: #f4f4f3; border-color: #d1d5db; }
.mp-claro svg.plano { border: 1px solid #d1d5db; }
.mp-claro .herr-mini { background: #fff; border-color: #d1d5db; }

/* Selector de modelos: el elegido a la vista y un catálogo desplegable con fotos, buscador y filtros */
#tabs .mp-sel-actual { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 560px; padding: 6px 14px 6px 6px; border-radius: 14px; background: #171717; border: 1px solid #2d2d2d; color: #e5e7eb; text-align: left; font-weight: 400; line-height: 1.25; }
#tabs .mp-sel-actual:hover, #tabs .mp-sel-actual[aria-expanded=true] { border-color: #f59e0b; color: #fff; }
.mp-sel-foto { width: 72px; height: 45px; object-fit: cover; border-radius: 9px; background: #efe9df; flex: none; }
.mp-sinfoto { display: flex; align-items: center; justify-content: center; color: #f59e0b; background: #1f1f1f; font-size: 18px; }
.mp-sel-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.mp-sel-txt small { font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #f59e0b; }
.mp-sel-txt b { font-size: 16px; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-sel-cambiar { font-size: 12px; font-weight: 700; color: #fbbf24; white-space: nowrap; }
.mp-cat { margin-top: 8px; padding: 12px; border-radius: 16px; background: #141414; border: 1px solid #2d2d2d; }
.mp-cat[hidden] { display: none; }
.mp-cat-barra { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.mp-cat-buscar { flex: 1 1 220px; min-width: 0; background: #0f0f0f; border: 1px solid #2d2d2d; color: #fff; border-radius: 999px; padding: 8px 14px; font-size: 14px; }
.mp-cat-buscar:focus { outline: none; border-color: #f59e0b; }
.mp-cat-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #3f3f46 transparent; padding-bottom: 2px; max-width: 100%; }
#tabs .mp-chip { flex: none; padding: 5px 12px; font-size: 12px; font-weight: 700; border-radius: 999px; background: transparent; border: 1px solid #2d2d2d; color: #a1a1aa; }
#tabs .mp-chip.on { background: rgba(245, 158, 11, .14); border-color: #f59e0b; color: #fbbf24; }
.mp-cat-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; max-height: min(62vh, 520px); overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: #3f3f46 transparent; padding-right: 2px; }
#tabs .mp-tarjeta { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 6px 6px 8px; border-radius: 12px; background: #1a1a1a; border: 1px solid #262626; color: #d4d4d8; text-align: left; font-weight: 400; line-height: 1.25; white-space: normal; min-width: 0; }
#tabs .mp-tarjeta[hidden] { display: none; }
#tabs .mp-tarjeta:hover { border-color: #52525b; color: #fff; }
#tabs .mp-tarjeta.on { border-color: #f59e0b; background: rgba(245, 158, 11, .1); }
.mp-tarjeta-foto { width: 100%; aspect-ratio: 8 / 5; height: auto; object-fit: cover; border-radius: 8px; background: #efe9df; }
.mp-nuevo { position: absolute; top: 10px; left: 10px; z-index: 1; background: #f59e0b; color: #111; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; }
.mp-tarjeta-nombre { font-size: 13px; font-weight: 700; color: #fff; padding: 0 2px; }
.mp-tarjeta-pie { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 0 2px; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.mp-tarjeta-pie i { font-style: normal; color: #71717a; }
.mp-tarjeta-pie em { font-style: normal; color: #a1a1aa; }
.mp-tarjeta-pie em.gratis { color: #6ee7b7; }
.mp-cat-vacio { margin: 12px 4px 4px; font-size: 13px; color: #a1a1aa; }
@media (max-width: 480px) { .mp-sel-cambiar { font-size: 0; } .mp-sel-cambiar span { font-size: 16px; } .mp-cat-rejilla { grid-template-columns: repeat(2, 1fr); } }

/* «A tu medida»: la estatura calcula las medidas (modelos de ergonomía) */
.mp-ergo { background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.45); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.mp-ergo-tit { font-weight: 800; color: #fbbf24; font-size: 14px; margin: 0 0 8px; }
.mp-ergo-campos { display: grid; gap: 8px; margin-bottom: 10px; }
.mp-ergo-campo { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: #e5e7eb; }
.mp-ergo-campo span { display: flex; align-items: center; gap: 6px; white-space: nowrap; color: #9ca3af; }
.mp-ergo-campo input { width: 76px; text-align: right; }
.mp-ergo .herr-btn { width: 100%; }
.mp-ergo .mp-ayuda { margin-top: 8px; }
.mp-claro .mp-ergo { background: #fff7e6; }
.mp-claro .mp-ergo-tit { color: #b45309; }
.mp-claro .mp-ergo-campo { color: #1f2937; }
