/* Product photos: controls sit outside the image so grain and colour stay visible. */
.dgal__full picture{display:block;height:100%}
.buying-product .decor__left .decor__ph.dgal .dgal__slide--customer img,.buying-product .decor__left .decor__ph.dgal .dgal__slide--packaging img{object-fit:contain}
.dgal__open{display:flex;align-items:center;gap:7px;min-height:44px;box-sizing:border-box;padding:10px 13px;border:1px solid #203b2b1c;background:rgba(255,255,255,.94);color:var(--ink);font-size:13px;line-height:1.3;box-shadow:0 2px 12px #18231a0d}
.dgal__open svg{width:19px;height:19px;flex:none}
.dgal__bar{display:flex;align-items:center;gap:5px;margin:6px 0 1px;color:var(--ink)}
.dgal__bar[hidden]{display:none}
.dgal__bar button{display:grid;place-items:center;flex:none;width:44px;height:44px;padding:0;border:1px solid var(--line);border-radius:3px;background:transparent;color:var(--ink);cursor:pointer}
.dgal__bar button svg{width:21px;height:21px}
.dgal__bar button:hover:not(:disabled){background:var(--warm)}
.dgal__bar button:disabled{opacity:.28;cursor:default}
.dgal__bar button:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
.dgal__count{min-width:48px;text-align:center;font-size:14px;line-height:1.2;font-variant-numeric:tabular-nums}
.dgal__hint{margin-left:9px;font-size:12px;line-height:1.45;color:var(--muted)}
.dgal__th{min-width:44px;min-height:44px}

/* Native modal top layer covers sticky navigation. The image never covers controls. */
.photo-viewer{position:fixed;inset:0;width:100%;max-width:none;height:100vh;height:100dvh;max-height:none;margin:0;padding:0;border:0;box-sizing:border-box;background:#18211b;color:#f8f5ed;overflow:hidden;overscroll-behavior:contain;font-family:var(--text,sans-serif)}
.photo-viewer:not([open]){display:none}
.photo-viewer::backdrop{background:#18211bf5}
.photo-viewer [hidden]{display:none!important}
.photo-viewer__frame{display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:100%;height:100%;box-sizing:border-box;padding:calc(12px + env(safe-area-inset-top,0px)) calc(16px + env(safe-area-inset-right,0px)) calc(12px + env(safe-area-inset-bottom,0px)) calc(16px + env(safe-area-inset-left,0px));gap:12px}
.photo-viewer button{display:flex;align-items:center;justify-content:center;gap:8px;flex:none;min-width:44px;min-height:44px;margin:0;padding:10px 15px;border:1px solid #f8f5ed59;border-radius:3px;background:transparent;color:#f8f5ed;font:500 14px/1.3 var(--text,sans-serif);cursor:pointer;touch-action:manipulation}
.photo-viewer button:hover:not(:disabled){background:#ffffff16}
.photo-viewer button:disabled{opacity:.28;cursor:default}
.photo-viewer button:focus-visible,.photo-viewer__stage:focus-visible{outline:2px solid #f8f5ed;outline-offset:3px}
.photo-viewer button svg{display:block;flex:none;width:22px;height:22px}
.photo-viewer__top{display:flex;align-items:center;gap:10px;position:relative;z-index:2;min-width:0}
.photo-viewer__count{margin-right:auto;white-space:nowrap;font-size:14px;line-height:1.3;font-variant-numeric:tabular-nums}
.photo-viewer .photo-viewer__close{background:#f8f5ed;color:#18211b;border-color:#f8f5ed}
.photo-viewer .photo-viewer__close:hover{background:#e7e4db}
.photo-viewer__stage{position:relative;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-y pinch-zoom;border-radius:2px;scrollbar-width:thin;scrollbar-color:#f8f5ed80 transparent}
.photo-viewer__canvas{display:flex;align-items:center;justify-content:center;min-width:100%;min-height:100%}
.photo-viewer__image{display:block;flex:none;max-width:none;max-height:none;margin:0;object-fit:contain;user-select:none;-webkit-user-select:none}
.photo-viewer.is-zoomed .photo-viewer__stage{touch-action:auto;cursor:grab}
.photo-viewer.is-zoomed .photo-viewer__stage.is-panning{cursor:grabbing}
.photo-viewer__bottom{min-width:0}
.photo-viewer__caption{max-width:820px;max-height:18vh;overflow:auto;margin:0 auto 10px;text-align:center;font-size:14px;line-height:1.5;color:#f8f5ed;overscroll-behavior:contain}
.photo-viewer__nav{display:flex;align-items:center;justify-content:center;gap:18px;margin:auto;max-width:600px}
.photo-viewer__nav button{padding:10px;min-width:48px}
.photo-viewer__help{flex:1;max-width:330px;text-align:center;font-size:12px;line-height:1.4;color:#e0e3dc}
.photo-viewer__status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.photo-viewer__error{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;background:#18211b}
.photo-viewer__error p{margin:0;font-size:16px;line-height:1.5}
@media(max-width:600px){
  .dgal__open{right:10px;bottom:10px;font-size:12px}
  .dgal__hint{font-size:11px;margin-left:5px}
  .photo-viewer__frame{gap:10px;padding:calc(10px + env(safe-area-inset-top,0px)) calc(10px + env(safe-area-inset-right,0px)) calc(10px + env(safe-area-inset-bottom,0px)) calc(10px + env(safe-area-inset-left,0px))}
  .photo-viewer__top{gap:6px}
  .photo-viewer__count{font-size:12px}
  .photo-viewer button{padding:10px;font-size:13px}
  .photo-viewer__close svg{width:18px;height:18px}
  .photo-viewer__caption{font-size:13px;line-height:1.45;margin-bottom:8px}
  .photo-viewer__nav{gap:10px}
  .photo-viewer__help{font-size:11px}
}
@media(max-height:460px){
  .photo-viewer__frame{gap:6px;padding-top:calc(6px + env(safe-area-inset-top,0px));padding-bottom:calc(6px + env(safe-area-inset-bottom,0px))}
  .photo-viewer__caption{max-height:14vh;margin-bottom:4px;font-size:12px}
}
