/*
 * JH Sistemas - Zoom de imágenes exclusivo para computadoras.
 * Las reglas solo se activan con pantalla amplia, ratón y puntero preciso.
 */
@media (min-width: 992px) and (hover: hover) and (pointer: fine) {
  #product-modal.jh-desktop-zoom-ready {
    padding: 0 !important;
    background: #fff;
  }

  #product-modal.jh-desktop-zoom-ready .modal-dialog {
    width: 100vw;
    max-width: none;
    height: 100vh;
    margin: 0;
  }

  #product-modal.jh-desktop-zoom-ready .modal-content {
    box-sizing: border-box;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: #fff;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  #product-modal.jh-desktop-zoom-ready .modal-body {
    position: relative;
    box-sizing: border-box;
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) 112px;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    height: 100%;
    padding: 18px;
    margin: 0 !important;
    overflow: hidden;
    background: #fff;
  }

  #product-modal.jh-desktop-zoom-ready figure {
    display: block;
    width: 100% !important;
    min-width: 0;
    height: 100%;
    min-height: 0;
    margin: 0 !important;
    overflow: hidden;
  }

  #product-modal.jh-desktop-zoom-ready figure .image-caption {
    display: none;
  }

  #product-modal .jh-desktop-zoom-stage {
    position: relative;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    cursor: zoom-in;
    background:
      linear-gradient(45deg, #f5f6f8 25%, transparent 25%),
      linear-gradient(-45deg, #f5f6f8 25%, transparent 25%),
      linear-gradient(45deg, transparent 75%, #f5f6f8 75%),
      linear-gradient(-45deg, transparent 75%, #f5f6f8 75%),
      #fff;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-size: 16px 16px;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
  }

  #product-modal .jh-desktop-zoom-stage.is-zoomed {
    cursor: grab;
  }

  #product-modal .jh-desktop-zoom-stage.is-dragging {
    cursor: grabbing;
  }

  #product-modal .jh-desktop-zoom-stage .product-cover-modal {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    margin: auto;
    user-select: none;
    -webkit-user-drag: none;
    transform-origin: center center;
    transition: transform 160ms ease;
    will-change: transform;
  }

  #product-modal.jh-desktop-zoom-ready #thumbnails {
    position: relative;
    box-sizing: border-box;
    display: flex !important;
    align-items: center;
    width: 100% !important;
    min-width: 0;
    height: 112px !important;
    padding: 8px 62px;
    margin: 0 !important;
    overflow: hidden;
    background: #f7f8fa;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
  }

  #product-modal.jh-desktop-zoom-ready #thumbnails .js-modal-mask {
    width: 100%;
    height: 94px;
    margin: 0 !important;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
  }

  #product-modal.jh-desktop-zoom-ready #thumbnails .product-images {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: flex-start;
    width: max-content;
    height: 94px;
    margin: 0;
    padding: 0;
  }

  #product-modal.jh-desktop-zoom-ready #thumbnails .thumb-container {
    display: flex;
    flex: 0 0 82px;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    margin: 6px;
  }

  #product-modal.jh-desktop-zoom-ready #thumbnails .js-modal-thumb {
    width: 78px;
    height: 78px;
    margin: 0;
    object-fit: contain;
    cursor: pointer;
    background: #fff;
    border: 2px solid transparent;
    border-radius: 4px;
  }

  #product-modal.jh-desktop-zoom-ready #thumbnails .js-modal-thumb:hover,
  #product-modal.jh-desktop-zoom-ready #thumbnails .js-modal-thumb.selected {
    border-color: #24b9d7;
  }

  #product-modal.jh-desktop-zoom-ready #thumbnails .js-modal-arrows {
    display: none !important;
  }

  #product-modal .jh-desktop-zoom-stage.is-dragging .product-cover-modal {
    transition: none;
  }

  #product-modal .jh-desktop-zoom-toolbar {
    position: absolute;
    top: 28px;
    right: 28px;
    z-index: 20;
    display: flex;
    gap: 0.4rem;
    padding: 0.4rem;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.18);
  }

  #product-modal .jh-desktop-zoom-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
    color: #333;
    cursor: pointer;
    background: #fff;
    border: 1px solid #d7d7d7;
    border-radius: 4px;
  }

  #product-modal .jh-desktop-zoom-button:hover,
  #product-modal .jh-desktop-zoom-button:focus {
    color: #fff;
    background: #24b9d7;
    border-color: #24b9d7;
    outline: none;
  }

  #product-modal .jh-desktop-zoom-level {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    padding: 0 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #555;
  }
}
