/* Cementare color detail mobile parity — phone/tablet/landscape only */
@media (max-width:1199.98px){
  body.ct-color-detail .mbr-gallery,
  body.ct-color-detail .mbr-gallery-row,
  body.ct-color-detail .mbr-gallery-layout-default,
  body.ct-color-detail .mbr-gallery-layout-default>div,
  body.ct-color-detail .mbr-gallery-layout-default>div>div{
    min-width:0!important;
    max-width:100%!important;
  }

  body.ct-color-detail .mbr-gallery-item,
  body.ct-color-detail .mbr-gallery-item>div{
    min-width:0!important;
  }

  body.ct-color-detail .mbr-gallery-item img{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    height:100%!important;
    object-fit:cover!important;
  }

  body.ct-color-detail .mbr-slider.modal{
    padding:
      max(10px, env(safe-area-inset-top))
      max(10px, env(safe-area-inset-right))
      max(10px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left))!important;
  }

  body.ct-color-detail .mbr-slider.modal .modal-dialog{
    width:100%!important;
    max-width:none!important;
    height:100%!important;
    min-height:0!important;
    margin:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
  }

  body.ct-color-detail .mbr-slider.modal .modal-content,
  body.ct-color-detail .mbr-slider.modal .modal-body,
  body.ct-color-detail .mbr-slider.modal .carousel-inner,
  body.ct-color-detail .mbr-slider.modal .carousel-item{
    width:100%!important;
    max-width:100%!important;
    height:100%!important;
    min-height:0!important;
  }

  body.ct-color-detail .mbr-slider.modal .modal-content,
  body.ct-color-detail .mbr-slider.modal .modal-body{
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
  }

  body.ct-color-detail .mbr-slider.modal .carousel-item{
    align-items:center!important;
    justify-content:center!important;
  }

  body.ct-color-detail .mbr-slider.modal .carousel-item.active,
  body.ct-color-detail .mbr-slider.modal .carousel-item-next,
  body.ct-color-detail .mbr-slider.modal .carousel-item-prev{
    display:flex!important;
  }

  body.ct-color-detail .mbr-slider.modal .carousel-item img{
    display:block!important;
    width:auto!important;
    height:auto!important;
    max-width:min(100%, 1100px)!important;
    max-height:calc(100dvh - 44px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;
    object-fit:contain!important;
    margin:auto!important;
  }

  @supports not (height:100dvh){
    body.ct-color-detail .mbr-slider.modal .carousel-item img{
      max-height:calc(100vh - 44px)!important;
    }
  }

  body.ct-color-detail .mbr-slider.modal .carousel-control-prev,
  body.ct-color-detail .mbr-slider.modal .carousel-control-next{
    width:56px!important;
    min-width:44px!important;
    opacity:.9!important;
  }

  body.ct-color-detail .mbr-slider.modal .close{
    top:max(12px, env(safe-area-inset-top))!important;
    right:max(12px, env(safe-area-inset-right))!important;
    width:44px!important;
    height:44px!important;
    z-index:5!important;
  }
}

@media (min-width:701px) and (max-width:1199.98px){
  body.ct-color-detail .mbr-gallery{
    padding-top:clamp(46px,6vw,70px)!important;
    padding-bottom:clamp(72px,8vw,104px)!important;
  }

  body.ct-color-detail .mbr-gallery-row,
  body.ct-color-detail .mbr-gallery>h1.cementare-color-title{
    width:min(calc(100% - 48px), 1320px)!important;
  }

  body.ct-color-detail .mbr-gallery-item{
    width:50%!important;
  }
}

@media (max-width:700px){
  body.ct-color-detail .mbr-gallery{
    padding-top:34px!important;
    padding-bottom:62px!important;
  }

  body.ct-color-detail .mbr-gallery-row,
  body.ct-color-detail .mbr-gallery>h1.cementare-color-title{
    width:min(calc(100% - 28px), 1320px)!important;
  }

  body.ct-color-detail .mbr-gallery-item{
    width:100%!important;
  }

  body.ct-color-detail .mbr-slider.modal .carousel-control-prev,
  body.ct-color-detail .mbr-slider.modal .carousel-control-next{
    width:44px!important;
  }
}

@media (orientation:landscape) and (max-width:991.98px) and (max-height:520px){
  body.ct-color-detail .mbr-gallery{
    padding-top:28px!important;
    padding-bottom:48px!important;
  }

  body.ct-color-detail .mbr-slider.modal{
    padding:
      max(6px, env(safe-area-inset-top))
      max(8px, env(safe-area-inset-right))
      max(6px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left))!important;
  }

  body.ct-color-detail .mbr-slider.modal .carousel-item img{
    max-height:calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;
  }
}
