/* Llaveros y dijes 3D — usa los tokens de CiberKit (--ck-*, --bs-*) para respetar el tema claro/oscuro y la tipografía de consola */
.p3d-page .product-card { cursor: pointer; }
.p3d-page .product-image { aspect-ratio: 1; background-color: var(--ck-surface-muted); display: grid; place-items: center; }
.p3d-page .product-image img { object-fit: contain; width: 82%; height: 82%; }
.p3d-page .product-body { padding: 14px 16px 16px; }
.p3d-page .product-body h4 { font-size: 15px; min-height: 2.7em; margin-bottom: 6px; }
.p3d-page .product-meta { margin-bottom: 10px; }
.p3d-page .product-price { font-size: 18px; }
.p3d-acciones-toolbar { display: flex; gap: 8px; }
.p3d-acciones-toolbar .product-btn { width: auto; padding: 10px 18px; }
.filter-title { font-size: 12px; letter-spacing: .8px; text-transform: uppercase; color: var(--ck-text-muted); margin: 0 0 8px; font-weight: 400; }

/* Pieza */
.p3d-vista { position: relative; aspect-ratio: 1; max-height: 300px; margin: 0 auto 16px; background: var(--ck-surface-muted); border: 1px solid var(--ck-border); display: grid; place-items: center; overflow: hidden; }
.p3d-vista .capas { position: relative; width: 80%; height: 80%; }
.p3d-vista img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.p3d-sub { color: var(--ck-text-muted); font-size: 14px; margin-bottom: 14px; text-align: center; }
.p3d-bloque { margin: 16px 0; }
.p3d-bloque h3 { font-family: 'Courier New', Courier, monospace; font-size: 13px; letter-spacing: .8px; text-transform: uppercase; color: var(--ck-text-muted); margin: 0 0 8px; font-weight: 400; }
.p3d-canales { display: grid; gap: 8px; }
.p3d-canal { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 8px 12px; background: var(--ck-surface); border: 1px solid var(--ck-border); color: var(--ck-text); text-align: left; cursor: pointer; font-family: 'Courier New', Courier, monospace; }
.p3d-canal b { display: block; font-size: 14px; }
.p3d-canal small { color: var(--ck-text-muted); }
.p3d-canal[aria-pressed="true"] { border-color: var(--ck-primary); box-shadow: inset 0 0 0 1px var(--ck-primary); }
.p3d-paleta { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; max-height: 190px; overflow-y: auto; padding: 4px 2px; margin-top: 10px; }
.p3d-sw { position: relative; width: 100%; aspect-ratio: 1; min-width: 40px; border-radius: 50%; border: 2px solid rgba(128, 128, 128, .55); background: var(--c); cursor: pointer; padding: 0; }
.p3d-sw[aria-pressed="true"] { outline: 3px solid var(--ck-primary); outline-offset: 2px; }
.p3d-sw.t-transparente, .p3d-pt.t-transparente { background-image: linear-gradient(45deg, #bbb 25%, transparent 25%, transparent 75%, #bbb 75%), linear-gradient(45deg, #bbb 25%, #fff 25%, #fff 75%, #bbb 75%); background-size: 10px 10px; background-position: 0 0, 5px 5px; }
.p3d-sw.t-transparente::after, .p3d-pt.t-transparente::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--c); opacity: .62; }
.p3d-sw.t-fluorescente { box-shadow: 0 0 8px 2px var(--c); }
.p3d-sw.t-fosforescente { box-shadow: 0 0 0 2px #fff, 0 0 9px 3px #9dff7a; }
.p3d-sw.t-seda, .p3d-pt.t-seda { background-image: linear-gradient(135deg, rgba(255, 255, 255, .65), transparent 45%, rgba(0, 0, 0, .2)); background-color: var(--c); }
.p3d-pt { position: relative; flex: none; width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(128, 128, 128, .55); background: var(--c); }
.p3d-opciones { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.p3d-opciones .btn-group .btn { font-family: 'Courier New', Courier, monospace; }
.p3d-opciones select { max-width: 220px; }
.p3d-nota { font-size: 13px; color: var(--ck-text-muted); border: 1px dashed var(--ck-border); padding: 8px 12px; }
.p3d-cant { display: inline-flex; align-items: center; border: 1px solid var(--ck-border); background: var(--ck-surface); }
.p3d-cant button { width: 44px; height: 44px; border: 0; background: transparent; color: var(--ck-text); font-size: 20px; cursor: pointer; }
.p3d-cant input { width: 56px; height: 44px; border: 0; text-align: center; background: transparent; color: var(--ck-text); font-family: 'Courier New', Courier, monospace; -moz-appearance: textfield; }
.p3d-cant input::-webkit-outer-spin-button, .p3d-cant input::-webkit-inner-spin-button { -webkit-appearance: none; }
.p3d-pie-modal { justify-content: space-between; border-top: 1px solid var(--ck-border); }
.p3d-total { font-family: 'Courier New', Courier, monospace; font-size: 22px; font-weight: 600; color: var(--ck-text-heading); }

/* Pedido */
.p3d-lin { display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--ck-border); }
.p3d-lin .p3d-vista { margin: 0; max-height: none; }
.p3d-lin h4 { font-size: 16px; margin: 0 0 4px; }
.p3d-chips { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--ck-text-muted); margin-bottom: 4px; }
.p3d-chips span { display: inline-flex; align-items: center; gap: 5px; }
.p3d-chips i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); border: 1px solid rgba(128, 128, 128, .7); }
.p3d-obs { font-size: 13px; font-style: italic; color: var(--ck-text-muted); }
.p3d-lin-acc { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.p3d-lin-acc .p3d-cant button { width: 38px; height: 38px; } .p3d-lin-acc .p3d-cant input { width: 44px; height: 38px; }
.p3d-enlace { background: none; border: 0; color: var(--ck-primary); text-decoration: underline; padding: 6px; cursor: pointer; font-size: 13px; }
.p3d-enlace.p3d-quitar { color: #dc3545; }
.p3d-resumen { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; font-family: 'Courier New', Courier, monospace; }
.p3d-resumen b { font-size: 22px; }
.p3d-flota { position: fixed; right: 18px; bottom: 18px; z-index: 1030; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); font-size: 13px; padding: 12px 18px; }

/* Pago */
.p3d-kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 10px 0; font-family: 'Courier New', Courier, monospace; font-size: 14px; }
.p3d-kv dt { color: var(--ck-text-muted); font-weight: 400; } .p3d-kv dd { margin: 0; word-break: break-word; }
.p3d-copiar { background: none; border: 0; color: var(--ck-primary); text-decoration: underline; cursor: pointer; padding: 0 6px; font-size: 13px; }
.p3d-qr { display: block; max-width: 170px; margin: 8px auto; border: 1px solid var(--ck-border); background: #fff; padding: 6px; }
.p3d-codigo { display: inline-block; padding: 6px 16px; border: 1px solid var(--ck-primary); color: var(--ck-primary); font-family: 'Courier New', Courier, monospace; font-size: 22px; letter-spacing: .08em; margin: 6px 0; }
.p3d-estado { display: inline-block; padding: 2px 10px; border-radius: 20px; font-family: 'Courier New', Courier, monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; border: 1px solid var(--ck-border); }
.p3d-estado.e-nuevo, .p3d-estado.p-reportado, .p3d-estado.p-revision, .p3d-estado.p-pendiente { color: #b8860b; border-color: #b8860b; }
.p3d-estado.e-confirmado, .p3d-estado.e-imprimiendo { color: var(--ck-primary); border-color: var(--ck-primary); }
.p3d-estado.e-listo, .p3d-estado.e-entregado, .p3d-estado.p-verificado { color: #25694a; border-color: #25694a; }
.p3d-estado.e-cancelado, .p3d-estado.p-rechazado { color: #dc3545; border-color: #dc3545; }
.p3d-mi { border: 1px solid var(--ck-border); padding: 12px 14px; margin-bottom: 10px; background: var(--ck-surface); }
.p3d-mi h4 { margin: 0; font-size: 16px; font-family: 'Courier New', Courier, monospace; }
.p3d-trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 575px) {
  .p3d-flota { left: 12px; right: 12px; bottom: 12px; text-align: center; }
  .p3d-lin { grid-template-columns: 64px 1fr; }
  .p3d-acciones-toolbar .product-btn { width: 100%; }
}

.p3d-bloque-titulo { font-size: 13px; letter-spacing: .8px; text-transform: uppercase; color: var(--ck-text-muted); font-weight: 400; }
