/* Scoped additions: existing page grids, navigation and document UI are unchanged. */
.hp-sg-editor [hidden],.hp-sg-gallery [hidden]{display:none!important}
.hp-sg-editor{margin-bottom:26px}
.hp-sg-editor h3{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:17px}
.hp-sg-editor h3 span{font-size:12px;border-radius:20px;padding:5px 10px;background:var(--mint,#e9f4ed);color:var(--green,#246849);white-space:nowrap}
.hp-sg-drop{border:1.5px dashed #92b9a4;border-radius:12px;padding:16px;background:#f4f9f6;transition:background .15s}
.hp-sg-drop.is-over{background:#daefe3;border-color:#246849}
.hp-sg-drop label{cursor:pointer;margin:0 0 12px}
.hp-sg-drop label strong,.hp-sg-drop label span{display:block}
.hp-sg-drop label strong{font-size:13px;color:#245a42}
.hp-sg-drop label span{font-size:11px;line-height:1.6;margin-top:6px}
.hp-sg-drop input[type=file]{display:block;width:100%;min-width:0;padding:6px;font-size:12px;background:#fff;border-radius:6px}
.hp-sg-editor .hp-sg-status{font-size:12px;line-height:1.6;color:#246849;overflow-wrap:anywhere}
.hp-sg-status:empty{display:none}
.hp-sg-editor .hp-sg-error{color:#a22929}
.hp-sg-editor-list{list-style:none;margin:14px 0 0;padding:0;display:grid;gap:10px}
.hp-sg-editor-list>li{display:grid;grid-template-columns:62px minmax(0,1fr);gap:10px;border:1px solid #dce5df;padding:9px;border-radius:10px;background:#fff;cursor:grab}
.hp-sg-editor-list>li.is-cover{border-color:#32825b;box-shadow:0 0 0 1px #32825b}
.hp-sg-editor-list>li.is-dragging{opacity:.45}
.hp-sg-editor-list img{width:62px;height:70px;object-fit:contain;background:#f1f5f2;border-radius:5px}
.hp-sg-file-name{display:block;font-size:11px;overflow-wrap:anywhere;line-height:1.5;margin-bottom:7px}
.hp-sg-item-actions{display:flex;flex-wrap:wrap;gap:5px}
.hp-sg-item-actions button{font:inherit;font-size:11px;line-height:1.2;padding:7px 8px;min-height:34px;border:1px solid #d3ded7;border-radius:6px;background:#f7faf8;color:#244b37;cursor:pointer}
.hp-sg-item-actions button[aria-pressed=true]{background:#e3f2e9;border-color:#32825b}
.hp-sg-item-actions button:disabled{opacity:.35;cursor:default}
.hp-sg-editor button:focus-visible,.hp-sg-gallery a:focus-visible,.hp-sg-gallery button:focus-visible{outline:3px solid #267952;outline-offset:3px}
.hp-sg-fallback-item img{width:100%;max-height:180px;object-fit:contain}
.hp-site .stock-image>img{object-fit:contain}
.hp-site .product-detail>.product-photo:has(.hp-sg-gallery){aspect-ratio:auto;max-height:none;overflow:visible;background:transparent}
.hp-sg-gallery{min-width:0;width:100%;border-radius:18px;background:var(--wash,#f3f6f3);overflow:hidden}
.hp-sg-stage{position:relative;aspect-ratio:1/1;touch-action:pan-y pinch-zoom}
.hp-sg-slide{display:flex;width:100%;height:100%;align-items:center;justify-content:center;position:absolute;inset:0;cursor:zoom-in}
.hp-sg-slide img{display:block;width:100%;height:100%;object-fit:contain}
.hp-sg-zoom-hint{position:absolute;right:14px;top:14px;padding:7px 11px;background:rgba(255,255,255,.92);color:#245a42;border-radius:20px;font-size:11px}
.hp-sg-controls{position:absolute;bottom:14px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:16px;background:rgba(255,255,255,.95);border-radius:30px;padding:3px 6px;box-shadow:0 2px 15px #193b2514}
.hp-sg-controls span{font-size:12px;min-width:36px;text-align:center;font-variant-numeric:tabular-nums}
.hp-sg-gallery button{font:inherit;cursor:pointer}
.hp-sg-controls button{border:0;background:transparent;color:#225c3f;font-size:28px;line-height:1;width:42px;height:42px;border-radius:50%}
.hp-sg-controls button:hover{background:#e5f1e9}
.hp-sg-thumbs{display:flex;gap:10px;padding:14px;overflow-x:auto;background:#fff}
.hp-sg-thumbs a{display:block;flex:0 0 68px;height:64px;border:2px solid transparent;border-radius:8px;overflow:hidden;background:#f3f6f3}
.hp-sg-thumbs a[aria-current=true]{border-color:#32825b}
.hp-sg-thumbs img{width:100%;height:100%;object-fit:contain}
.hp-sg-dialog{width:min(1320px,96vw);max-width:96vw;max-height:96dvh;padding:12px;margin:auto;border:0;border-radius:14px;background:#10241b;color:#fff}
.hp-sg-dialog::backdrop{background:rgba(7,17,12,.86)}
.hp-sg-dialog-bar{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:2px 6px 12px;font-size:13px}
.hp-sg-dialog button{border:1px solid #ffffff55;border-radius:8px;background:#ffffff12;color:#fff;min-height:44px;min-width:44px}
.hp-sg-dialog-bar button{padding:8px 14px}
.hp-sg-zoom-stage{display:flex;align-items:center;justify-content:center;gap:10px;touch-action:pan-y pinch-zoom}
.hp-sg-zoom-stage img{display:block;max-width:calc(100% - 110px);max-height:calc(90dvh - 70px);width:auto;height:auto;object-fit:contain}
.hp-sg-zoom-stage button{flex-shrink:0;font-size:30px}
@media(max-width:600px){.hp-sg-stage{aspect-ratio:1.1}.hp-sg-thumbs{gap:6px;padding:10px}.hp-sg-thumbs a{flex-basis:54px;height:52px}.hp-sg-dialog{padding:8px}.hp-sg-zoom-stage{gap:5px}.hp-sg-zoom-stage img{max-width:calc(100% - 98px)}.hp-sg-item-actions button{min-height:40px}}
@media(prefers-reduced-motion:reduce){.hp-sg-drop{transition:none}}

/* The expanded editor must scroll with the document, including on shorter screens. */
.hp-site .stock-edit-form .editor-side.hp-sg-sidebar{position:static;align-self:start}
.hp-site .hp-sg-editor .hp-sg-file-name{color:#244b37}
.hp-site .hp-sg-drop label span{color:#4e6d5b}
.hp-site.eco-staff .hp-sg-editor .hp-sg-status{color:#9fdfb7}
.hp-site.eco-staff .hp-sg-editor .hp-sg-status.hp-sg-error{color:#ffb3ab}
