/* Hotfix: keep every product image inside its dedicated media cell. */
.modal-panel{min-width:0;min-height:0}
.modal-media{min-width:0;min-height:0;overflow:hidden}
.modal-media img{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;object-position:center}
.modal-body{min-width:0;min-height:0;background:#fff;position:relative;z-index:1}

/* Banner controls sit below the artwork, with the same hit area for all three actions. */
.home-controls{position:static;inset:auto;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 0 0;pointer-events:auto}
.home-dots{max-width:100%;overflow-x:auto}
.home-arrows{flex:none}
.home-arrows button{width:44px;height:44px;flex:none}
.home-arrows button:focus-visible,.home-dot:focus-visible{outline:3px solid #277d50;outline-offset:3px}
.banner-icon{display:block;width:18px;height:18px}
#home-rotation[data-playing="true"] .banner-icon-play,#home-rotation[data-playing="false"] .banner-icon-pause{display:none}

@media(max-width:820px){
  .modal-panel{display:flex;flex-direction:column;box-sizing:border-box;height:calc(100vh - 16px);max-height:calc(100vh - 16px);margin:8px auto}
  .modal-media{flex:0 0 auto;height:min(30vh,220px);padding:16px}
  .modal-body{flex:1 1 auto;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;padding:18px 18px calc(24px + env(safe-area-inset-bottom,0px))}
}
@supports(height:100dvh){
  @media(max-width:820px){
    .modal-panel{height:calc(100dvh - 16px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));max-height:calc(100dvh - 16px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));margin-top:calc(8px + env(safe-area-inset-top,0px))}
    .modal-media{height:min(30dvh,220px)}
  }
}
@media(max-width:700px){
  .home-controls{inset:auto;flex-wrap:wrap;row-gap:8px}
  .home-arrows{margin-left:auto}
  .home-dots{padding:4px 7px}
  .home-dot,.home-dot.is-active{width:32px;height:36px;flex:none;background:transparent;display:grid;place-items:center;transition:none}
  .home-dot::after{content:"";width:10px;height:10px;border-radius:99px;background:#658b74}
  .home-dot.is-active::after{width:22px;background:#1d6846}
}
@media(prefers-reduced-motion:reduce){
  .home-arrows button{transition-property:background-color,border-color,color,box-shadow}
}
@media(hover:none){
  .home-arrows button:hover{background:#fff;color:#194931}
}
