.image-crop-stage[data-hero=true] { min-height: 0; border: 0; border-radius: 12px; background: #20140e; touch-action: none; cursor: grab; }
.image-crop-stage[data-hero=true]:active { cursor: grabbing; }
.image-crop-stage[data-hero=true] > img { display: none; }
.image-crop-stage[data-hero=true] .image-crop-frame { border: 0; box-shadow: none; }
.image-crop-stage [data-hero-crop-frame] { position: absolute; left: 0; top: 0; border: 0; transform-origin: top left; pointer-events: none; max-width: none; }
.hero-crop-devices { display: flex; gap: 8px; margin-bottom: 14px; }
.hero-crop-devices button { flex: 1; }
.hero-crop-devices [aria-pressed=true] { color: white; background: var(--admin-primary, #325a89); border-color: transparent; }
[data-hero-crop-controls] select { width: 100%; }
.image-crop-controls > label { margin-top: 15px; }
.image-crop-stage[data-hero=true] { width: 100%; max-width: var(--hero-preview-max-width, 100%); margin-inline: auto; }
.image-crop-stage[data-hero=true] + .image-crop-controls { align-self: start; }
[data-hero-crop-controls][hidden], [data-hero-crop-frame][hidden] { display: none !important; }
.brio-preview-hero:has([data-framed=true]) { aspect-ratio: 1440 / 612; }
.brio-preview-frame[data-device=mobile] .brio-preview-hero:has([data-framed=true]) { aspect-ratio: 390 / 650; }
.image-crop-panel:has(.image-crop-stage[data-hero=true]) { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; gap: 12px; }
.image-crop-panel:has(.image-crop-stage[data-hero=true]) .image-crop-layout { overflow: auto; align-items: start; }
.image-crop-panel:has(.image-crop-stage[data-hero=true]) > .admin-form-actions { margin: 0; padding-top: 10px; border-top: 1px solid var(--admin-line); background: var(--admin-surface); }
.image-crop-controls:has([data-hero-crop-controls]:not([hidden])) { gap: 10px; }
.image-crop-controls:has([data-hero-crop-controls]:not([hidden])) :is(.fine-print, .image-crop-size) { font-size: 12px; line-height: 1.5; margin: 0; }
.image-crop-controls:has([data-hero-crop-controls]:not([hidden])) > label { margin: 0; }
[data-hero-crop-controls] .fine-print { margin-top: 10px !important; }
.image-crop-controls:has([data-hero-crop-controls]:not([hidden])) > [data-image-crop-help] { display: none; }
@media (max-width: 760px) {
  .image-crop-panel:has(.image-crop-stage[data-hero=true]) .image-crop-layout { display: block; }
  .image-crop-stage[data-hero=true] + .image-crop-controls { margin-top: 14px; }
  .image-crop-panel:has(.image-crop-stage[data-hero=true]) .image-crop-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Keep the selected photograph composition across viewport widths and heights.
   The old viewport-height clamp recropped the photo outside the editor. */
body.brio-storefront .hero-stage {
  aspect-ratio: 1440 / 612;
  height: auto;
  min-height: 0;
  display: block;
}
body.brio-storefront .hero-content {
  position: absolute;
  top: 0;
  bottom: 0;
  padding: 24px 0;
  justify-content: center;
}
body.brio-storefront .hero h1 { margin-top: 12px; margin-bottom: 16px; }
@media (min-width: 701px) and (max-width: 1100px) {
  body.brio-storefront .hero-content { width: min(600px, calc(100% - 48px)); margin-left: 24px; padding: 16px 0; }
  body.brio-storefront .hero h1 { font-size: clamp(30px, 4.1vw, 44px); margin: 8px 0 12px; }
  body.brio-storefront .hero-content p:not(.eyebrow) { font-size: 11px; line-height: 1.5; }
  body.brio-storefront .hero-actions { margin-top: 12px; }
  body.brio-storefront .hero-actions a { min-height: 36px; padding: 9px 13px; }
  body.brio-storefront .hero-content p.hero-assortment { margin-top: 14px; font-size: 9px; }
  body.brio-storefront .hero-caption { bottom: 60px; }
  body.brio-storefront .hero-caption p { font-size: 18px; }
}
@media (max-width: 700px) {
  body.brio-storefront .hero-stage { aspect-ratio: 390 / 650; min-height: 0; }
  body.brio-storefront .hero-content { top: auto; bottom: 0; padding: 24px 0 76px; }
}

/* One composition on every screen: the mobile photo retains the selected frame.
   Text flows below the photograph instead of changing/cropping its aspect ratio. */
body.brio-storefront .hero img { object-position: center 18%; }
body.brio-storefront .hero img[hidden] { display: none !important; }
@media (max-width: 700px) {
  body.brio-storefront .hero-stage { display: flex; flex-direction: column; aspect-ratio: auto; }
  body.brio-storefront .hero-visual { position: relative; inset: auto; width: 100%; aspect-ratio: 1440 / 612; order: 0; }
  body.brio-storefront .hero-content { position: relative; inset: auto; order: 1; padding: 24px 0 32px; }
  body.brio-storefront .hero-caption { display: none; }
  body.brio-storefront .hero-carousel-controls { right: 12px; bottom: 10px; }
  body.brio-storefront .hero-carousel-controls > button { width: 28px; height: 28px; }
}

/* Keep the editing frame proportional to the exported canvas, even on small screens. */
.image-crop-stage:not([data-hero=true]) {min-height:0; padding:0; border:0; border-radius:0}

/* Touch editor: a stable preview, scrollable controls and always-visible actions. */
body.admin-body .image-crop-stage {touch-action:none;user-select:none;-webkit-user-select:none}
@media(max-width:760px){
 body.admin-body .image-crop-modal {padding:0;z-index:200;height:100dvh;box-sizing:border-box;overscroll-behavior:contain}
 body.admin-body .image-crop-modal .image-crop-panel {width:100%;height:100dvh;max-height:100dvh;min-height:0;border:0;border-radius:0;padding:12px;box-sizing:border-box;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:10px;overflow:hidden}
 body.admin-body .image-crop-panel header {margin:0;gap:10px}
 body.admin-body .image-crop-panel header .eyebrow {display:none}
 body.admin-body .image-crop-panel h2 {font-size:18px!important;line-height:1.25;margin:0}
 body.admin-body .image-crop-panel [data-image-crop-status] {font-size:12px!important;line-height:1.4;margin:6px 0 0}
 body.admin-body .image-crop-panel header [data-image-crop-cancel] {width:44px;height:44px;min-width:44px;font-size:22px!important}
 body.admin-body .image-crop-panel .image-crop-layout {display:grid!important;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);gap:10px;min-height:0;overflow:hidden!important}
 body.admin-body .image-crop-panel .image-crop-stage {width:min(100%,calc(30dvh * var(--crop-ratio)))!important;max-width:100%!important;min-height:0;margin:0 auto;flex:none}
 body.admin-body .image-crop-panel .image-crop-controls {min-height:0;overflow-y:auto;overscroll-behavior:contain;margin:0!important;padding:12px;gap:8px;align-self:stretch!important}
 body.admin-body .image-crop-panel .image-crop-controls>label {margin:0;font-size:14px!important;gap:0}
 body.admin-body .image-crop-panel input[type=range] {height:36px;min-height:36px;margin:0;touch-action:pan-y}
 body.admin-body .image-crop-panel .hero-crop-devices {margin-bottom:8px}
 body.admin-body .image-crop-panel :is(button,select) {font-size:14px!important;min-height:44px}
 body.admin-body .image-crop-panel [data-hero-crop-controls]>label {font-size:13px!important}
 body.admin-body .image-crop-panel [data-hero-crop-controls] .fine-print,body.admin-body .image-crop-panel [data-image-crop-help] {display:none}
 body.admin-body .image-crop-panel .image-crop-size {font-size:12px!important;line-height:1.35}
 body.admin-body .image-crop-panel .image-crop-tools {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 body.admin-body .image-crop-panel .image-crop-tools button {padding:8px 4px;font-size:12px!important;white-space:normal}
 body.admin-body .image-crop-panel>.admin-form-actions {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin:0;padding:10px 0 max(0px,env(safe-area-inset-bottom));border-top:1px solid var(--admin-line);background:var(--admin-surface)}
 body.admin-body .image-crop-panel>.admin-form-actions button {padding:10px 12px;white-space:normal;line-height:1.3}
}
body.admin-body .image-crop-panel button {touch-action:manipulation}
