.mdvg-gallery{display:flex;flex-wrap:wrap;gap:6px;align-items:flex-start;box-sizing:border-box;width:100%;max-width:100%;margin:0 auto 25px;padding:0 15px;container-type:normal}.mdvg-frame{--w:var(--pc-w);--h:var(--pc-h);--z:var(--pc-z);--x:var(--pc-x);--y:var(--pc-y);flex:0 0 calc(var(--w)*1% - 6px);aspect-ratio:auto;min-width:0;min-height:0;position:relative;overflow:hidden;border-radius:12px;background:#f4f4f4;box-sizing:border-box}.mdvg-gallery .mdvg-frame img{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:contain!important;object-position:center!important;transform:translate(calc(var(--x)*1%),calc(var(--y)*1%)) scale(calc(var(--z)/100))!important;margin:0!important;display:block!important}.mdvg-gallery.mdvg-mobile .mdvg-frame{--w:var(--mobile-w);--h:var(--mobile-h);--z:var(--mobile-z);--x:var(--mobile-x);--y:var(--mobile-y)}@media(max-width:767px){.mdvg-gallery:not(.mdvg-pc) .mdvg-frame{--w:var(--mobile-w);--h:var(--mobile-h);--z:var(--mobile-z);--x:var(--mobile-x);--y:var(--mobile-y)}}#mdvg-editor .mdvg-frame{cursor:pointer;touch-action:none;outline:1px dashed #8baeb9}#mdvg-editor .mdvg-selected{outline:3px solid #2496b4}#mdvg-editor .mdvg-frame img{pointer-events:none}#mdvg-editor .mdvg-frame span{position:absolute;top:6px;left:6px;background:white;padding:3px 7px;border-radius:4px;pointer-events:none}#mdvg-editor .mdvg-toolbar{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}#mdvg-editor .mdvg-controls label{display:flex;align-items:center;gap:8px;margin:8px 0}#mdvg-editor .mdvg-controls input{width: min(55%,320px)}

.mdvg-gallery{height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;align-content:flex-start;flex:none!important}.mdvg-frame::before{content:"";display:block;width:100%;padding-top:calc(var(--h)*1%)}.mdvg-frame{height:auto!important;align-self:flex-start}.mdmt:has(.mdvg-gallery),.mdm-gallery-section:has(.mdvg-gallery),:is(.elementor-widget,.elementor-widget-container,.elementor-shortcode,.e-con,.e-con-inner,.elementor-section,.elementor-column,.elementor-widget-wrap):has(.mdvg-gallery){height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;--overflow:visible;--height:auto;--min-height:0px;flex-shrink:0!important;min-width:0!important;max-width:100%!important}.mdvg-gallery .mdvg-frame img{aspect-ratio:auto!important}.mdvg-gallery.mdvg-pc .mdvg-frame{--w:var(--pc-w);--h:var(--pc-h);--z:var(--pc-z);--x:var(--pc-x);--y:var(--pc-y)}
#mdvg-editor .mdvg-controls input[type=number]{width:80px}


/* 1.9.11: en móvil, la galería sale del ancho restringido del contenedor Elementor
   y ocupa el ancho de pantalla dejando 20px de margen por lado. */
@media (max-width: 767px) {
  .mdvg-gallery {
    position: relative !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: calc(100vw - 40px) !important;
    max-width: calc(100vw - 40px) !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .mdmt:has(.mdvg-gallery),
  .mdm-gallery-section:has(.mdvg-gallery),
  :is(.elementor-widget, .elementor-widget-container, .elementor-shortcode, .e-con, .e-con-inner, .elementor-section, .elementor-column, .elementor-widget-wrap):has(.mdvg-gallery) {
    min-width: 0 !important;
    max-width: none !important;
    overflow: visible !important;
  }
  html, body { overflow-x: clip !important; }
}
