/* OFS V10.34 — sistema de imágenes. Los fondos editoriales conservan su encuadre. */
:root{--ofs-image-bg:#edf3f7;--ofs-image-border:#d6e4ec;--ofs-image-radius:9px;--ofs-gallery-height:160px;--ofs-product-height:190px}
img{max-inline-size:100%}
.customer-gallery,.review-photos,.ofs-upload-previews,.product-card,.client-update-card,.sample-card,.color-photo,.product-photo{min-width:0}
.customer-sample img,#customer-production .customer-sample img,#customer-finished .customer-sample img{display:block;width:100%;height:var(--ofs-gallery-height);max-height:var(--ofs-gallery-height);object-fit:contain;object-position:center;background:var(--ofs-image-bg);border-radius:var(--ofs-image-radius)}
.product-photo{height:var(--ofs-product-height);overflow:hidden}
.product-photo .photo-viewport img.product-thumbnail,.selected-color-preview img,.selected-color-chip img,.ofs-cart-item-photo,.color-photo img,.trash-image img,.order-samples .sample-preview img,.client-update-thumb,.ofs-upload-preview img,.ofs-finished-photo img,.ofs-review .review-photo img,.product-card>img{object-fit:contain;object-position:center;max-width:100%;min-width:0}
.ofs-review .review-photo img,.ofs-upload-preview img,.ofs-finished-photo img{background:var(--ofs-image-bg);border-radius:var(--ofs-image-radius)}
.ofs-review .review-photo{display:block;min-width:0;max-width:100%}
.ofs-image-thumb-button{display:block;max-width:100%;border:0;padding:0;background:transparent;cursor:zoom-in;min-width:0;border-radius:var(--ofs-image-radius);line-height:0}
.client-update-card>.ofs-image-thumb-button{width:112px;height:130px;flex:none;align-self:start}
.client-update-card>.ofs-image-thumb-button .client-update-thumb{width:100%;height:100%;display:block}
.ofs-cart-item-main>.ofs-image-thumb-button{flex:none;width:52px;height:60px}.ofs-cart-item-main>.ofs-image-thumb-button img{display:block}.ofs-upload-preview>.ofs-image-thumb-button{width:100%;padding:0;min-height:0;border:0;background:transparent}
.ofs-image-thumb-button:focus-visible,.ofs-image-dialog button:focus-visible{outline:3px solid #43c3e8;outline-offset:2px}
.ofs-review .review-photo.ofs-image-thumb-button{display:block;width:100%;min-height:0;margin:0;padding:0;border:0;background:none;line-height:0}
/* No se impone una altura global a logotipos ni a la fotografía editorial. */
.ig-tile img,.mini-gallery__photos img,.inspiration-photos img{object-fit:contain;object-position:center;background:var(--ofs-image-bg)}
.ig-tile:hover img{transform:none}
/* Dialog top layer: no se recorta por contenedores, drawer, grid ni z-index. */
.ofs-image-dialog{box-sizing:border-box;position:fixed;inset:0;margin:auto;padding:0;border:1px solid #c7dae6;border-radius:16px;background:#fff;color:#142c40;width:min(1100px,calc(100vw - 32px));height:min(850px,calc(100vh - 32px));height:min(850px,calc(100dvh - 32px));max-width:none;max-height:none;overflow:hidden;box-shadow:0 24px 90px #0006;isolation:isolate;font:inherit;line-height:1.4}
.ofs-image-dialog:not([open]){display:none}
.ofs-image-dialog::backdrop{background:#051421e8}
.ofs-image-dialog .ofs-image-layout{height:100%;width:100%;display:flex;flex-direction:column;min-width:0;min-height:0}
.ofs-image-dialog .ofs-image-head{flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px;background:#102c40;color:#fff;border:0}
.ofs-image-head>div{min-width:0;flex:1}.ofs-image-head strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:16px}.ofs-image-head p{margin:3px 0 0;font-size:12px;color:#c5dce9;overflow-wrap:anywhere;max-height:3.4em;overflow:auto}.ofs-image-head p:empty{display:none}
.ofs-image-dialog .ofs-image-stage{position:relative;flex:1 1 0;min-width:0;min-height:0;overflow:hidden;background:#edf3f7;touch-action:none;user-select:none;overscroll-behavior:contain}
.ofs-image-stage img{position:absolute;left:50%;top:50%;display:block;width:0;height:0;max-width:none;max-inline-size:none;max-height:none;object-fit:contain;transform-origin:center;pointer-events:none;user-select:none;-webkit-user-drag:none;visibility:hidden}
.ofs-image-stage.is-ready img{visibility:visible}.ofs-image-stage.is-zoomed{cursor:grab}.ofs-image-stage.is-zoomed:active{cursor:grabbing}
.ofs-image-status{position:absolute;inset:0;display:grid;place-items:center;text-align:center;padding:20px;color:#527185;font-size:14px;pointer-events:none}.ofs-image-status[hidden]{display:none!important}
.ofs-image-dialog .ofs-image-controls{flex:none;display:flex;align-items:center;justify-content:center;gap:8px;padding:12px 16px;background:#fff;border-top:1px solid #d6e4ec;flex-wrap:wrap}
.ofs-image-dialog button{font:inherit;font-weight:700;min-width:42px;min-height:42px;border:1px solid #c8dce8;border-radius:8px;background:#eef6fa;color:#173b53;padding:6px 12px;cursor:pointer;line-height:1.2;box-shadow:none;flex:none}
.ofs-image-dialog button:disabled{opacity:.45;cursor:default}.ofs-image-dialog button[hidden]{display:none!important}.ofs-image-dialog .ofs-image-close{background:#1e4359;color:#fff;border-color:#64899f;font-size:22px}.ofs-image-dialog .ofs-image-zoom{font-size:21px}.ofs-image-dialog .ofs-image-value,.ofs-image-dialog .ofs-image-count{font-size:13px;font-weight:700;min-width:46px;text-align:center;color:#34566b;font-variant-numeric:tabular-nums}.ofs-image-count[hidden]{display:none!important}
.ofs-image-hint{flex:none;text-align:center;font-size:11px;color:#5d7485;margin:0;padding:0 12px 10px;background:#fff}
html.ofs-image-viewing,html.ofs-image-viewing body{overflow:hidden!important}
@media(max-width:700px){:root{--ofs-gallery-height:124px;--ofs-product-height:148px}.ofs-image-dialog{width:calc(100vw - 16px);height:calc(100vh - 16px);height:calc(100dvh - 16px);border-radius:12px}.ofs-image-dialog .ofs-image-head{padding:10px 12px}.ofs-image-dialog .ofs-image-controls{gap:5px;padding:9px 8px}.ofs-image-dialog button{min-width:38px;min-height:42px;padding:5px 8px}.ofs-image-hint{padding-bottom:max(10px,env(safe-area-inset-bottom))}}
@media(max-width:370px){:root{--ofs-gallery-height:112px}.ofs-image-dialog .ofs-image-value,.ofs-image-dialog .ofs-image-count{min-width:36px;font-size:11px}}
