/** Shopify CDN: Minification failed

Line 6822:10 Expected ":"
Line 6852:12 Expected ":"
Line 7030:12 Expected ":"
Line 8246:12 Expected ":"

**/
/* 23DTF REV55 VALIDADO:
   - Fuentes @font-face en CSS: 114
   - Fuentes en shopify-fonts-assets.zip: 114
   - Todas las rutas url(...) del CSS coinciden con el ZIP revisado.
*/
/* 23DTF REV55 local font-face declarations. Upload every listed font file to Shopify assets. */
@font-face {
  font-family: "23DTF Arial Black";
  src: url("23dtf-font-arial-black.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Arial";
  src: url("23dtf-font-arial.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Arial Bold";
  src: url("23dtf-font-arial-bold.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Arial Narrow";
  src: url("23dtf-font-arial-narrow.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Impact";
  src: url("23dtf-font-impact.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Georgia";
  src: url("23dtf-font-georgia.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Georgia Bold";
  src: url("23dtf-font-georgia-bold.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Trebuchet MS";
  src: url("23dtf-font-trebuchet-ms.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Trebuchet MS Bold";
  src: url("23dtf-font-trebuchet-ms-bold.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Verdana";
  src: url("23dtf-font-verdana.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Verdana Bold";
  src: url("23dtf-font-verdana-bold.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Century Gothic";
  src: url("23dtf-font-century-gothic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Century Gothic Bold";
  src: url("23dtf-font-century-gothic-bold.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Franklin Gothic Medium";
  src: url("23dtf-font-franklin-gothic-medium.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Garamond";
  src: url("23dtf-font-garamond.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Garamond Bold";
  src: url("23dtf-font-garamond-bold.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Book Antiqua";
  src: url("23dtf-font-book-antiqua.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Bookman Old Style";
  src: url("23dtf-font-bookman-old-style.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Palatino Linotype";
  src: url("23dtf-font-palatino-linotype.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Comic Sans MS";
  src: url("23dtf-font-comic-sans-ms.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Comic Sans MS Bold";
  src: url("23dtf-font-comic-sans-ms-bold.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Segoe Print";
  src: url("23dtf-font-segoe-print.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Segoe Print Bold";
  src: url("23dtf-font-segoe-print-bold.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Segoe Script";
  src: url("23dtf-font-segoe-script.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Segoe Script Bold";
  src: url("23dtf-font-segoe-script-bold.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Ink Free";
  src: url("23dtf-font-ink-free.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF MV Boli";
  src: url("23dtf-font-mv-boli.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Monotype Corsiva";
  src: url("23dtf-font-monotype-corsiva.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Gabriola";
  src: url("23dtf-font-gabriola.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Bahnschrift";
  src: url("23dtf-font-bahnschrift.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Calibri";
  src: url("23dtf-font-calibri.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Candara";
  src: url("23dtf-font-candara.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Consolas";
  src: url("23dtf-font-consolas.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Constantia";
  src: url("23dtf-font-constantia.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Corbel";
  src: url("23dtf-font-corbel.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Courier New";
  src: url("23dtf-font-courier-new.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Times New Roman";
  src: url("23dtf-font-times-new-roman.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Tahoma";
  src: url("23dtf-font-tahoma.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Arial Bold Italic";
  src: url("23dtf-font-arial-bold-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Arial Italic";
  src: url("23dtf-font-arial-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Arial Narrow Bold";
  src: url("23dtf-font-arial-narrow-bold.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Arial Narrow Bold Italic";
  src: url("23dtf-font-arial-narrow-bold-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Arial Narrow Italic";
  src: url("23dtf-font-arial-narrow-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Book Antiqua Bold";
  src: url("23dtf-font-book-antiqua-bold.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Book Antiqua Bold Italic";
  src: url("23dtf-font-book-antiqua-bold-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Book Antiqua Italic";
  src: url("23dtf-font-book-antiqua-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Bookman Old Style Bold";
  src: url("23dtf-font-bookman-old-style-bold.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Bookman Old Style Bold Italic";
  src: url("23dtf-font-bookman-old-style-bold-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Bookman Old Style Italic";
  src: url("23dtf-font-bookman-old-style-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Calibri Bold";
  src: url("23dtf-font-calibri-bold.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Calibri Bold Italic";
  src: url("23dtf-font-calibri-bold-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Calibri Italic";
  src: url("23dtf-font-calibri-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Calibri Light";
  src: url("23dtf-font-calibri-light.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Calibri Light Italic";
  src: url("23dtf-font-calibri-light-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Cambria Bold";
  src: url("23dtf-font-cambria-bold.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Cambria Bold Italic";
  src: url("23dtf-font-cambria-bold-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Cambria Italic";
  src: url("23dtf-font-cambria-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Candara Bold";
  src: url("23dtf-font-candara-bold.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Candara Bold Italic";
  src: url("23dtf-font-candara-bold-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Candara Italic";
  src: url("23dtf-font-candara-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Candara Light";
  src: url("23dtf-font-candara-light.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Candara Light Italic";
  src: url("23dtf-font-candara-light-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Century";
  src: url("23dtf-font-century.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Century Gothic Bold Italic";
  src: url("23dtf-font-century-gothic-bold-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Century Gothic Italic";
  src: url("23dtf-font-century-gothic-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Comic Sans MS Bold Italic";
  src: url("23dtf-font-comic-sans-ms-bold-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Comic Sans MS Italic";
  src: url("23dtf-font-comic-sans-ms-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Consolas Bold";
  src: url("23dtf-font-consolas-bold.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Consolas Bold Italic";
  src: url("23dtf-font-consolas-bold-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Consolas Italic";
  src: url("23dtf-font-consolas-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Constantia Bold";
  src: url("23dtf-font-constantia-bold.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Constantia Bold Italic";
  src: url("23dtf-font-constantia-bold-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Constantia Italic";
  src: url("23dtf-font-constantia-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Corbel Bold";
  src: url("23dtf-font-corbel-bold.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Corbel Bold Italic";
  src: url("23dtf-font-corbel-bold-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Corbel Italic";
  src: url("23dtf-font-corbel-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Corbel Light";
  src: url("23dtf-font-corbel-light.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Corbel Light Italic";
  src: url("23dtf-font-corbel-light-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Courier New Bold";
  src: url("23dtf-font-courier-new-bold.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Courier New Bold Italic";
  src: url("23dtf-font-courier-new-bold-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Courier New Italic";
  src: url("23dtf-font-courier-new-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Franklin Gothic Medium Italic";
  src: url("23dtf-font-franklin-gothic-medium-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Garamond Italic";
  src: url("23dtf-font-garamond-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Georgia Bold Italic";
  src: url("23dtf-font-georgia-bold-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Georgia Italic";
  src: url("23dtf-font-georgia-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Haettenschweiler";
  src: url("23dtf-font-haettenschweiler.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Lucida Console";
  src: url("23dtf-font-lucida-console.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Lucida Sans Unicode";
  src: url("23dtf-font-lucida-sans-unicode.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF MS Reference Sans Serif";
  src: url("23dtf-font-ms-reference-sans-serif.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Microsoft Sans Serif";
  src: url("23dtf-font-microsoft-sans-serif.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Palatino Linotype Bold";
  src: url("23dtf-font-palatino-linotype-bold.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Palatino Linotype Bold Italic";
  src: url("23dtf-font-palatino-linotype-bold-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Palatino Linotype Italic";
  src: url("23dtf-font-palatino-linotype-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Segoe UI Black";
  src: url("23dtf-font-segoe-ui-black.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Segoe UI Black Italic";
  src: url("23dtf-font-segoe-ui-black-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Segoe UI Bold";
  src: url("23dtf-font-segoe-ui-bold.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Segoe UI Bold Italic";
  src: url("23dtf-font-segoe-ui-bold-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Segoe UI Italic";
  src: url("23dtf-font-segoe-ui-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Segoe UI Light";
  src: url("23dtf-font-segoe-ui-light.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Segoe UI Light Italic";
  src: url("23dtf-font-segoe-ui-light-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Segoe UI";
  src: url("23dtf-font-segoe-ui.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Segoe UI Semibold";
  src: url("23dtf-font-segoe-ui-semibold.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Segoe UI Semibold Italic";
  src: url("23dtf-font-segoe-ui-semibold-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Segoe UI Semilight";
  src: url("23dtf-font-segoe-ui-semilight.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Segoe UI Semilight Italic";
  src: url("23dtf-font-segoe-ui-semilight-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Sylfaen";
  src: url("23dtf-font-sylfaen.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Tahoma Negreta";
  src: url("23dtf-font-tahoma-negreta.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Times New Roman Bold";
  src: url("23dtf-font-times-new-roman-bold.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Times New Roman Bold Italic";
  src: url("23dtf-font-times-new-roman-bold-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Times New Roman Italic";
  src: url("23dtf-font-times-new-roman-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Trebuchet MS Bold Italic";
  src: url("23dtf-font-trebuchet-ms-bold-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Trebuchet MS Italic";
  src: url("23dtf-font-trebuchet-ms-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Verdana Bold Italic";
  src: url("23dtf-font-verdana-bold-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "23DTF Verdana Italic";
  src: url("23dtf-font-verdana-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* 23DTF personalizer modal v3.6 Printful visual */
.p23m{--p23m-blue:#0d6aa8;--p23m-soft:#d9edf9;--p23m-red:#ed0000;--p23m-line:#e3e3e3;--p23m-text:#202223;--p23m-muted:#6d7175;--p23m-aqua:#36dce4;font-family:var(--font-body-family,Arial,sans-serif);color:var(--p23m-text);height:100%}
.p23m *{box-sizing:border-box}.p23m button{font-family:inherit;cursor:pointer}.p23m button:disabled{cursor:not-allowed;opacity:.55}
.p23m__layout{display:flex;min-height:650px;height:min(76vh,820px);border-top:1px solid var(--p23m-line);background:#f6f6f7;overflow:hidden}
.p23m__rail{width:72px;flex:0 0 72px;background:#fff;border-right:1px solid var(--p23m-line);padding:14px 0;display:flex;flex-direction:column;align-items:center;gap:6px}
.p23m__rail button{width:100%;border:0;background:transparent;padding:4px;display:flex;flex-direction:column;align-items:center;gap:3px;color:#333}
.p23m__rail span{height:40px;width:40px;display:flex;align-items:center;justify-content:center;border-radius:8px;font-size:18px}.p23m__rail small{font-size:11px;line-height:14px}.p23m__rail .is-active span{background:#4a4a4a;color:#fff}.p23m__rail .is-active small{font-weight:700;color:#202223}
.p23m__panel{width:410px;flex:0 0 410px;background:#fff;border-right:1px solid var(--p23m-line);overflow:auto;padding:18px 20px 120px}
.p23m__panel h3{font-size:15px;line-height:1.35;margin:0 0 8px}.p23m__panel h4{font-size:13px;margin:0 0 12px}.p23m__link,.p23m__back{border:0;background:transparent;color:#2c6ecb;font-size:13px;font-weight:600;padding:0}.p23m__back{margin-bottom:18px}
.p23m__block{border-top:1px solid #eee;margin-top:18px;padding-top:18px}.p23m__choice-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.p23m__choice-row button{height:44px;border:1px solid #d6d9dc;border-radius:4px;background:#fff;font-weight:700}.p23m__choice-row .is-selected{border:2px solid #202223}
.p23m__radio{height:54px;border:1px solid #d6d9dc;border-radius:6px;display:flex;align-items:center;gap:12px;padding:0 12px;margin-bottom:10px;font-weight:700}.p23m__radio.is-selected{border-color:#b8d7fb}.p23m__radio span{margin-left:auto}.p23m__radio b{background:var(--p23m-red);color:white;border-radius:999px;padding:1px 6px;font-size:10px}
.p23m__colors,.p23m__sizes{display:flex;flex-wrap:wrap;gap:8px}.p23m__colors button{width:28px;height:28px;border-radius:5px;border:1px solid #d1d5db}.p23m__colors .is-selected{outline:2px solid #111;outline-offset:2px}.p23m__check{display:block;font-size:13px;margin-bottom:10px}.p23m__sizes label{font-size:13px;display:flex;gap:5px;align-items:center}
.p23m__upload-card{border:1px solid #eee;background:#fafafa;border-radius:8px;padding:12px;display:flex;align-items:center;gap:12px;font-size:12px}.p23m__thumb{width:48px;height:48px;border-radius:6px;background:#e5e7eb;overflow:hidden;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:800;flex:0 0 48px}.p23m__thumb img{width:100%;height:100%;object-fit:cover}.p23m__upload-copy{min-width:0;flex:1}.p23m__upload-copy p{margin:3px 0;color:#555}.p23m__upload-copy b{color:#d97706}.p23m__small{border:0;border-radius:999px;background:#eee;padding:6px 10px;font-weight:800}.p23m__hint{margin-top:14px;border:1px dashed #cbd5e1;background:#f8fafc;border-radius:8px;padding:12px;font-size:13px;color:#53606d;line-height:1.45}.p23m__hint[hidden]{display:none!important}
.p23m__text-editor{margin-bottom:16px}.p23m__text-editor label{display:block;font-size:13px;font-weight:700;margin-bottom:8px}.p23m__text-editor textarea{width:100%;border:1px solid #d6d9dc;border-radius:8px;padding:12px;font-size:15px;resize:vertical;outline:none}.p23m__text-editor textarea:focus{border-color:var(--p23m-blue)}
.p23m__templates{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.p23m__templates button{min-height:92px;border:1px solid #eee;background:white;border-radius:8px;font-weight:900;line-height:1.05;white-space:normal;text-align:center}.p23m__templates .script{font-family:Georgia,serif;font-style:italic;color:#2f6d50}.p23m__templates .red{color:#ef4444}.p23m__templates .blue{color:#2f94d0}
.p23m__layers-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}.p23m__layers-head small{color:#6d7175;text-align:right}
.p23m__layers{display:grid;gap:10px}.p23m__layer{display:block;width:100%;border:1px solid #e5e7eb;background:#fafafa;border-radius:8px;padding:12px;text-align:left}.p23m__layer.is-active{border-color:var(--p23m-blue);background:#eff6ff}.p23m__layer span{font-size:12px;color:#6d7175}.p23m__layer-row{display:flex;align-items:center;gap:10px}.p23m__layer-preview{height:42px;width:42px;border-radius:6px;background:#e5e7eb;display:flex;align-items:center;justify-content:center;overflow:hidden;font-weight:900}.p23m__layer-preview img{width:100%;height:100%;object-fit:cover}.p23m__layer-actions{margin-left:auto;display:flex;gap:6px}.p23m__layer-actions button{height:28px;width:28px;border-radius:6px;border:1px solid #d6d9dc;background:#fff}
.p23m__dynamic-controls{margin-top:18px;border-top:1px solid #eee;padding-top:18px}.p23m__control-title{font-size:13px;font-weight:800;margin:0 0 12px}.p23m__control-row{margin-bottom:16px}.p23m__control-row label{display:block;font-size:13px;font-weight:700;margin-bottom:8px}.p23m__control-row input[type="range"]{width:100%}.p23m__control-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.p23m__field{border:1px solid #d6d9dc;border-radius:6px;background:#fff;display:flex;overflow:hidden}.p23m__field button{width:34px;border:0;background:#fff;font-weight:900}.p23m__field input{min-width:0;flex:1;border:0;text-align:center;padding:8px}.p23m__swatches{display:grid;grid-template-columns:repeat(8,22px);gap:6px}.p23m__swatches button{height:22px;width:22px;border:1px solid #d1d5db;border-radius:4px}.p23m__swatches button.is-selected{outline:2px solid #4b5563;outline-offset:1px}.p23m__align-buttons{display:flex;flex-wrap:wrap;gap:8px}.p23m__align-buttons button{height:34px;width:34px;border:1px solid #202223;border-radius:4px;background:#fff;font-weight:900}
.p23m__workspace{min-width:0;flex:1;display:flex;flex-direction:column;background:#f6f6f7}.p23m__placements{display:flex;gap:4px;align-items:center;flex-wrap:wrap;padding:12px 18px 7px}.p23m__placements button{border:0;background:transparent;border-radius:999px;padding:8px 12px;font-size:13px;font-weight:800}.p23m__placements button:not(:disabled):hover{background:#fff}.p23m__placements .is-active{background:#d9edf9;color:#0d6aa8}.p23m__placements small{font-size:11px;margin-left:2px;color:inherit;opacity:.8}
.p23m__toolbar{display:flex;align-items:center;gap:4px;background:#fff;border-radius:6px;margin:0 18px 12px;padding:8px 10px;box-shadow:0 0 0 1px #ececec}.p23m__toolbar button{border:0;background:transparent;border-radius:4px;padding:8px 10px;font-size:13px;font-weight:700}.p23m__toolbar .is-active{background:#d9edf9;color:#0d6aa8}.p23m__toolbar .is-disabled{opacity:.5;cursor:not-allowed}
.p23m__canvas{position:relative;margin:0 18px 18px;min-height:0;flex:1;background:#fff;border-radius:6px;border:1px solid #e3e3e3;overflow:hidden}.p23m__canvas.is-grid{background-image:linear-gradient(#e2e8f0 1px,transparent 1px),linear-gradient(90deg,#e2e8f0 1px,transparent 1px);background-size:28px 28px}
.p23m__zone-float{position:absolute;left:50%;top:18px;transform:translateX(-50%);z-index:30;text-align:center}.p23m__zone-float>button{border:0;background:#fff;border-radius:999px;padding:8px 16px;font-size:13px;font-weight:800;box-shadow:0 1px 6px rgba(0,0,0,.08)}.p23m__zone-menu{position:absolute;left:50%;top:44px;transform:translateX(-50%);width:250px;border:1px solid #e5e7eb;background:#fff;border-radius:8px;padding:8px;box-shadow:0 12px 34px rgba(0,0,0,.15)}.p23m__zone-menu button{display:block;width:100%;border:0;background:#fff;border-radius:6px;padding:9px;text-align:left}.p23m__zone-menu .is-active{background:#eff6ff;color:#0d6aa8}
.p23m__canvas-tools{position:absolute;right:14px;top:14px;z-index:20;display:flex;flex-direction:column;border:1px solid #e3e3e3;border-radius:6px;overflow:hidden;background:#fff}.p23m__canvas-tools button{height:40px;width:40px;border:0;border-bottom:1px solid #ececec;background:#fff}.p23m__canvas-tools button:last-child{border-bottom:0}.p23m__canvas-tools .is-active{background:#d9edf9}
.p23m__stage{height:100%;display:flex;align-items:center;justify-content:center;padding:58px 24px 80px}.p23m__mockup{position:relative;width:380px;height:460px;transform-origin:center center;transition:transform .12s ease}.p23m__product-image-wrap,.p23m__product-image,.p23m__hoodie{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}.p23m__product-image{display:block}.p23m__product-image.is-empty{display:none}.p23m__hoodie.is-hidden{display:none}
.p23m__safe{position:absolute;border:1px dashed rgba(13,106,168,.34);background:rgba(13,106,168,.035);pointer-events:none}.p23m__safe.is-warning{border-color:#ef4444;background:rgba(239,68,68,.07)}
.p23m__layer-stage{position:absolute;inset:0}.p23m__layer-item{position:absolute;touch-action:none;cursor:move;transform-origin:center center}.p23m__layer-item.is-active{z-index:10}.p23m__layer-text{width:100%;height:100%;display:flex;align-items:center;justify-content:center;text-align:center;line-height:.9;font-size:42px;font-weight:900;white-space:pre-wrap;user-select:none}.p23m__layer-item img{width:100%;height:100%;object-fit:contain;display:block;user-select:none;pointer-events:none}
.p23m__selection{display:none;position:absolute;inset:0;border:1px dashed #19c8d2;pointer-events:none}.p23m__layer-item.is-active .p23m__selection{display:block}.p23m__handle{position:absolute;height:10px;width:10px;border-radius:999px;background:#36dce4;border:1px solid #18aeb7;pointer-events:auto}.p23m__handle.nw{left:-5px;top:-5px;cursor:nwse-resize}.p23m__handle.ne{right:-5px;top:-5px;cursor:nesw-resize}.p23m__handle.sw{left:-5px;bottom:-5px;cursor:nesw-resize}.p23m__handle.se{right:-5px;bottom:-5px;cursor:nwse-resize}.p23m__handle.n{left:50%;top:-15px;transform:translateX(-50%);cursor:grab}.p23m__delete{position:absolute;right:-14px;top:-14px;height:22px;width:22px;border:0;border-radius:999px;background:#ff3b30;color:#fff;font-weight:900;pointer-events:auto;line-height:1}
.p23m__zoom{position:absolute;left:50%;bottom:16px;z-index:20;transform:translateX(-50%);display:flex;align-items:center;gap:12px;width:min(430px,70%);background:#fff;border:1px solid #e3e3e3;border-radius:999px;padding:10px 16px;box-shadow:0 1px 8px rgba(0,0,0,.06)}.p23m__zoom span,.p23m__zoom strong{font-size:12px}.p23m__zoom input{flex:1}
.p23m__crop-actions{position:absolute;top:86px;left:50%;transform:translateX(-50%);z-index:40;display:flex;gap:8px}.p23m__crop-actions button{border:0;border-radius:6px;padding:10px 18px;font-weight:800}.p23m__crop-cancel{background:#e5e7eb}.p23m__crop-apply{background:#ff3b30;color:#fff}
@media (max-width:900px){.p23m__layout{height:auto;min-height:700px}.p23m__panel{width:320px;flex-basis:320px}.p23m__rail{width:58px;flex-basis:58px}.p23m__toolbar,.p23m__placements{overflow:auto;flex-wrap:nowrap}.p23m__mockup{width:320px;height:390px}.p23m__zoom{width:80%}}


/* v3: modo Printful dentro del popup */
.mpv2c-modal.is-p23m-with-active .mpv2c-modal__footer{display:none!important}
.mpv2c-modal.is-p23m-with-active .mpv2c-modal__content{padding-bottom:0!important}
.p23m__layout{height:min(68vh,720px);min-height:600px;border-top:1px solid var(--p23m-line)}
.p23m__panel{padding-bottom:42px}.p23m__workspace{padding-bottom:0}.p23m__canvas{margin-bottom:0;border-bottom-left-radius:0;border-bottom-right-radius:0}
.p23m__section-head{display:flex;align-items:center;justify-content:space-between;margin:28px 0 14px;font-size:13px}.p23m__section-head button{border:0;background:transparent;color:#2c6ecb;font-size:13px;font-weight:600}.p23m__templates--top{margin-top:2px}.p23m__templates button small{font-size:10px;font-weight:700}.p23m__num{font-size:34px;line-height:1;font-weight:1000}.p23m__num--outline{color:#fff;text-shadow:-1px -1px 0 #111,1px -1px 0 #111,-1px 1px 0 #111,1px 1px 0 #111}.p23m__num--gray{color:#444}.p23m__num--yellow{color:#d7c90e;text-shadow:-1px -1px 0 #777,1px -1px 0 #777,-1px 1px 0 #777,1px 1px 0 #777}.p23m__num--orange{color:#f97316;text-shadow:-1px -1px 0 #111,1px -1px 0 #111,-1px 1px 0 #111,1px 1px 0 #111}
.p23m__footer{position:relative;display:flex;align-items:center;justify-content:flex-end;gap:18px;border-top:1px solid #e3e3e3;background:#fff;padding:12px 22px;min-height:66px}.p23m__footer-spacer{flex:1}.p23m__price-wrap{position:relative;display:flex;align-items:center;gap:7px}.p23m__price-label{display:block;color:#8c9196;font-size:11px;text-align:right}.p23m__price-wrap strong{font-size:16px;color:#202223}.p23m__price-info{width:18px;height:18px;border-radius:999px;border:1px solid #cfd4d8;background:#fff;color:#6d7175;font-weight:800;font-size:11px;line-height:1}.p23m__save-template{border:0;border-radius:6px;background:#ff3b30;color:#fff;font-size:14px;font-weight:800;padding:12px 20px}.p23m__save-template:hover{background:#ec2d22}.p23m__price-popover{position:absolute;right:0;bottom:44px;width:360px;border:1px solid #d2d5d9;border-radius:8px;background:#fff;box-shadow:0 14px 40px rgba(0,0,0,.14);padding:20px;z-index:80}.p23m__price-popover:after{content:'';position:absolute;right:24px;bottom:-8px;width:16px;height:16px;background:#fff;border-right:1px solid #d2d5d9;border-bottom:1px solid #d2d5d9;transform:rotate(45deg)}.p23m__price-popover h3{font-size:15px;margin:0 0 18px}.p23m__price-line{display:flex;justify-content:space-between;gap:20px;margin:12px 0;font-size:14px}.p23m__price-total{display:flex;justify-content:space-between;gap:20px;border-top:1px solid #e5e7eb;margin-top:18px;padding-top:18px;font-size:16px}.p23m__price-popover p{background:#f6f6f7;border-radius:8px;padding:14px;margin:16px 0 12px;font-size:13px;color:#4b5563;line-height:1.45}.p23m__price-popover small{color:#dc2626;font-size:12px}.p23m__product-image.is-empty{display:none}.p23m__product-image-wrap{display:flex;align-items:center;justify-content:center}.p23m__product-image:not(.is-empty){position:relative;inset:auto;max-width:100%;max-height:100%;width:100%;height:100%;object-fit:contain;color:transparent;font-size:0}.p23m__hoodie.is-hidden{display:none!important}
.p23m__control-patterns{margin-top:24px}.p23m__pattern-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:12px}.p23m__pattern-grid button{height:104px;border:1px solid #e5e7eb;border-radius:6px;background-size:cover;background-position:center}.p23m__pattern-0{background:radial-gradient(circle at 20% 30%,#facc15 0 5px,transparent 6px),radial-gradient(circle at 70% 45%,#f472b6 0 5px,transparent 6px),#3f2a56}.p23m__pattern-1{background:radial-gradient(circle,#4b8b68 0 4px,transparent 5px),#d7efe4;background-size:24px 24px}.p23m__pattern-2{background:linear-gradient(35deg,transparent 0 45%,#f59e0b 46% 55%,transparent 56%),#f8f4ee}.p23m__pattern-3{background:repeating-linear-gradient(120deg,#111 0 6px,#efe7d6 6px 16px)}.p23m__pattern-4{background:repeating-linear-gradient(135deg,#fecaca 0 10px,#fff7ed 10px 20px)}.p23m__pattern-5{background:linear-gradient(30deg,#eab308 12%,transparent 12.5%,transparent 87%,#eab308 87.5%),#fcd34d;background-size:32px 32px}
@media (max-width:900px){.p23m__layout{height:auto;min-height:620px}.p23m__footer{flex-wrap:wrap}.p23m__price-popover{right:-90px;width:320px}.p23m__save-template{width:100%}}


/* v3.4 uploads reales sin demo */
.p23m__upload-empty{border:1px dashed #cbd5e1;background:#f8fafc;border-radius:10px;padding:22px;text-align:center;margin:12px 0 16px}.p23m__upload-empty[hidden]{display:none!important}.p23m__upload-empty-icon{width:42px;height:42px;border-radius:50%;background:#111827;color:#fff;display:inline-flex;align-items:center;justify-content:center;font-weight:900;font-size:20px;margin-bottom:10px}.p23m__upload-empty h3{font-size:16px;margin:0 0 8px}.p23m__upload-empty p{font-size:13px;color:#53606d;line-height:1.45;margin:0 auto 14px;max-width:290px}.p23m__upload-main,.p23m__upload-secondary,.p23m__apply-upload{border:0;border-radius:999px;background:#e10600;color:#fff;font-weight:800;cursor:pointer}.p23m__upload-main{padding:11px 18px;font-size:13px}.p23m__upload-secondary{padding:8px 12px;font-size:12px}.p23m__uploads-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:10px 0 12px}.p23m__uploads-top strong{display:block;font-size:13px}.p23m__uploads-top small{display:block;color:#6d7175;font-size:12px;margin-top:2px}.p23m__upload-list{display:grid;gap:10px}.p23m__upload-file{display:flex;align-items:center;gap:10px;border:1px solid #e5e7eb;background:#fff;border-radius:10px;padding:10px}.p23m__upload-file-thumb{width:52px;height:52px;flex:0 0 52px;border:0;border-radius:7px;background:#f3f4f6;overflow:hidden;padding:0;cursor:pointer}.p23m__upload-file-thumb img{width:100%;height:100%;object-fit:cover;display:block}.p23m__upload-file-copy{min-width:0;flex:1}.p23m__upload-file-copy strong{display:block;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.p23m__upload-file-copy span,.p23m__upload-file-copy small{display:block;color:#6d7175;font-size:12px;margin-top:2px}.p23m__apply-upload{padding:7px 11px;font-size:12px;flex:0 0 auto}.p23m__layer-item img[src=""]{display:none}.p23m__dynamic-controls:empty{display:none}

/* v3.5 selección independiente en Con personalización */
.p23m__personalizer-table-wrap{margin-top:14px;overflow:auto;border:1px solid #e5e7eb;border-radius:12px;background:#fff;cursor:grab;user-select:none;max-height:290px;overscroll-behavior:contain}.p23m__personalizer-table-wrap.is-dragging{cursor:grabbing}.p23m__personalizer-table-wrap input{user-select:auto}.p23m__personalizer-table{width:100%;border-collapse:collapse;min-width:430px}.p23m__personalizer-table th,.p23m__personalizer-table td{border-bottom:1px solid #edf0f2;padding:9px 8px;text-align:center;font-size:12px}.p23m__personalizer-table thead th{position:sticky;top:0;z-index:2;background:#fafafa;color:#202223;font-weight:800}.p23m__personalizer-table tbody tr:last-child th,.p23m__personalizer-table tbody tr:last-child td{border-bottom:0}.p23m__personalizer-table th:first-child{text-align:left;min-width:126px;position:sticky;left:0;z-index:3;background:#fff}.p23m__personalizer-table thead th:first-child{background:#fafafa;z-index:4}.p23m__personalizer-table tbody th{font-weight:700;display:flex;align-items:center;gap:8px}.p23m__personalizer-swatch{width:24px;height:24px;border-radius:5px;border:1px solid #d1d5db;box-shadow:inset 0 0 0 1px rgba(255,255,255,.35);flex:0 0 24px}.p23m__personalizer-table input{width:54px;height:34px;border:1px solid #d6d9dc;border-radius:7px;text-align:center;font-weight:800;background:#fff}.p23m__personalizer-table input:focus{border-color:#0d6aa8;outline:2px solid rgba(13,106,168,.12)}.p23m__personalizer-summary{margin-top:14px;border:1px solid #e5e7eb;background:#fff;border-radius:12px;padding:12px}.p23m__personalizer-summary-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.p23m__personalizer-summary-head strong{font-size:13px}.p23m__personalizer-summary-head span{border-radius:999px;background:#f3f4f6;padding:4px 9px;font-size:12px;font-weight:800;color:#4b5563}.p23m__personalizer-groups{display:grid;gap:8px}.p23m__personalizer-group{border:1px solid #edf0f2;border-radius:10px;background:#fafafa;padding:9px}.p23m__personalizer-group-color{display:flex;align-items:center;gap:8px}.p23m__personalizer-group-color strong{font-size:13px}.p23m__personalizer-group-color em{margin-left:auto;font-style:normal;font-size:12px;font-weight:800;color:#4b5563}.p23m__personalizer-group-sizes{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.p23m__personalizer-group-sizes span{font-size:12px;color:#4b5563}.p23m__personalizer-group-sizes span:not(:last-child)::after{content:"·";margin-left:6px;color:#9ca3af}.p23m__personalizer-group-sizes b{color:#202223}.p23m__continue-design{display:block;width:100%;margin-top:14px;border:0;border-radius:999px;background:#e10600;color:#fff;font-weight:900;padding:12px 16px}.p23m__continue-design:disabled{background:#e5e7eb;color:#8c9196;opacity:1;cursor:not-allowed}


/* v3.7 upload button: efecto cuadrado rojo claro */
.p23m__upload-empty{
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}
.p23m__upload-empty:hover,
.p23m__upload-empty.is-dragover{
  border-color:#ffb4ad!important;
  background:#fff5f4!important;
  box-shadow:0 0 0 4px rgba(225,6,0,.06);
}
.p23m__upload-empty.is-dragover{
  transform:translateY(-1px);
}
.p23m__upload-empty-icon{
  width:48px!important;
  height:48px!important;
  border-radius:10px!important;
  background:#ffe1de!important;
  color:#e10600!important;
  border:1px solid #ffb4ad!important;
  box-shadow:0 8px 18px rgba(225,6,0,.10);
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.p23m__upload-empty:hover .p23m__upload-empty-icon,
.p23m__upload-empty.is-dragover .p23m__upload-empty-icon{
  background:#ffd2ce!important;
  transform:translateY(-1px) scale(1.03);
  box-shadow:0 10px 22px rgba(225,6,0,.16);
}
.p23m__upload-main,
.p23m__upload-secondary{
  position:relative;
  overflow:hidden;
  border-radius:8px!important;
  background:#ffe1de!important;
  color:#e10600!important;
  border:1px solid #ffb4ad!important;
  box-shadow:0 3px 10px rgba(225,6,0,.08);
  transition: background .16s ease, box-shadow .16s ease, transform .16s ease, border-color .16s ease;
}
.p23m__upload-main:hover,
.p23m__upload-secondary:hover{
  background:#ffd2ce!important;
  border-color:#ff9188!important;
  box-shadow:0 0 0 4px rgba(225,6,0,.08), 0 8px 18px rgba(225,6,0,.12);
  transform:translateY(-1px);
}
.p23m__upload-main:active,
.p23m__upload-secondary:active{
  transform:translateY(0);
  box-shadow:0 0 0 3px rgba(225,6,0,.10);
}
.p23m__upload-main::after,
.p23m__upload-secondary::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(120deg, transparent 0%, rgba(255,255,255,.55) 45%, transparent 75%);
  transform:translateX(-120%);
  transition:transform .42s ease;
}
.p23m__upload-main:hover::after,
.p23m__upload-secondary:hover::after{
  transform:translateX(120%);
}

/* v3.9 droparea sobre la prenda: estilo Printful adaptado a 23DTF */
.p23m__mockup{
  position:relative;
}

.p23m__canvas-upload{
  --p23m-drop-size: 188px;
  position:absolute;
  z-index:8;
  width:var(--p23m-drop-size);
  height:var(--p23m-drop-size);
  min-width:74px;
  min-height:74px;
  max-width:204px;
  max-height:204px;
  padding:0;
  border:0;
  background:transparent;
  color:#e10600;
  display:flex;
  align-items:center;
  justify-content:center;
  transform:translate(-50%, -50%);
  cursor:pointer;
  isolation:isolate;
}

.p23m__canvas-upload[hidden]{
  display:none!important;
}

.p23m__canvas-upload-inner{
  position:absolute;
  inset:0;
  z-index:2;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  border-radius:999px;
  background:#ffe1de;
  color:#e10600;
  box-shadow:0 0 10px rgba(171,182,186,.50), 0 12px 32px rgba(225,6,0,.10);
  border:1px solid rgba(225,6,0,.14);
  padding:18px;
  text-align:center;
  font-weight:800;
  line-height:1.18;
  transition:background .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.p23m__canvas-upload-icon{
  width:24px;
  height:24px;
  flex:0 0 auto;
}

.p23m__canvas-upload-text{
  display:block;
  max-width:132px;
  font-size:14px;
  letter-spacing:-.01em;
}

.p23m__canvas-upload-pulse{
  position:absolute;
  inset:0;
  z-index:1;
  border-radius:999px;
  background:#ffe1de;
  opacity:.66;
  box-shadow:0 0 0 0 rgba(225,6,0,.22);
  animation:p23m-droparea-pulse 1.85s ease-out infinite;
}

.p23m__canvas-upload:hover .p23m__canvas-upload-inner,
.p23m__canvas-upload.is-dragover .p23m__canvas-upload-inner{
  background:#ffd2ce;
  box-shadow:0 0 12px rgba(171,182,186,.60), 0 16px 38px rgba(225,6,0,.18);
  transform:scale(1.035);
}

.p23m__canvas-upload:active .p23m__canvas-upload-inner{
  transform:scale(.985);
}

.p23m__canvas-upload:focus-visible{
  outline:0;
}

.p23m__canvas-upload:focus-visible .p23m__canvas-upload-inner{
  outline:3px solid rgba(225,6,0,.34);
  outline-offset:4px;
}

@keyframes p23m-droparea-pulse{
  0%{
    transform:scale(1);
    opacity:.60;
    box-shadow:0 0 0 0 rgba(225,6,0,.24);
  }
  70%{
    transform:scale(1.18);
    opacity:0;
    box-shadow:0 0 0 20px rgba(225,6,0,0);
  }
  100%{
    transform:scale(1.18);
    opacity:0;
    box-shadow:0 0 0 0 rgba(225,6,0,0);
  }
}

/* En zonas pequeñas dejamos solo el icono para que no se vea apretado */
.p23m__canvas-upload[style*="74px"] .p23m__canvas-upload-text,
.p23m__canvas-upload[style*="75px"] .p23m__canvas-upload-text,
.p23m__canvas-upload[style*="76px"] .p23m__canvas-upload-text,
.p23m__canvas-upload[style*="77px"] .p23m__canvas-upload-text,
.p23m__canvas-upload[style*="78px"] .p23m__canvas-upload-text,
.p23m__canvas-upload[style*="79px"] .p23m__canvas-upload-text,
.p23m__canvas-upload[style*="80px"] .p23m__canvas-upload-text,
.p23m__canvas-upload[style*="81px"] .p23m__canvas-upload-text,
.p23m__canvas-upload[style*="82px"] .p23m__canvas-upload-text,
.p23m__canvas-upload[style*="83px"] .p23m__canvas-upload-text,
.p23m__canvas-upload[style*="84px"] .p23m__canvas-upload-text,
.p23m__canvas-upload[style*="85px"] .p23m__canvas-upload-text,
.p23m__canvas-upload[style*="86px"] .p23m__canvas-upload-text,
.p23m__canvas-upload[style*="87px"] .p23m__canvas-upload-text,
.p23m__canvas-upload[style*="88px"] .p23m__canvas-upload-text,
.p23m__canvas-upload[style*="89px"] .p23m__canvas-upload-text,
.p23m__canvas-upload[style*="90px"] .p23m__canvas-upload-text,
.p23m__canvas-upload[style*="91px"] .p23m__canvas-upload-text,
.p23m__canvas-upload[style*="92px"] .p23m__canvas-upload-text{
  display:none;
}

@media (max-width: 900px){
  .p23m__canvas-upload{
    --p23m-drop-size: min(140px, var(--p23m-drop-size));
  }
  .p23m__canvas-upload-text{
    font-size:12px;
    max-width:100px;
  }
}


/* v4.0: el droparea de la prenda ya no depende de abrir la pestaña Subidas */
.p23m__canvas-upload{
  pointer-events:auto;
}
.p23m__canvas-upload-inner{
  backdrop-filter:saturate(1.05);
}


/* v4.1: Subidas limpio + biblioteca de archivos en popup */
.p23m__upload-list[hidden],
[data-p23m-upload-count][hidden]{
  display:none!important;
}
.p23m__upload-empty-icon{
  border:0;
  cursor:pointer;
}
.p23m-filelib[hidden]{display:none!important;}
.p23m-filelib{
  position:fixed;
  inset:0;
  z-index:2147483640;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:42px;
}
.p23m-filelib__backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.42);
}
.p23m-filelib__dialog{
  position:relative;
  width:min(1180px, calc(100vw - 84px));
  max-height:min(850px, calc(100vh - 84px));
  background:#fff;
  border-radius:14px;
  box-shadow:0 24px 80px rgba(0,0,0,.32);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.p23m-filelib__header{
  height:72px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 22px;
  border-bottom:1px solid #e5e7eb;
}
.p23m-filelib__title{
  margin:0;
  font-size:25px;
  line-height:1.2;
  font-weight:800;
  color:#111827;
}
.p23m-filelib__close{
  width:42px;
  height:42px;
  border:0;
  background:transparent;
  color:#374151;
  font-size:42px;
  line-height:1;
  cursor:pointer;
}
.p23m-filelib__body{
  overflow:auto;
  padding:24px 22px 34px;
  background:#fff;
}
.p23m-filelib__top{
  display:grid;
  grid-template-columns:minmax(280px, 1fr) 320px 140px;
  gap:12px;
  align-items:center;
  margin-bottom:26px;
}
.p23m-filelib__search{
  height:52px;
  border:1px solid #d9dde3;
  border-radius:6px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 14px;
  color:#9ca3af;
}
.p23m-filelib__search input{
  border:0;
  outline:0;
  width:100%;
  font-size:16px;
}
.p23m-filelib__sort button{
  height:52px;
  width:100%;
  border:1px solid #d9dde3;
  background:#fff;
  border-radius:6px;
  padding:0 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  font-size:16px;
  cursor:pointer;
}
.p23m-filelib__upload{
  height:52px;
  border:0;
  border-radius:6px;
  background:#e10600;
  color:#fff;
  font-size:16px;
  font-weight:800;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  cursor:pointer;
}
.p23m-filelib h3{
  margin:0 0 8px;
  font-size:18px;
  font-weight:800;
  color:#111827;
}
.p23m-filelib__recent{margin-bottom:28px;}
.p23m-filelib__recent-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:34px;
  border-top:1px solid #e5e7eb;
  padding-top:14px;
}
.p23m-filelib__recent-card{
  min-height:104px;
  border:1px solid #d9dde3;
  border-radius:6px;
  background:#fff;
  display:grid;
  grid-template-columns:86px 1fr;
  align-items:center;
  gap:14px;
  overflow:hidden;
  text-align:left;
  cursor:pointer;
}
.p23m-filelib__recent-thumb{
  height:104px;
  background:
    linear-gradient(45deg,#eee 25%,transparent 25%),
    linear-gradient(-45deg,#eee 25%,transparent 25%),
    linear-gradient(45deg,transparent 75%,#eee 75%),
    linear-gradient(-45deg,transparent 75%,#eee 75%);
  background-size:18px 18px;
  background-position:0 0,0 9px,9px -9px,-9px 0;
  display:flex;
  align-items:center;
  justify-content:center;
}
.p23m-filelib__recent-thumb img{max-width:100%;max-height:100%;object-fit:contain;}
.p23m-filelib__recent-name{
  padding-right:12px;
  font-weight:800;
  font-size:15px;
  line-height:1.35;
  word-break:break-word;
}
.p23m-filelib__select-all{
  min-height:40px;
  display:flex;
  align-items:center;
  border-top:1px solid #e5e7eb;
  padding-top:12px;
  margin-bottom:14px;
  font-size:16px;
}
.p23m-filelib__grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:24px;
}
.p23m-filelib__card{
  position:relative;
  border:1px solid #d9dde3;
  border-radius:7px;
  background:#fff;
  overflow:hidden;
}
.p23m-filelib__card-check{
  position:absolute;
  z-index:3;
  top:10px;
  left:10px;
  background:#fff;
  border-radius:3px;
  padding:2px;
}
.p23m-filelib__card-thumb{
  position:relative;
  width:100%;
  height:210px;
  border:0;
  background:
    linear-gradient(45deg,#eee 25%,transparent 25%),
    linear-gradient(-45deg,#eee 25%,transparent 25%),
    linear-gradient(45deg,transparent 75%,#eee 75%),
    linear-gradient(-45deg,transparent 75%,#eee 75%);
  background-size:20px 20px;
  background-position:0 0,0 10px,10px -10px,-10px 0;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.p23m-filelib__card-thumb img{max-width:100%;max-height:100%;object-fit:contain;}
.p23m-filelib__card-overlay{
  position:absolute;
  inset:0;
  background:rgba(17,24,39,.48);
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  transition:opacity .15s ease;
}
.p23m-filelib__card-overlay span{
  background:#fff;
  color:#111827;
  border-radius:6px;
  padding:10px 26px;
  font-weight:800;
}
.p23m-filelib__card-thumb:hover .p23m-filelib__card-overlay{opacity:1;}
.p23m-filelib__card-body{
  padding:13px;
  display:flex;
  flex-direction:column;
  gap:5px;
  font-size:13px;
  line-height:1.35;
}
.p23m-filelib__card-body strong{font-size:14px;word-break:break-word;}
.p23m-filelib__card-body span{color:#6b7280;}
.p23m-filelib__empty{
  margin-top:18px;
  border:1px dashed #cbd5e1;
  border-radius:8px;
  background:#f8fafc;
  padding:24px;
  color:#64748b;
  font-size:14px;
}
@media (max-width: 980px){
  .p23m-filelib{padding:18px;}
  .p23m-filelib__dialog{width:calc(100vw - 36px);max-height:calc(100vh - 36px);}
  .p23m-filelib__top{grid-template-columns:1fr;}
  .p23m-filelib__recent-grid,
  .p23m-filelib__grid{grid-template-columns:repeat(2, minmax(0,1fr));gap:14px;}
}


/* v4.2: Subidas no muestra biblioteca lateral; abre popup y las imágenes aplicadas pasan a Capas */
.p23m__panel-view--uploads-empty{
  display:none!important;
}

.p23m__upload-list[hidden],
[data-p23m-upload-count][hidden]{
  display:none!important;
}


/* v4.3: biblioteca sin Dropbox, orden real e información relevante */
.p23m-filelib__sort{
  position:relative;
}

.p23m-filelib__sort-menu{
  position:absolute;
  z-index:5;
  left:0;
  right:0;
  top:calc(100% + 6px);
  border:1px solid #e5e7eb;
  border-radius:6px;
  background:#fff;
  box-shadow:0 12px 32px rgba(17,24,39,.14);
  padding:8px;
}

.p23m-filelib__sort-menu button{
  width:100%;
  border:0;
  background:#fff;
  border-radius:6px;
  padding:12px 10px;
  text-align:left;
  font-size:15px;
  color:#374151;
  cursor:pointer;
}

.p23m-filelib__sort-menu button:hover,
.p23m-filelib__sort-menu button.is-active{
  background:#f3f4f6;
  color:#111827;
  font-weight:800;
}

.p23m-filelib__recent-meta{
  display:flex;
  min-width:0;
  flex-direction:column;
  gap:6px;
  padding-right:12px;
}

.p23m-filelib__recent-meta small{
  color:#6b7280;
  font-size:12px;
  line-height:1.25;
}

.p23m-filelib__card-body b{
  color:#374151;
  font-weight:800;
}

@media (max-width: 980px){
  .p23m-filelib__top{
    grid-template-columns:1fr!important;
  }
}


/* v4.5: herramientas neutras, panel de capas limpio y recorte aplicado */
.p23m.is-p23m-tool-only .p23m__panel-view{display:none!important}
.p23m.is-p23m-tool-only .p23m__dynamic-controls{border-top:0;margin-top:0;padding-top:0}
.p23m__layer-measures{display:block;margin-top:3px;color:#6d7175;font-size:11px}
.p23m__dynamic-controls:empty{display:none!important}
.p23m-filelib__sort{position:relative;z-index:20}
.p23m-filelib__sort-menu{z-index:40}


/* v4.6b: transformar compacto y fluido sin tocar Liquid */
.p23m__dynamic-controls{
  overflow-x:hidden;
}

.p23m-transform{
  display:flex;
  flex-direction:column;
  gap:16px;
  max-width:100%;
}

.p23m-transform label{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin:0 0 8px;
  color:#202223;
  font-size:13px;
  font-weight:800;
}

.p23m-transform label span{
  color:#9ca3af;
  font-size:12px;
  font-weight:700;
}

.p23m-transform__range-line{
  display:grid;
  grid-template-columns:minmax(0,1fr) 82px;
  align-items:center;
  gap:10px;
  max-width:100%;
}

.p23m-transform__range-line input[type="range"]{
  min-width:0;
  width:100%;
  accent-color:#0d6aa8;
}

.p23m-transform__number{
  width:82px;
  min-width:0;
  height:36px;
  border:1px solid #d6d9dc;
  border-radius:6px;
  background:#fff;
  padding:0 8px;
  text-align:center;
  font:inherit;
}

.p23m-transform__size-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 18px minmax(0,1fr);
  align-items:end;
  gap:8px;
  max-width:100%;
}

.p23m-transform__size-item{
  min-width:0;
}

.p23m-transform__link{
  display:flex;
  align-items:center;
  justify-content:center;
  height:36px;
  color:#c4c4c4;
  font-size:16px;
  font-weight:900;
}

.p23m-transform__stepper{
  display:grid;
  grid-template-columns:28px minmax(42px,1fr) 28px;
  height:36px;
  min-width:0;
  overflow:hidden;
  border:1px solid #d6d9dc;
  border-radius:6px;
  background:#fff;
}

.p23m-transform__stepper button{
  border:0;
  background:#fff;
  color:#202223;
  font-size:18px;
  font-weight:900;
  line-height:1;
  cursor:pointer;
}

.p23m-transform__stepper button:first-child{
  border-right:1px solid #d6d9dc;
}

.p23m-transform__stepper button:last-child{
  border-left:1px solid #d6d9dc;
}

.p23m-transform__stepper input{
  width:100%;
  min-width:0;
  border:0;
  background:#fff;
  padding:0 4px;
  text-align:center;
  font:inherit;
  font-size:13px;
  outline:0;
}

.p23m-transform + .p23m__control-row{
  margin-top:18px;
}

.p23m-transform + .p23m__control-row .p23m__control-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.p23m-transform + .p23m__control-row .p23m__layer{
  min-width:0;
  padding:10px 8px;
  text-align:center;
}

@media (max-width: 900px){
  .p23m-transform__range-line{
    grid-template-columns:minmax(0,1fr) 72px;
  }

  .p23m-transform__number{
    width:72px;
  }

  .p23m-transform__size-grid{
    grid-template-columns:1fr;
  }

  .p23m-transform__link{
    display:none;
  }
}


/* ======================================================================
   23DTF v3.7 - Desktop popup ampliado
   Objetivo: aprovechar mejor el tamaño de pantalla en ordenador sin tocar móvil.
   ====================================================================== */

@media screen and (min-width: 990px) {
  .mpv2c-modal__dialog {
    width: min(96vw, 1680px) !important;
    height: min(94vh, 980px) !important;
    max-width: none !important;
    max-height: none !important;
  }

  .mpv2c-modal__header {
    padding: 20px 24px 10px !important;
  }

  .mpv2c-modal__content {
    padding: 14px 24px 18px !important;
  }

  .mpv2c-modal__product-card {
    max-width: 430px !important;
    margin-bottom: 16px !important;
  }

  .mpv2c-modal__matrix-wrap {
    max-width: min(100%, 1040px) !important;
  }

  .mpv2c-modal__table-scroll {
    max-height: clamp(360px, calc(94vh - 330px), 620px) !important;
    overflow: auto !important;
  }

  .mpv2c-modal__matrix th,
  .mpv2c-modal__matrix td {
    padding: 9px 11px !important;
  }
}

@media screen and (min-width: 1200px) {
  .mpv2c-modal.is-p23m-with-active .mpv2c-modal__dialog {
    width: min(96vw, 1720px) !important;
    height: min(94vh, 1000px) !important;
  }

  .mpv2c-modal.is-p23m-with-active .mpv2c-modal__content {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    padding: 12px 24px 0 !important;
  }

  .mpv2c-modal.is-p23m-with-active .mpv2c-modal__panel.is-active {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    flex: 1 1 auto !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    flex: 1 1 auto !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__layout {
    height: clamp(700px, calc(100vh - 220px), 850px) !important;
    min-height: 700px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__panel {
    width: 450px !important;
    flex: 0 0 450px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__rail {
    width: 76px !important;
    flex: 0 0 76px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__placements {
    padding: 12px 22px 8px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__toolbar {
    margin: 0 22px 12px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__canvas {
    margin: 0 22px 0 !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__stage {
    padding: 64px 30px 86px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__mockup {
    width: min(43vw, 520px) !important;
    height: min(62vh, 630px) !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-matrix-wrap {
    max-height: clamp(400px, calc(100vh - 390px), 570px) !important;
  }
}

@media screen and (min-width: 1500px) {
  .mpv2c-modal__dialog {
    width: min(96vw, 1760px) !important;
    height: min(94vh, 1040px) !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__layout {
    height: clamp(740px, calc(100vh - 220px), 900px) !important;
    min-height: 740px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__panel {
    width: 480px !important;
    flex-basis: 480px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__mockup {
    width: min(42vw, 560px) !important;
    height: min(64vh, 680px) !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-matrix-wrap {
    max-height: clamp(430px, calc(100vh - 390px), 620px) !important;
  }
}

@media screen and (max-width: 989px) {
  /* En tablet/móvil mantenemos el comportamiento anterior. */
}


/* ======================================================================
   23DTF v3.9 - Tabla Sin personalización más grande
   Aumenta anchura, altura, celdas, swatches e inputs de la tabla normal.
   Solo afecta al panel data-panel="without".
   ====================================================================== */

@media screen and (min-width: 990px) {
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-wrap {
    width: 100% !important;
    max-width: min(100%, 1280px) !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll {
    max-height: clamp(480px, calc(94vh - 280px), 760px) !important;
    overflow: auto !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix th,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix td {
    padding: 14px 13px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th:first-child,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody td:first-child,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__color-cell {
    width: 118px !important;
    min-width: 118px !important;
    max-width: 118px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__color-cell {
    gap: 10px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__color-swatch {
    width: 32px !important;
    height: 32px !important;
    flex-basis: 32px !important;
    border-radius: 9px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__color-label {
    font-size: 14px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix td:not(:first-child) {
    min-width: 86px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty {
    width: 70px !important;
    height: 42px !important;
    min-height: 42px !important;
    font-size: 15px !important;
    border-radius: 10px !important;
  }
}

@media screen and (min-width: 1400px) {
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-wrap {
    max-width: min(100%, 1380px) !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll {
    max-height: clamp(540px, calc(94vh - 260px), 820px) !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix th,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix td {
    padding: 15px 14px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th:first-child,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody td:first-child,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__color-cell {
    width: 126px !important;
    min-width: 126px !important;
    max-width: 126px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix td:not(:first-child) {
    min-width: 92px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty {
    width: 74px !important;
    height: 44px !important;
    min-height: 44px !important;
  }
}


/* ======================================================================
   23DTF v4.4 - Hover y selección corregidos en Sin personalización
   Mantiene la tabla igual. Solo:
   - hover gris suave en columnas de tallas/cantidades
   - fila seleccionada roja completa
   - barra roja lateral igual que Con personalización
   - sin contornos ni brillos extra en el swatch
   - sin separador Color/Tallas
   ====================================================================== */

/* Sin separador vertical entre Color y tallas */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th:first-child,
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody td:first-child {
  border-right: 0 !important;
  box-shadow: none !important;
}

/* Hover: solo columnas de tallas/cantidades, como querías; no toca la matriz de color */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-row:not(.is-selected-color):hover td:not(:first-child) {
  background: #f8fafc !important;
}

/* Selección por click en color, click/focus/input en cantidad: toda la barra se pone rojiza */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-row.is-selected-color td,
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-row:focus-within td {
  background: #FEEEEE !important;
}

/* Barra roja lateral: mismo color y grosor que Con personalización */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-row.is-selected-color td:first-child,
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-row:focus-within td:first-child {
  background: #FEEEEE !important;
  box-shadow: inset 4px 0 0 #DF0201 !important;
}

/* No añadir contornos, brillos ni borde rojo al swatch */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-row.is-selected-color .mpv2c-modal__color-swatch,
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-row:focus-within .mpv2c-modal__color-swatch,
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__color-cell:focus .mpv2c-modal__color-swatch,
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__color-cell:focus-visible .mpv2c-modal__color-swatch,
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__color-cell:active .mpv2c-modal__color-swatch {
  outline: 0 !important;
}

/* El foco del input se mantiene normal; la selección visual importante es la fila */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty:focus {
  outline: 2px solid rgba(13,106,168,.22) !important;
  border-color: #0d6aa8 !important;
}


/* ======================================================================
   23DTF v5.0 - Stepper funcional estilo nativo Sin personalización
   Mismo aspecto que Con personalización: flechas finas dentro del input,
   visibles solo en hover/focus, pero con botones reales funcionales.
   ====================================================================== */

.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-stepper {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: fit-content !important;
}

.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-stepper .mpv2c-modal__qty {
  font-weight: 400 !important;
  padding-right: 22px !important;
  background-image: none !important;
  appearance: textfield !important;
  -moz-appearance: textfield !important;
}

/* Quitamos el spinner nativo para no duplicar: los botones reales son los nuestros */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty::-webkit-inner-spin-button,
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty::-webkit-outer-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-native-buttons {
  position: absolute !important;
  top: 50% !important;
  right: 8px !important;
  width: 10px !important;
  height: 24px !important;
  transform: translateY(-50%) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 3px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Aparecen solo al pasar el ratón o al enfocar el selector */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-stepper:hover .mpv2c-modal__qty-native-buttons,
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-stepper:focus-within .mpv2c-modal__qty-native-buttons {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-native-step {
  width: 10px !important;
  height: 8px !important;
  min-width: 10px !important;
  min-height: 8px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: transparent !important;
  cursor: pointer !important;
  line-height: 0 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

/* Triángulos iguales al look nativo: finos, grises, sin caja visible */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-native-step::before {
  content: "" !important;
  display: block !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 auto !important;
  border-left: 4px solid transparent !important;
  border-right: 4px solid transparent !important;
}

.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-native-step--up::before {
  border-bottom: 5px solid #8c9196 !important;
}

.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-native-step--down::before {
  border-top: 5px solid #8c9196 !important;
}

.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-native-step:hover::before {
  filter: brightness(.65) !important;
}

.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-stepper.is-disabled .mpv2c-modal__qty-native-buttons,
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-native-step:disabled {
  display: none !important;
}



/* ======================================================================
   23DTF v5.2 - Solo scroll nativo desktop Sin personalización
   En ordenador eliminamos la barra vertical interna de la tabla para dejar
   únicamente el scroll nativo/principal del popup.
   Tablet/móvil conservan su comportamiento actual.
   ====================================================================== */

@media screen and (min-width: 990px) {
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-wrap {
    max-height: none !important;
    overflow: visible !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
  }

  /* Evita que estilos anteriores vuelvan a crear scroll vertical interno */
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll::-webkit-scrollbar {
    width: 0 !important;
  }
}


/* ======================================================================
   23DTF v5.3 - Mobile focus stepper y cabecera sticky Sin personalización
   Móvil/tablet:
   - las flechas de cantidad NO están siempre visibles
   - aparecen solo cuando el selector/input está seleccionado
   - la cabecera Color/Tallas queda fija al hacer scroll por muchos colores
   ====================================================================== */

@media screen and (max-width: 989px) {
  /* El wrapper sigue existiendo para que los botones funcionales v5.0 trabajen */
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-stepper {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: fit-content !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-stepper .mpv2c-modal__qty {
    font-weight: 400 !important;
    padding-right: 22px !important;
    appearance: textfield !important;
    -moz-appearance: textfield !important;
  }

  /* En móvil/tablet oculto por defecto: solo aparece al seleccionar el input */
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-native-buttons {
    position: absolute !important;
    top: 50% !important;
    right: 8px !important;
    width: 10px !important;
    height: 24px !important;
    transform: translateY(-50%) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 3px !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-stepper:focus-within .mpv2c-modal__qty-native-buttons,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-stepper.is-active .mpv2c-modal__qty-native-buttons {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-native-step {
    width: 10px !important;
    height: 8px !important;
    min-width: 10px !important;
    min-height: 8px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: transparent !important;
    cursor: pointer !important;
    line-height: 0 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    touch-action: manipulation !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-native-step::before {
    content: "" !important;
    display: block !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 auto !important;
    border-left: 4px solid transparent !important;
    border-right: 4px solid transparent !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-native-step--up::before {
    border-bottom: 5px solid #8c9196 !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-native-step--down::before {
    border-top: 5px solid #8c9196 !important;
  }

  /* Cabecera fija en móvil/tablet cuando hay muchos colores */
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead {
    position: sticky !important;
    top: 0 !important;
    z-index: 30 !important;
    background: #fff !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 31 !important;
    background: #fff !important;
    box-shadow: 0 1px 0 rgba(18,18,18,.08) !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th:first-child {
    left: 0 !important;
    z-index: 33 !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll {
    overflow: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}

/* En dispositivos táctiles NO forzamos visibilidad permanente: solo focus-within */
@media (hover: none), (pointer: coarse) {
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-native-buttons {
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-stepper:focus-within .mpv2c-modal__qty-native-buttons,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-stepper.is-active .mpv2c-modal__qty-native-buttons {
    opacity: 1 !important;
    pointer-events: auto !important;
  }
}


/* ======================================================================
   23DTF v5.4 - Header sticky real móvil Sin personalización
   Corrige el sticky de Color/Tallas en móvil:
   el sticky solo funciona si la tabla tiene su propio contenedor con scroll.
   En desktop seguimos usando solo el scroll principal del popup.
   ====================================================================== */

@media screen and (max-width: 989px) {
  /* La tabla vuelve a tener scroll interno solo en móvil/tablet para que thead sticky funcione */
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-wrap {
    max-height: none !important;
    overflow: visible !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll {
    display: block !important;
    position: relative !important;
    max-height: min(58vh, 560px) !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix {
    border-collapse: separate !important;
    border-spacing: 0 !important;
  }

  /* Sticky real: se aplica a cada th, no solo al thead */
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 40 !important;
    background: #fff !important;
    background-clip: padding-box !important;
    box-shadow: 0 1px 0 rgba(18,18,18,.08) !important;
  }

  /* Color es sticky horizontal y vertical a la vez */
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th:first-child {
    left: 0 !important;
    z-index: 45 !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody td:first-child {
    position: sticky !important;
    left: 0 !important;
    z-index: 20 !important;
    background: #fff !important;
    background-clip: padding-box !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-row.is-selected-color td:first-child,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-row:focus-within td:first-child {
    background: #FEEEEE !important;
    box-shadow: inset 4px 0 0 #DF0201 !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-row:not(.is-selected-color):hover td:not(:first-child) {
    background: #f8fafc !important;
  }
}

/* En desktop mantenemos la decisión anterior: sin scroll interno de tabla */
@media screen and (min-width: 990px) {
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-wrap {
    max-height: none !important;
    overflow: visible !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
  }
}


/* ======================================================================
   23DTF v5.5 - Sellado cabecera sticky móvil Sin personalización
   Evita que las filas se vean por encima/detrás de la cabecera sticky.
   La cabecera queda pegada arriba, con fondo sólido y sin espacio visible.
   ====================================================================== */

@media screen and (max-width: 989px) {
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll {
    position: relative !important;
    padding-top: 0 !important;
    overflow: auto !important;
    background: #fff !important;
    isolation: isolate !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix {
    margin-top: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead {
    position: sticky !important;
    top: 0 !important;
    z-index: 80 !important;
    background: #fff !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead tr {
    background: #fff !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 85 !important;
    background: #fff !important;
    background-clip: padding-box !important;
    box-shadow:
      0 -12px 0 12px #fff,
      0 1px 0 rgba(18,18,18,.08) !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th:first-child {
    left: 0 !important;
    z-index: 90 !important;
    background: #fff !important;
  }

  /* Las filas quedan por debajo de la cabecera, nunca por encima */
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody td {
    position: relative !important;
    z-index: 1 !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody td:first-child {
    position: sticky !important;
    left: 0 !important;
    z-index: 20 !important;
    background-clip: padding-box !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody tr.is-selected-color td:first-child,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody tr:focus-within td:first-child {
    background: #FEEEEE !important;
    box-shadow: inset 4px 0 0 #DF0201 !important;
  }
}


/* ======================================================================
   23DTF v5.6 - Sin línea cabecera y sellado desktop Sin personalización
   - Quita la línea/borde bajo Color / tallas.
   - Mantiene la cabecera limpia en móvil.
   - Aplica también el sellado en desktop para que no exista espacio visible
     por encima/debajo de la cabecera si algún scroll interno queda activo.
   ====================================================================== */

/* Quitar línea inferior de la cabecera en todos los tamaños */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead,
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead tr,
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th {
  border-bottom: 0 !important;
  box-shadow: none !important;
}

.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th::before,
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th::after {
  content: none !important;
  display: none !important;
}

/* Móvil/tablet: cabecera sticky sin línea y con fondo sólido */
@media screen and (max-width: 989px) {
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll {
    padding-top: 0 !important;
    background: #fff !important;
    isolation: isolate !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix {
    margin-top: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead {
    position: sticky !important;
    top: 0 !important;
    z-index: 90 !important;
    background: #fff !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 95 !important;
    background: #fff !important;
    background-clip: padding-box !important;
    border-bottom: 0 !important;
    box-shadow: 0 -18px 0 18px #fff !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th:first-child {
    left: 0 !important;
    z-index: 100 !important;
    background: #fff !important;
  }

  /* Primera fila pegada a la cabecera, sin hueco visual */
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody tr:first-child td {
    border-top: 0 !important;
  }
}

/* Desktop: si hay scroll interno activo por cualquier estilo previo, sellamos igual */
@media screen and (min-width: 990px) {
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll {
    padding-top: 0 !important;
    background: #fff !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix {
    margin-top: 0 !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th {
    top: 0 !important;
    background: #fff !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody tr:first-child td {
    border-top: 0 !important;
  }
}


/* ======================================================================
   23DTF v5.7 - Mobile sin personalización táctil mejorado
   Solo móvil/tablet:
   - separa la barra roja del swatch de color
   - aumenta el swatch/color para dedos
   - aumenta el selector de cantidad
   - mantiene cabecera sticky, hover/selección y stepper funcional
   ====================================================================== */

@media screen and (max-width: 989px) {
  /* Más aire entre la barra roja lateral y el color */
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody td:first-child {
    padding-left: 14px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-row.is-selected-color td:first-child,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-row:focus-within td:first-child {
    box-shadow: inset 4px 0 0 #DF0201 !important;
    padding-left: 16px !important;
  }

  /* Color un poco más grande, más parecido a Con personalización */
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__color-cell {
    gap: 9px !important;
    min-height: 44px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__color-swatch {
    width: 32px !important;
    height: 32px !important;
    flex: 0 0 32px !important;
    border-radius: 8px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__color-label {
    font-size: 12px !important;
    line-height: 1.2 !important;
  }

  /* Selector de cantidad más cómodo en móvil/tablet */
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty {
    width: 54px !important;
    min-width: 54px !important;
    height: 36px !important;
    min-height: 36px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
    padding-left: 8px !important;
    padding-right: 22px !important;
    font-weight: 400 !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-stepper {
    min-width: 54px !important;
  }

  /* Ajuste de posición de las flechas dentro del input agrandado */
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-native-buttons {
    right: 8px !important;
    height: 25px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-native-step {
    width: 11px !important;
    height: 9px !important;
    min-width: 11px !important;
    min-height: 9px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-native-step::before {
    border-left-width: 4px !important;
    border-right-width: 4px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-native-step--up::before {
    border-bottom-width: 5px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-native-step--down::before {
    border-top-width: 5px !important;
  }

  /* Celdas un poco más amplias para que no quede todo apretado */
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix th,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix td {
    padding-top: 9px !important;
    padding-bottom: 9px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix td:not(:first-child) {
    min-width: 72px !important;
  }

  /* La cabecera se mantiene limpia y sin línea inferior */
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th {
    border-bottom: 0 !important;
    box-shadow: 0 -18px 0 18px #fff !important;
  }
}

@media screen and (max-width: 420px) {
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody td:first-child {
    padding-left: 13px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-row.is-selected-color td:first-child,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-row:focus-within td:first-child {
    padding-left: 15px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__color-swatch {
    width: 30px !important;
    height: 30px !important;
    flex-basis: 30px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty {
    width: 52px !important;
    min-width: 52px !important;
    height: 36px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-stepper {
    min-width: 52px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix td:not(:first-child) {
    min-width: 68px !important;
  }
}


/* ======================================================================
   23DTF v6.0 - Rollback seguro cabecera Sin personalización
   Base estable: vuelve al visual v5.7 y evita que la cabecera tape producto
   o borre nombres de tallas. Sticky solo en móvil/tablet y sin máscaras grandes.
   ====================================================================== */

/* Seguridad global: nada de máscaras gigantes ni desplazamientos en cabecera */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead,
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead tr,
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th {
  transform: none !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  background: #fff !important;
}

.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead::before,
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead::after,
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead tr::before,
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead tr::after,
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th::before,
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th::after {
  content: none !important;
  display: none !important;
}

/* Desktop: dejamos la tabla estable, sin sticky agresivo y sin tocar el producto */
@media screen and (min-width: 990px) {
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-wrap {
    overflow: visible !important;
    max-height: none !important;
    background: #fff !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll {
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
    padding-top: 0 !important;
    background: #fff !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix {
    margin-top: 0 !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th {
    position: static !important;
    top: auto !important;
    left: auto !important;
    z-index: auto !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody td:first-child {
    position: static !important;
    left: auto !important;
    z-index: auto !important;
  }
}

/* Móvil/tablet: sticky limpio para Color y tallas, sin tapar contenido superior */
@media screen and (max-width: 989px) {
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-wrap {
    background: #fff !important;
    overflow: visible !important;
    max-height: none !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll {
    position: relative !important;
    max-height: min(58vh, 560px) !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch !important;
    background: #fff !important;
    padding-top: 0 !important;
    isolation: auto !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix {
    margin-top: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: #fff !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 30 !important;
    background: #fff !important;
    background-clip: padding-box !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th:first-child {
    left: 0 !important;
    z-index: 35 !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody td:first-child {
    position: sticky !important;
    left: 0 !important;
    z-index: 10 !important;
    background: #fff !important;
    background-clip: padding-box !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-row.is-selected-color td:first-child,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-row:focus-within td:first-child {
    background: #FEEEEE !important;
    box-shadow: inset 4px 0 0 #DF0201 !important;
  }
}


/* ======================================================================
   23DTF v6.1 - Cabecera sticky limpia Sin personalización
   Hace que Color / XS / S / M... sea una cabecera real.
   No usa máscaras grandes ni z-index agresivos que tapen producto.
   ====================================================================== */

/* Preparación limpia de la tabla */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-wrap {
  background: #fff !important;
}

.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll {
  position: relative !important;
  background: #fff !important;
  -webkit-overflow-scrolling: touch !important;
}

.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  background: #fff !important;
}

/* La cabecera completa se fija dentro del scroll de la tabla */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th {
  position: sticky !important;
  top: 0 !important;
  z-index: 20 !important;
  background: #fff !important;
  background-clip: padding-box !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}

/* La columna Color también queda fija horizontal y vertical */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th:first-child {
  left: 0 !important;
  z-index: 30 !important;
}

/* La primera columna del cuerpo queda fija solo horizontalmente */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody td:first-child {
  position: sticky !important;
  left: 0 !important;
  z-index: 10 !important;
  background: #fff !important;
  background-clip: padding-box !important;
}

/* Mantener selección roja de la primera columna */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-row.is-selected-color td,
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-row:focus-within td {
  background: #FEEEEE !important;
}

.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-row.is-selected-color td:first-child,
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-row:focus-within td:first-child {
  background: #FEEEEE !important;
  box-shadow: inset 4px 0 0 #DF0201 !important;
}

/* Móvil/tablet: scroll interno para que sticky funcione correctamente */
@media screen and (max-width: 989px) {
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll {
    max-height: min(58vh, 560px) !important;
    overflow: auto !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th {
    top: 0 !important;
  }
}

/* Ordenador: scroll interno solo para la tabla sin crear máscaras/tapar producto */
@media screen and (min-width: 990px) {
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-wrap {
    max-width: min(100%, 1280px) !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll {
    max-height: clamp(520px, calc(94vh - 320px), 760px) !important;
    overflow: auto !important;
  }

  /* Hacemos el scroll interno discreto en desktop */
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,.22) !important;
    border-radius: 999px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll::-webkit-scrollbar-track {
    background: transparent !important;
  }
}


/* ======================================================================
   23DTF v6.2 - Cabecera sticky con scroll nativo desktop
   Desktop:
   - elimina la barra interna de la tabla
   - usa solo el scroll principal/nativo del popup
   - mantiene Color / XS / S / M... como cabecera sticky
   Móvil/tablet:
   - conserva el scroll interno de tabla porque es más estable en pantallas táctiles.
   ====================================================================== */

/* Base limpia para la cabecera */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  background: #fff !important;
}

.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th {
  position: sticky !important;
  top: 0 !important;
  z-index: 40 !important;
  background: #fff !important;
  background-clip: padding-box !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}

.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th:first-child {
  left: 0 !important;
  z-index: 50 !important;
}

.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody td:first-child {
  position: sticky !important;
  left: 0 !important;
  z-index: 10 !important;
  background: #fff !important;
  background-clip: padding-box !important;
}

.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-row.is-selected-color td,
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-row:focus-within td {
  background: #FEEEEE !important;
}

.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-row.is-selected-color td:first-child,
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-row:focus-within td:first-child {
  background: #FEEEEE !important;
  box-shadow: inset 4px 0 0 #DF0201 !important;
}

/* DESKTOP: fuera la barra interna; sticky se engancha al scroll principal del popup */
@media screen and (min-width: 990px) {
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-wrap {
    max-height: none !important;
    overflow: visible !important;
    background: #fff !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    background: #fff !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th {
    top: 0 !important;
  }

  /* Oculta cualquier scrollbar residual que pueda quedar por estilos anteriores */
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
  }
}

/* MÓVIL/TABLET: mantenemos scroll interno para que sticky sea fiable con pantallas táctiles */
@media screen and (max-width: 989px) {
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll {
    position: relative !important;
    max-height: min(58vh, 560px) !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch !important;
    background: #fff !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th {
    top: 0 !important;
  }
}


/* ======================================================================
   23DTF v6.3 - Altura cabecera tabla Sin personalización
   Ajusta el alto de la cabecera Color / tallas sin tocar la lógica.
   ====================================================================== */

/* DESKTOP */
@media screen and (min-width: 990px) {
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th {
    top: 0 !important;
    height: 56px !important;
    min-height: 56px !important;
    padding-top: 16px !important;
    padding-bottom: 16px !important;
    vertical-align: middle !important;
    background: #fff !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th:first-child {
    height: 56px !important;
    min-height: 56px !important;
  }
}

/* MÓVIL / TABLET */
@media screen and (max-width: 989px) {
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th {
    top: 0 !important;
    height: 48px !important;
    min-height: 48px !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    vertical-align: middle !important;
    background: #fff !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead th:first-child {
    height: 48px !important;
    min-height: 48px !important;
  }
}


/* ======================================================================
   23DTF v7.2 - Cabecera separada bajo tabs Sin personalización
   Cabecera Color / tallas fuera del <table>, colocada bajo los botones
   Sin personalización / Con personalización.
   ====================================================================== */

.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head {
  display: grid !important;
  grid-template-columns: 126px repeat(var(--mpv2c-size-count, 6), minmax(92px, 1fr)) !important;
  align-items: center !important;
  width: 100% !important;
  max-width: min(100%, 1380px) !important;
  margin: 18px 0 0 !important;
  padding: 0 !important;
  background: #fff !important;
  border: 0 !important;
  box-shadow: none !important;
}

.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head-cell {
  min-height: 50px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 12px 13px !important;
  color: #3f3f46 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  background: #fff !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head-cell:first-child {
  justify-content: flex-start !important;
  width: 126px !important;
  min-width: 126px !important;
  max-width: 126px !important;
}

/* La tabla de Sin personalización ya no necesita thead */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead {
  display: none !important;
}

.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-wrap,
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Desktop: mantener una sola barra de scroll, la del popup */
@media screen and (min-width: 990px) {
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head {
    grid-template-columns: 126px repeat(var(--mpv2c-size-count, 6), minmax(92px, 1fr)) !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-wrap {
    overflow: visible !important;
    max-height: none !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
  }
}

/* Móvil/tablet */
@media screen and (max-width: 989px) {
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head {
    grid-template-columns: 112px repeat(var(--mpv2c-size-count, 6), minmax(68px, 1fr)) !important;
    min-width: max-content !important;
    margin-top: 14px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head-cell {
    min-height: 44px !important;
    padding: 10px 9px !important;
    font-size: 12px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head-cell:first-child {
    width: 112px !important;
    min-width: 112px !important;
    max-width: 112px !important;
  }
}


/* ======================================================================
   23DTF v7.3 - Cabecera separada alineada y fija
   Corrige:
   - separación excesiva entre tallas y cantidades
   - anchura de la cabecera para que coincida con las columnas reales
   - cabecera fija al hacer scroll vertical
   ====================================================================== */

/* La cabecera ya no debe estirarse a todo el ancho del popup:
   debe medir lo mismo que la tabla de cantidades. */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head {
  position: sticky !important;
  top: 0 !important;
  z-index: 80 !important;
  display: grid !important;
  grid-template-columns: 126px repeat(var(--mpv2c-size-count, 6), 92px) !important;
  width: max-content !important;
  min-width: max-content !important;
  max-width: none !important;
  margin: 18px 0 0 !important;
  padding: 0 !important;
  background: #fff !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Celdas de la cabecera */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head-cell {
  width: 92px !important;
  min-width: 92px !important;
  max-width: 92px !important;
  min-height: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 12px 13px !important;
  color: #3f3f46 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  background: #fff !important;
  border: 0 !important;
  white-space: nowrap !important;
}

/* Primera columna: Color */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head-cell:first-child {
  justify-content: flex-start !important;
  width: 126px !important;
  min-width: 126px !important;
  max-width: 126px !important;
}

/* La tabla del cuerpo debe usar exactamente las mismas medidas */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix {
  width: max-content !important;
  min-width: max-content !important;
  table-layout: fixed !important;
}

.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody td:first-child,
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__color-cell {
  width: 126px !important;
  min-width: 126px !important;
  max-width: 126px !important;
}

.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody td:not(:first-child) {
  width: 92px !important;
  min-width: 92px !important;
  max-width: 92px !important;
  text-align: center !important;
}

/* Ocultamos cualquier thead antiguo dentro de la tabla */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix thead {
  display: none !important;
}

/* Contenedor: sin scroll interno vertical en desktop, pero permitimos overflow horizontal si hiciera falta */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-wrap {
  overflow: visible !important;
  max-height: none !important;
}

.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll {
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Desktop */
@media screen and (min-width: 990px) {
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head {
    top: 0 !important;
    grid-template-columns: 126px repeat(var(--mpv2c-size-count, 6), 92px) !important;
  }
}

/* Móvil/tablet */
@media screen and (max-width: 989px) {
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head {
    top: 0 !important;
    grid-template-columns: 112px repeat(var(--mpv2c-size-count, 6), 68px) !important;
    margin-top: 14px !important;
    width: max-content !important;
    min-width: max-content !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head-cell {
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
    min-height: 44px !important;
    padding: 10px 9px !important;
    font-size: 12px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head-cell:first-child {
    width: 112px !important;
    min-width: 112px !important;
    max-width: 112px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody td:first-child,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__color-cell {
    width: 112px !important;
    min-width: 112px !important;
    max-width: 112px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody td:not(:first-child) {
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll {
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch !important;
  }
}


/* ======================================================================
   23DTF v7.6 - Scroll táctil móvil real Sin personalización
   Motivo:
   en móvil, el gesto empieza encima de la tabla horizontal. Si ese contenedor
   tiene overflow-y hidden/visible, iOS/Chrome puede capturar el gesto y no
   deja subir/bajar. Aquí hacemos que el cuerpo de la tabla sea también el
   scroll vertical táctil, manteniendo la cabecera separada fija arriba.
   ====================================================================== */

/* Configuración buena confirmada para la cabecera */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head {
  position: sticky !important;
  top: -25px !important;
  z-index: 90 !important;
  background: #fff !important;
}

/* Desktop: conservar una sola barra principal */
@media screen and (min-width: 990px) {
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head {
    top: -25px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-wrap {
    overflow: visible !important;
    max-height: none !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
  }
}

/* Móvil/tablet: scroll vertical real dentro del cuerpo de la tabla */
@media screen and (max-width: 989px) {
  .mpv2c-modal__content {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .mpv2c-modal__panel[data-panel="without"] {
    overflow: visible !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head {
    top: -25px !important;
    margin-top: 0 !important;
    touch-action: auto !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-wrap {
    overflow: visible !important;
    max-height: none !important;
  }

  /* Este es el cambio clave:
     el contenedor de cantidades ahora acepta scroll vertical y horizontal. */
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll {
    max-height: min(58vh, 560px) !important;
    height: auto !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: auto !important;
    overscroll-behavior: contain !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix {
    touch-action: auto !important;
  }

  /* Evita que algún bloque anterior fuerce el bloqueo vertical */
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tr,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix td {
    touch-action: auto !important;
  }
}


/* ======================================================================
   23DTF v7.7 - Scroll encadenado móvil Sin personalización
   Objetivo:
   - La tabla puede desplazarse verticalmente y horizontalmente.
   - Cuando la tabla llega arriba o abajo, el gesto continúa en el popup.
   - Mantiene cabecera separada con top:-25px.
   ====================================================================== */

@media screen and (max-width: 989px) {
  /* El popup vuelve a poder recibir el scroll cuando la tabla llega al límite */
  .mpv2c-modal__dialog,
  .mpv2c-modal__content {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: auto !important;
    overscroll-behavior-x: contain !important;
    touch-action: auto !important;
  }

  .mpv2c-modal__panel[data-panel="without"] {
    overflow: visible !important;
    overscroll-behavior-y: auto !important;
    touch-action: auto !important;
  }

  /* Cabecera buena confirmada */
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head {
    position: sticky !important;
    top: -25px !important;
    z-index: 90 !important;
    background: #fff !important;
    margin-top: 0 !important;
    touch-action: auto !important;
    overscroll-behavior-y: auto !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-wrap {
    overflow: visible !important;
    max-height: none !important;
    overscroll-behavior-y: auto !important;
    touch-action: auto !important;
  }

  /* Cambio clave:
     quitamos el contain anterior para permitir scroll chaining al llegar
     al inicio/final del bloque de tabla. */
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll {
    max-height: min(58vh, 560px) !important;
    height: auto !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: auto !important;
    overscroll-behavior-y: auto !important;
    overscroll-behavior-x: contain !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tr,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix td {
    touch-action: auto !important;
    overscroll-behavior-y: auto !important;
  }
}


/* ======================================================================
   23DTF v7.8 - Cabecera sincronizada horizontalmente
   La cabecera separada Color / tallas tiene su propio wrapper horizontal
   y el JS sincroniza su scrollLeft con el cuerpo de la tabla.
   ====================================================================== */

/* Wrapper de cabecera: sticky vertical, scroll horizontal oculto */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head-scroll {
  position: sticky !important;
  top: -25px !important;
  z-index: 95 !important;
  width: 100% !important;
  max-width: min(100%, 1380px) !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  background: #fff !important;
  margin: 0 !important;
  padding: 0 !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  -webkit-overflow-scrolling: touch !important;
}

.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head-scroll::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* La cabecera interior mide exactamente igual que el cuerpo */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head {
  position: relative !important;
  top: auto !important;
  z-index: 1 !important;
  display: grid !important;
  grid-template-columns: 126px repeat(var(--mpv2c-size-count, 6), 92px) !important;
  width: max-content !important;
  min-width: max-content !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #fff !important;
  border: 0 !important;
  box-shadow: none !important;
}

.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head-cell {
  width: 92px !important;
  min-width: 92px !important;
  max-width: 92px !important;
  min-height: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 12px 13px !important;
  color: #3f3f46 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  background: #fff !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head-cell:first-child {
  justify-content: flex-start !important;
  width: 126px !important;
  min-width: 126px !important;
  max-width: 126px !important;
}

/* El cuerpo mantiene sus mismas anchuras para coincidir con la cabecera */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix {
  width: max-content !important;
  min-width: max-content !important;
  table-layout: fixed !important;
}

.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody td:first-child,
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__color-cell {
  width: 126px !important;
  min-width: 126px !important;
  max-width: 126px !important;
}

.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody td:not(:first-child) {
  width: 92px !important;
  min-width: 92px !important;
  max-width: 92px !important;
  text-align: center !important;
}

/* Móvil/tablet */
@media screen and (max-width: 989px) {
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head-scroll {
    top: -25px !important;
    max-width: 100% !important;
    touch-action: pan-x pan-y !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head {
    grid-template-columns: 112px repeat(var(--mpv2c-size-count, 6), 68px) !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head-cell {
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
    min-height: 44px !important;
    padding: 10px 9px !important;
    font-size: 12px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head-cell:first-child,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody td:first-child,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__color-cell {
    width: 112px !important;
    min-width: 112px !important;
    max-width: 112px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody td:not(:first-child) {
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
  }
}


/* ======================================================================
   23DTF v7.9 - Color fijo cabecera y cuerpo
   Objetivo:
   - La columna Color queda fija.
   - Solo se desplazan horizontalmente las columnas de tallas/cantidades.
   - La cabecera Color también se mantiene fija mientras las tallas se mueven.
   Requiere la estructura v7.8 con .mpv2c-modal__matrix-head-scroll.
   ====================================================================== */

/* La cabecera sigue sincronizada horizontalmente, pero su primera celda se queda fija */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head-scroll {
  position: sticky !important;
  top: -25px !important;
  z-index: 95 !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  background: #fff !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head-scroll::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Primera celda de cabecera: Color fijo, igual que la columna Color del cuerpo */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head-cell:first-child {
  position: sticky !important;
  left: 0 !important;
  z-index: 120 !important;
  background: #fff !important;
  background-clip: padding-box !important;
  box-shadow: none !important;
}

/* Columna Color del cuerpo fija */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody td:first-child {
  position: sticky !important;
  left: 0 !important;
  z-index: 60 !important;
  background: #fff !important;
  background-clip: padding-box !important;
}

/* Mantener la selección roja en la columna Color aunque sea sticky */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-row.is-selected-color td:first-child,
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-row:focus-within td:first-child {
  background: #FEEEEE !important;
  box-shadow: inset 4px 0 0 #DF0201 !important;
}

/* Las columnas de tallas/cantidades son las únicas que deben moverse horizontalmente */
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head-cell:not(:first-child),
.mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody td:not(:first-child) {
  z-index: 1 !important;
}

/* Desktop */
@media screen and (min-width: 990px) {
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head-scroll {
    top: -25px !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head-cell:first-child,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody td:first-child,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__color-cell {
    width: 126px !important;
    min-width: 126px !important;
    max-width: 126px !important;
  }
}

/* Móvil/tablet */
@media screen and (max-width: 989px) {
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head-scroll {
    top: -25px !important;
    touch-action: pan-x pan-y !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head-cell:first-child,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody td:first-child,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__color-cell {
    width: 112px !important;
    min-width: 112px !important;
    max-width: 112px !important;
  }
}


/* ======================================================================
   23DTF v7.10 - Scroll continuo iPhone Sin personalización
   Base: v7.9 estable.
   Objetivo:
   - Mantener el diseño bueno actual.
   - Mejorar el gesto vertical en iPhone/iOS.
   - La tabla conserva scroll interno.
   - Al llegar al inicio/final de la tabla, el JS pasa el gesto al popup.
   ====================================================================== */

@media screen and (max-width: 989px) {
  .mpv2c-modal__content {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: auto !important;
    touch-action: pan-y !important;
  }

  .mpv2c-modal__panel[data-panel="without"] {
    overflow: visible !important;
    touch-action: auto !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-wrap {
    overflow: visible !important;
    max-height: none !important;
    touch-action: auto !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll {
    max-height: min(58vh, 560px) !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: auto !important;
    overscroll-behavior-x: contain !important;
    touch-action: pan-x pan-y !important;
  }

  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tr,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix td {
    touch-action: pan-x pan-y !important;
  }

  /* Mantiene la cabecera buena de v7.9 */
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix-head-scroll {
    top: -25px !important;
    z-index: 95 !important;
    background: #fff !important;
  }
}


/* ======================================================================
   23DTF v7.11 - Pinch zoom iPhone sin romper tabla
   Base: v7.10 estable.
   Permite el gesto de zoom con dos dedos y mantiene el scroll de tabla.
   ====================================================================== */

@media screen and (max-width: 989px) {
  /* El popup puede panear y también aceptar pinch zoom */
  .mpv2c-modal,
  .mpv2c-modal__dialog,
  .mpv2c-modal__content {
    touch-action: pan-x pan-y pinch-zoom !important;
  }

  /* La tabla mantiene scroll horizontal/vertical, pero no debe bloquear el gesto con dos dedos */
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__table-scroll,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tbody,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix tr,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__matrix td {
    touch-action: pan-x pan-y pinch-zoom !important;
  }

  /* Los controles de cantidad mantienen su comportamiento táctil normal */
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty,
  .mpv2c-modal__panel[data-panel="without"] .mpv2c-modal__qty-stepper,
  .mpv2c-modal__panel[data-panel="without"] [data-mpv2c-qty-step] {
    touch-action: manipulation !important;
  }
}


/* ======================================================================
   23DTF v4.10d - Toolbar contextual y capas limpias
   SAFE PATCH SOBRE CSS ACTUAL:
   - Base: 23dtf-personalizer-modal (4).css
   - No sustituye CSS por versiones antiguas.
   - Solo añade reglas al final.
   ====================================================================== */

.p23m__toolbar[hidden],
.p23m__toolbar.is-p23m-hidden,
.p23m__dynamic-controls[hidden] {
  display: none !important;
}

.p23m__layers-empty {
  min-height: 330px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #202223;
  text-align: center;
  padding: 34px 18px;
}

.p23m__layers-empty strong {
  display: block;
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 800;
}

.p23m__layers-empty p {
  margin: 10px 0 0;
  max-width: 250px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.45;
}

.p23m__layers-empty-illustration {
  position: relative;
  width: 150px;
  height: 110px;
  opacity: .72;
}

.p23m__layers-empty-card {
  position: absolute;
  right: 8px;
  top: 10px;
  width: 92px;
  height: 72px;
  border: 2px solid #c5c8cc;
  border-radius: 4px;
  background: linear-gradient(135deg, #f8f8f8 0 56%, #ededed 56% 100%);
}

.p23m__layers-empty-brush {
  position: absolute;
  left: 22px;
  top: 62px;
  width: 78px;
  height: 16px;
  border-radius: 999px;
  background: #9ca3af;
  transform: rotate(-20deg);
}

.p23m__layers-empty-brush::before {
  content: "";
  position: absolute;
  left: -18px;
  top: -5px;
  width: 28px;
  height: 26px;
  border-radius: 4px 0 0 4px;
  background: #7b8188;
}

.p23m__layers-empty-dots {
  position: absolute;
  right: 34px;
  top: 34px;
  color: #e5e7eb;
  font-size: 28px;
  letter-spacing: 5px;
  line-height: 1;
}

.p23m.is-p23m-tool-only .p23m__dynamic-controls:not([hidden]) {
  display: block !important;
  padding: 18px 20px 120px;
  margin: 0;
  border-top: 0;
}

/* 23DTF v4.10e - JS fix: mantener panel contextual al deseleccionar capa. CSS sin cambios funcionales. */


/* ======================================================================
   23DTF v4.10f - Mockup responsive proporcional
   Mantiene el mockup en coordenadas internas 380x460 y escala TODO junto:
   prenda, área de impresión y capas. Evita que el cuadrado se descuadre al
   cambiar el tamaño de la ventana en ordenador.
   ====================================================================== */

.p23m__stage {
  min-width: 0 !important;
}

.p23m__mockup {
  width: 380px !important;
  height: 460px !important;
  flex: 0 0 auto !important;
  transform-origin: 50% 50% !important;
  will-change: transform !important;
}

.p23m__product-image-wrap,
.p23m__product-image,
.p23m__hoodie,
.p23m__layer-stage {
  width: 100% !important;
  height: 100% !important;
}

/* Anula la regla antigua @media max-width:900px que cambiaba el tamaño real
   del mockup a 320x390. Ahora el tamaño real no cambia; se escala por JS. */
@media (max-width: 900px) {
  .p23m__mockup {
    width: 380px !important;
    height: 460px !important;
  }
}


/* ======================================================================
   23DTF v4.10g - Máscara visual área de impresión tipo Printful
   Las capas siguen pudiendo moverse/escalarse libremente, pero solo se ve
   la parte situada dentro del área de impresión.
   ====================================================================== */

.p23m__layer-stage.is-p23m-print-mask-active {
  overflow: hidden !important;
  clip-path: inset(
    var(--p23m-mask-top, 0px)
    var(--p23m-mask-right, 0px)
    var(--p23m-mask-bottom, 0px)
    var(--p23m-mask-left, 0px)
  ) !important;
}

/* Asegura que la máscara se calcula sobre el mockup completo */
.p23m__layer-stage {
  position: absolute !important;
  inset: 0 !important;
}

/* La guía del área queda visible por encima, aunque la capa quede recortada */
.p23m__safe {
  z-index: 35 !important;
}


/* ======================================================================
   23DTF v4.10h - Recuperar capa totalmente fuera del área de impresión
   Si el diseño queda completamente fuera de la máscara y se suelta, vuelve
   al centro del área de impresión.
   ====================================================================== */

.p23m.is-p23m-layer-recovered .p23m__layer-item.is-active {
  transition:
    left .16s ease,
    top .16s ease,
    width .16s ease,
    height .16s ease,
    transform .16s ease !important;
}


/* ======================================================================
   23DTF v4.10i - Layout móvil/tablet tipo editor app
   Desktop queda igual. En móvil/tablet:
   - Zonas arriba
   - Canvas/prenda siempre visible
   - Toolbar contextual debajo del canvas
   - Panel de opciones como bottom sheet
   - Rail principal como navegación inferior
   ====================================================================== */

@media screen and (max-width: 989px) {
  .mpv2c-modal.is-p23m-with-active .mpv2c-modal__content {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 0 !important;
  }

  .p23m {
    height: auto !important;
    min-height: 0 !important;
  }

  .p23m__layout {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    background: #f6f6f7 !important;
  }

  /* 1) Workspace/canvas primero */
  .p23m__workspace {
    order: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    width: 100% !important;
    flex: 0 0 auto !important;
    background: #f6f6f7 !important;
    padding-bottom: 0 !important;
  }

  /* Zonas arriba del canvas */
  .p23m__placements {
    order: 1 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 10px 12px 8px !important;
    background: #f6f6f7 !important;
    border-bottom: 1px solid #e3e3e3 !important;
    scrollbar-width: none !important;
  }

  .p23m__placements::-webkit-scrollbar {
    display: none !important;
  }

  .p23m__placements button {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    padding: 8px 11px !important;
    font-size: 12px !important;
  }

  /* Canvas visible justo después de zonas */
  .p23m__canvas {
    order: 2 !important;
    flex: 0 0 auto !important;
    width: calc(100% - 20px) !important;
    min-height: 390px !important;
    height: min(54vh, 520px) !important;
    margin: 10px 10px 0 !important;
    overflow: hidden !important;
    border-radius: 10px !important;
    background: #fff !important;
  }

  .p23m__stage {
    height: 100% !important;
    min-height: 0 !important;
    padding: 58px 10px 72px !important;
  }

  .p23m__mockup {
    width: 380px !important;
    height: 460px !important;
    max-width: none !important;
    max-height: none !important;
  }

  .p23m__zone-float {
    top: 10px !important;
    width: min(92%, 330px) !important;
  }

  .p23m__zone-float > button {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    padding: 7px 13px !important;
    font-size: 12px !important;
  }

  .p23m__zone-menu {
    width: min(86vw, 300px) !important;
    top: 42px !important;
  }

  .p23m__canvas-tools {
    right: 8px !important;
    top: 8px !important;
  }

  .p23m__canvas-tools button {
    width: 36px !important;
    height: 36px !important;
  }

  .p23m__zoom {
    width: min(86%, 360px) !important;
    bottom: 10px !important;
    padding: 8px 12px !important;
  }

  .p23m__crop-actions {
    top: 72px !important;
  }

  /* Toolbar contextual debajo del canvas */
  .p23m__toolbar {
    order: 3 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    margin: 10px 10px 0 !important;
    padding: 8px !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: 0 0 0 1px #ececec !important;
    scrollbar-width: none !important;
  }

  .p23m__toolbar[hidden],
  .p23m__toolbar.is-p23m-hidden {
    display: none !important;
  }

  .p23m__toolbar::-webkit-scrollbar {
    display: none !important;
  }

  .p23m__toolbar button {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    padding: 8px 10px !important;
    font-size: 12px !important;
  }

  /* 2) Panel inferior tipo bottom sheet */
  .p23m__panel {
    order: 2 !important;
    width: calc(100% - 20px) !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    margin: 10px 10px 0 !important;
    padding: 16px 16px 92px !important;
    border: 1px solid #e3e3e3 !important;
    border-radius: 14px 14px 0 0 !important;
    background: #fff !important;
    max-height: min(46vh, 460px) !important;
    min-height: 190px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    box-shadow: 0 -10px 30px rgba(0,0,0,.08) !important;
  }

  .p23m__panel::before {
    content: "" !important;
    display: block !important;
    width: 42px !important;
    height: 4px !important;
    border-radius: 999px !important;
    background: #d1d5db !important;
    margin: 0 auto 14px !important;
  }

  .p23m__panel h3 {
    font-size: 14px !important;
  }

  .p23m__panel-view {
    min-height: 0 !important;
  }

  .p23m__dynamic-controls {
    margin-top: 14px !important;
    padding-top: 14px !important;
  }

  .p23m.is-p23m-tool-only .p23m__dynamic-controls:not([hidden]) {
    padding: 0 0 18px !important;
  }

  .p23m__layers-empty {
    min-height: 230px !important;
    padding: 22px 12px !important;
  }

  .p23m__templates {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .p23m__pattern-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .p23m__control-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  .p23m__swatches {
    grid-template-columns: repeat(8, 22px) !important;
  }

  /* 3) Rail inferior tipo app */
  .p23m__rail {
    order: 3 !important;
    position: sticky !important;
    bottom: 0 !important;
    z-index: 500 !important;
    width: 100% !important;
    flex: 0 0 auto !important;
    min-height: 66px !important;
    height: 66px !important;
    padding: 6px 8px max(6px, env(safe-area-inset-bottom)) !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 4px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    background: #fff !important;
    border-right: 0 !important;
    border-top: 1px solid #e3e3e3 !important;
    box-shadow: 0 -6px 24px rgba(0,0,0,.08) !important;
    scrollbar-width: none !important;
  }

  .p23m__rail::-webkit-scrollbar {
    display: none !important;
  }

  .p23m__rail button {
    flex: 0 0 68px !important;
    width: 68px !important;
    height: 54px !important;
    padding: 3px 2px !important;
    gap: 2px !important;
    justify-content: center !important;
    border-radius: 10px !important;
  }

  .p23m__rail span {
    width: 30px !important;
    height: 30px !important;
    font-size: 15px !important;
  }

  .p23m__rail small {
    font-size: 10px !important;
    line-height: 12px !important;
    max-width: 64px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  /* Footer del personalizador debajo del flujo móvil */
  .p23m__footer {
    position: sticky !important;
    bottom: 66px !important;
    z-index: 420 !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    padding: 10px 12px !important;
    border-top: 1px solid #e3e3e3 !important;
    box-shadow: 0 -4px 18px rgba(0,0,0,.06) !important;
  }

  .p23m__footer-spacer {
    display: none !important;
  }

  .p23m__price-wrap {
    flex: 1 1 auto !important;
  }

  .p23m__save-template {
    flex: 0 0 auto !important;
    padding: 10px 14px !important;
    font-size: 13px !important;
  }

  .p23m__price-popover {
    right: 0 !important;
    width: min(92vw, 330px) !important;
  }
}

/* Ajuste específico para móviles estrechos */
@media screen and (max-width: 520px) {
  .p23m__canvas {
    min-height: 360px !important;
    height: 50vh !important;
  }

  .p23m__stage {
    padding: 52px 4px 68px !important;
  }

  .p23m__panel {
    max-height: min(48vh, 430px) !important;
    min-height: 180px !important;
  }

  .p23m__zoom span {
    display: none !important;
  }

  .p23m__zoom {
    gap: 8px !important;
  }

  .p23m__save-template {
    width: 100% !important;
  }
}


/* ======================================================================
   23DTF v4.10j - Ajuste móvil de márgenes, rail y CTA
   - Reduce separación entre panel inferior, footer/subtotal y navegación inferior.
   - Mantiene canvas visible.
   - Rail inferior optimizado para orden: Producto, Subidas, Capas, Texto, Diseños, Clipart.
   ====================================================================== */

@media screen and (max-width: 989px) {
  /* Evita aire acumulado entre canvas, panel, footer y rail */
  .p23m__workspace {
    margin: 0 !important;
  }

  .p23m__canvas {
    margin: 8px 8px 0 !important;
    width: calc(100% - 16px) !important;
  }

  .p23m__toolbar {
    margin: 8px 8px 0 !important;
  }

  .p23m__panel {
    margin: 8px 8px 0 !important;
    width: calc(100% - 16px) !important;
    max-height: min(42vh, 410px) !important;
    min-height: 168px !important;
    padding: 12px 14px 18px !important;
    border-radius: 12px 12px 0 0 !important;
    box-shadow: 0 -6px 18px rgba(0,0,0,.06) !important;
  }

  .p23m__panel::before {
    margin-bottom: 10px !important;
  }

  /* El footer ya no debe crear una columna enorme entre panel y navegación */
  .p23m__footer {
    position: sticky !important;
    bottom: 62px !important;
    z-index: 430 !important;
    min-height: 58px !important;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom) * .2) !important;
    gap: 8px !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-shadow: 0 -3px 14px rgba(0,0,0,.05) !important;
  }

  .p23m__price-wrap {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    gap: 6px !important;
  }

  .p23m__price-label {
    font-size: 10px !important;
    line-height: 1.1 !important;
    text-align: left !important;
  }

  .p23m__price-wrap strong {
    font-size: 14px !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
  }

  .p23m__price-info {
    width: 18px !important;
    height: 18px !important;
    flex: 0 0 18px !important;
  }

  .p23m__save-template {
    width: auto !important;
    min-width: 138px !important;
    flex: 0 0 auto !important;
    padding: 10px 13px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
  }

  /* Barra inferior más compacta */
  .p23m__rail {
    min-height: 62px !important;
    height: 62px !important;
    padding: 5px 6px max(5px, env(safe-area-inset-bottom)) !important;
    gap: 2px !important;
  }

  .p23m__rail button {
    flex: 0 0 64px !important;
    width: 64px !important;
    height: 52px !important;
  }

  .p23m__rail span {
    width: 28px !important;
    height: 28px !important;
    font-size: 14px !important;
  }

  .p23m__rail small {
    font-size: 9.5px !important;
    line-height: 11px !important;
    max-width: 60px !important;
  }

  /* El popover del subtotal se adapta al nuevo footer compacto */
  .p23m__price-popover {
    bottom: 42px !important;
  }
}

@media screen and (max-width: 520px) {
  .p23m__panel {
    max-height: min(40vh, 380px) !important;
    min-height: 155px !important;
  }

  .p23m__footer {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  .p23m__save-template {
    min-width: 130px !important;
    padding-inline: 11px !important;
  }
}


/* ======================================================================
   23DTF v4.10k - Compactar columnas inferiores móvil/tablet
   Reduce altura y separación de:
   - Subtotal + Añadir al carrito
   - Rail inferior Producto/Subidas/Capas/Texto/Diseños/Clipart
   - Panel inferior tipo bottom sheet
   ====================================================================== */

@media screen and (max-width: 989px) {
  .p23m__panel {
    margin: 5px 6px 0 !important;
    width: calc(100% - 12px) !important;
    max-height: min(38vh, 370px) !important;
    min-height: 138px !important;
    padding: 9px 11px 12px !important;
    border-radius: 10px 10px 0 0 !important;
  }

  .p23m__panel::before {
    width: 36px !important;
    height: 3px !important;
    margin-bottom: 8px !important;
  }

  .p23m__panel h3,
  .p23m__panel h4 {
    margin-bottom: 7px !important;
  }

  .p23m__dynamic-controls {
    margin-top: 10px !important;
    padding-top: 10px !important;
  }

  .p23m__footer {
    bottom: 54px !important;
    min-height: 48px !important;
    padding: 5px 7px calc(5px + env(safe-area-inset-bottom) * .15) !important;
    gap: 3px !important;
    align-items: center !important;
  }

  .p23m__price-wrap {
    gap: 4px !important;
  }

  .p23m__price-label {
    font-size: 9px !important;
    line-height: 1 !important;
  }

  .p23m__price-wrap strong {
    font-size: 13px !important;
    line-height: 1.05 !important;
  }

  .p23m__price-info {
    width: 16px !important;
    height: 16px !important;
    flex: 0 0 16px !important;
    font-size: 10px !important;
  }

  .p23m__save-template {
    min-width: 118px !important;
    padding: 8px 9px !important;
    border-radius: 7px !important;
    font-size: 12px !important;
    line-height: 1.05 !important;
  }

  .p23m__rail {
    min-height: 54px !important;
    height: 54px !important;
    padding: 3px 3px max(3px, env(safe-area-inset-bottom)) !important;
    gap: 0 !important;
    justify-content: space-between !important;
  }

  .p23m__rail button {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 48px !important;
    padding: 2px 1px !important;
    border-radius: 8px !important;
  }

  .p23m__rail span {
    width: 25px !important;
    height: 25px !important;
    font-size: 13px !important;
    border-radius: 7px !important;
  }

  .p23m__rail small {
    font-size: 8.8px !important;
    line-height: 10px !important;
    max-width: 100% !important;
    letter-spacing: -.15px !important;
  }

  .p23m__price-popover {
    bottom: 36px !important;
  }
}

@media screen and (max-width: 520px) {
  .p23m__canvas {
    min-height: 345px !important;
    height: 48vh !important;
  }

  .p23m__panel {
    max-height: min(37vh, 350px) !important;
    min-height: 132px !important;
  }

  .p23m__footer {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  .p23m__save-template {
    min-width: 112px !important;
    padding: 7px 8px !important;
    font-size: 11.5px !important;
  }

  .p23m__rail button {
    height: 47px !important;
  }

  .p23m__rail small {
    font-size: 8.4px !important;
  }
}


/* ======================================================================
   23DTF v4.10l - CTA inferior más ancho y columna más compacta
   Objetivo:
   - Botón inferior tipo "Añadir al carrito" más alargado.
   - Mantiene radio de borde actual.
   - Reduce el alto de la columna/footer inferior.
   - Reduce separación vertical entre botón y contenedor.
   ====================================================================== */

@media screen and (max-width: 989px) {
  /* Footer inferior: menos alto y con el contenido más pegado */
  .p23m__footer {
    bottom: 50px !important;
    min-height: 44px !important;
    height: auto !important;
    padding: 4px 6px calc(4px + env(safe-area-inset-bottom) * .12) !important;
    gap: 5px !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  /* Columna de subtotal más estrecha para dar protagonismo al CTA */
  .p23m__price-wrap {
    flex: 0 1 34% !important;
    min-width: 82px !important;
    max-width: 38% !important;
    gap: 4px !important;
  }

  .p23m__price-label {
    font-size: 8.5px !important;
    line-height: 1 !important;
  }

  .p23m__price-wrap strong {
    font-size: 12.5px !important;
    line-height: 1.05 !important;
  }

  .p23m__price-info {
    width: 15px !important;
    height: 15px !important;
    flex: 0 0 15px !important;
    font-size: 9px !important;
  }

  /* CTA principal: más alargado, más bajo, mismo radio visual */
  .p23m__save-template {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 36px !important;
    height: 36px !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    font-size: 12.5px !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
  }

  /* Rail inferior todavía más compacto para que el footer pueda bajar */
  .p23m__rail {
    min-height: 50px !important;
    height: 50px !important;
    padding: 2px 3px max(2px, env(safe-area-inset-bottom)) !important;
  }

  .p23m__rail button {
    height: 44px !important;
    padding: 1px 1px !important;
  }

  .p23m__rail span {
    width: 23px !important;
    height: 23px !important;
    font-size: 12.5px !important;
  }

  .p23m__rail small {
    font-size: 8.1px !important;
    line-height: 9px !important;
  }

  /* Popover adaptado a la nueva altura */
  .p23m__price-popover {
    bottom: 34px !important;
  }
}

/* En móvil estrecho, el CTA ocupa más ancho y no se baja a segunda línea */
@media screen and (max-width: 520px) {
  .p23m__footer {
    display: flex !important;
    grid-template-columns: none !important;
    min-height: 42px !important;
    padding-inline: 5px !important;
  }

  .p23m__price-wrap {
    flex: 0 1 31% !important;
    max-width: 34% !important;
  }

  .p23m__save-template {
    flex: 1 1 66% !important;
    height: 35px !important;
    min-height: 35px !important;
    padding: 7px 12px !important;
    font-size: 12px !important;
  }

  .p23m__rail {
    min-height: 49px !important;
    height: 49px !important;
  }

  .p23m__rail button {
    height: 43px !important;
  }
}


/* ======================================================================
   23DTF v4.10m - Botón final móvil Añadir al carrito
   Elimina el caso visual del botón "Próximamente" usando el texto cambiado
   en main-product-v2 y compacta cualquier submit inferior del modal.
   ====================================================================== */

@media screen and (max-width: 989px) {
  .mpv2c-modal__submit,
  .mpv2c-modal__footer button[type="submit"],
  .mpv2c-modal__footer button[data-mpv2c-submit],
  .mpv2c-modal__footer .button,
  .p23m__save-template {
    border-radius: 8px !important;
  }

  .mpv2c-modal.is-p23m-with-active .mpv2c-modal__footer {
    min-height: 44px !important;
    padding: 4px 6px !important;
    gap: 5px !important;
  }

  .mpv2c-modal.is-p23m-with-active .mpv2c-modal__footer button,
  .mpv2c-modal.is-p23m-with-active .mpv2c-modal__footer .button {
    min-height: 36px !important;
    height: 36px !important;
    padding: 8px 16px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }
}


/* ======================================================================
   23DTF v4.10r - Popup móvil sin scroll exterior + rail fijo inferior
   - Bloquea el movimiento de la página exterior en iPhone/Android.
   - Deja la barra Producto/Subidas/Capas fija abajo del popup.
   - Aumenta altura de barra y tamaño de botones sin cambiar el ancho completo.
   ====================================================================== */

html.p23m-modal-scroll-locked,
body.p23m-modal-scroll-locked {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}

@media screen and (max-width: 989px) {
  .mpv2c-modal:not([hidden]),
  .mpv2-phase1-modal:not([hidden]) {
    position: fixed !important;
    inset: 0 !important;
    overscroll-behavior: contain !important;
  }

  .mpv2c-modal.is-p23m-with-active .mpv2c-modal__dialog {
    overflow: hidden !important;
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 10px) !important;
  }

  .mpv2c-modal.is-p23m-with-active .mpv2c-modal__content {
    height: 100% !important;
    max-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: calc(152px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m,
  .mpv2c-modal.is-p23m-with-active .p23m__layout {
    overscroll-behavior: contain !important;
  }

  /*
    Barra inferior fija al popup.
    Usamos position: fixed porque en iPhone el sticky dentro de contenedores
    con scroll puede saltar o dejar que el exterior se mueva.
  */
  .mpv2c-modal.is-p23m-with-active .p23m__rail {
    position: fixed !important;
    left: max(0px, calc((100vw - 96vw) / 2)) !important;
    right: max(0px, calc((100vw - 96vw) / 2)) !important;
    bottom: env(safe-area-inset-bottom, 0px) !important;
    z-index: 900 !important;
    width: auto !important;
    height: calc(74px + env(safe-area-inset-bottom, 0px)) !important;
    min-height: calc(74px + env(safe-area-inset-bottom, 0px)) !important;
    padding: 6px 8px max(6px, env(safe-area-inset-bottom, 0px)) !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 4px !important;
    overflow: hidden !important;
    background: #fff !important;
    border-top: 1px solid #e3e3e3 !important;
    border-right: 0 !important;
    box-shadow: 0 -8px 24px rgba(0,0,0,.12) !important;
    border-radius: 0 0 16px 16px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__rail button {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    height: 62px !important;
    padding: 4px 2px !important;
    border-radius: 12px !important;
    gap: 3px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__rail span {
    width: 32px !important;
    height: 32px !important;
    font-size: 16px !important;
    border-radius: 9px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__rail small {
    display: block !important;
    max-width: 100% !important;
    font-size: 10.2px !important;
    line-height: 11px !important;
    letter-spacing: -.1px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Footer/CTA fijo justo encima de la barra inferior */
  .mpv2c-modal.is-p23m-with-active .p23m__footer {
    position: fixed !important;
    left: max(0px, calc((100vw - 96vw) / 2)) !important;
    right: max(0px, calc((100vw - 96vw) / 2)) !important;
    bottom: calc(74px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 880 !important;
    min-height: 48px !important;
    height: 48px !important;
    padding: 5px 8px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: #fff !important;
    border-top: 1px solid #e3e3e3 !important;
    box-shadow: 0 -5px 18px rgba(0,0,0,.08) !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__save-template {
    height: 37px !important;
    min-height: 37px !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
  }

  /* Evita que el último contenido quede escondido detrás de footer + rail */
  .mpv2c-modal.is-p23m-with-active .p23m__panel {
    margin-bottom: 8px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__price-popover {
    bottom: 44px !important;
  }
}

@media screen and (max-width: 520px) {
  .mpv2c-modal.is-p23m-with-active .mpv2c-modal__content {
    padding-bottom: calc(148px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__rail {
    height: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
    min-height: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__rail button {
    height: 60px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__rail span {
    width: 31px !important;
    height: 31px !important;
    font-size: 15px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__rail small {
    font-size: 9.6px !important;
    line-height: 10.5px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__footer {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  }
}


/* ======================================================================
   23DTF v4.10s - Footer subtotal scrollable detrás de rail inferior
   Mantiene fija solo la barra Producto/Subidas/Capas.
   El bloque Subtotal + Añadir al carrito vuelve al flujo del popup y puede
   pasar visualmente por debajo/detrás de la barra inferior al hacer scroll.
   ====================================================================== */

@media screen and (max-width: 989px) {
  /*
    Ahora el contenido solo reserva espacio real para la barra inferior.
    Ya no reservamos espacio permanente para el footer de subtotal.
  */
  .mpv2c-modal.is-p23m-with-active .mpv2c-modal__content {
    padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /*
    Footer deja de estar fijo.
    Queda dentro del scroll del popup y con z-index inferior al rail.
  */
  .mpv2c-modal.is-p23m-with-active .p23m__footer {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 1 !important;

    width: calc(100% - 12px) !important;
    min-height: 48px !important;
    height: 48px !important;

    margin: 8px 6px calc(-48px - env(safe-area-inset-bottom, 0px)) !important;
    padding: 5px 8px !important;

    display: flex !important;
    align-items: center !important;
    gap: 6px !important;

    background: #fff !important;
    border-top: 1px solid #e3e3e3 !important;
    box-shadow: 0 -5px 18px rgba(0,0,0,.06) !important;
  }

  /*
    La barra inferior queda como única barra fija.
    Su z-index alto hace que el footer pueda pasar por debajo visualmente.
  */
  .mpv2c-modal.is-p23m-with-active .p23m__rail {
    z-index: 950 !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__save-template {
    height: 37px !important;
    min-height: 37px !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__price-popover {
    bottom: 44px !important;
    z-index: 980 !important;
  }
}

@media screen and (max-width: 520px) {
  .mpv2c-modal.is-p23m-with-active .mpv2c-modal__content {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__footer {
    min-height: 46px !important;
    height: 46px !important;
    margin-bottom: calc(-46px - env(safe-area-inset-bottom, 0px)) !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__save-template {
    height: 35px !important;
    min-height: 35px !important;
  }
}


/* ======================================================================
   23DTF v4.10t - Footer visible completo + tabla con personalización compacta
   - Corrige el footer: Subtotal + Añadir al carrito vuelve a verse entero.
   - Mantiene la barra Producto/Subidas/Capas fija abajo.
   - Compacta la tabla de colores/tallas en móvil para ver más tallas.
   ====================================================================== */

@media screen and (max-width: 989px) {
  /*
    Corrección sobre v4.10s:
    quitamos el margen negativo fuerte que hacía que solo se viera una parte
    pequeña del botón. El footer sigue dentro del scroll, pero puede llegar a
    verse completo antes de quedar cubierto por el rail.
  */
  .mpv2c-modal.is-p23m-with-active .mpv2c-modal__content {
    padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__footer {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 1 !important;

    width: calc(100% - 12px) !important;
    min-height: 50px !important;
    height: 50px !important;

    margin: 8px 6px 14px !important;
    padding: 6px 8px !important;

    display: flex !important;
    align-items: center !important;
    gap: 6px !important;

    background: #fff !important;
    border-top: 1px solid #e3e3e3 !important;
    box-shadow: 0 -5px 18px rgba(0,0,0,.06) !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__save-template {
    height: 38px !important;
    min-height: 38px !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__rail {
    z-index: 950 !important;
  }

  /*
    Tabla de colores/tallas con personalización:
    solo reducimos medidas visuales en móvil/tablet.
    No tocamos JS, data-attributes ni lógica de cantidad/color.
  */
  .mpv2c-modal.is-p23m-with-active .p23m__personalizer-table-wrap {
    max-height: 255px !important;
    margin-top: 10px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__personalizer-table {
    min-width: 360px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__personalizer-table th,
  .mpv2c-modal.is-p23m-with-active .p23m__personalizer-table td {
    padding: 6px 5px !important;
    font-size: 11px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__personalizer-table th:first-child {
    min-width: 92px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__personalizer-table tbody th {
    gap: 6px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__personalizer-swatch {
    width: 20px !important;
    height: 20px !important;
    flex: 0 0 20px !important;
    border-radius: 5px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__personalizer-table input {
    width: 42px !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 2px 4px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__personalizer-summary {
    margin-top: 10px !important;
    padding: 10px !important;
  }
}

@media screen and (max-width: 520px) {
  .mpv2c-modal.is-p23m-with-active .mpv2c-modal__content {
    padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__footer {
    min-height: 48px !important;
    height: 48px !important;
    margin: 7px 6px 12px !important;
    padding: 5px 7px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__save-template {
    height: 36px !important;
    min-height: 36px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__personalizer-table {
    min-width: 340px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__personalizer-table th:first-child {
    min-width: 86px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__personalizer-table input {
    width: 38px !important;
    height: 29px !important;
    min-height: 29px !important;
    font-size: 11.5px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__personalizer-swatch {
    width: 18px !important;
    height: 18px !important;
    flex-basis: 18px !important;
  }
}


/* ======================================================================
   23DTF v4.10u - Ajustes panel producto móvil + tabla más visible
   - Oculta el título del producto en el panel de producto.
   - Sube "ⓘ Precios y guías de archivo" a la esquina superior del bloque.
   - Da más separación entre aviso y tabla.
   - Reduce el hueco debajo del bloque Subtotal + Añadir al carrito.
   - Compacta SOLO la tabla de Con personalización en móvil/tablet.
   ====================================================================== */

@media screen and (max-width: 989px) {
  /*
    Panel Producto: ocultamos el título duplicado para ahorrar altura.
    No afecta al título general del popup ni a desktop.
  */
  .mpv2c-modal.is-p23m-with-active .p23m__panel-view[data-p23m-panel="product"] > h3 {
    display: none !important;
  }

  /*
    Link de precios arriba, limpio y pegado a la esquina izquierda del bloque.
  */
  .mpv2c-modal.is-p23m-with-active .p23m__panel-view[data-p23m-panel="product"] > .p23m__link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
  }

  /*
    Aviso inicial: más aire por debajo para que no se pegue a la tabla.
  */
  .mpv2c-modal.is-p23m-with-active [data-p23m-selection-hint] {
    margin-top: 0 !important;
    margin-bottom: 20px !important;
    padding: 13px 14px !important;
  }

  /*
    Menos hueco visual entre el bloque de subtotal y la barra inferior.
    Conserva el rail fijo y permite que el footer siga entrando detrás.
  */
  .mpv2c-modal.is-p23m-with-active .mpv2c-modal__content {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__footer {
    margin: 8px 6px calc(-22px - env(safe-area-inset-bottom, 0px)) !important;
    min-height: 50px !important;
    height: 50px !important;
  }

  /*
    Tabla Con personalización más compacta.
    Objetivo: que en móvil se vean más tallas sin romper selección,
    scroll horizontal ni inputs de cantidad.
  */
  .mpv2c-modal.is-p23m-with-active .p23m-matrix-wrap {
    max-height: 245px !important;
    margin-top: 0 !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-matrix {
    min-width: 410px !important;
    width: max-content !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-matrix th,
  .mpv2c-modal.is-p23m-with-active .p23m-matrix td {
    padding: 6px 5px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-matrix__color-th,
  .mpv2c-modal.is-p23m-with-active .p23m-matrix thead th:first-child {
    min-width: 86px !important;
    width: 86px !important;
    max-width: 86px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-matrix__color-button {
    gap: 6px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-matrix__swatch,
  .mpv2c-modal.is-p23m-with-active .mpv2-matrix-color__swatch,
  .mpv2c-modal.is-p23m-with-active .mpv2c-modal__color-swatch {
    width: 20px !important;
    height: 20px !important;
    flex: 0 0 20px !important;
    border-radius: 6px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-matrix__color-label {
    font-size: 11px !important;
    line-height: 1.1 !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-matrix__qty-cell {
    min-width: 54px !important;
    width: 54px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-matrix__qty {
    width: 42px !important;
    min-height: 30px !important;
    height: 30px !important;
    padding: 2px 4px !important;
    font-size: 12px !important;
    border-radius: 7px !important;
    font-weight: 600 !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-matrix thead th {
    font-size: 11px !important;
    height: 34px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-matrix__row {
    height: 48px !important;
  }
}

@media screen and (max-width: 520px) {
  .mpv2c-modal.is-p23m-with-active .mpv2c-modal__content {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__footer {
    margin-bottom: calc(-24px - env(safe-area-inset-bottom, 0px)) !important;
    min-height: 48px !important;
    height: 48px !important;
  }

  .mpv2c-modal.is-p23m-with-active [data-p23m-selection-hint] {
    margin-bottom: 18px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-matrix {
    min-width: 390px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-matrix__color-th,
  .mpv2c-modal.is-p23m-with-active .p23m-matrix thead th:first-child {
    min-width: 78px !important;
    width: 78px !important;
    max-width: 78px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-matrix__qty-cell {
    min-width: 50px !important;
    width: 50px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-matrix__qty {
    width: 38px !important;
    min-height: 29px !important;
    height: 29px !important;
    font-size: 11.5px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-matrix__swatch,
  .mpv2c-modal.is-p23m-with-active .mpv2-matrix-color__swatch,
  .mpv2c-modal.is-p23m-with-active .mpv2c-modal__color-swatch {
    width: 18px !important;
    height: 18px !important;
    flex-basis: 18px !important;
  }
}


/* ======================================================================
   23DTF v4.10v - Ajuste final bloque Subtotal + Añadir al carrito
   Objetivo:
   - El bloque se ve completo.
   - No queda tanto hueco debajo antes de la barra Producto/Subidas/Capas.
   - Mantiene el footer dentro del scroll y el rail inferior fijo.
   - Solo afecta a móvil/tablet en "Con personalización".
   ====================================================================== */

@media screen and (max-width: 989px) {
  /*
    Reserva el espacio justo para que el footer pueda verse completo
    y luego pasar detrás del rail inferior sin dejar una zona muerta grande.
  */
  .mpv2c-modal.is-p23m-with-active .mpv2c-modal__content {
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /*
    Footer subtotal/carrito:
    - Menos alto.
    - Padding más compacto.
    - Margen inferior suave negativo: se acerca al rail, pero no se esconde demasiado.
  */
  .mpv2c-modal.is-p23m-with-active .p23m__footer {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 1 !important;

    width: calc(100% - 12px) !important;
    min-height: 48px !important;
    height: 48px !important;

    margin: 8px 6px -8px !important;
    padding: 5px 8px !important;

    display: flex !important;
    align-items: center !important;
    gap: 6px !important;

    background: #fff !important;
    border-top: 1px solid #e3e3e3 !important;
    box-shadow: 0 -5px 18px rgba(0,0,0,.06) !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__price-wrap {
    min-width: 0 !important;
    gap: 5px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__price-label {
    font-size: 9px !important;
    line-height: 1 !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__price-wrap strong {
    font-size: 13px !important;
    line-height: 1.05 !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__save-template {
    height: 36px !important;
    min-height: 36px !important;
    padding: 7px 16px !important;
    border-radius: 8px !important;
    line-height: 1 !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__rail {
    z-index: 950 !important;
  }
}

@media screen and (max-width: 520px) {
  .mpv2c-modal.is-p23m-with-active .mpv2c-modal__content {
    padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__footer {
    min-height: 46px !important;
    height: 46px !important;
    margin: 7px 6px -7px !important;
    padding: 5px 7px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__save-template {
    height: 35px !important;
    min-height: 35px !important;
    padding: 7px 14px !important;
  }
}


/* ======================================================================
   23DTF v4.10y - Transformar corregido + área fija en responsive
   - El área de impresión se mantiene en coordenadas del mockup.
   - Escala libre deforma realmente la imagen.
   - Botón reset recupera proporción original.
   ====================================================================== */

.p23m__mockup > .p23m__safe {
  position: absolute !important;
}

.p23m__layer-item img {
  object-fit: fill !important;
}

.p23m-transform__link-wrap {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  min-width: 52px !important;
}

.p23m-transform__link {
  min-width: 38px !important;
  height: 34px !important;
  border: 1px solid #d6d9dc !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #202223 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  padding: 0 8px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

.p23m-transform__link span {
  display: none !important;
}

.p23m-transform__link.is-locked {
  border-color: #0d6aa8 !important;
  background: #d9edf9 !important;
  color: #0d6aa8 !important;
}

.p23m-transform__link.is-free {
  border-color: #d6d9dc !important;
  background: #fff !important;
  color: #202223 !important;
}

.p23m-transform__reset {
  width: 32px !important;
  height: 34px !important;
  border: 1px solid #d6d9dc !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #202223 !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

.p23m-transform__reset:hover {
  background: #f6f6f7 !important;
}

.p23m__handle.n-edge {
  left: 50% !important;
  top: -5px !important;
  transform: translateX(-50%) !important;
  cursor: ns-resize !important;
}

.p23m__handle.s-edge {
  left: 50% !important;
  bottom: -5px !important;
  transform: translateX(-50%) !important;
  cursor: ns-resize !important;
}

.p23m__handle.e-edge {
  right: -5px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  cursor: ew-resize !important;
}

.p23m__handle.w-edge {
  left: -5px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  cursor: ew-resize !important;
}

@media screen and (max-width: 989px) {
  .p23m-transform__link,
  .p23m-transform__reset {
    height: 36px !important;
  }
}


/* ======================================================================
   23DTF v4.10z - Coordinate Space único 380x460
   Solución estructural para que prenda, área de impresión, máscara, dropzone
   y capas usen exactamente el mismo sistema de coordenadas.
   ====================================================================== */

/*
  Anula definitivamente reglas desktop antiguas que cambiaban el tamaño real
  del mockup con min(43vw...), min(62vh...), etc.
  El mockup SIEMPRE mide 380x460 internamente y solo se escala con transform.
*/
.mpv2c-modal.is-p23m-with-active .p23m__stage .p23m__mockup,
.mpv2c-modal.is-p23m-with-active .p23m__canvas .p23m__mockup,
.mpv2c-modal.is-p23m-with-active .p23m__workspace .p23m__mockup {
  position: relative !important;
  width: 380px !important;
  height: 460px !important;
  min-width: 380px !important;
  min-height: 460px !important;
  max-width: none !important;
  max-height: none !important;
  flex: 0 0 auto !important;
  transform-origin: 50% 50% !important;
  will-change: transform !important;
}

/*
  Capa única de coordenadas.
  Todo lo que usa rect: {x,y,w,h} vive aquí dentro.
*/
.p23m__coord-space {
  position: absolute !important;
  inset: 0 !important;
  width: 380px !important;
  height: 460px !important;
  min-width: 380px !important;
  min-height: 460px !important;
  max-width: 380px !important;
  max-height: 460px !important;
  transform: none !important;
  transform-origin: 50% 50% !important;
  overflow: visible !important;
}

/* La prenda, área, dropzone y capas comparten el mismo origen 0,0 */
.p23m__coord-space .p23m__product-image-wrap,
.p23m__coord-space .p23m__hoodie,
.p23m__coord-space .p23m__product-image,
.p23m__coord-space .p23m__safe,
.p23m__coord-space .p23m__canvas-upload,
.p23m__coord-space .p23m__layer-stage {
  position: absolute !important;
}

.p23m__coord-space .p23m__product-image-wrap,
.p23m__coord-space .p23m__hoodie,
.p23m__coord-space .p23m__product-image,
.p23m__coord-space .p23m__layer-stage {
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

/*
  Evita que reglas antiguas con display:flex/position:relative sobre la imagen
  alteren el origen visual del producto.
*/
.p23m__coord-space .p23m__product-image-wrap {
  display: block !important;
  overflow: hidden !important;
}

.p23m__coord-space .p23m__product-image:not(.is-empty) {
  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 center !important;
  color: transparent !important;
  font-size: 0 !important;
}

/* Safe y máscara por encima de la prenda, pero dentro del mismo coordinate-space */
.p23m__coord-space .p23m__safe {
  z-index: 35 !important;
}

.p23m__coord-space .p23m__canvas-upload {
  z-index: 40 !important;
}

.p23m__coord-space .p23m__layer-stage {
  z-index: 20 !important;
}

/* Refuerzo de máscara calculada sobre los mismos 380x460 */
.p23m__coord-space .p23m__layer-stage.is-p23m-print-mask-active {
  overflow: hidden !important;
}

/* Mantener escala libre real de imágenes dentro de las capas */
.p23m__layer-item img {
  object-fit: fill !important;
}


/* ======================================================================
   23DTF v4.11a - Rail inferior limpio: Producto/Subidas/Texto/Capas
   - Oculta Diseños y Clipart si quedaran renderizados por caché.
   - Barra inferior a todo el ancho del popup en móvil/tablet.
   - 4 botones más grandes, iconos SVG estilo app.
   ====================================================================== */

/* Iconos SVG base, también válido para desktop */
.p23m__rail-icon svg {
  width: 22px !important;
  height: 22px !important;
  display: block !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.9 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.p23m__rail [data-p23m-rail="designs"],
.p23m__rail [data-p23m-rail="clipart"] {
  display: none !important;
}

@media screen and (max-width: 989px) {
  /*
    Rail a todo el ancho útil del popup.
    Al ser fixed, usamos inset horizontal 0 para que no quede "flotando" ni estrecho.
  */
  .mpv2c-modal.is-p23m-with-active .p23m__rail {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: env(safe-area-inset-bottom, 0px) !important;
    width: 100vw !important;
    max-width: 100vw !important;
    min-height: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
    height: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
    padding: 7px 10px max(7px, env(safe-area-inset-bottom, 0px)) !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    overflow: hidden !important;
    background: #fff !important;
    border-top: 1px solid #e3e3e3 !important;
    border-right: 0 !important;
    border-radius: 0 !important;
    box-shadow: 0 -8px 26px rgba(0,0,0,.13) !important;
    z-index: 950 !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__rail button {
    width: 100% !important;
    min-width: 0 !important;
    height: 64px !important;
    padding: 5px 3px !important;
    border-radius: 14px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    background: transparent !important;
    color: #202223 !important;
    border: 0 !important;
    transition: background .16s ease, color .16s ease, transform .16s ease !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__rail button:not(.is-active):hover {
    background: #f6f6f7 !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__rail button:active {
    transform: translateY(1px) !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__rail span,
  .mpv2c-modal.is-p23m-with-active .p23m__rail-icon {
    width: 34px !important;
    height: 34px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f3f4f6 !important;
    color: #202223 !important;
    font-size: 0 !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__rail-icon svg {
    width: 21px !important;
    height: 21px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__rail .is-active span,
  .mpv2c-modal.is-p23m-with-active .p23m__rail .is-active .p23m__rail-icon {
    background: #202223 !important;
    color: #fff !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__rail small {
    max-width: 100% !important;
    font-size: 10.8px !important;
    line-height: 11px !important;
    font-weight: 700 !important;
    letter-spacing: -.1px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    color: currentColor !important;
  }

  /*
    Compensación inferior: ahora el rail es un poco más alto y ocupa todo el ancho.
    Mantenemos footer/subtotal scrollable por detrás.
  */
  .mpv2c-modal.is-p23m-with-active .mpv2c-modal__content {
    padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__footer {
    margin-bottom: -6px !important;
  }
}

@media screen and (max-width: 520px) {
  .mpv2c-modal.is-p23m-with-active .p23m__rail {
    min-height: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    height: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    padding: 6px 8px max(6px, env(safe-area-inset-bottom, 0px)) !important;
    gap: 7px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__rail button {
    height: 63px !important;
    border-radius: 13px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__rail span,
  .mpv2c-modal.is-p23m-with-active .p23m__rail-icon {
    width: 33px !important;
    height: 33px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__rail-icon svg {
    width: 20px !important;
    height: 20px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__rail small {
    font-size: 10.2px !important;
  }

  .mpv2c-modal.is-p23m-with-active .mpv2c-modal__content {
    padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px)) !important;
  }
}


/* ======================================================================
   23DTF v4.11b - Iconos Transformar + tap real en toolbar móvil
   - Iconos SVG inline para proporción vinculada/libre y reset.
   - Mejora visual de los botones del bloque Transformar.
   - En táctil, los botones Transformar/Posición/Recortar no cambian
     accidentalmente al rozarlos durante scroll.
   ====================================================================== */

.p23m-transform__icon {
  width: 18px !important;
  height: 18px !important;
  display: block !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.9 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  pointer-events: none !important;
}

.p23m-transform__link,
.p23m-transform__reset {
  appearance: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

.p23m-transform__link {
  box-shadow: 0 1px 0 rgba(0,0,0,.04) !important;
}

.p23m-transform__link.is-locked {
  border-color: rgba(13,106,168,.36) !important;
  background: #d9edf9 !important;
  color: #0d6aa8 !important;
}

.p23m-transform__link.is-free {
  border-color: rgba(32,34,35,.18) !important;
  background: #fff !important;
  color: #202223 !important;
}

.p23m-transform__reset {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 1px 0 rgba(0,0,0,.04) !important;
}

.p23m-transform__reset:hover {
  border-color: rgba(32,34,35,.28) !important;
  background: #f6f6f7 !important;
}

.p23m-transform__reset:active,
.p23m-transform__link:active {
  transform: translateY(1px) !important;
}

@media screen and (max-width: 989px) {
  .mpv2c-modal.is-p23m-with-active .p23m__toolbar {
    touch-action: pan-x pan-y !important;
    user-select: none !important;
    -webkit-user-select: none !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__toolbar button {
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  .p23m-transform__icon {
    width: 19px !important;
    height: 19px !important;
  }
}


/* ======================================================================
   23DTF v4.11c - Tap real también en zonas de prenda
   Evita que Impresión frontal / Manga izquierda / Manga derecha / Trasera /
   Etiqueta interior cambien accidentalmente al rozar durante scroll táctil.
   ====================================================================== */

@media screen and (max-width: 989px) {
  .mpv2c-modal.is-p23m-with-active .p23m__placements {
    touch-action: pan-x pan-y !important;
    user-select: none !important;
    -webkit-user-select: none !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__placements button {
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
  }
}


/* ======================================================================
   23DTF v4.11d - Reset proporción + popup Subidas robusto
   - El popup Tus archivos queda por encima de todo, con X visible.
   - En móvil/tablet ocupa la pantalla del popup de forma estable.
   - Cerrar funciona desde X, backdrop y Escape.
   ====================================================================== */

html.p23m-filelib-open,
body.p23m-filelib-open {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}

.p23m-filelib.is-open {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.p23m-filelib__dialog {
  isolation: isolate !important;
}

.p23m-filelib__header {
  position: relative !important;
  z-index: 5 !important;
  background: #fff !important;
  flex: 0 0 auto !important;
}

.p23m-filelib__close {
  position: relative !important;
  z-index: 20 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 42px !important;
  width: 42px !important;
  height: 42px !important;
  border-radius: 10px !important;
  color: #202223 !important;
  background: #fff !important;
}

.p23m-filelib__close:hover {
  background: #f6f6f7 !important;
}

@media screen and (max-width: 989px) {
  .p23m-filelib {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483647 !important;
    padding: max(10px, env(safe-area-inset-top, 0px)) 10px max(10px, env(safe-area-inset-bottom, 0px)) !important;
    align-items: stretch !important;
    justify-content: center !important;
    background: rgba(0,0,0,.42) !important;
    overscroll-behavior: contain !important;
  }

  .p23m-filelib__backdrop {
    position: fixed !important;
    inset: 0 !important;
  }

  .p23m-filelib__dialog {
    width: min(100%, 720px) !important;
    height: calc(100dvh - max(20px, env(safe-area-inset-top, 0px)) - max(20px, env(safe-area-inset-bottom, 0px))) !important;
    max-height: none !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .p23m-filelib__header {
    position: sticky !important;
    top: 0 !important;
    min-height: 58px !important;
    height: 58px !important;
    padding: 0 12px 0 16px !important;
  }

  .p23m-filelib__title {
    font-size: 18px !important;
  }

  .p23m-filelib__close {
    flex-basis: 44px !important;
    width: 44px !important;
    height: 44px !important;
    font-size: 34px !important;
    line-height: 1 !important;
  }

  .p23m-filelib__body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 14px 12px 20px !important;
  }

  .p23m-filelib__top {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin-bottom: 18px !important;
  }

  .p23m-filelib__search,
  .p23m-filelib__sort button,
  .p23m-filelib__upload {
    height: 46px !important;
    font-size: 14px !important;
  }

  .p23m-filelib__recent-grid,
  .p23m-filelib__grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
}


/* ======================================================================
   23DTF v4.11e - Subidas solo abre popup, no aplica archivo automático
   Evita que el mismo gesto que abre Tus archivos pueda aplicar una tarjeta.
   ====================================================================== */

.p23m-filelib.is-opening [data-p23m-apply-upload] {
  pointer-events: none !important;
}

.p23m-filelib.is-opening .p23m-filelib__card,
.p23m-filelib.is-opening .p23m-filelib__recent-card {
  opacity: .96 !important;
}


/* ======================================================================
   23DTF v4.11f - Anti click por hover/pointermove
   Refuerzo visual/táctil: los botones de subida esperan click real.
   ====================================================================== */

.p23m__canvas-upload,
.p23m__canvas-upload button,
[data-p23m-upload-btn] {
  -webkit-tap-highlight-color: transparent !important;
}

@media (hover: hover) and (pointer: fine) {
  .p23m__canvas-upload:hover {
    cursor: pointer !important;
  }
}


/* ======================================================================
   23DTF v4.11g - Transformar: lock/reset bien ubicados entre Anchura y Altura
   Desktop:
     Anchura | vínculo/reset | Altura
   Móvil:
     Anchura
     vínculo/reset
     Altura
   ====================================================================== */

/* Escritorio y tablet ancha */
@media screen and (min-width: 990px) {
  .mpv2c-modal.is-p23m-with-active .p23m-transform__size-grid {
    display: grid !important;
    grid-template-columns: minmax(150px, 178px) 74px minmax(150px, 178px) !important;
    align-items: end !important;
    justify-content: start !important;
    column-gap: 12px !important;
    row-gap: 8px !important;
    max-width: 460px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__size-item {
    min-width: 0 !important;
    width: 100% !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__stepper {
    width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: 30px minmax(72px, 1fr) 30px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__stepper input {
    min-width: 0 !important;
    width: 100% !important;
    text-align: center !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__stepper button {
    width: 30px !important;
    min-width: 30px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__link-wrap {
    align-self: end !important;
    min-width: 74px !important;
    width: 74px !important;
    height: 36px !important;
    margin: 0 0 0 !important;
    display: grid !important;
    grid-template-columns: 36px 32px !important;
    gap: 6px !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__link,
  .mpv2c-modal.is-p23m-with-active .p23m-transform__reset {
    margin: 0 !important;
    min-width: 0 !important;
    width: 100% !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    border-radius: 9px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__link .p23m-transform__icon,
  .mpv2c-modal.is-p23m-with-active .p23m-transform__reset .p23m-transform__icon {
    width: 17px !important;
    height: 17px !important;
  }
}

/* Pantallas intermedias donde el panel izquierdo puede ser estrecho */
@media screen and (min-width: 990px) and (max-width: 1280px) {
  .mpv2c-modal.is-p23m-with-active .p23m-transform__size-grid {
    grid-template-columns: minmax(132px, 158px) 70px minmax(132px, 158px) !important;
    column-gap: 10px !important;
    max-width: 410px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__link-wrap {
    width: 70px !important;
    min-width: 70px !important;
    grid-template-columns: 34px 30px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__link,
  .mpv2c-modal.is-p23m-with-active .p23m-transform__reset {
    height: 34px !important;
    min-height: 34px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__stepper {
    grid-template-columns: 28px minmax(64px, 1fr) 28px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__stepper button {
    width: 28px !important;
    min-width: 28px !important;
  }
}

/* Móvil/tablet vertical: mantener lectura en columna */
@media screen and (max-width: 989px) {
  .mpv2c-modal.is-p23m-with-active .p23m-transform__size-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    row-gap: 12px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__link-wrap {
    order: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: -2px 0 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__size-item:first-child {
    order: 1 !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__size-item:last-child {
    order: 3 !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__link,
  .mpv2c-modal.is-p23m-with-active .p23m-transform__reset {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    border-radius: 10px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__stepper {
    width: 100% !important;
  }
}


/* ======================================================================
   23DTF v4.11h - Transformar tablet: tamaño primero + bloque sin recorte
   - En tablet/escritorio estrecho, Anchura/Altura pasan encima de Girar.
   - El grid se compacta para que no se corte el botón de Altura.
   - En desktop ancho se mantiene el layout anterior.
   ====================================================================== */

/* Tablet / portátil estrecho: panel izquierdo más limitado */
@media screen and (min-width: 990px) and (max-width: 1280px) {
  .mpv2c-modal.is-p23m-with-active .p23m-transform {
    display: flex !important;
    flex-direction: column !important;
    gap: 18px !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  /* Anchura / lock-reset / Altura primero */
  .mpv2c-modal.is-p23m-with-active .p23m-transform__size-grid {
    order: 1 !important;
    display: grid !important;
    grid-template-columns: minmax(118px, 1fr) 66px minmax(118px, 1fr) !important;
    column-gap: 8px !important;
    row-gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
  }

  /* Girar debajo */
  .mpv2c-modal.is-p23m-with-active .p23m-transform__group:first-child {
    order: 2 !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__size-item {
    min-width: 0 !important;
    width: 100% !important;
    overflow: visible !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__size-item label {
    white-space: nowrap !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__stepper {
    width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: 27px minmax(48px, 1fr) 27px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__stepper input {
    min-width: 0 !important;
    width: 100% !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
    text-align: center !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__stepper button {
    width: 27px !important;
    min-width: 27px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__link-wrap {
    align-self: end !important;
    width: 66px !important;
    min-width: 66px !important;
    height: 34px !important;
    display: grid !important;
    grid-template-columns: 33px 29px !important;
    gap: 4px !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__link,
  .mpv2c-modal.is-p23m-with-active .p23m-transform__reset {
    width: 100% !important;
    min-width: 0 !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__link .p23m-transform__icon,
  .mpv2c-modal.is-p23m-with-active .p23m-transform__reset .p23m-transform__icon {
    width: 16px !important;
    height: 16px !important;
  }
}

/* Tablet muy justo: si aún no cabe en 3 columnas, cae a formato limpio de 2 filas */
@media screen and (min-width: 990px) and (max-width: 1120px) {
  .mpv2c-modal.is-p23m-with-active .p23m-transform__size-grid {
    grid-template-columns: 1fr 66px 1fr !important;
    column-gap: 7px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__stepper {
    grid-template-columns: 26px minmax(42px, 1fr) 26px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__stepper button {
    width: 26px !important;
    min-width: 26px !important;
  }
}

/* Móvil: orden ya correcto, reforzamos que Anchura vaya arriba y Altura abajo */
@media screen and (max-width: 989px) {
  .mpv2c-modal.is-p23m-with-active .p23m-transform {
    display: flex !important;
    flex-direction: column !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__size-grid {
    order: 1 !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__group:first-child {
    order: 2 !important;
  }
}


/* ======================================================================
   23DTF v4.11i - Transformar sin escala libre, solo reset
   - Oculta cualquier botón antiguo de proporción libre/vinculada.
   - Deja reset como único botón central.
   - El diseño escala siempre proporcionalmente para proteger el resultado.
   ====================================================================== */

.mpv2c-modal.is-p23m-with-active [data-p23m-toggle-aspect],
.mpv2c-modal.is-p23m-with-active .p23m-transform__link {
  display: none !important;
}

.mpv2c-modal.is-p23m-with-active .p23m-transform__size-grid.is-reset-only .p23m-transform__link-wrap {
  display: flex !important;
  align-items: end !important;
  justify-content: center !important;
}

.mpv2c-modal.is-p23m-with-active .p23m-transform__size-grid.is-reset-only .p23m-transform__reset {
  display: inline-flex !important;
}

@media screen and (min-width: 990px) {
  .mpv2c-modal.is-p23m-with-active .p23m-transform__size-grid.is-reset-only {
    grid-template-columns: minmax(150px, 178px) 42px minmax(150px, 178px) !important;
    column-gap: 12px !important;
    max-width: 420px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__size-grid.is-reset-only .p23m-transform__link-wrap {
    width: 42px !important;
    min-width: 42px !important;
    height: 36px !important;
    align-self: end !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__size-grid.is-reset-only .p23m-transform__reset {
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    border-radius: 9px !important;
  }
}

@media screen and (min-width: 990px) and (max-width: 1280px) {
  .mpv2c-modal.is-p23m-with-active .p23m-transform__size-grid.is-reset-only {
    grid-template-columns: minmax(122px, 1fr) 40px minmax(122px, 1fr) !important;
    column-gap: 8px !important;
    max-width: 100% !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__size-grid.is-reset-only .p23m-transform__link-wrap {
    width: 40px !important;
    min-width: 40px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__size-grid.is-reset-only .p23m-transform__reset {
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
  }
}

@media screen and (max-width: 989px) {
  .mpv2c-modal.is-p23m-with-active .p23m-transform__size-grid.is-reset-only {
    grid-template-columns: 1fr !important;
    row-gap: 12px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__size-grid.is-reset-only .p23m-transform__link-wrap {
    order: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: -2px 0 0 !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__size-grid.is-reset-only .p23m-transform__reset {
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    border-radius: 11px !important;
  }
}


/* ======================================================================
   23DTF v4.11j - Reset total debajo de Voltear + tamaño proporcional OK
   - El reset sale debajo de Horizontal/Vertical, centrado.
   - Anchura/Altura quedan en dos columnas sin botón intermedio.
   - Reset total: tamaño original, centrado, giro 0/mapRotation y sin volteos.
   ====================================================================== */

.mpv2c-modal.is-p23m-with-active .p23m-transform__size-grid.is-no-link {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
  max-width: 100% !important;
}

.mpv2c-modal.is-p23m-with-active .p23m-transform__size-grid.is-no-link .p23m-transform__size-item {
  min-width: 0 !important;
}

.mpv2c-modal.is-p23m-with-active .p23m-transform__size-grid.is-no-link .p23m-transform__stepper {
  width: 100% !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: 32px minmax(64px, 1fr) 32px !important;
}

.mpv2c-modal.is-p23m-with-active .p23m-transform__size-grid.is-no-link .p23m-transform__stepper input {
  width: 100% !important;
  min-width: 0 !important;
  text-align: center !important;
}

.mpv2c-modal.is-p23m-with-active .p23m-transform__reset-row {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  margin: 18px 0 0 !important;
  padding: 0 !important;
}

.mpv2c-modal.is-p23m-with-active .p23m-transform__reset-total {
  width: auto !important;
  min-width: 172px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 16px !important;
  border-radius: 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  font-weight: 800 !important;
  font-size: 13px !important;
  background: #fff !important;
}

.mpv2c-modal.is-p23m-with-active .p23m-transform__reset-total span {
  display: inline !important;
}

@media screen and (min-width: 990px) and (max-width: 1280px) {
  .mpv2c-modal.is-p23m-with-active .p23m-transform__size-grid.is-no-link {
    order: 1 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__group:first-child {
    order: 2 !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__size-grid.is-no-link .p23m-transform__stepper {
    grid-template-columns: 28px minmax(48px, 1fr) 28px !important;
  }
}

@media screen and (max-width: 989px) {
  .mpv2c-modal.is-p23m-with-active .p23m-transform__size-grid.is-no-link {
    order: 1 !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__group:first-child {
    order: 2 !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__reset-row {
    margin-top: 16px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-transform__reset-total {
    min-width: 180px !important;
    height: 42px !important;
    min-height: 42px !important;
  }
}


/* ======================================================================
   23DTF v4.11k - Toolbar de edición dentro del canvas
   - Sustituye los 3 botones laterales antiguos por Transformar/Posición/etc.
   - Solo se ven iconos.
   - Tooltip tipo chip al hover/focus con el nombre de la herramienta.
   - En móvil/tablet se coloca horizontal para no tapar demasiado la prenda.
   ====================================================================== */

.mpv2c-modal.is-p23m-with-active .p23m__toolbar--legacy {
  display: none !important;
}

.mpv2c-modal.is-p23m-with-active .p23m__workspace > .p23m__toolbar:not(.p23m__toolbar--canvas) {
  display: none !important;
}

.mpv2c-modal.is-p23m-with-active .p23m__canvas-tools.p23m__canvas-tools--subtools {
  position: absolute !important;
  right: 14px !important;
  top: 14px !important;
  z-index: 55 !important;
  display: flex !important;
  flex-direction: column !important;
  border: 1px solid #e3e3e3 !important;
  border-radius: 10px !important;
  overflow: visible !important;
  background: #fff !important;
  box-shadow: 0 8px 22px rgba(0,0,0,.08) !important;
}

.mpv2c-modal.is-p23m-with-active .p23m__toolbar.p23m__toolbar--canvas {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #fff !important;
  border: 0 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.mpv2c-modal.is-p23m-with-active .p23m__toolbar.p23m__toolbar--canvas[hidden],
.mpv2c-modal.is-p23m-with-active .p23m__toolbar.p23m__toolbar--canvas.is-p23m-hidden {
  display: none !important;
}

.mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button {
  position: relative !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid #ececec !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: #202223 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0 !important;
  -webkit-tap-highlight-color: transparent !important;
}

.mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button:first-child {
  border-top-left-radius: 10px !important;
  border-top-right-radius: 10px !important;
}

.mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button:last-child {
  border-bottom: 0 !important;
  border-bottom-left-radius: 10px !important;
  border-bottom-right-radius: 10px !important;
}

.mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button.is-active {
  background: #d9edf9 !important;
  color: #0d6aa8 !important;
}

.mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button.is-disabled {
  opacity: .35 !important;
  cursor: not-allowed !important;
}

.mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas .p23m__tool-icon {
  width: 22px !important;
  height: 22px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: none !important;
}

.mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas .p23m__tool-icon svg {
  width: 21px !important;
  height: 21px !important;
  display: block !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.9 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas .p23m__tool-label {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button::after {
  content: attr(data-p23m-tooltip) !important;
  position: absolute !important;
  right: calc(100% + 10px) !important;
  top: 50% !important;
  transform: translateY(-50%) translateX(4px) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  z-index: 80 !important;
  min-width: max-content !important;
  max-width: 190px !important;
  padding: 7px 10px !important;
  border-radius: 9px !important;
  border: 1px solid rgba(18,18,18,.12) !important;
  background: #fff !important;
  color: #202223 !important;
  box-shadow: 0 10px 26px rgba(0,0,0,.14) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
  transition: opacity .14s ease, transform .14s ease, visibility .14s ease !important;
}

.mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button:hover::after,
.mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button:focus-visible::after {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(-50%) translateX(0) !important;
}

/* Móvil / tablet: toolbar horizontal compacta dentro del canvas */
@media screen and (max-width: 989px) {
  .mpv2c-modal.is-p23m-with-active .p23m__canvas-tools.p23m__canvas-tools--subtools {
    left: 10px !important;
    right: 10px !important;
    top: 10px !important;
    width: auto !important;
    max-width: calc(100% - 20px) !important;
    flex-direction: row !important;
    overflow: visible !important;
    border-radius: 12px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__toolbar.p23m__toolbar--canvas {
    width: 100% !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    border-radius: 12px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__toolbar.p23m__toolbar--canvas::-webkit-scrollbar {
    display: none !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button {
    flex: 0 0 46px !important;
    width: 46px !important;
    height: 42px !important;
    min-width: 46px !important;
    border-bottom: 0 !important;
    border-right: 1px solid #ececec !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button:first-child {
    border-radius: 12px 0 0 12px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button:last-child {
    border-right: 0 !important;
    border-radius: 0 12px 12px 0 !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button::after {
    right: auto !important;
    left: 50% !important;
    top: calc(100% + 8px) !important;
    transform: translateX(-50%) translateY(-4px) !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button:hover::after,
  .mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button:focus-visible::after,
  .mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button:active::after {
    transform: translateX(-50%) translateY(0) !important;
  }

  /* Al mover la toolbar dentro del canvas, damos algo de aire arriba al mockup. */
  .mpv2c-modal.is-p23m-with-active .p23m__stage {
    padding-top: 62px !important;
  }
}


/* ======================================================================
   23DTF v4.11l - Toolbar lateral derecha también en móvil/tablet + tooltip
   - En móvil/tablet la barra deja de ser horizontal.
   - Se mantiene vertical en el lado derecho del canvas.
   - Iconos un poco más pequeños.
   - Tooltip tipo popup/chip al hover/focus, como los colores.
   ====================================================================== */

/* Tooltip robusto para desktop y dispositivos con ratón */
.mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button[data-p23m-tooltip] {
  overflow: visible !important;
}

.mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button[data-p23m-tooltip]::after {
  content: attr(data-p23m-tooltip) !important;
  position: absolute !important;
  right: calc(100% + 10px) !important;
  left: auto !important;
  top: 50% !important;
  transform: translateY(-50%) translateX(4px) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  z-index: 999 !important;
  width: max-content !important;
  min-width: auto !important;
  max-width: 190px !important;
  padding: 7px 10px !important;
  border-radius: 9px !important;
  border: 1px solid rgba(18,18,18,.12) !important;
  background: #fff !important;
  color: #202223 !important;
  box-shadow: 0 10px 26px rgba(0,0,0,.14) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
  transition: opacity .14s ease, transform .14s ease, visibility .14s ease !important;
}

.mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button[data-p23m-tooltip]::before {
  content: "" !important;
  position: absolute !important;
  right: calc(100% + 4px) !important;
  left: auto !important;
  top: 50% !important;
  width: 10px !important;
  height: 10px !important;
  transform: translateY(-50%) rotate(45deg) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  z-index: 998 !important;
  background: #fff !important;
  border-top: 1px solid rgba(18,18,18,.12) !important;
  border-right: 1px solid rgba(18,18,18,.12) !important;
  transition: opacity .14s ease, visibility .14s ease !important;
}

.mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button[data-p23m-tooltip]:hover::after,
.mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button[data-p23m-tooltip]:focus-visible::after {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(-50%) translateX(0) !important;
}

.mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button[data-p23m-tooltip]:hover::before,
.mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button[data-p23m-tooltip]:focus-visible::before {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Iconos algo más pequeños en todas las vistas */
.mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas .p23m__tool-icon {
  width: 19px !important;
  height: 19px !important;
}

.mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas .p23m__tool-icon svg {
  width: 18px !important;
  height: 18px !important;
  stroke-width: 1.85 !important;
}

/*
  Móvil / tablet:
  anulamos la barra horizontal de v4.11k y recuperamos barra vertical derecha.
*/
@media screen and (max-width: 989px) {
  .mpv2c-modal.is-p23m-with-active .p23m__canvas-tools.p23m__canvas-tools--subtools {
    left: auto !important;
    right: 8px !important;
    top: 12px !important;
    width: auto !important;
    max-width: none !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: visible !important;
    border-radius: 11px !important;
    border: 1px solid #e3e3e3 !important;
    background: #fff !important;
    box-shadow: 0 8px 22px rgba(0,0,0,.10) !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__toolbar.p23m__toolbar--canvas {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    overflow: visible !important;
    border-radius: 11px !important;
    scrollbar-width: auto !important;
    -webkit-overflow-scrolling: auto !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__toolbar.p23m__toolbar--canvas::-webkit-scrollbar {
    display: none !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button {
    flex: 0 0 36px !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    border-right: 0 !important;
    border-bottom: 1px solid #ececec !important;
    border-radius: 0 !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button:first-child {
    border-radius: 11px 11px 0 0 !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button:last-child {
    border-bottom: 0 !important;
    border-radius: 0 0 11px 11px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas .p23m__tool-icon {
    width: 17px !important;
    height: 17px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas .p23m__tool-icon svg {
    width: 16px !important;
    height: 16px !important;
    stroke-width: 1.8 !important;
  }

  /*
    El tooltip en móvil/tablet también queda preparado a la izquierda.
    En iPhone no hay hover real, pero sí aparece con focus-visible cuando aplica.
  */
  .mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button[data-p23m-tooltip]::after {
    right: calc(100% + 9px) !important;
    left: auto !important;
    top: 50% !important;
    transform: translateY(-50%) translateX(4px) !important;
    font-size: 11.5px !important;
    padding: 6px 9px !important;
    border-radius: 8px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button[data-p23m-tooltip]:hover::after,
  .mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button[data-p23m-tooltip]:focus-visible::after {
    transform: translateY(-50%) translateX(0) !important;
  }

  /* Ya no hace falta reservar aire arriba como cuando la toolbar era horizontal */
  .mpv2c-modal.is-p23m-with-active .p23m__stage {
    padding-top: 30px !important;
  }
}

/* Móviles estrechos: todavía más compacta */
@media screen and (max-width: 520px) {
  .mpv2c-modal.is-p23m-with-active .p23m__canvas-tools.p23m__canvas-tools--subtools {
    right: 6px !important;
    top: 10px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button {
    flex-basis: 34px !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas .p23m__tool-icon svg {
    width: 15.5px !important;
    height: 15.5px !important;
  }
}


/* ======================================================================
   23DTF v4.11m - iPhone Subidas close fix + auto-toolbar por tipo de capa
   - X del popup Tus archivos siempre visible y usable en iPhone.
   - Header sticky/fijo dentro del popup con safe-area.
   - Al seleccionar imagen/texto, la barra lateral muestra herramientas correctas.
   ====================================================================== */

.p23m-filelib.is-open,
.p23m-filelib:not([hidden]) {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.p23m-filelib__header {
  position: sticky !important;
  top: 0 !important;
  z-index: 2147483647 !important;
  background: #fff !important;
  
  -webkit-
}

.p23m-filelib__close {
  position: relative !important;
  z-index: 2147483647 !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
  cursor: pointer !important;
}

@supports (-webkit-touch-callout: none) {
  .p23m-filelib {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483647 !important;
    padding-top: max(10px, env(safe-area-inset-top, 0px)) !important;
    padding-bottom: max(10px, env(safe-area-inset-bottom, 0px)) !important;
    overscroll-behavior: contain !important;
  }

  .p23m-filelib__dialog {
    position: relative !important;
    height: calc(100dvh - max(20px, env(safe-area-inset-top, 0px)) - max(20px, env(safe-area-inset-bottom, 0px))) !important;
    max-height: calc(100dvh - max(20px, env(safe-area-inset-top, 0px)) - max(20px, env(safe-area-inset-bottom, 0px))) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    
    -webkit-
  }

  .p23m-filelib__header {
    flex: 0 0 auto !important;
    min-height: 58px !important;
    padding-top: 0 !important;
    padding-right: max(12px, env(safe-area-inset-right, 0px)) !important;
  }

  .p23m-filelib__body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .p23m-filelib__close {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
    font-size: 34px !important;
    line-height: 1 !important;
    background: #fff !important;
  }
}

/* Estado activo claro en la toolbar contextual según imagen/texto */
.mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button.is-active {
  background: #d9edf9 !important;
  color: #0d6aa8 !important;
}


/* ======================================================================
   23DTF v4.11m-REV3 - Cierre Subidas iPhone/Safari
   Botón X flotante de emergencia por encima del popup Tus archivos.
   No modifica colores, canvas, matriz ni estructura del configurador.
   ====================================================================== */

.p23m-filelib__force-close {
  position: fixed !important;
  top: max(14px, env(safe-area-inset-top, 0px)) !important;
  right: max(14px, env(safe-area-inset-right, 0px)) !important;
  z-index: 2147483647 !important;
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid rgba(0,0,0,.12) !important;
  border-radius: 14px !important;
  background: #fff !important;
  color: #202223 !important;
  box-shadow: 0 10px 28px rgba(0,0,0,.22) !important;
  font-size: 36px !important;
  line-height: 1 !important;
  font-weight: 400 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
}

.p23m-filelib[hidden] .p23m-filelib__force-close,
.p23m-filelib[aria-hidden="true"] .p23m-filelib__force-close {
  display: none !important;
}

@supports (-webkit-touch-callout: none) {
  .p23m-filelib:not([hidden]) .p23m-filelib__force-close {
    display: inline-flex !important;
  }

  .p23m-filelib__close,
  .p23m-filelib__force-close,
  [data-p23m-filelib-close] {
    pointer-events: auto !important;
    touch-action: manipulation !important;
    -webkit-user-select: none !important;
    user-select: none !important;
  }
}


/* ======================================================================
   23DTF v4.11m-REV5 - X integrada Subidas solo iOS/Safari
   - No usa botón global/flotante.
   - No duplica botones en Android.
   - La X queda dentro del propio popup "Tus archivos".
   ====================================================================== */

.p23m-filelib__ios-close {
  display: none !important;
}

@supports (-webkit-touch-callout: none) {
  .p23m-filelib:not([hidden]) .p23m-filelib__dialog {
    position: relative !important;
  }

  .p23m-filelib:not([hidden]) .p23m-filelib__ios-close {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    z-index: 2147483647 !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid rgba(0,0,0,.10) !important;
    border-radius: 13px !important;
    background: #fff !important;
    color: #202223 !important;
    box-shadow: 0 8px 22px rgba(0,0,0,.16) !important;
    font-size: 34px !important;
    line-height: 1 !important;
    font-weight: 400 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-user-select: none !important;
    user-select: none !important;
  }

  .p23m-filelib:not([hidden]) .p23m-filelib__body {
    padding-top: max(74px, calc(20px + env(safe-area-inset-top, 0px))) !important;
  }

  .p23m-filelib:not([hidden]) .p23m-filelib__header [data-p23m-filelib-close] {
    display: none !important;
  }
}


/* ======================================================================
   23DTF v4.11m-REV6 - iOS Subidas: header visible + X integrada
   Corrige el hueco blanco superior de REV5 y fuerza "Tus archivos" + X
   dentro del popup. No usa botón global/flotante.
   ====================================================================== */

@supports (-webkit-touch-callout: none) {
  .p23m-filelib:not([hidden]) .p23m-filelib__dialog {
    position: relative !important;
    overflow: hidden !important;
  }

  /*
    La causa del hueco era reservar padding arriba en el body mientras la
    cabecera no se pintaba. Ahora la cabecera se fuerza visible.
  */
  .p23m-filelib:not([hidden]) .p23m-filelib__body {
    padding-top: 14px !important;
  }

  .p23m-filelib:not([hidden]) .p23m-filelib__header {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 2147483646 !important;
    min-height: 64px !important;
    height: 64px !important;
    flex: 0 0 64px !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 14px 0 18px !important;
    background: #fff !important;
    border-bottom: 1px solid #e5e7eb !important;
    
    -webkit-
  }

  .p23m-filelib:not([hidden]) .p23m-filelib__title {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 !important;
    color: #111827 !important;
    font-size: 20px !important;
    line-height: 1.1 !important;
    font-weight: 800 !important;
  }

  /*
    No ocultamos la X del header en iOS. Si existe la normal, que se vea.
    Si Safari se la come, la ios-close va integrada en el mismo header/dialog.
  */
  .p23m-filelib:not([hidden]) .p23m-filelib__header [data-p23m-filelib-close] {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .p23m-filelib:not([hidden]) .p23m-filelib__ios-close {
    position: absolute !important;
    top: 10px !important;
    right: 12px !important;
    z-index: 2147483647 !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid rgba(0,0,0,.10) !important;
    border-radius: 13px !important;
    background: #fff !important;
    color: #202223 !important;
    box-shadow: 0 8px 22px rgba(0,0,0,.16) !important;
    font-size: 34px !important;
    line-height: 1 !important;
    font-weight: 400 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-user-select: none !important;
    user-select: none !important;
  }
}


/* ======================================================================
   23DTF v4.11m-REV7 - iOS Subidas: cabecera dentro del body visible
   Si Safari no pinta .p23m-filelib__header, añadimos "Tus archivos" + X
   dentro de .p23m-filelib__body. No es global, no se muestra en Android.
   ====================================================================== */

.p23m-filelib__ios-inline-header {
  display: none !important;
}

@supports (-webkit-touch-callout: none) {
  .p23m-filelib:not([hidden]) .p23m-filelib__body {
    padding-top: 0 !important;
  }

  .p23m-filelib:not([hidden]) .p23m-filelib__ios-inline-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 2147483647 !important;
    min-height: 64px !important;
    height: 64px !important;
    margin: 0 -12px 14px !important;
    padding: 0 14px 0 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #fff !important;
    border-bottom: 1px solid #e5e7eb !important;
    box-shadow: 0 8px 20px rgba(255,255,255,.92) !important;
  }

  .p23m-filelib:not([hidden]) .p23m-filelib__ios-inline-header h2 {
    margin: 0 !important;
    padding: 0 !important;
    color: #111827 !important;
    font-size: 20px !important;
    line-height: 1.1 !important;
    font-weight: 800 !important;
  }

  .p23m-filelib:not([hidden]) .p23m-filelib__ios-inline-header button {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid rgba(0,0,0,.10) !important;
    border-radius: 13px !important;
    background: #fff !important;
    color: #202223 !important;
    box-shadow: 0 8px 22px rgba(0,0,0,.14) !important;
    font-size: 34px !important;
    line-height: 1 !important;
    font-weight: 400 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-user-select: none !important;
    user-select: none !important;
  }

  /*
    Ya no necesitamos la X absoluta de REV5/REV6 cuando existe la cabecera inline.
    La dejamos oculta para evitar duplicados dentro de iOS.
  */
  .p23m-filelib:not([hidden]) .p23m-filelib__ios-close {
    display: none !important;
  }
}


/* ======================================================================
   23DTF v4.11m-REV10 - iOS Subidas: REV7 sin header padre
   Base: REV7, donde "Tus archivos" + X sí aparecen.
   No usamos cubierta blanca ni forzamos pantalla completa.
   Solo ocultamos el header padre y subimos el popup de archivos dentro
   del mismo modal para que se vea como Android.
   ====================================================================== */

@supports (-webkit-touch-callout: none) {
  /*
    Cuando Tus archivos está abierto, el header del popup principal no debe
    ocupar espacio ni verse. Esto evita que aparezca:
    "Selecciona colores y tallas de este artículo" + X padre.
  */
  .mpv2c-modal.is-p23m-with-active:has(.p23m-filelib:not([hidden])) .mpv2c-modal__header {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
  }

  /*
    Quitamos padding superior del contenido del popup padre solo mientras
    está abierta la biblioteca, para que Tus archivos suba arriba.
  */
  .mpv2c-modal.is-p23m-with-active:has(.p23m-filelib:not([hidden])) .mpv2c-modal__content {
    padding-top: 0 !important;
  }

  /*
    Mantenemos el comportamiento de REV7, pero colocamos la biblioteca
    arriba dentro del modal. No cambiamos su geometría general.
  */
  .mpv2c-modal.is-p23m-with-active .p23m-filelib:not([hidden]) {
    align-items: flex-start !important;
    padding-top: 12px !important;
    z-index: 2147483639 !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-filelib:not([hidden]) .p23m-filelib__dialog {
    margin-top: 0 !important;
    z-index: 2147483640 !important;
  }

  /*
    La cabecera inline de REV7 es la correcta en iPhone.
    La fijamos arriba del popup de archivos y dejamos estética tipo Android.
  */
  .mpv2c-modal.is-p23m-with-active .p23m-filelib:not([hidden]) .p23m-filelib__ios-inline-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 2147483641 !important;
    margin: 0 -12px 14px !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  /*
    Si aparece algún header original de filelib además del inline, lo ocultamos
    solo en iOS para no duplicar "Tus archivos".
  */
  .mpv2c-modal.is-p23m-with-active .p23m-filelib:not([hidden]) > .p23m-filelib__dialog > .p23m-filelib__header {
    display: none !important;
  }
}


/* ======================================================================
   23DTF v4.11m-REV11 - iOS Subidas: una sola X limpia
   - Oculta la X absoluta/duplicada.
   - Deja solo la X de la cabecera inline "Tus archivos".
   - La X queda sin caja, sin sombra y sin fondo, como en Android.
   ====================================================================== */

@supports (-webkit-touch-callout: none) {
  /*
    Esta es la X duplicada que aparece arriba a la derecha.
    La ocultamos para dejar únicamente la X integrada en "Tus archivos".
  */
  .mpv2c-modal.is-p23m-with-active .p23m-filelib:not([hidden]) .p23m-filelib__ios-close,
  .mpv2c-modal.is-p23m-with-active .p23m-filelib:not([hidden]) > .p23m-filelib__dialog > .p23m-filelib__close,
  .mpv2c-modal.is-p23m-with-active .p23m-filelib:not([hidden]) > .p23m-filelib__dialog > [data-p23m-filelib-force-close] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /*
    X buena: la que vive dentro de la cabecera inline Tus archivos.
    La hacemos visualmente igual que Android: solo una X limpia.
  */
  .mpv2c-modal.is-p23m-with-active .p23m-filelib:not([hidden]) .p23m-filelib__ios-inline-header button[data-p23m-filelib-close],
  .mpv2c-modal.is-p23m-with-active .p23m-filelib:not([hidden]) .p23m-filelib__ios-inline-header button[data-p23m-filelib-ios-inline-close] {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #111827 !important;
    font-size: 32px !important;
    line-height: 1 !important;
    font-weight: 400 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-filelib:not([hidden]) .p23m-filelib__ios-inline-header button[data-p23m-filelib-close]:active,
  .mpv2c-modal.is-p23m-with-active .p23m-filelib:not([hidden]) .p23m-filelib__ios-inline-header button[data-p23m-filelib-ios-inline-close]:active {
    transform: scale(.96) !important;
  }
}


/* ======================================================================
   23DTF v4.11m-REV12 - iOS Subidas: ocultar X padre residual
   - La X pequeña que queda arriba pertenece al popup padre.
   - La ocultamos solo cuando Tus archivos está abierto.
   - Conservamos únicamente la X limpia de la cabecera "Tus archivos".
   ====================================================================== */

@supports (-webkit-touch-callout: none) {
  /*
    Oculta cualquier cierre directo del dialog principal mientras está abierto
    el popup de Tus archivos. No afecta a la X interna porque esa vive dentro
    de .p23m-filelib__ios-inline-header.
  */
  .mpv2c-modal.is-p23m-with-active:has(.p23m-filelib:not([hidden])) > .mpv2c-modal__dialog > .mpv2c-modal__close,
  .mpv2c-modal.is-p23m-with-active:has(.p23m-filelib:not([hidden])) > .mpv2c-modal__dialog > button.mpv2c-modal__close,
  .mpv2c-modal.is-p23m-with-active:has(.p23m-filelib:not([hidden])) > .mpv2c-modal__dialog > button[aria-label="Cerrar"],
  .mpv2c-modal.is-p23m-with-active:has(.p23m-filelib:not([hidden])) > .mpv2c-modal__dialog > button[aria-label="Close"],
  .mpv2c-modal.is-p23m-with-active:has(.p23m-filelib:not([hidden])) > .mpv2c-modal__dialog > [data-modal-close],
  .mpv2c-modal.is-p23m-with-active:has(.p23m-filelib:not([hidden])) > .mpv2c-modal__dialog > [data-close],
  .mpv2c-modal.is-p23m-with-active:has(.p23m-filelib:not([hidden])) > .mpv2c-modal__dialog > .modal-close {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /*
    Si esa X padre está posicionada dentro del header, también queda anulada.
    La X de Tus archivos se vuelve a activar explícitamente debajo.
  */
  .mpv2c-modal.is-p23m-with-active:has(.p23m-filelib:not([hidden])) .mpv2c-modal__header .mpv2c-modal__close,
  .mpv2c-modal.is-p23m-with-active:has(.p23m-filelib:not([hidden])) .mpv2c-modal__header button[aria-label="Cerrar"],
  .mpv2c-modal.is-p23m-with-active:has(.p23m-filelib:not([hidden])) .mpv2c-modal__header button[aria-label="Close"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /*
    Reactivación explícita de la X correcta.
  */
  .mpv2c-modal.is-p23m-with-active .p23m-filelib:not([hidden]) .p23m-filelib__ios-inline-header button[data-p23m-filelib-close],
  .mpv2c-modal.is-p23m-with-active .p23m-filelib:not([hidden]) .p23m-filelib__ios-inline-header button[data-p23m-filelib-ios-inline-close] {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
}


/* ======================================================================
   23DTF v4.11m-REV13 - iOS Subidas: header fijo + scroll interno
   - La cabecera "Tus archivos" + X queda fija arriba.
   - Solo scrollea el contenido desde el buscador hacia abajo.
   - Bloquea el scroll del fondo/popup principal mientras Tus archivos está abierto.
   - Solo iOS/Safari. No toca Android.
   ====================================================================== */

@supports (-webkit-touch-callout: none) {
  /*
    Bloqueo del fondo cuando Tus archivos está abierto.
    Evita que se mueva el popup principal o la página de atrás.
  */
  html.p23m-filelib-open,
  body.p23m-filelib-open {
    overflow: hidden !important;
    overscroll-behavior: none !important;
    touch-action: none !important;
  }

  .mpv2c-modal.is-p23m-with-active:has(.p23m-filelib:not([hidden])) {
    overflow: hidden !important;
    overscroll-behavior: contain !important;
    touch-action: none !important;
  }

  .mpv2c-modal.is-p23m-with-active:has(.p23m-filelib:not([hidden])) .mpv2c-modal__dialog,
  .mpv2c-modal.is-p23m-with-active:has(.p23m-filelib:not([hidden])) .mpv2c-modal__content,
  .mpv2c-modal.is-p23m-with-active:has(.p23m-filelib:not([hidden])) .mpv2c-modal__panel,
  .mpv2c-modal.is-p23m-with-active:has(.p23m-filelib:not([hidden])) .p23m,
  .mpv2c-modal.is-p23m-with-active:has(.p23m-filelib:not([hidden])) .p23m__layout {
    overflow: hidden !important;
    overscroll-behavior: contain !important;
  }

  /*
    El overlay de Tus archivos captura el gesto.
    No permitimos que el scroll se escape al fondo.
  */
  .mpv2c-modal.is-p23m-with-active .p23m-filelib:not([hidden]) {
    overflow: hidden !important;
    overscroll-behavior: contain !important;
    touch-action: none !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m-filelib:not([hidden]) .p23m-filelib__dialog {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    max-height: calc(100dvh - 36px) !important;
    overscroll-behavior: contain !important;
    touch-action: none !important;
  }

  /*
    La cabecera inline de iOS queda fija, no participa en el scroll.
  */
  .mpv2c-modal.is-p23m-with-active .p23m-filelib:not([hidden]) .p23m-filelib__ios-inline-header {
    position: relative !important;
    top: auto !important;
    flex: 0 0 64px !important;
    min-height: 64px !important;
    height: 64px !important;
    z-index: 2147483641 !important;
    margin: 0 -12px 0 !important;
    padding: 0 14px 0 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #fff !important;
    border-bottom: 1px solid #e5e7eb !important;
    box-shadow: none !important;
    overscroll-behavior: contain !important;
    touch-action: auto !important;
  }

  /*
    Solo el área posterior a la cabecera scrollea.
    El buscador queda como primer elemento del contenido desplazable.
  */
  .mpv2c-modal.is-p23m-with-active .p23m-filelib:not([hidden]) .p23m-filelib__body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    touch-action: pan-y !important;
    padding: 0 12px 18px !important;
    background: #fff !important;
  }

  /*
    Como la cabecera inline está dentro del body por la estructura actual,
    la fijamos visualmente arriba y hacemos que el resto respete esa altura.
    Este selector evita que el buscador se meta debajo de la cabecera.
  */
  .mpv2c-modal.is-p23m-with-active .p23m-filelib:not([hidden]) .p23m-filelib__ios-inline-header + .p23m-filelib__top,
  .mpv2c-modal.is-p23m-with-active .p23m-filelib:not([hidden]) .p23m-filelib__ios-inline-header ~ .p23m-filelib__top {
    margin-top: 14px !important;
  }

  /*
    Reasegurar que la X correcta siga limpia y funcional.
  */
  .mpv2c-modal.is-p23m-with-active .p23m-filelib:not([hidden]) .p23m-filelib__ios-inline-header button[data-p23m-filelib-close],
  .mpv2c-modal.is-p23m-with-active .p23m-filelib:not([hidden]) .p23m-filelib__ios-inline-header button[data-p23m-filelib-ios-inline-close] {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
  }

  /*
    Mantener oculta la X residual del popup padre mientras Tus archivos está abierto.
  */
  .mpv2c-modal.is-p23m-with-active:has(.p23m-filelib:not([hidden])) > .mpv2c-modal__dialog > .mpv2c-modal__close,
  .mpv2c-modal.is-p23m-with-active:has(.p23m-filelib:not([hidden])) .mpv2c-modal__header .mpv2c-modal__close,
  .mpv2c-modal.is-p23m-with-active:has(.p23m-filelib:not([hidden])) .mpv2c-modal__header button[aria-label="Cerrar"],
  .mpv2c-modal.is-p23m-with-active:has(.p23m-filelib:not([hidden])) .mpv2c-modal__header button[aria-label="Close"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}


/* ======================================================================
   23DTF v4.11m-REV14 - iOS Subidas: sticky real de cabecera
   Corrección sobre REV13:
   - REV13 dejó la cabecera inline en position: relative, por eso scrolleaba.
   - Ahora la cabecera queda sticky dentro del body scrolleable.
   - El dialog no scrollea: solo scrollea .p23m-filelib__body.
   ====================================================================== */

@supports (-webkit-touch-callout: none) {
  /*
    Fondo bloqueado mientras Tus archivos está abierto.
    El JS seguro ya añade p23m-filelib-open a html/body.
  */
  html.p23m-filelib-open,
  body.p23m-filelib-open {
    overflow: hidden !important;
    overscroll-behavior: none !important;
  }

  body.p23m-filelib-open .mpv2c-modal.is-p23m-with-active,
  body.p23m-filelib-open .mpv2c-modal.is-p23m-with-active .mpv2c-modal__dialog,
  body.p23m-filelib-open .mpv2c-modal.is-p23m-with-active .mpv2c-modal__content,
  body.p23m-filelib-open .mpv2c-modal.is-p23m-with-active .mpv2c-modal__panel,
  body.p23m-filelib-open .mpv2c-modal.is-p23m-with-active .p23m,
  body.p23m-filelib-open .mpv2c-modal.is-p23m-with-active .p23m__layout {
    overflow: hidden !important;
    overscroll-behavior: contain !important;
  }

  /*
    El overlay y el dialog no deben tener scroll propio.
  */
  body.p23m-filelib-open .mpv2c-modal.is-p23m-with-active .p23m-filelib:not([hidden]) {
    overflow: hidden !important;
    overscroll-behavior: contain !important;
  }

  body.p23m-filelib-open .mpv2c-modal.is-p23m-with-active .p23m-filelib:not([hidden]) .p23m-filelib__dialog {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    overscroll-behavior: contain !important;
    max-height: calc(100dvh - 36px) !important;
  }

  /*
    Único scroll permitido: dentro del body de Tus archivos.
  */
  body.p23m-filelib-open .mpv2c-modal.is-p23m-with-active .p23m-filelib:not([hidden]) .p23m-filelib__body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    touch-action: pan-y !important;
    padding: 0 12px 18px !important;
    background: #fff !important;
  }

  /*
    Cabecera fija real: al estar dentro del body, sticky hace que el scroll
    empiece visualmente debajo, desde el buscador hacia abajo.
  */
  body.p23m-filelib-open .mpv2c-modal.is-p23m-with-active .p23m-filelib:not([hidden]) .p23m-filelib__ios-inline-header {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 2147483642 !important;
    flex: 0 0 64px !important;
    min-height: 64px !important;
    height: 64px !important;
    margin: 0 -12px 14px !important;
    padding: 0 14px 0 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #fff !important;
    border-bottom: 1px solid #e5e7eb !important;
    box-shadow: 0 8px 16px rgba(255,255,255,.94) !important;
  }

  /*
    El buscador queda justo después de la cabecera fija.
  */
  body.p23m-filelib-open .mpv2c-modal.is-p23m-with-active .p23m-filelib:not([hidden]) .p23m-filelib__ios-inline-header + .p23m-filelib__top,
  body.p23m-filelib-open .mpv2c-modal.is-p23m-with-active .p23m-filelib:not([hidden]) .p23m-filelib__ios-inline-header ~ .p23m-filelib__top {
    margin-top: 0 !important;
  }

  /*
    La X correcta sigue limpia y clicable.
  */
  body.p23m-filelib-open .mpv2c-modal.is-p23m-with-active .p23m-filelib:not([hidden]) .p23m-filelib__ios-inline-header button[data-p23m-filelib-close],
  body.p23m-filelib-open .mpv2c-modal.is-p23m-with-active .p23m-filelib:not([hidden]) .p23m-filelib__ios-inline-header button[data-p23m-filelib-ios-inline-close] {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
  }
}


/* ======================================================================
   23DTF v4.11m-REV15 - Producto móvil/tablet: colores primero, canvas después
   Nueva estrategia UX:
   - En el apartado Producto, primero aparece la tabla de colores/tallas.
   - Después aparece el canvas de la prenda para insertar el diseño.
   - Solo móvil/tablet. Desktop mantiene el layout lateral actual.
   ====================================================================== */

@media screen and (max-width: 989px) {
  /*
    Solo cuando está activo el panel Producto.
    Evita alterar Texto/Subidas/Capas cuando el cliente cambie de herramienta.
  */
  .mpv2c-modal.is-p23m-with-active .p23m:has(.p23m__panel-view[data-p23m-panel="product"]:not([hidden])) .p23m__layout {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    border-top: 0 !important;
    background: #fff !important;
  }

  /*
    El rail ya es fijo abajo en móvil/tablet. Lo dejamos fuera del flujo visual.
  */
  .mpv2c-modal.is-p23m-with-active .p23m:has(.p23m__panel-view[data-p23m-panel="product"]:not([hidden])) .p23m__rail {
    order: 99 !important;
  }

  /*
    1º bloque: colores/tallas.
  */
  .mpv2c-modal.is-p23m-with-active .p23m:has(.p23m__panel-view[data-p23m-panel="product"]:not([hidden])) .p23m__panel {
    order: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 10px 14px 12px !important;
    border-right: 0 !important;
    border-bottom: 1px solid #e5e7eb !important;
    background: #fff !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m:has(.p23m__panel-view[data-p23m-panel="product"]:not([hidden])) .p23m__panel-view[data-p23m-panel="product"] {
    display: block !important;
    max-width: 100% !important;
  }

  /*
    Compactamos la tabla para que el cliente vea colores primero
    pero no tenga que bajar demasiado para encontrar el canvas.
  */
  .mpv2c-modal.is-p23m-with-active .p23m:has(.p23m__panel-view[data-p23m-panel="product"]:not([hidden])) .p23m__personalizer-table-wrap,
  .mpv2c-modal.is-p23m-with-active .p23m:has(.p23m__panel-view[data-p23m-panel="product"]:not([hidden])) .p23m-matrix-wrap {
    max-height: clamp(180px, 32vh, 310px) !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
  }

  /*
    2º bloque: canvas de diseño.
  */
  .mpv2c-modal.is-p23m-with-active .p23m:has(.p23m__panel-view[data-p23m-panel="product"]:not([hidden])) .p23m__workspace {
    order: 2 !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
    min-height: 430px !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: visible !important;
    background: #f6f6f7 !important;
    border-top: 0 !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m:has(.p23m__panel-view[data-p23m-panel="product"]:not([hidden])) .p23m__placements {
    order: 1 !important;
    padding: 12px 14px 8px !important;
    margin: 0 !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m:has(.p23m__panel-view[data-p23m-panel="product"]:not([hidden])) .p23m__canvas {
    order: 2 !important;
    margin: 0 14px 12px !important;
    min-height: clamp(360px, 52vh, 540px) !important;
    height: clamp(360px, 52vh, 540px) !important;
    flex: 0 0 auto !important;
    border-radius: 12px !important;
    overflow: hidden !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m:has(.p23m__panel-view[data-p23m-panel="product"]:not([hidden])) .p23m__stage {
    min-height: 100% !important;
    height: 100% !important;
    padding: 46px 12px 72px !important;
  }

  /*
    El footer/subtotal queda debajo del canvas y por encima del rail inferior.
  */
  .mpv2c-modal.is-p23m-with-active .p23m:has(.p23m__panel-view[data-p23m-panel="product"]:not([hidden])) .p23m__footer {
    order: 3 !important;
  }
}

@media screen and (max-width: 520px) {
  .mpv2c-modal.is-p23m-with-active .p23m:has(.p23m__panel-view[data-p23m-panel="product"]:not([hidden])) .p23m__panel {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m:has(.p23m__panel-view[data-p23m-panel="product"]:not([hidden])) .p23m__personalizer-table-wrap,
  .mpv2c-modal.is-p23m-with-active .p23m:has(.p23m__panel-view[data-p23m-panel="product"]:not([hidden])) .p23m-matrix-wrap {
    max-height: clamp(170px, 30vh, 270px) !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m:has(.p23m__panel-view[data-p23m-panel="product"]:not([hidden])) .p23m__canvas {
    margin-left: 10px !important;
    margin-right: 10px !important;
    min-height: clamp(350px, 50vh, 500px) !important;
    height: clamp(350px, 50vh, 500px) !important;
  }
}


/* ======================================================================
   23DTF v4.11m-REV16 - Móvil/tablet: controles debajo del canvas
   Ajuste sobre REV15:
   - Producto normal: colores/tallas primero y canvas después.
   - Si se selecciona imagen/texto y entra el modo herramienta, desaparece
     el bloque de colores y los controles aparecen debajo del canvas.
   ====================================================================== */

@media screen and (max-width: 989px) {
  /*
    Modo herramienta activo: imagen/texto seleccionado.
    Reordenamos sin tocar JS:
      1. Workspace/canvas
      2. Panel de controles dinámicos
      3. Footer
      4. Rail inferior
  */
  .mpv2c-modal.is-p23m-with-active .p23m.is-p23m-tool-only .p23m__layout {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    background: #f6f6f7 !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m.is-p23m-tool-only .p23m__workspace {
    order: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
    min-height: 430px !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: visible !important;
    background: #f6f6f7 !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m.is-p23m-tool-only .p23m__placements {
    order: 1 !important;
    padding: 12px 14px 8px !important;
    margin: 0 !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m.is-p23m-tool-only .p23m__canvas {
    order: 2 !important;
    margin: 0 14px 12px !important;
    min-height: clamp(360px, 52vh, 540px) !important;
    height: clamp(360px, 52vh, 540px) !important;
    flex: 0 0 auto !important;
    border-radius: 12px !important;
    overflow: hidden !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m.is-p23m-tool-only .p23m__stage {
    min-height: 100% !important;
    height: 100% !important;
    padding: 46px 12px 72px !important;
  }

  /*
    Panel pasa debajo del canvas. Los panel-view de colores/producto/texto/subidas
    quedan ocultos por la regla base is-p23m-tool-only; reforzamos aquí para que
    no se mezcle nada debajo/encima de colores.
  */
  .mpv2c-modal.is-p23m-with-active .p23m.is-p23m-tool-only .p23m__panel {
    order: 2 !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 14px 14px !important;
    border-right: 0 !important;
    border-bottom: 1px solid #e5e7eb !important;
    background: #f6f6f7 !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m.is-p23m-tool-only .p23m__panel-view {
    display: none !important;
  }

  /*
    El bloque real de Transformar/Texto/Posición/etc. queda como tarjeta
    debajo del canvas, no debajo de colores.
  */
  .mpv2c-modal.is-p23m-with-active .p23m.is-p23m-tool-only .p23m__dynamic-controls {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 14px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 4px 14px rgba(0,0,0,.04) !important;
    overflow: visible !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m.is-p23m-tool-only .p23m__dynamic-controls[hidden],
  .mpv2c-modal.is-p23m-with-active .p23m.is-p23m-tool-only .p23m__dynamic-controls:empty {
    display: none !important;
  }

  /*
    Footer y rail siguen debajo.
  */
  .mpv2c-modal.is-p23m-with-active .p23m.is-p23m-tool-only .p23m__footer {
    order: 3 !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m.is-p23m-tool-only .p23m__rail {
    order: 99 !important;
  }
}

@media screen and (max-width: 520px) {
  .mpv2c-modal.is-p23m-with-active .p23m.is-p23m-tool-only .p23m__canvas {
    margin-left: 10px !important;
    margin-right: 10px !important;
    min-height: clamp(350px, 50vh, 500px) !important;
    height: clamp(350px, 50vh, 500px) !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m.is-p23m-tool-only .p23m__panel {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}


/* ======================================================================
   23DTF v4.11m-REV17 - Fix real selección capa: colores fuera, controles bajo canvas
   Complementa el JS:
   - Cuando root tiene is-p23m-tool-only, fuerza layout de edición.
   - Evita que cualquier regla de Producto/colores de REV15 se imponga.
   ====================================================================== */

@media screen and (max-width: 989px) {
  .mpv2c-modal.is-p23m-with-active .p23m.is-p23m-tool-only .p23m__layout {
    display: flex !important;
    flex-direction: column !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m.is-p23m-tool-only .p23m__workspace {
    order: 1 !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m.is-p23m-tool-only .p23m__panel {
    order: 2 !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m.is-p23m-tool-only .p23m__panel-view[data-p23m-panel="product"],
  .mpv2c-modal.is-p23m-with-active .p23m.is-p23m-tool-only .p23m__personalizer-table-wrap,
  .mpv2c-modal.is-p23m-with-active .p23m.is-p23m-tool-only .p23m-matrix-wrap {
    display: none !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m.is-p23m-tool-only .p23m__dynamic-controls:not([hidden]):not(:empty) {
    display: block !important;
    order: 1 !important;
  }
}


/* ======================================================================
   23DTF v4.11m-REV20 - Recorte real con marco arrastrable limpio
   Base limpia desde REV17:
   - Marco sobre la imagen con tiradores en lados y esquinas.
   - La zona clara se conserva; la zona oscura se elimina.
   - Aplicar crea un PNG recortado real mediante canvas.
   ====================================================================== */

.p23m-crop {
  display: grid !important;
  gap: 14px !important;
}

.p23m-crop__row {
  display: grid !important;
  gap: 8px !important;
}

.p23m-crop__row label {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  color: #202223 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

.p23m-crop__row label strong {
  color: #6b7280 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

.p23m-crop__actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
  margin-top: 2px !important;
}

.p23m__layer-item.is-cropping {
  overflow: visible !important;
}

.p23m__layer-item.is-cropping > img {
  opacity: 1 !important;
}

.p23m__crop-frame-ui {
  position: absolute !important;
  inset: 0 !important;
  z-index: 8 !important;
  pointer-events: none !important;
}

.p23m__crop-box {
  position: absolute !important;
  border: 2px solid #0d6aa8 !important;
  background: rgba(255,255,255,.02) !important;
  box-shadow:
    0 0 0 9999px rgba(0,0,0,.50),
    0 0 0 1px rgba(255,255,255,.80) inset,
    0 8px 22px rgba(0,0,0,.16) !important;
  pointer-events: auto !important;
  touch-action: none !important;
}

.p23m__crop-grid {
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  background:
    linear-gradient(90deg, transparent 33.333%, rgba(255,255,255,.68) 33.333% calc(33.333% + 1px), transparent calc(33.333% + 1px) 66.666%, rgba(255,255,255,.68) 66.666% calc(66.666% + 1px), transparent calc(66.666% + 1px)),
    linear-gradient(0deg, transparent 33.333%, rgba(255,255,255,.68) 33.333% calc(33.333% + 1px), transparent calc(33.333% + 1px) 66.666%, rgba(255,255,255,.68) 66.666% calc(66.666% + 1px), transparent calc(66.666% + 1px)) !important;
}

.p23m__crop-handle {
  position: absolute !important;
  z-index: 3 !important;
  width: 16px !important;
  height: 16px !important;
  border: 2px solid #0d6aa8 !important;
  border-radius: 999px !important;
  background: #fff !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.22) !important;
  pointer-events: auto !important;
  touch-action: none !important;
}

.p23m__crop-handle.crop-nw { left: -8px !important; top: -8px !important; cursor: nwse-resize !important; }
.p23m__crop-handle.crop-n { left: 50% !important; top: -8px !important; transform: translateX(-50%) !important; cursor: ns-resize !important; }
.p23m__crop-handle.crop-ne { right: -8px !important; top: -8px !important; cursor: nesw-resize !important; }
.p23m__crop-handle.crop-e { right: -8px !important; top: 50% !important; transform: translateY(-50%) !important; cursor: ew-resize !important; }
.p23m__crop-handle.crop-se { right: -8px !important; bottom: -8px !important; cursor: nwse-resize !important; }
.p23m__crop-handle.crop-s { left: 50% !important; bottom: -8px !important; transform: translateX(-50%) !important; cursor: ns-resize !important; }
.p23m__crop-handle.crop-sw { left: -8px !important; bottom: -8px !important; cursor: nesw-resize !important; }
.p23m__crop-handle.crop-w { left: -8px !important; top: 50% !important; transform: translateY(-50%) !important; cursor: ew-resize !important; }

.p23m__layer-item.is-cropping .p23m__selection {
  pointer-events: none !important;
}

.p23m__layer-item.is-cropping .p23m__selection .p23m__handle,
.p23m__layer-item.is-cropping .p23m__selection .p23m__rotate {
  display: none !important;
}

.p23m-position-tools,
.p23m-pattern-tools__grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.p23m-icon-btn {
  min-height: 64px !important;
  border: 1px solid #d8dde3 !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: #202223 !important;
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 8px !important;
  cursor: pointer !important;
  transition: background .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease !important;
}

.p23m-icon-btn:hover {
  background: #f8fafc !important;
  border-color: #9cc9e8 !important;
  box-shadow: 0 6px 18px rgba(13,106,168,.08) !important;
}

.p23m-icon-btn:active {
  transform: scale(.98) !important;
}

.p23m-icon-btn span {
  width: 24px !important;
  height: 24px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.p23m-icon-btn svg {
  width: 23px !important;
  height: 23px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.9 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.p23m-icon-btn small {
  color: #4b5563 !important;
  font-size: 11px !important;
  line-height: 1.1 !important;
  font-weight: 800 !important;
  text-align: center !important;
}

.p23m-pattern-tools {
  display: grid !important;
  gap: 12px !important;
}

@media screen and (max-width: 989px) {
  .p23m__crop-handle {
    width: 20px !important;
    height: 20px !important;
  }

  .p23m__crop-handle.crop-nw { left: -10px !important; top: -10px !important; }
  .p23m__crop-handle.crop-n { top: -10px !important; }
  .p23m__crop-handle.crop-ne { right: -10px !important; top: -10px !important; }
  .p23m__crop-handle.crop-e { right: -10px !important; }
  .p23m__crop-handle.crop-se { right: -10px !important; bottom: -10px !important; }
  .p23m__crop-handle.crop-s { bottom: -10px !important; }
  .p23m__crop-handle.crop-sw { left: -10px !important; bottom: -10px !important; }
  .p23m__crop-handle.crop-w { left: -10px !important; }
}

@media screen and (max-width: 520px) {
  .p23m-position-tools,
  .p23m-pattern-tools__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}


/* ======================================================================
   23DTF v4.11m-REV21 - Fix upload button + reset original + crop keeps size
   - Botón redondo oculto con cualquier capa visible.
   - Reset vuelve al archivo original aunque haya recorte aplicado.
   - Recorte mantiene tamaño/posición visual elegido por el cliente.
   ====================================================================== */


/* ======================================================================
   23DTF v4.11m-REV22 - Crop sin deformación visual
   Al aplicar recorte, la caja visual se ajusta al marco recortado en vez de
   mantener la caja completa y estirar el PNG.
   ====================================================================== */

.p23m__layer-item:not(.is-cropping) > img {
  object-fit: fill !important;
}


/* ======================================================================
   23DTF v4.11m-REV23 - Recorte más fluido + sin acciones duplicadas
   - El panel no se reconstruye mientras se arrastran sliders.
   - La columna izquierda no muestra Cancelar/Aplicar porque ya están en canvas.
   ====================================================================== */

.p23m-crop__actions {
  display: none !important;
}

.p23m-crop input[type="range"] {
  width: 100% !important;
  touch-action: pan-x !important;
  cursor: ew-resize !important;
}

.p23m-crop__footer-hint {
  margin-top: 2px !important;
  opacity: .82 !important;
}

.p23m-crop__row input[type="range"]::-webkit-slider-thumb {
  cursor: ew-resize !important;
}

.p23m-crop__row input[type="range"]::-moz-range-thumb {
  cursor: ew-resize !important;
}


/* ======================================================================
   23DTF v4.11m-REV24 - Diseño/patrón funcional
   - Quita el texto explicativo de Diseño.
   - Activa Sin patrón / Repetir / Horizontal / Vertical / Espejo.
   ====================================================================== */

.p23m-icon-btn.is-active {
  border-color: #0d6aa8 !important;
  background: #d9edf9 !important;
  color: #0d6aa8 !important;
  box-shadow: 0 6px 18px rgba(13,106,168,.16) !important;
}

.p23m-icon-btn.is-active small {
  color: #0d6aa8 !important;
}

.p23m__pattern-wrap {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  transform-origin: center center !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

.p23m__pattern-svg {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
}


/* ======================================================================
   23DTF v4.11m-REV25 - Capas reordenables + fix imagen invisible iOS
   - El panel Capas se puede arrastrar para subir/bajar prioridad.
   - Arriba en la lista = arriba en el canvas.
   - Fuerza visibilidad/z-index estable de imágenes en iOS.
   ====================================================================== */

.p23m__layer-main {
  border: 0 !important;
  background: transparent !important;
  text-align: left !important;
  flex: 1 !important;
  min-width: 0 !important;
  padding: 0 !important;
  cursor: grab !important;
}

.p23m__layer-grip {
  width: 16px !important;
  flex: 0 0 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #9ca3af !important;
  font-size: 14px !important;
  line-height: 1 !important;
  cursor: grab !important;
  user-select: none !important;
  touch-action: none !important;
}

.p23m__layer[data-p23m-layer-card] {
  position: relative !important;
  touch-action: none !important;
}

.p23m__layer.is-dragging {
  opacity: .52 !important;
  transform: scale(.985) !important;
}

.p23m__layer.is-drop-before::before,
.p23m__layer.is-drop-after::after {
  content: "" !important;
  position: absolute !important;
  left: 10px !important;
  right: 10px !important;
  height: 3px !important;
  border-radius: 999px !important;
  background: #0d6aa8 !important;
  box-shadow: 0 0 0 3px rgba(13,106,168,.14) !important;
  z-index: 3 !important;
}

.p23m__layer.is-drop-before::before {
  top: -5px !important;
}

.p23m__layer.is-drop-after::after {
  bottom: -5px !important;
}

.is-p23m-layer-reordering .p23m__layer {
  cursor: grabbing !important;
}

.p23m__layer-stage {
  isolation: isolate !important;
}

.p23m__layer-item {
  visibility: visible !important;
  opacity: 1 !important;
  will-change: transform, left, top, width, height !important;
  -webkit-transform-style: preserve-3d !important;
  transform-style: preserve-3d !important;
}

.p23m__layer-item > img,
.p23m__layer-item .p23m__pattern-wrap,
.p23m__layer-item .p23m__pattern-svg {
  visibility: visible !important;
  opacity: 1 !important;
  backface-visibility: hidden !important;
  -webkit-backface-visibility: hidden !important;
}

@supports (-webkit-touch-callout: none) {
  .p23m__layer-item > img {
    
    -webkit-
  }
}


/* ======================================================================
   23DTF v4.11m-REV26 - Canvas abre Capas + drag capas con presión larga
   - Tocar diseño/texto en canvas abre Capas.
   - Reordenar capas requiere mantener pulsado.
   - La tarjeta se mueve visualmente al arrastrar.
   ====================================================================== */

.p23m__layer[data-p23m-layer-card] {
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease, background .18s ease !important;
  transform: translate3d(0, 0, 0) !important;
}

.p23m__layer[data-p23m-layer-card].is-dragging {
  transform: translate3d(0, var(--p23m-layer-drag-y, 0px), 0) scale(1.015) !important;
  opacity: .96 !important;
  background: #ffffff !important;
  box-shadow: 0 18px 38px rgba(15, 23, 42, .20) !important;
  border-color: #0d6aa8 !important;
  cursor: grabbing !important;
}

.p23m__layer[data-p23m-layer-card].is-dragging .p23m__layer-main,
.p23m__layer[data-p23m-layer-card].is-dragging .p23m__layer-grip {
  cursor: grabbing !important;
}

.p23m__layer-grip::after {
  content: "" !important;
  position: absolute !important;
  inset: -12px !important;
}

.p23m__layer-row {
  user-select: none !important;
  -webkit-user-select: none !important;
}

.p23m__layer-main {
  cursor: pointer !important;
}

.p23m__layer-grip {
  cursor: grab !important;
}

.is-p23m-layer-reordering .p23m__layer:not(.is-dragging) {
  transition: transform .18s ease, opacity .18s ease, background .18s ease !important;
}

.p23m__layer.is-drop-before {
  transform: translateY(6px) !important;
}

.p23m__layer.is-drop-after {
  transform: translateY(-6px) !important;
}

.p23m__layer.is-drop-before::before,
.p23m__layer.is-drop-after::after {
  height: 4px !important;
  background: #0d6aa8 !important;
  box-shadow: 0 0 0 5px rgba(13,106,168,.16) !important;
}


/* ======================================================================
   23DTF v4.11m-REV27 - Capas: drag más fluido y marcador más preciso
   - La tarjeta arrastrada sigue el dedo/ratón.
   - Los marcadores arriba/abajo indican la ranura exacta.
   - La tarjeta arrastrada no interfiere con el cálculo de posición.
   ====================================================================== */

.p23m__layer[data-p23m-layer-card] {
  transition:
    transform .16s cubic-bezier(.2,.8,.2,1),
    box-shadow .16s ease,
    opacity .16s ease,
    border-color .16s ease,
    background .16s ease !important;
}

.p23m__layer[data-p23m-layer-card].is-dragging {
  transform: translate3d(0, var(--p23m-layer-drag-y, 0px), 0) scale(1.018) !important;
  opacity: .98 !important;
  background: #ffffff !important;
  box-shadow: 0 22px 44px rgba(15, 23, 42, .24) !important;
  border-color: #0d6aa8 !important;
  cursor: grabbing !important;
  pointer-events: none !important;
  will-change: transform !important;
}

.p23m__layer.is-drop-before,
.p23m__layer.is-drop-after {
  background: #f8fbff !important;
}

.p23m__layer.is-drop-before {
  transform: translateY(8px) !important;
}

.p23m__layer.is-drop-after {
  transform: translateY(-8px) !important;
}

.p23m__layer.is-drop-before::before,
.p23m__layer.is-drop-after::after {
  left: 6px !important;
  right: 6px !important;
  height: 5px !important;
  border-radius: 999px !important;
  background: #0d6aa8 !important;
  box-shadow:
    0 0 0 4px rgba(13,106,168,.16),
    0 8px 18px rgba(13,106,168,.22) !important;
}

.p23m__layer.is-drop-before::before {
  top: -7px !important;
}

.p23m__layer.is-drop-after::after {
  bottom: -7px !important;
}

.p23m__layer.is-drop-near .p23m__layer-row {
  outline: 1px solid rgba(13,106,168,.18) !important;
  outline-offset: 2px !important;
  border-radius: 8px !important;
}

.is-p23m-layer-reordering .p23m__layer:not(.is-dragging) {
  transition:
    transform .16s cubic-bezier(.2,.8,.2,1),
    background .16s ease,
    outline-color .16s ease !important;
}


/* ======================================================================
   23DTF v4.11m-REV28 - Botones SVG funcionales en Capas
   - Ver/Ocultar y Eliminar ya no disparan reordenado.
   - Iconos SVG limpios.
   - Zonas táctiles amplias y separadas del drag.
   ====================================================================== */

.p23m__layer-actions {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex: 0 0 auto !important;
  position: relative !important;
  z-index: 10 !important;
  touch-action: manipulation !important;
}

.p23m__layer-action-btn {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  border: 1px solid #d8dde3 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #374151 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
  transition: background .14s ease, border-color .14s ease, color .14s ease, transform .14s ease, box-shadow .14s ease !important;
}

.p23m__layer-action-btn svg {
  width: 18px !important;
  height: 18px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.9 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  pointer-events: none !important;
}

.p23m__layer-action-btn:hover {
  background: #f8fafc !important;
  border-color: #9cc9e8 !important;
  color: #0d6aa8 !important;
  box-shadow: 0 5px 14px rgba(13,106,168,.10) !important;
}

.p23m__layer-action-btn:active {
  transform: scale(.96) !important;
}

.p23m__layer-action-btn.is-danger {
  color: #b42318 !important;
}

.p23m__layer-action-btn.is-danger:hover {
  background: #fff1f1 !important;
  border-color: #fecaca !important;
  color: #dc2626 !important;
  box-shadow: 0 5px 14px rgba(220,38,38,.10) !important;
}

.p23m__layer-row {
  gap: 8px !important;
}

.p23m__layer-main,
.p23m__layer-preview,
.p23m__layer-grip {
  touch-action: pan-y !important;
}

/* Las acciones nunca deben transformarse como parte del indicador de drop */
.p23m__layer.is-drop-before .p23m__layer-actions,
.p23m__layer.is-drop-after .p23m__layer-actions,
.p23m__layer.is-dragging .p23m__layer-actions {
  pointer-events: auto !important;
}


/* ======================================================================
   23DTF v4.11m-REV29 - Añadir abre Capas + patrón dentro de Transformar
   - Diseño ya no aparece en barra vertical.
   - Voltear/Repetir/Espejo pasan a Transformar.
   - La imagen no nace estrechada cuando las dimensiones cargan tarde.
   ====================================================================== */

.p23m-transform-flip-row {
  margin-top: 14px !important;
}

.p23m-transform-flip-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.p23m-transform-flip-grid .p23m-icon-btn {
  min-height: 62px !important;
}

@media screen and (min-width: 760px) {
  .p23m-transform-flip-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}


/* ======================================================================
   23DTF v4.11m-REV30 - Transformar controla patrón sin abrir Diseño
   - Sin patrón / Repetir 2x / Espejo permanecen dentro de Transformar.
   - Espejo solo duplica si Repetir 2x está activo.
   ====================================================================== */


/* ======================================================================
   23DTF v4.11m-REV31 - Voltear real + sin bloque Diseño
   - Sin patrón no aparece seleccionado por defecto.
   - Horizontal/Vertical voltean la capa completa, incluido el marco.
   - Espejo individual muestra una sola imagen espejada.
   ====================================================================== */

.p23m__layer-item {
  transform-origin: center center !important;
}

/* ======================================================================
   23DTF v4.11m-REV32 - Flip/patrón/crop sin espacios
   - Horizontal/Vertical renderizan la capa completa.
   - Repetir 2x adapta la caja visual a dos imágenes.
   - Crop ajusta la caja final a la proporción real recortada.
   ====================================================================== */

.p23m__layer-item {
  transform-origin: center center !important;
}

.p23m__pattern-wrap,
.p23m__pattern-svg {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

.p23m__layer-item > img {
  object-fit: fill !important;
}


/* ======================================================================
   23DTF v4.11m-REV33 - Quitar Repetir 2x + orientación horizontal real
   - Se elimina Repetir 2x.
   - Horizontal/Vertical cambian la orientación de la caja completa.
   - Espejo queda como una sola imagen espejada.
   ====================================================================== */

.p23m-transform-flip-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

@media screen and (min-width: 760px) {
  .p23m-transform-flip-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}


/* ======================================================================
   23DTF v4.11m-REV34 CLEAN - Formato horizontal sin deformar
   - Formato horizontal/vertical usa rotación de capa completa.
   - No hay Repetir 2x.
   - Reset restaura archivo y proporción originales.
   ====================================================================== */

.p23m-transform-flip-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.p23m-transform-flip-grid .p23m-icon-btn small {
  min-height: 2.2em !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.p23m__layer-item {
  transform-origin: center center !important;
}


/* ======================================================================
   23DTF v4.11m-REV35 - Orientación por acciones + tooltip activo fijo
   - Fila 1: Formato vertical / Formato horizontal.
   - Fila 2: Espejo / Normal.
   - Los botones no quedan seleccionados; solo ejecutan acción.
   - El título del botón activo del toolbar vertical queda visible fijo.
   ====================================================================== */

.p23m-transform-actions-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.p23m-transform-actions-grid .p23m-icon-btn {
  min-height: 64px !important;
}

.p23m-transform-actions-grid .p23m-icon-btn.is-active {
  border-color: #d8dde3 !important;
  background: #fff !important;
  color: #202223 !important;
  box-shadow: none !important;
}

.p23m-transform-actions-grid .p23m-icon-btn.is-active small {
  color: #4b5563 !important;
}

/* Tooltip fijo solo en toolbar vertical desktop */
@media screen and (min-width: 990px) {
  .mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button.is-active::after {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(-50%) translateX(0) !important;
  }

  .mpv2c-modal.is-p23m-with-active .p23m__toolbar--canvas button.is-active {
    position: relative !important;
    z-index: 85 !important;
  }
}


/* ======================================================================
   23DTF v4.11m-REV36 - Bloquear menú nativo por pulsación larga
   - Evita "Guardar/Copiar/Abrir imagen" en iOS y Android dentro del editor.
   - Mantener pulsado queda reservado para mover diseños/textos y capas.
   ====================================================================== */

.mpv2c-modal .p23m,
.mpv2c-modal .p23m *,
.mpv2c-modal [data-p23m-canvas],
.mpv2c-modal [data-p23m-mockup],
.mpv2c-modal [data-p23m-layer],
.mpv2c-modal [data-p23m-layer-stage],
.mpv2c-modal [data-p23m-safe] {
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}

.mpv2c-modal img,
.mpv2c-modal svg,
.mpv2c-modal canvas,
.mpv2c-modal [data-p23m-canvas] img,
.mpv2c-modal [data-p23m-mockup] img,
.mpv2c-modal [data-p23m-layer] img,
.mpv2c-modal .p23m__layer-item img,
.mpv2c-modal .p23m__mockup img {
  -webkit-touch-callout: none !important;
  -webkit-user-drag: none !important;
  user-drag: none !important;
  user-select: none !important;
}

.mpv2c-modal [data-p23m-layer],
.mpv2c-modal .p23m__layer-item,
.mpv2c-modal .p23m__selection,
.mpv2c-modal .p23m__handle,
.mpv2c-modal .p23m__rotate {
  touch-action: none !important;
}

/* Permitimos selección/escritura normal solo en campos de formulario */
.mpv2c-modal input,
.mpv2c-modal textarea,
.mpv2c-modal [contenteditable="true"] {
  -webkit-user-select: text !important;
  user-select: text !important;
  -webkit-touch-callout: default !important;
}


/* ======================================================================
   23DTF v4.11m-REV37 - Resize real de texto con el marco
   - La caja y la tipografía escalan juntas.
   - Evita que el marco cambie pero el texto mantenga tamaño fijo.
   ====================================================================== */

.p23m__layer-text {
  font-size: inherit;
  overflow: visible !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  transform-origin: center center !important;
}

.p23m__layer-item[data-p23m-layer] .p23m__layer-text {
  min-width: 100% !important;
  min-height: 100% !important;
}


/* ======================================================================
   23DTF v4.11m-REV38 - Marco de texto envuelve todo el texto
   - Corrige textos multilínea cuyo marco quedaba demasiado bajo/pequeño.
   - La caja se ajusta antes de renderizar.
   ====================================================================== */

.p23m__layer-item:has(.p23m__layer-text) {
  overflow: visible !important;
}

.p23m__layer-text {
  box-sizing: border-box !important;
  padding: 4px 6px !important;
  line-height: .96 !important;
  width: 100% !important;
  height: 100% !important;
}


/* ======================================================================
   23DTF v4.11m-REV39 - Resize texto proporcional sin deformar marco
   - El marco mantiene su forma/proporción.
   - El texto crece o reduce con el marco.
   - La autoexpansión solo actúa antes del resize manual.
   ====================================================================== */

.p23m__layer-item:has(.p23m__layer-text) {
  transform-origin: center center !important;
}

.p23m__layer-text {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}


/* ======================================================================
   23DTF v4.11m-REV40 - Fit real del marco al texto
   - El marco se ajusta al texto renderizado real.
   - Sin padding interno excesivo.
   - Mantiene resize proporcional de REV39.
   ====================================================================== */

.p23m__layer-text {
  padding: 0 !important;
  margin: 0 !important;
  line-height: .9 !important;
  width: 100% !important;
  height: 100% !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: pre !important;
  overflow: visible !important;
}

.p23m__layer-item:has(.p23m__layer-text) {
  overflow: visible !important;
}


/* ======================================================================
   23DTF v4.11m-REV41 - Texto español + fit limitado + doble click editor
   - Default: "Tu texto aquí".
   - El marco del texto se ajusta al texto real sin salirse de la zona.
   - Doble click abre el editor correspondiente.
   ====================================================================== */

.p23m__layer-text {
  min-width: 0 !important;
  min-height: 0 !important;
}


/* ======================================================================
   23DTF v4.11m-REV42 CLEAN - Texto editable estable
   - Esquinas: escalan tipografía + marco.
   - Laterales: cambian composición/ancho para bajar/subir líneas.
   - Tamaño mínimo real más pequeño.
   - Doble tap/click abre editor correspondiente.
   ====================================================================== */

.p23m__layer-text {
  line-height: .88 !important;
  white-space: pre-wrap !important;
  overflow-wrap: break-word !important;
}

.p23m__handle[data-p23m-resize="e"],
.p23m__handle[data-p23m-resize="w"] {
  cursor: ew-resize !important;
}

.p23m__handle[data-p23m-resize="ne"],
.p23m__handle[data-p23m-resize="nw"],
.p23m__handle[data-p23m-resize="se"],
.p23m__handle[data-p23m-resize="sw"] {
  cursor: nwse-resize !important;
}


/* ======================================================================
   23DTF v4.11m-REV43 - Texto progresivo + escritura directa
   - Esquinas: escala global de texto y marco.
   - Laterales: ancho de composición; el texto continúa debajo.
   - Doble tap/click: abre editor y enfoca textarea.
   ====================================================================== */

.p23m__text-editor {
  font-size: 16px !important;
  line-height: 1.35 !important;
  min-height: 92px !important;
  touch-action: manipulation !important;
}

.p23m__layer-text {
  line-height: .88 !important;
  white-space: pre-wrap !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
}

.p23m__layer-item:has(.p23m__layer-text) {
  overflow: visible !important;
}


/* ======================================================================
   23DTF v4.11m-REV44 - Edición directa de texto en canvas
   - Doble tap/click permite escribir directamente sobre el texto.
   - Esquinas escalan texto + marco.
   - Laterales cambian ancho y provocan salto de línea.
   ====================================================================== */

.p23m__layer-item.is-editing-text {
  cursor: text !important;
}

.p23m__layer-text[contenteditable="true"] {
  cursor: text !important;
  outline: none !important;
  caret-color: currentColor !important;
  -webkit-user-select: text !important;
  user-select: text !important;
  -webkit-touch-callout: default !important;
}

.p23m__layer-item.is-editing-text .p23m__layer-text {
  pointer-events: auto !important;
}

.p23m__layer-text {
  line-height: .88 !important;
  white-space: pre-wrap !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
  text-align: center !important;
}


/* ======================================================================
   23DTF v4.11m-REV45 CLEAN - Texto editable desde botón Texto
   - 1 tap en capa abre Capas.
   - Botón Texto activa escritura directa en canvas.
   - Se elimina doble tap/doble click como gesto de edición.
   - Tiradores laterales en texto ajustan ancho/wrap.
   ====================================================================== */

.p23m__layer-item.is-editing-text {
  cursor: text !important;
}

.p23m__layer-text[contenteditable="true"] {
  cursor: text !important;
  outline: none !important;
  caret-color: currentColor !important;
  -webkit-user-select: text !important;
  user-select: text !important;
  -webkit-touch-callout: default !important;
  touch-action: manipulation !important;
}

.p23m__layer-item.is-editing-text .p23m__selection {
  pointer-events: none !important;
}

.p23m__layer-item.is-editing-text .p23m__delete,
.p23m__layer-item.is-editing-text .p23m__rotate,
.p23m__layer-item.is-editing-text .p23m__handle {
  pointer-events: auto !important;
}

.p23m__handle.e-edge,
.p23m__handle.w-edge {
  display: block !important;
  opacity: 1 !important;
}

.p23m__layer-text {
  line-height: .88 !important;
  white-space: pre-wrap !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
  text-align: center !important;
}


/* ======================================================================
   23DTF v4.11m-REV46 - Marco y edición directa conviven
   - Tocar texto editable reactiva el marco si estaba deseleccionado.
   - Los tiradores siguen operativos mientras el texto se puede editar.
   - El cuerpo del texto mantiene el cursor de escritura.
   ====================================================================== */

.p23m__layer-item.is-editing-text.is-active .p23m__selection {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.p23m__layer-item.is-editing-text .p23m__selection {
  pointer-events: none !important;
}

.p23m__layer-item.is-editing-text .p23m__handle,
.p23m__layer-item.is-editing-text .p23m__rotate,
.p23m__layer-item.is-editing-text .p23m__delete {
  pointer-events: auto !important;
}

.p23m__layer-text[contenteditable="true"] {
  position: relative !important;
  z-index: 2 !important;
}

.p23m__layer-item.is-editing-text .p23m__selection {
  z-index: 3 !important;
}

.p23m__layer-item.is-editing-text .p23m__handle,
.p23m__layer-item.is-editing-text .p23m__rotate,
.p23m__layer-item.is-editing-text .p23m__delete {
  z-index: 4 !important;
}


/* ======================================================================
   23DTF v4.11m-REV47 REBUILD - Mover texto desde líneas del marco
   Base reconstruida sobre los archivos enviados por el usuario.
   - Centro del texto editable = escribir.
   - Círculos/tiradores = redimensionar.
   - Laterales = ajustar ancho/wrap.
   - Líneas del marco = mover toda la capa.
   - Zona táctil amplia para móvil sin ensuciar visualmente.
   ====================================================================== */

.p23m__move-frame {
  position: absolute !important;
  display: block !important;
  pointer-events: auto !important;
  z-index: 3 !important;
  background: transparent !important;
  touch-action: none !important;
  cursor: move !important;
  -webkit-tap-highlight-color: transparent !important;
}

.p23m__move-frame.move-top,
.p23m__move-frame.move-bottom {
  left: 14px !important;
  right: 14px !important;
  height: 18px !important;
}

.p23m__move-frame.move-top {
  top: -9px !important;
}

.p23m__move-frame.move-bottom {
  bottom: -9px !important;
}

.p23m__move-frame.move-left,
.p23m__move-frame.move-right {
  top: 14px !important;
  bottom: 14px !important;
  width: 18px !important;
}

.p23m__move-frame.move-left {
  left: -9px !important;
}

.p23m__move-frame.move-right {
  right: -9px !important;
}

.p23m__move-frame:hover::after {
  content: "" !important;
  position: absolute !important;
  background: rgba(13, 106, 168, .55) !important;
  border-radius: 999px !important;
}

.p23m__move-frame.move-top:hover::after,
.p23m__move-frame.move-bottom:hover::after {
  left: 0 !important;
  right: 0 !important;
  top: 8px !important;
  height: 2px !important;
}

.p23m__move-frame.move-left:hover::after,
.p23m__move-frame.move-right:hover::after {
  top: 0 !important;
  bottom: 0 !important;
  left: 8px !important;
  width: 2px !important;
}

.p23m__layer-item.is-editing-text .p23m__move-frame {
  pointer-events: auto !important;
}

.p23m__layer-item.is-editing-text .p23m__handle,
.p23m__layer-item.is-editing-text .p23m__rotate,
.p23m__layer-item.is-editing-text .p23m__delete {
  z-index: 4 !important;
}


/* ======================================================================
   23DTF v4.11m-REV48 - Líneas del marco abren Capas al mover
   - Al tocar/arrastrar líneas del marco del texto, se sale de edición directa.
   - Se abre Capas y se mueve la capa completa.
   - Para volver a escribir, hay que pulsar de nuevo el botón Texto.
   ====================================================================== */


/* ======================================================================
   23DTF v4.11m-REV49 - Copiar/pegar texto + anclar capas
   - Permite seleccionar, copiar y pegar dentro del bloque Texto y texto del canvas.
   - Añade botón de ancla/enlace para mover varias capas juntas.
   ====================================================================== */

.mpv2c-modal textarea[data-p23m-control="text"],
.mpv2c-modal .p23m__text-editor,
.mpv2c-modal .p23m__text-editor textarea,
.mpv2c-modal [data-p23m-canvas-text-edit],
.mpv2c-modal .p23m__layer-text[contenteditable="true"] {
  -webkit-user-select: text !important;
  user-select: text !important;
  -webkit-touch-callout: default !important;
  touch-action: manipulation !important;
  cursor: text !important;
}

.mpv2c-modal textarea[data-p23m-control="text"] {
  resize: vertical !important;
}

.p23m__layer.is-group-move {
  border-color: rgba(13, 106, 168, .72) !important;
  background: #eef8ff !important;
}

.p23m__layer-action-btn.is-active {
  border-color: #0d6aa8 !important;
  background: #d9edf9 !important;
  color: #0d6aa8 !important;
}

.p23m__layer-action-btn.is-active svg {
  stroke: #0d6aa8 !important;
}

.p23m.is-p23m-group-moving .p23m__layer-item.is-active .p23m__selection,
.mpv2c-modal.is-p23m-group-moving .p23m__layer-item.is-active .p23m__selection {
  border-color: #0d6aa8 !important;
  box-shadow: 0 0 0 2px rgba(13, 106, 168, .12) !important;
}


/* ======================================================================
   23DTF v4.11m-REV50 - Paleta completa tipo Printful + color HEX
   - Sustituye la paleta corta por la variante amplia extraída del bloque Printful.
   - Añade selector nativo tipo tab-solid-swatches-selection-hex.
   - Permite introducir HEX manual y mantiene R/G/B visible.
   ====================================================================== */

.p23m-color-block {
  display: grid !important;
  gap: 10px !important;
}

.p23m-color-block__current {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 13px !important;
  color: #202223 !important;
}

.p23m-color-block__current strong {
  font-weight: 800 !important;
}

.p23m-color-block__current small {
  color: #6d7175 !important;
}

.p23m-color-block__top {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.p23m__swatches.p23m__swatches--printful {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(24px, 24px)) !important;
  gap: 5px !important;
  align-items: center !important;
  max-width: 100% !important;
}

.p23m__swatch {
  position: relative !important;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  border: 1px solid #b8bec5 !important;
  border-radius: 5px !important;
  padding: 0 !important;
  cursor: pointer !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18) !important;
}

.p23m__swatch:hover {
  box-shadow: 0 0 0 2px rgba(13,106,168,.18), inset 0 0 0 1px rgba(255,255,255,.24) !important;
}

.p23m__swatch.is-selected {
  outline: 2px solid #0d6aa8 !important;
  outline-offset: 1px !important;
  box-shadow: 0 0 0 3px rgba(13,106,168,.16) !important;
}

.p23m__swatch.is-selected::after {
  content: "✓" !important;
  position: absolute !important;
  inset: 0 !important;
  display: grid !important;
  place-items: center !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.75), 0 0 2px rgba(0,0,0,.75) !important;
}

.p23m__swatch--hex {
  overflow: hidden !important;
  display: inline-grid !important;
  place-items: center !important;
  background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red) !important;
  border-color: #0d6aa8 !important;
}

.p23m__swatch--hex input[type="color"] {
  position: absolute !important;
  inset: -6px !important;
  width: calc(100% + 12px) !important;
  height: calc(100% + 12px) !important;
  opacity: 0 !important;
  cursor: pointer !important;
}

.p23m__swatch--hex span {
  position: relative !important;
  z-index: 1 !important;
  display: grid !important;
  width: 18px !important;
  height: 18px !important;
  place-items: center !important;
  border-radius: 4px !important;
  background: rgba(255,255,255,.86) !important;
  color: #0d6aa8 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  pointer-events: none !important;
}

.p23m-color-block__hex-input {
  width: 96px !important;
  height: 32px !important;
  border: 1px solid #d6d9dc !important;
  border-radius: 6px !important;
  padding: 0 8px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  outline: none !important;
}

.p23m-color-block__hex-input:focus {
  border-color: #0d6aa8 !important;
  box-shadow: 0 0 0 2px rgba(13,106,168,.12) !important;
}


/* ======================================================================
   23DTF v4.11m-REV51 - Panel Fuente + Font combinations reales
   - Biblioteca de fuentes con buscador y tabs.
   - Combinaciones de fuente editables aplicadas a capa de texto.
   - Base lista para evolucionar a combinaciones multi-capa.
   ====================================================================== */

.p23m-font-panel {
  display: grid !important;
  gap: 14px !important;
}

.p23m-font-search-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto auto !important;
  gap: 8px !important;
  align-items: center !important;
}

.p23m-font-search-row input {
  height: 38px !important;
  min-width: 0 !important;
  border: 1px solid #d6d9dc !important;
  border-radius: 8px !important;
  padding: 0 12px !important;
  font-size: 13px !important;
  outline: none !important;
}

.p23m-font-search-row input:focus {
  border-color: #0d6aa8 !important;
  box-shadow: 0 0 0 2px rgba(13,106,168,.12) !important;
}

.p23m-font-search-row button {
  height: 38px !important;
  border: 1px solid #d6d9dc !important;
  border-radius: 8px !important;
  background: #fff !important;
  padding: 0 10px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
}

.p23m-font-search-row button.is-active {
  border-color: #111827 !important;
  color: #111827 !important;
  box-shadow: inset 0 -2px 0 #111827 !important;
}

.p23m-font-section {
  border: 1px solid #e5e7eb !important;
  border-radius: 10px !important;
  background: #fff !important;
  overflow: hidden !important;
}

.p23m-font-section__title {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 10px 12px !important;
  border-bottom: 1px solid #eef0f2 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  color: #202223 !important;
}

.p23m-font-section__title small {
  color: #6d7175 !important;
  font-weight: 800 !important;
}

.p23m-font-list {
  max-height: 300px !important;
  overflow: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.p23m-font-row {
  display: grid !important;
  width: 100% !important;
  grid-template-columns: 24px minmax(0, 1fr) 24px !important;
  gap: 8px !important;
  align-items: center !important;
  border: 0 !important;
  border-bottom: 1px solid #f1f2f3 !important;
  background: #fff !important;
  padding: 9px 12px !important;
  text-align: left !important;
  cursor: pointer !important;
}

.p23m-font-row:hover,
.p23m-font-row.is-active {
  background: #f6fbff !important;
}

.p23m-font-row__favorite {
  color: #9ca3af !important;
  font-size: 17px !important;
}

.p23m-font-row__body {
  min-width: 0 !important;
}

.p23m-font-row__body strong {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: #111827 !important;
  font-size: 16px !important;
  line-height: 1.1 !important;
}

.p23m-font-row__body small {
  color: #8c9196 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

.p23m-font-row__check {
  color: #0d6aa8 !important;
  font-weight: 900 !important;
}

.p23m-font-combos {
  border: 1px solid #e5e7eb !important;
  border-radius: 10px !important;
  background: #fff !important;
  overflow: hidden !important;
}

.p23m-font-combos__grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  padding: 10px !important;
}

.p23m-font-combo {
  display: grid !important;
  min-height: 126px !important;
  gap: 4px !important;
  align-content: center !important;
  border: 1px solid #eceff2 !important;
  border-radius: 12px !important;
  background: #fff !important;
  padding: 10px !important;
  text-align: center !important;
  cursor: pointer !important;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease !important;
}

.p23m-font-combo:hover {
  transform: translateY(-1px) !important;
  border-color: #0d6aa8 !important;
  box-shadow: 0 8px 20px rgba(13, 106, 168, .12) !important;
}

.p23m-font-combo__preview {
  display: flex !important;
  min-height: 68px !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: .9 !important;
}

.p23m-font-combo__preview span {
  display: block !important;
  font-weight: 900 !important;
  line-height: .92 !important;
  text-transform: none !important;
}

.p23m-font-combo strong {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: #202223 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

.p23m-font-combo small {
  color: #6d7175 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

@media (max-width: 749px) {
  .p23m-font-search-row {
    grid-template-columns: 1fr !important;
  }

  .p23m-font-combos__grid {
    grid-template-columns: 1fr !important;
  }

  .p23m-font-list {
    max-height: 240px !important;
  }
}


/* ======================================================================
   23DTF v4.11m-REV52 - Rail Texto limpio, Font combinations solo en Fuente
   - Rail Texto: añadir texto / plantillas rápidas.
   - Tt Fuente: fuentes + combinaciones de fuente.
   ====================================================================== */

.p23m-text-rail-clean {
  display: grid !important;
  gap: 16px !important;
}

.p23m-text-rail-clean__head {
  border: 1px solid #e5e7eb !important;
  border-radius: 12px !important;
  background: #f8fafc !important;
  padding: 14px !important;
}

.p23m-text-rail-clean__head h3 {
  margin: 0 0 6px !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  color: #111827 !important;
}

.p23m-text-rail-clean__head p {
  margin: 0 !important;
  color: #6d7175 !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
}

.p23m-text-rail-clean__head b {
  color: #0d6aa8 !important;
}

.p23m-text-add-primary {
  height: 44px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #111827 !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  cursor: pointer !important;
}

.p23m-text-rail-clean__section h4 {
  margin: 0 0 10px !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  color: #202223 !important;
}

.p23m-text-presets-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.p23m-text-preset {
  display: grid !important;
  min-height: 92px !important;
  align-content: center !important;
  gap: 6px !important;
  border: 1px solid #eceff2 !important;
  border-radius: 12px !important;
  background: #fff !important;
  padding: 10px !important;
  text-align: center !important;
  cursor: pointer !important;
}

.p23m-text-preset:hover {
  border-color: #0d6aa8 !important;
  box-shadow: 0 8px 20px rgba(13,106,168,.10) !important;
}

.p23m-text-preset span {
  color: #6d7175 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

.p23m-text-preset strong {
  white-space: pre-line !important;
  color: #111827 !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1.05 !important;
}

.p23m-text-preset.is-red strong {
  color: #ef4444 !important;
}

.p23m-text-preset.is-blue strong {
  color: #2f94d0 !important;
}

.p23m-text-preset.is-team strong {
  -webkit-text-stroke: 1px #111827 !important;
  color: #fff !important;
  font-size: 20px !important;
}

.p23m-text-preset.is-urban strong {
  font-family: Impact, Arial Black, sans-serif !important;
  letter-spacing: .02em !important;
}

@media (max-width: 749px) {
  .p23m-text-presets-grid {
    grid-template-columns: 1fr !important;
  }
}


/* ======================================================================
   23DTF v4.11m-REV53 - Fuentes integradas dentro de Texto
   - Se elimina el botón vertical Tt Fuente.
   - Texto contiene: contenido, fuentes, usadas, todas y combinaciones.
   - Orden toolbar texto: Texto, Color, Transformar, Contorno, Sombra, Posición.
   ====================================================================== */

.p23m__control-title--sub {
  margin-top: 18px !important;
  padding-top: 16px !important;
  border-top: 1px solid #eef0f2 !important;
}

.p23m-font-panel--embedded {
  margin-top: 0 !important;
}

.p23m-font-panel--embedded .p23m-font-list {
  max-height: 230px !important;
}

.p23m-font-panel--embedded .p23m-font-combos {
  order: 10 !important;
}

.p23m-font-panel--embedded .p23m-font-combos__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.p23m-font-panel--embedded .p23m-font-combo {
  min-height: 118px !important;
}

.p23m-font-panel--embedded .p23m-font-combo__preview {
  min-height: 58px !important;
}

@media (max-width: 749px) {
  .p23m-font-panel--embedded .p23m-font-combos__grid {
    grid-template-columns: 1fr !important;
  }

  .p23m-font-panel--embedded .p23m-font-list {
    max-height: 200px !important;
  }
}


/* ======================================================================
   23DTF v4.11m-REV54 - Fuentes reales + combinaciones multi-capa
   - Carga Google Fonts para que las fuentes de la lista se reflejen realmente.
   - Las combinaciones con varias líneas crean varias capas de texto ancladas.
   ====================================================================== */

.p23m__layer-text,
.p23m-font-row__body strong,
.p23m-font-combo__preview span {
  font-synthesis: none !important;
  text-rendering: geometricPrecision !important;
}

.p23m__layer.is-group-move .p23m__layer-name::after {
  content: " · anclada" !important;
  color: #0d6aa8 !important;
  font-weight: 800 !important;
}

.p23m-font-combo__preview span {
  letter-spacing: .01em !important;
}


/* ======================================================================
   23DTF v4.11m-REV55 - Fuentes locales desde assets
   - Sustituye Google Fonts por archivos locales subidos a Shopify assets.
   - Las font combinations usan las fuentes locales 23DTF.
   ====================================================================== */

.p23m-font-row__body strong,
.p23m-font-combo__preview span,
.p23m__layer-text {
  font-synthesis: none !important;
}


/* ======================================================================
   23DTF v4.11m-REV56 - Texto limpio, marco más estable
   - Texto nuevo sin inclinación.
   - Combinaciones sin contorno/sombra/rotación por defecto.
   - Toolbar texto: Texto, Color, Contorno, Sombreado, Transformar, Posición.
   - Mejor base para redimensionar texto sin saltos visuales.
   ====================================================================== */

.p23m__layer-text {
  line-height: .94 !important;
  transform-origin: center center !important;
}

.p23m__layer-item.is-editing-text .p23m__layer-text {
  cursor: text !important;
}

.p23m__layer-item.is-active .p23m__selection {
  transform-origin: center center !important;
}


/* ======================================================================
   23DTF v4.11m-REV57 - Tiradores laterales de texto más precisos
   - Los puntos centrales izquierda/derecha tienen zona táctil mayor.
   - El ancho de composición se controla de forma directa sin perder el punto.
   - Mejora móvil/tablet cuando el texto se comprime mucho.
   ====================================================================== */

.p23m__layer-item .p23m__handle.e-edge,
.p23m__layer-item .p23m__handle.w-edge {
  width: 16px !important;
  height: 28px !important;
  min-width: 16px !important;
  min-height: 28px !important;
  border-radius: 999px !important;
  z-index: 8 !important;
  pointer-events: auto !important;
  touch-action: none !important;
}

.p23m__layer-item .p23m__handle.e-edge {
  right: -8px !important;
}

.p23m__layer-item .p23m__handle.w-edge {
  left: -8px !important;
}

.p23m__layer-item .p23m__handle.e-edge::after,
.p23m__layer-item .p23m__handle.w-edge::after {
  content: "" !important;
  position: absolute !important;
  inset: -10px -8px !important;
  border-radius: 999px !important;
  background: transparent !important;
}

.p23m__layer-item.is-active .p23m__selection {
  overflow: visible !important;
}

.p23m__layer-item.is-active .p23m__handle {
  z-index: 9 !important;
}


/* ======================================================================
   23DTF v4.11m-REV58 - Precisión de marco de texto
   - Tiradores laterales más pequeños para no tapar esquinas.
   - Esquinas por encima de tiradores centrales.
   - X de eliminar separada de la esquina.
   - Marco más coherente con texto pequeño.
   ====================================================================== */

.p23m__layer-item .p23m__handle.e-edge,
.p23m__layer-item .p23m__handle.w-edge {
  width: 10px !important;
  height: 18px !important;
  min-width: 10px !important;
  min-height: 18px !important;
  border-radius: 999px !important;
  z-index: 7 !important;
}

.p23m__layer-item .p23m__handle.e-edge {
  right: -5px !important;
}

.p23m__layer-item .p23m__handle.w-edge {
  left: -5px !important;
}

.p23m__layer-item .p23m__handle.e-edge::after,
.p23m__layer-item .p23m__handle.w-edge::after {
  inset: -6px -5px !important;
}

.p23m__layer-item .p23m__handle.nw,
.p23m__layer-item .p23m__handle.ne,
.p23m__layer-item .p23m__handle.sw,
.p23m__layer-item .p23m__handle.se {
  z-index: 12 !important;
}

.p23m__layer-item .p23m__delete {
  right: -24px !important;
  top: -24px !important;
  z-index: 13 !important;
}

@media (max-width: 749px) {
  .p23m__layer-item .p23m__delete {
    right: -22px !important;
    top: -22px !important;
  }

  .p23m__layer-item .p23m__handle.e-edge,
  .p23m__layer-item .p23m__handle.w-edge {
    width: 11px !important;
    height: 20px !important;
  }
}


/* ======================================================================
   23DTF v4.11m-REV59 - Resize de esquinas con ancla estable
   - Las esquinas del texto escalan manteniendo fijo el punto contrario.
   - Evita el desplazamiento vertical automático al reducir/ampliar.
   ====================================================================== */

.p23m__layer-item.is-active .p23m__selection {
  will-change: width, height, transform !important;
}

.p23m__layer-item.is-active .p23m__handle.nw,
.p23m__layer-item.is-active .p23m__handle.ne,
.p23m__layer-item.is-active .p23m__handle.sw,
.p23m__layer-item.is-active .p23m__handle.se {
  box-shadow: 0 0 0 2px rgba(255,255,255,.95), 0 2px 8px rgba(0,0,0,.16) !important;
}


/* ======================================================================
   23DTF v4.11m-REV60B SAFE - Multitexto, zoom 200 y capas scroll
   ====================================================================== */

.p23m__layers {
  max-height: min(52vh, 440px) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
  padding-right: 4px !important;
}

.p23m__layer {
  touch-action: pan-y !important;
}

.p23m__layer-actions,
.p23m__layer-actions button {
  touch-action: manipulation !important;
}

.p23m__canvas {
  overflow: auto !important;
  overscroll-behavior: contain !important;
}

.p23m__stage {
  min-width: 100% !important;
  min-height: 100% !important;
}

.p23m.is-p23m-layer-interacting .p23m__layer-text,
.p23m__layer-item.is-active.is-editing-text .p23m__selection {
  caret-color: transparent !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}

.p23m-transform-actions-row .p23m-icon-btn small {
  font-size: 10px !important;
}


/* ======================================================================
   23DTF REV67 CLEAN - Overrides finales consolidados
   Base funcional: REV66.

   Objetivo de esta limpieza:
   - Unificar en un único bloque las reglas finales que antes estaban
     repartidas entre REV63, REV64, REV65 y REV66.
   - Mantener el mismo comportamiento visual y táctil actual.
   - Evitar contradicciones visibles entre pan-y / none en Capas, canvas y recorte.
   - Dejar este archivo preparado para la siguiente fase: persistencia del
     proyecto del cliente y exportación de archivos de producción.

   Importante:
   - No se fuerza aquí un modo app fullscreen global. Esa decisión queda para
     una revisión móvil específica, no para limpieza.
   ====================================================================== */

/* Bloqueo de la página exterior cuando el popup está abierto. El scroll interno queda gestionado por paneles. */
html.p23m-modal-scroll-locked,
body.p23m-modal-scroll-locked {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}

/* Desktop: popup más amplio sin ocupar pantalla completa. */
@media screen and (min-width: 990px) {
  .mpv2c-modal.is-p23m-with-active .mpv2c-modal__dialog {
    width: min(96vw, 1480px) !important;
    max-width: min(96vw, 1480px) !important;
    height: min(92vh, 920px) !important;
    max-height: min(92vh, 920px) !important;
  }
}

/* Scroll táctil nativo en paneles internos. */
.mpv2c-modal.is-p23m-with-active .p23m__panel,
.mpv2c-modal.is-p23m-with-active .p23m__panel-view,
.mpv2c-modal.is-p23m-with-active .p23m__dynamic-controls,
.mpv2c-modal.is-p23m-with-active .p23m-font-list,
.mpv2c-modal.is-p23m-with-active .p23m-filelib__body,
.mpv2c-modal.is-p23m-with-active .p23m-filelib__grid,
.mpv2c-modal.is-p23m-with-active .p23m__personalizer-table-wrap {
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
}

/* Lista de capas: contenedor scrollable. Las tarjetas gestionan sus gestos desde JS. */
.mpv2c-modal.is-p23m-with-active .p23m__layers {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  max-height: min(52vh, 470px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  touch-action: pan-y !important;
  padding: 2px 5px 14px 1px !important;
}

.mpv2c-modal.is-p23m-with-active .p23m__layer {
  flex: 0 0 auto !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.mpv2c-modal.is-p23m-with-active .p23m__layer-row {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

/* REV64: la tarjeta usa touch-action:none para diferenciar scroll, click y long-press desde JS. */
.p23m__layer[data-p23m-layer-card],
.p23m__layer-main,
.p23m__layer-preview {
  touch-action: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.p23m__layer-main,
.p23m__layer-preview {
  cursor: pointer !important;
  pointer-events: auto !important;
}

.mpv2c-modal.is-p23m-with-active .p23m__layer-grip,
.p23m__layer-grip {
  cursor: grab !important;
  touch-action: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  min-width: 28px !important;
  min-height: 42px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 8px !important;
  color: #6d7175 !important;
  font-weight: 900 !important;
  letter-spacing: -2px !important;
}

.mpv2c-modal.is-p23m-with-active .p23m__layer-grip:active {
  cursor: grabbing !important;
  background: #eef6ff !important;
  color: #0d6aa8 !important;
}

.p23m.is-p23m-layer-reordering .p23m__layer-main,
.p23m.is-p23m-layer-reordering .p23m__layer-preview,
.p23m.is-p23m-layer-reordering .p23m__layer[data-p23m-layer-card] {
  cursor: grabbing !important;
}

.mpv2c-modal.is-p23m-with-active .p23m__layer-actions,
.mpv2c-modal.is-p23m-with-active .p23m__layer-actions button {
  touch-action: manipulation !important;
  pointer-events: auto !important;
}

.mpv2c-modal.is-p23m-with-active input[type="range"] {
  touch-action: pan-x !important;
}

@media screen and (max-width: 989px) {
  .mpv2c-modal.is-p23m-with-active .p23m__layers {
    max-height: min(42vh, 390px) !important;
  }
}

/* Canvas y zona de diseño: el gesto dentro del canvas pertenece al editor, no a la página. */
.p23m [data-p23m-canvas],
.p23m .p23m__canvas,
.p23m .p23m__stage,
.p23m .p23m__mockup,
.p23m .p23m__layer-stage {
  overscroll-behavior: contain !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}

.p23m .p23m__stage,
.p23m .p23m__mockup,
.p23m .p23m__layer-stage,
.p23m .p23m__layer-item,
.p23m .p23m__selection,
.p23m .p23m__handle,
.p23m .p23m__rotate,
.p23m .p23m__crop-frame-ui,
.p23m .p23m__crop-box,
.p23m .p23m__crop-handle {
  touch-action: none !important;
}

.p23m .p23m__layer-item {
  will-change: left, top, width, height, transform !important;
}

.p23m .p23m__crop-frame-ui,
.p23m .p23m__crop-box,
.p23m .p23m__crop-handle {
  -webkit-user-select: none !important;
  user-select: none !important;
}

/* Recorte: marco y capa activa siempre por encima del área segura. */
.p23m .p23m__coord-space.is-p23m-cropping .p23m__layer-stage,
.p23m .p23m__layer-stage.is-p23m-cropping {
  z-index: 90 !important;
}

.p23m .p23m__layer-item.is-cropping {
  z-index: 120 !important;
  overflow: visible !important;
}

.p23m .p23m__layer-item.is-cropping > img {
  position: relative !important;
  z-index: 1 !important;
}

.p23m .p23m__layer-item.is-cropping .p23m__crop-frame-ui {
  z-index: 30 !important;
}

.p23m .p23m__layer-item.is-cropping .p23m__crop-box {
  z-index: 31 !important;
}

.p23m .p23m__layer-item.is-cropping .p23m__crop-handle {
  z-index: 33 !important;
}

/* Botones de recorte debajo de la imagen activa. */
.p23m .p23m__crop-actions {
  position: absolute !important;
  top: auto !important;
  left: 50% !important;
  transform: translate(var(--p23m-crop-actions-shift, -50%, 0)) !important;
  z-index: 150 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  width: auto !important;
  max-width: 230px !important;
  padding: 0 !important;
  margin: 0 !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
}

.p23m .p23m__crop-actions button {
  min-width: 0 !important;
  height: 34px !important;
  border: 0 !important;
  border-radius: 999px !important;
  padding: 0 12px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
  box-shadow: 0 7px 18px rgba(0,0,0,.14) !important;
}

.p23m .p23m__crop-cancel {
  background: #f1f3f5 !important;
  color: #0d6aa8 !important;
}

.p23m .p23m__crop-apply {
  background: #ff3b30 !important;
  color: #fff !important;
}

@media screen and (max-width: 989px) {
  .p23m .p23m__crop-actions {
    gap: 6px !important;
    max-width: 190px !important;
  }

  .p23m .p23m__crop-actions button {
    height: 32px !important;
    padding: 0 10px !important;
    font-size: 11px !important;
  }
}


/* ======================================================================
   23DTF REV68 DRAFT - Autoguardado local de personalización
   ====================================================================== */
.p23m__draft-panel{
  margin-top:14px;
  border:1px solid #dbeafe;
  background:#f8fbff;
  border-radius:12px;
  padding:10px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-size:12px;
  color:#475569;
}
.p23m__draft-panel span{
  min-width:0;
  flex:1;
  line-height:1.35;
}
.p23m__draft-panel button{
  border:1px solid #cbd5e1;
  background:#fff;
  color:#111827;
  border-radius:999px;
  padding:7px 10px;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}
.p23m__draft-panel button:active{
  transform:scale(.98);
}
@media (max-width: 989px){
  .p23m__draft-panel{
    margin-bottom:82px;
    padding:9px 10px;
  }
  .p23m__draft-panel button{
    padding:7px 9px;
    font-size:11px;
  }
}


/* ======================================================================
   23DTF REV68C IMAGE GUARD HOTFIX
   Ajuste visual mínimo para el estado del autoguardado.
   ====================================================================== */
.p23m__draft-panel [data-p23m-draft-status]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}


/* 23DTF REV68C IMAGE GUARD */
.p23m-image-guard{
  display:grid;
  gap:4px;
  margin:0 0 12px;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid #fed7aa;
  background:#fff7ed;
  color:#7c2d12;
  font-size:12px;
  line-height:1.35;
}
.p23m-image-guard strong{font-size:13px;color:#7c2d12;}
.p23m-image-guard p{margin:0;color:#7c2d12;}
.p23m-image-guard small{color:#9a3412;font-weight:700;}
.p23m-image-guard--info{border-color:#bfdbfe;background:#eff6ff;color:#1e3a8a;}
.p23m-image-guard--info strong,.p23m-image-guard--info p,.p23m-image-guard--info small{color:#1e3a8a;}
.p23m-image-guard--danger{border-color:#fecaca;background:#fef2f2;color:#991b1b;}
.p23m-image-guard--danger strong,.p23m-image-guard--danger p,.p23m-image-guard--danger small{color:#991b1b;}
.p23m-image-guard__badge{
  display:inline-flex;
  align-items:center;
  margin-left:6px;
  padding:2px 6px;
  border-radius:999px;
  background:#fff7ed;
  color:#9a3412;
  border:1px solid #fed7aa;
  font-size:10px;
  font-style:normal;
  font-weight:900;
  vertical-align:middle;
}
.p23m-filelib__recent-name .p23m-image-guard__badge{margin-left:4px;}
@media (max-width:989px){
  .p23m-image-guard{font-size:11px;padding:9px 10px;border-radius:9px;}
}

/* ======================================================================
   23DTF REV69A EXPORT LOCAL
   Panel de exportación local de prueba: JSON + previews + PNG transparente
   por zona antes de conectar Cloudflare R2 y pedido Shopify.
   ====================================================================== */
.p23m__export-panel{
  margin-top:12px;
  border:1px solid #dbeafe;
  background:#eff6ff;
  border-radius:12px;
  padding:12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.p23m__export-panel strong{
  display:block;
  font-size:13px;
  line-height:1.2;
  color:#0f172a;
}
.p23m__export-panel small{
  display:block;
  margin-top:4px;
  font-size:11px;
  line-height:1.35;
  color:#475569;
}
.p23m__export-panel button{
  flex:0 0 auto;
  min-height:36px;
  border:0;
  border-radius:999px;
  padding:8px 14px;
  background:#111827;
  color:#fff;
  font-size:12px;
  font-weight:900;
  letter-spacing:.01em;
}
.p23m__export-panel button:disabled{
  background:#94a3b8;
  color:#f8fafc;
}
@media (max-width: 749px){
  .p23m__export-panel{
    align-items:stretch;
    flex-direction:column;
  }
  .p23m__export-panel button{
    width:100%;
  }
}
