/* Priorite renforcee face aux anciennes regles de galerie du theme. */
@media (min-width: 768px) {
  html body#product #product-modal .modal-dialog {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: min(1080px, calc(100vw - 48px)) !important;
    max-width: min(1080px, calc(100vw - 48px)) !important;
    margin: 24px auto !important;
    transform: none !important;
  }

  html body#product #product-modal .modal-dialog .modal-content,
  html body#product #product-modal .modal-dialog .modal-content .modal-body {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
  }

  html body#product #product-modal .modal-dialog .modal-content .modal-body {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 106px !important;
    align-items: start !important;
    gap: 18px !important;
    padding: 16px !important;
  }

  html body#product #product-modal .modal-body figure {
    width: 100% !important;
    max-width: 850px !important;
    height: auto !important;
    min-width: 0 !important;
    margin: 0 auto !important;
  }

  html body#product #product-modal .modal-body figure .product-cover-modal {
    display: block !important;
    width: 100% !important;
    max-width: 800px !important;
    height: auto !important;
    max-height: calc(100vh - 190px) !important;
    margin: 0 auto !important;
    object-fit: contain !important;
  }

  html body#product #product-modal .modal-body aside#thumbnails,
  html body#product #product-modal .modal-body aside#thumbnails .js-modal-mask {
    width: 106px !important;
    min-width: 106px !important;
    max-width: 106px !important;
    height: auto !important;
    max-height: calc(100vh - 80px) !important;
    margin: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  html body#product #product-modal .modal-body aside#thumbnails .js-modal-mask ul.product-images.js-modal-product-images {
    display: flex !important;
    flex-flow: column nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    width: 106px !important;
    min-width: 106px !important;
    max-width: 106px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  html body#product #product-modal .modal-body aside#thumbnails .js-modal-mask ul.product-images.js-modal-product-images > li.thumb-container {
    display: block !important;
    flex: 0 0 92px !important;
    width: 92px !important;
    min-width: 92px !important;
    max-width: 92px !important;
    height: 92px !important;
    min-height: 92px !important;
    max-height: 92px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  html body#product #product-modal .modal-body aside#thumbnails .js-modal-mask ul.product-images.js-modal-product-images > li.thumb-container img.thumb.js-modal-thumb {
    display: block !important;
    width: 92px !important;
    min-width: 92px !important;
    max-width: 92px !important;
    height: 92px !important;
    min-height: 92px !important;
    max-height: 92px !important;
    margin: 0 !important;
    border: 3px solid #d2aa70 !important;
    border-radius: 9px !important;
    box-sizing: border-box !important;
    object-fit: cover !important;
  }
}

@media (max-width: 767.98px) {
  html body#product #product-modal .modal-dialog {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
  }

  html body#product #product-modal .modal-body aside#thumbnails .js-modal-mask ul.product-images.js-modal-product-images {
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    gap: 8px !important;
    width: max-content !important;
    height: 76px !important;
  }

  html body#product #product-modal .modal-body aside#thumbnails .js-modal-mask ul.product-images.js-modal-product-images > li.thumb-container,
  html body#product #product-modal .modal-body aside#thumbnails .js-modal-mask ul.product-images.js-modal-product-images > li.thumb-container img.thumb.js-modal-thumb {
    flex: 0 0 72px !important;
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    height: 72px !important;
    min-height: 72px !important;
    max-height: 72px !important;
  }
}
