.smh-photo-cropper{border:0;padding:0;width:min(1080px,calc(100vw - 28px));max-height:calc(100vh - 28px);border-radius:22px;box-shadow:0 24px 80px rgba(0,0,0,.3);background:#fff;color:#18342d}.smh-photo-cropper::backdrop{background:rgba(3,22,18,.72);backdrop-filter:blur(4px)}.smh-crop-shell{display:flex;flex-direction:column;max-height:calc(100vh - 28px)}.smh-crop-head{display:flex;align-items:flex-start;justify-content:space-between;padding:22px 24px 16px;border-bottom:1px solid rgba(14,58,49,.12)}.smh-crop-head span{font-size:.72rem;letter-spacing:.16em;font-weight:800;color:#8a7424}.smh-crop-head h2{margin:4px 0 2px;font:800 1.45rem/1.2 Montserrat,sans-serif}.smh-crop-head p{margin:0;color:#66736f}.smh-crop-head button{border:0;background:transparent;font-size:2rem;line-height:1;cursor:pointer;color:#53635e}.smh-crop-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,.72fr);gap:20px;padding:20px 24px;overflow:auto}.smh-crop-preview{min-width:0}.smh-crop-preview canvas{display:block;width:100%;max-height:58vh;object-fit:contain;border-radius:16px;background:#eef2ef;box-shadow:inset 0 0 0 1px rgba(14,58,49,.12)}.smh-crop-source{margin-top:9px;font-size:.82rem;color:#6b7773}.smh-crop-settings{display:flex;flex-direction:column;gap:13px}.smh-crop-settings label{display:flex;flex-direction:column;gap:6px;font-weight:700;font-size:.88rem}.smh-crop-settings select,.smh-crop-settings input[type=number]{width:100%;border:1px solid rgba(14,58,49,.2);border-radius:10px;padding:10px 11px;background:#fff;color:#18342d}.smh-crop-settings input[type=range]{width:100%;accent-color:#0e3a31}.smh-crop-dims{display:grid;grid-template-columns:1fr 1fr;gap:10px}.smh-range-line{display:grid;grid-template-columns:minmax(0,1fr) 48px;gap:8px;align-items:center}.smh-range-line output{text-align:right;font-weight:800;color:#0e3a31}.smh-crop-recommend{border-radius:12px;padding:12px;background:#f6f1df;border:1px solid rgba(198,162,42,.28);display:flex;flex-direction:column;gap:3px}.smh-crop-recommend strong{color:#665716}.smh-crop-recommend span{font-size:.8rem;color:#6c6756}.smh-crop-limits{display:grid;gap:3px;border-top:1px solid rgba(14,58,49,.12);padding-top:12px;font-size:.8rem;color:#68746f}.smh-crop-limits strong{color:#18342d}.smh-crop-error{min-height:18px;color:#a52b2b;font-weight:700;font-size:.82rem}.smh-crop-actions{display:flex;justify-content:flex-end;gap:10px;padding:16px 24px 22px;border-top:1px solid rgba(14,58,49,.12)}.smh-crop-actions button{border-radius:12px;padding:11px 18px;font-weight:800;cursor:pointer}.smh-crop-secondary{background:#fff;border:1px solid rgba(14,58,49,.2);color:#18342d}.smh-crop-primary{background:#0e3a31;border:1px solid #0e3a31;color:#fff}@media(max-width:760px){.smh-photo-cropper{width:calc(100vw - 16px);max-height:calc(100vh - 16px)}.smh-crop-grid{grid-template-columns:1fr;padding:14px;gap:14px}.smh-crop-head{padding:16px}.smh-crop-actions{position:sticky;bottom:0;background:#fff;padding:12px 14px}.smh-crop-preview canvas{max-height:40vh}.smh-crop-dims{grid-template-columns:1fr 1fr}}

.smh-crop-preview-title{display:block;margin-bottom:12px;color:#18342d;font-size:.9rem}
.smh-crop-preview{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:16px;background:#f5f7f5;border:1px solid #dfe7e1;border-radius:20px}
.smh-crop-preview canvas{width:auto;max-width:100%;height:auto;max-height:52vh;border-radius:0;background-color:#fff;background-image:linear-gradient(45deg,#e9ece9 25%,transparent 25%),linear-gradient(-45deg,#e9ece9 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e9ece9 75%),linear-gradient(-45deg,transparent 75%,#e9ece9 75%);background-size:20px 20px;background-position:0 0,0 10px,10px -10px,-10px 0;box-shadow:0 6px 24px rgba(14,58,49,.1)}
.smh-crop-settings{padding:4px}.smh-crop-source{text-align:center}.smh-crop-recommend{background:#eef5f0;border-color:#d4e5d9}.smh-crop-recommend strong{color:#18342d}
.smh-crop-facebook-share{width:min(1600px,calc(100vw - 20px));max-height:calc(100vh - 20px)}.smh-crop-facebook-share .smh-crop-shell{max-height:calc(100vh - 20px)}.smh-crop-facebook-share .smh-crop-grid{grid-template-columns:minmax(0,2fr) minmax(310px,.82fr);gap:18px;padding:16px 20px}.smh-crop-facebook-share .smh-crop-preview{min-height:72vh;padding:18px}.smh-crop-facebook-share .smh-crop-preview canvas{max-height:74vh}.smh-crop-facebook-share [data-crop-preview]{cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}.smh-crop-facebook-share [data-crop-preview]:active{cursor:grabbing}.smh-crop-facebook-share .smh-crop-pan-help{margin-top:12px;color:#51655d;font-size:.9rem;text-align:center}.smh-crop-facebook-share .smh-crop-source{margin-top:8px}
@media(max-width:980px){.smh-crop-facebook-share .smh-crop-grid{grid-template-columns:minmax(0,1fr);gap:14px}.smh-crop-facebook-share .smh-crop-preview{min-height:0}.smh-crop-facebook-share .smh-crop-preview canvas{max-height:68vh}}
@media(max-width:760px){.smh-crop-preview{padding:12px}.smh-crop-preview canvas{max-height:35vh}}

/* Facebook gallery: keep a large crop frame and actions within the viewport. */
.smh-crop-facebook-share .smh-crop-grid{flex:1;min-height:0}.smh-crop-facebook-share .smh-crop-preview{min-height:0}.smh-crop-facebook-share .smh-crop-head,.smh-crop-facebook-share .smh-crop-actions{flex-shrink:0}.smh-crop-facebook-share .smh-crop-preview canvas{max-height:calc(100dvh - 275px);max-width:100%;width:auto;height:auto}.smh-crop-facebook-share .smh-crop-actions{position:sticky;bottom:0;background:white}.smh-crop-facebook-share input[readonly]{background:#f4f6f4;color:#51655d}@media(max-width:980px){.smh-crop-facebook-share .smh-crop-preview canvas{max-height:60dvh}}

@media(min-width:981px){.smh-crop-facebook-share .smh-crop-grid{height:calc(100dvh - 190px);overflow:hidden;align-items:start}.smh-crop-facebook-share .smh-crop-preview{align-self:start;padding:12px}.smh-crop-facebook-share .smh-crop-preview canvas{max-height:calc(100dvh - 310px)}.smh-crop-facebook-share .smh-crop-settings{max-height:100%;overflow:auto;padding-right:10px}}
/* Stacked cropper must retain intrinsic preview height when the dialog scrolls. */
@media(max-width:980px){.smh-crop-facebook-share .smh-crop-grid{display:block;overflow-y:auto;overflow-x:hidden}.smh-crop-facebook-share .smh-crop-preview{display:flex;height:auto;min-height:min-content;justify-content:flex-start;margin-bottom:20px}.smh-crop-facebook-share .smh-crop-preview>*{flex-shrink:0}.smh-crop-facebook-share .smh-crop-preview canvas{max-height:55dvh;max-width:100%;object-fit:contain}.smh-crop-facebook-share .smh-crop-settings{height:auto;overflow:visible}}

/* Keep product context visible while re-cropping. */
.smh-photo-cropper.smh-crop-facebook-share{width:min(1100px,calc(100vw - 48px));max-width:calc(100vw - 48px);height:min(860px,90dvh);max-height:90dvh}.smh-photo-cropper.smh-crop-facebook-share::backdrop{background:rgba(3,22,18,.32);backdrop-filter:blur(1px)}@media(max-width:600px){.smh-photo-cropper.smh-crop-facebook-share{width:calc(100vw - 24px);max-width:calc(100vw - 24px);height:90dvh}}
