/* Grupo Nórdico — pestaña Productos (ver public/productos.js). Usa la paleta de app.css y las piezas de vitrina.css. */
.pd-cab { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.pd-disp { display: inline-block; line-height: 1.5; font-size: 13px; color: var(--tinta-2); background: #fff; border: 1px solid var(--linea); border-radius: 20px; padding: 6px 13px; }
.pd-disp .ic { color: var(--azul-4); vertical-align: -3px; margin-right: 6px; }
.pd-vis { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; color: var(--tinta-2); cursor: pointer; background: #fff; border: 1px solid var(--linea); border-radius: 20px; padding: 5px 6px 5px 13px; }
.pd-sw { width: 38px; height: 22px; border-radius: 12px; background: #cfd7e4; position: relative; transition: background .2s; }
.pd-sw i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.pd-sw.on { background: var(--verde); } .pd-sw.on i { transform: translateX(16px); }

/* loteos */
.pd-loteos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.pd-loteo { position: relative; min-height: 236px; border-radius: var(--r); overflow: hidden; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; box-shadow: var(--sombra); background: var(--azul-9); }
.pd-loteo-kb { position: absolute; inset: 0; }
.pd-loteo-velo { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6, 20, 42, .1) 0%, rgba(6, 20, 42, .25) 40%, rgba(6, 20, 42, .88) 100%); pointer-events: none; }
.pd-loteo-c { position: relative; padding: 16px; }
.pd-loteo-t { font: 800 20px/1.15 var(--fm); }
.pd-loteo-l { font-size: 12px; color: #c9d9ef; margin-bottom: 6px; }
.pd-loteo-n { font-size: 12.5px; color: #e4edf9; }
.pd-loteo-n b { font: 800 15px var(--fm); color: #fff; }
.pd-loteo-s { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.pd-loteo-s span { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 12px; background: rgba(255, 255, 255, .16); }
.pd-loteo-acc { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 11px; }
.pd-loteo-acc .btn.sec { background: rgba(255, 255, 255, .92); border-color: transparent; }
.pd-loteo-comp { position: absolute; top: 12px; right: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 20px; padding: 6px 11px; background: rgba(255, 255, 255, .92); color: var(--azul); font: 600 12px var(--ff); cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.pd-loteo-comp:hover { background: #fff; }
.btn.blanco { background: #fff; color: var(--azul); } .btn.blanco:hover { background: var(--hielo); }

.pd-tabs { margin-bottom: 16px; flex-wrap: wrap; }
.pd-tabs button { padding: 8px 13px; }

/* filtros */
.pd-filtros { margin-bottom: 12px; padding: 14px 16px; }
.pd-f-fila { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.pd-f-fila.b { margin-top: 12px; align-items: center; gap: 8px; }
.pd-f { display: flex; flex-direction: column; gap: 4px; min-width: 130px; flex: 1 1 140px; }
.pd-f.chico { min-width: 80px; flex: 0 1 90px; }
.pd-f > span:first-child { font-size: 11px; font-weight: 700; color: var(--suave); text-transform: uppercase; letter-spacing: .05em; }
.pd-f .inp { padding: 8px 10px; }
.pd-f.en-linea { flex-direction: row; align-items: center; flex: 0 0 auto; min-width: 0; gap: 6px; }
.pd-f.en-linea .inp { width: auto; }
.pd-rango { display: flex; gap: 6px; } .pd-rango .inp { min-width: 0; }
.pd-mon { flex: 0 0 66px; }
.pd-res-h { display: flex; align-items: baseline; gap: 6px; margin: 4px 2px 10px; }
.pd-res-h b { font: 700 15px var(--fm); color: var(--azul-9); }

/* lotes */
.pd-grilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.pd-lote { position: relative; background: #fff; border: 1px solid var(--linea-2); border-radius: 14px; padding: 14px 14px 12px; box-shadow: var(--sombra); cursor: pointer; transition: transform .12s, box-shadow .15s, border-color .15s; overflow: hidden; }
.pd-lote:hover { transform: translateY(-1px); border-color: var(--azul-2); box-shadow: 0 10px 28px rgba(11, 37, 71, .1); }
.pd-lote::after { content: ''; position: absolute; right: -18px; top: -20px; width: 64px; height: 58px; background: var(--hielo-2); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.pd-lote.sel { border-color: var(--azul); box-shadow: 0 0 0 2px var(--azul) inset, var(--sombra); }
.pd-lote.no-of { background: #fbfbfc; }
.pd-lote.no-of .pd-lote-p { color: var(--suave); }
.pd-chk { position: absolute; right: 10px; top: 10px; z-index: 1; padding: 4px; cursor: pointer; }
.pd-chk input { width: 18px; height: 18px; accent-color: var(--azul); cursor: pointer; }
.pd-lote-t { font: 800 16px var(--fm); color: var(--azul-9); padding-right: 26px; }
.pd-lote-s { font-size: 12px; color: var(--suave); }
.pd-lote-p { font: 800 21px/1.2 var(--fm); color: var(--azul); margin-top: 8px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pd-lote-p small { font: 600 11.5px var(--ff); color: var(--suave); }
.pd-lote-d { font-size: 13px; color: var(--tinta-2); margin-top: 2px; }
.pd-lote-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.pd-no-of { display: flex; gap: 6px; align-items: flex-start; font-size: 11.5px; color: var(--rojo); margin-top: 8px; line-height: 1.35; }
.pd-al { cursor: help; }
.pd-tabla td, .pd-tabla th { white-space: nowrap; }
.pd-tabla .der { text-align: right; }
.pd-tabla tbody tr { cursor: pointer; } .pd-tabla tbody tr:hover { background: var(--hielo-2); }
.pd-tabla tr.sel { background: var(--hielo); } .pd-tabla tr.no-of td { color: var(--suave); }
.pd-td-chk input { width: 17px; height: 17px; accent-color: var(--azul); }
.pd-mas { display: flex; justify-content: center; margin-top: 14px; }

/* bandeja de la selección */
.pd-bandeja { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 35; display: flex; align-items: center; gap: 10px; background: var(--azul-9); color: #fff; padding: 9px 10px 9px 16px; border-radius: 16px; box-shadow: var(--sombra-2); max-width: calc(100vw - 24px); animation: pop .25s cubic-bezier(.3, 1.2, .4, 1); }
.pd-band-t { display: flex; align-items: center; gap: 8px; min-width: 0; } .pd-band-t .muted { color: #9fb5d6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-bandeja .btn.fant { color: #c9d9ef; } .pd-bandeja .btn.fant:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.pd-bandeja .btn:not(.fant) { background: #fff; color: var(--azul); }

/* ficha del lote */
.modal.pd-modal { width: min(900px, 100%); }
.pd-ficha-g { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.pd-ficha-p { font: 800 30px/1.1 var(--fm); color: var(--azul); }
.pd-ficha-p small { display: block; font: 500 12px var(--ff); color: var(--suave); margin-top: 3px; }
.pd-ficha-plano { display: flex; flex-direction: column; gap: 6px; }
.pd-mini-visor { height: 330px; border-radius: 14px; border: 1px solid var(--linea); overflow: hidden; background: #f4f6f9; }
.pd-alertas { margin-top: 12px; border: 1px solid #f2dfb8; background: #fffaf0; border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; }
.pd-alerta { display: flex; gap: 8px; font-size: 12.5px; align-items: baseline; }
.pd-alerta code { flex: none; font: 700 10.5px ui-monospace, monospace; background: var(--ambar-1); color: var(--ambar); padding: 2px 6px; border-radius: 6px; }
.pd-alerta.bloquea code { background: var(--rojo-1); color: var(--rojo); }
.pd-parec { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.pd-parec-it { flex: none; text-align: left; border: 1px solid var(--linea); background: #fff; border-radius: 11px; padding: 8px 11px; cursor: pointer; display: flex; flex-direction: column; font-size: 12px; }
.pd-parec-it:hover { border-color: var(--azul-2); background: var(--hielo-2); }
.pd-parec-it span { color: var(--suave); }
.pd-det { margin-top: 14px; border: 1px solid var(--linea); border-radius: 12px; padding: 10px 12px; }
.pd-det summary { cursor: pointer; font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.pd-det ul { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 13px; }
.pd-det li.rec { font-weight: 600; }
.pd-tira { display: flex; gap: 8px; margin-top: 14px; overflow-x: auto; }
.pd-tira-f { flex: none; width: 120px; height: 80px; border: 0; padding: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in; background: var(--hielo); }
.pd-tira-f img { width: 100%; height: 100%; object-fit: cover; }
.modal-p.wrap { flex-wrap: wrap; }

/* planos */
.pd-planos-sel { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 12px; }
.pd-pl-g { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pd-pl-n { font: 700 11px var(--fm); letter-spacing: .08em; text-transform: uppercase; color: var(--suave); }
.pd-plano-w { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; }
.pd-visor { height: calc(100vh - 290px); min-height: 440px; overflow: hidden; padding: 0; }
.pd-plano-lado { display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 290px); min-height: 440px; overflow-y: auto; }
.pd-pl-info h2 { font-size: 15px; }
.pd-lado-ficha { animation: aparece .2s ease; }
.pd-sin-mz { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px 0; border-top: 1px dashed var(--linea); }
.pd-sin-mz > span { font: 700 11px var(--fm); color: var(--suave); width: 54px; }
.pd-sin-l { min-width: 30px; height: 26px; border-radius: 7px; border: 1px solid var(--azul-2); background: var(--hielo-2); color: var(--azul); font: 700 11.5px var(--ff); cursor: pointer; }
.pd-sin-l:hover { background: var(--azul); color: #fff; }
.pd-sin-l.no-of { border-color: var(--linea); background: #f5f6f8; color: var(--suave); }

/* fotos */
.pd-fl { position: relative; overflow: hidden; margin-bottom: 16px; }
.pd-fl-kb { position: absolute; left: 0; right: 0; top: 0; height: 190px; }
.pd-fl-velo { position: absolute; left: 0; right: 0; top: 0; height: 190px; background: linear-gradient(180deg, rgba(6, 20, 42, .05), rgba(6, 20, 42, .78)); pointer-events: none; }
.pd-fl-h { position: relative; height: 190px; display: flex; align-items: flex-end; gap: 8px; padding: 16px 18px; color: #fff; flex-wrap: wrap; }
.pd-fl-h h2 { color: #fff; font-size: 22px; } .pd-fl-h .small { color: #d3e1f4; }
.pd-fl-c { padding: 16px 18px 18px; display: grid; gap: 14px; }
.pd-fl-mapa { border-radius: 14px; overflow: hidden; max-width: 760px; }
.pd-fl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pd-fl-f { position: relative; aspect-ratio: 4 / 3; border: 0; padding: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in; background: var(--hielo); }
.pd-fl-f img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.pd-fl-f:hover img { transform: scale(1.07); }
.pd-fl-f i { position: absolute; left: 6px; top: 6px; font: 600 10px var(--ff); font-style: normal; background: rgba(255, 255, 255, .9); color: var(--suave); padding: 1px 6px; border-radius: 6px; }

/* enlaces */
.pd-enls { overflow: hidden; }
.pd-enl { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--linea-2); }
.pd-enl:last-child { border-bottom: 0; }
.pd-enl.vencido, .pd-enl.anulado { opacity: .62; }
.pd-enl-nota { margin-top: 3px; font-style: italic; }
.pd-enl-ap { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--suave); min-width: 130px; }
.pd-enl-ap.si { color: var(--verde); } .pd-enl-ap.si .tiny { color: var(--suave); }
.pd-enl-acc { display: flex; gap: 2px; }

/* compartir */
.pd-comp-que { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.pd-comp-kb { width: 86px; height: 62px; border-radius: 11px; flex: none; }
.pd-comp-lotes { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; max-height: 96px; overflow-y: auto; }
.pd-listo-acc { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.pd-listo-acc .btn { flex: 1 1 200px; }

@media (max-width: 1100px) {
  .pd-loteos { grid-template-columns: 1fr; }
  .pd-loteo { min-height: 190px; }
  .pd-plano-w { grid-template-columns: 1fr; }
  .pd-visor { height: 62vh; min-height: 360px; }
  .pd-plano-lado { max-height: none; min-height: 0; }
}
@media (max-width: 760px) {
  .pd-loteos { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin: 0 -14px 16px; padding: 0 14px 4px; scrollbar-width: none; }
  .pd-loteo { flex: 0 0 84%; scroll-snap-align: center; min-height: 0; }
  .pd-loteo-l, .pd-loteo-s { display: none; }
  .pd-loteo-c { padding: 52px 14px 14px; }
  .pd-loteo-t { font-size: 18px; }
  .pd-disp { font-size: 12px; border-radius: 12px; }
  .pd-planos-sel { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -14px 12px; padding: 0 14px 2px; }
  .pd-pl-g { flex: none; flex-wrap: nowrap; }
  .pd-loteo-comp span { display: none; }
  .pd-tabs { display: flex; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .pd-tabs button { flex: none; }
  .pd-f { flex: 1 1 calc(50% - 10px); min-width: 0; }
  .pd-f.chico { flex: 1 1 calc(50% - 10px); }
  .pd-f-fila.b .grow { display: none; }
  .pd-ficha-g { grid-template-columns: 1fr; }
  .pd-mini-visor { height: 260px; }
  .pd-grilla { grid-template-columns: 1fr 1fr; gap: 8px; }
  .pd-lote { padding: 12px 11px 10px; }
  .pd-lote-p { font-size: 17px; }
  .pd-lote-t { font-size: 14.5px; }
  .pd-enl { flex-wrap: wrap; }
  .pd-enl-ap { min-width: 0; }
  .pd-bandeja { left: 12px; right: 12px; transform: none; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .pd-bandeja .pd-band-t .muted { display: none; }
}
@media (max-width: 400px) { .pd-grilla { grid-template-columns: 1fr; } }
