/* CAI Pro Print 60.8.0 — capa móvil exclusivamente visual para personalizadores. */
.cai-mobile-dock, .cai-mobile-quickbar, .cai-mobile-close-controls { display:none !important; }
.cai-mobile-sr { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
@media (max-width:767px) {
  body.cai-mobile-editor-on { padding-bottom:calc(76px + env(safe-area-inset-bottom, 0px))!important; }
  body.cai-mobile-editor-on .cai-print-options,
  body.cai-mobile-editor-on .cai-designer,
  body.cai-mobile-editor-on .cai-fields { min-width:0!important; }
  body.cai-mobile-editor-on .cai-print-options { overflow:visible!important; }
  body.cai-mobile-editor-on .cai-fields > * { min-width:0!important; }
  body.cai-mobile-editor-on .cai-fields input:not([type="checkbox"]):not([type="color"]),
  body.cai-mobile-editor-on .cai-fields select,
  body.cai-mobile-editor-on .cai-fields textarea { max-width:100%!important; box-sizing:border-box!important; font-size:16px!important; }
  body.cai-mobile-editor-on .cai-fields button { touch-action:manipulation; }
  body.cai-mobile-editor-on .cai-mobile-dock { 
    position:fixed; z-index:1300; bottom:0; left:0; right:0;
    padding:7px max(5px, env(safe-area-inset-left, 0px)) calc(7px + env(safe-area-inset-bottom, 0px)) max(5px,env(safe-area-inset-right,0px));
    display:grid!important; grid-template-columns:repeat(5,minmax(0,1fr)); align-items:stretch;
    background:#fff; border-top:1px solid #dbe4e9;
    box-shadow:0 -5px 21px rgba(17,38,54,.12); box-sizing:border-box;
  }
  body.cai-mobile-editor-on .cai-mobile-dock-four { grid-template-columns:repeat(4,minmax(0,1fr)); }
  body.cai-mobile-editor-on .cai-mobile-dock button { 
    display:flex; flex-direction:column; justify-content:center; align-items:center; gap:2px;
    min-width:0; min-height:54px; background:#fff; border:0;
    color:#24404b; font-size:10px; line-height:1.2; font-weight:800;
    border-radius:10px; padding:5px 1px; cursor:pointer;
  }
  body.cai-mobile-editor-on .cai-mobile-dock button.cai-mobile-dock-upload { background:#eaf8fd; color:#006c97; }
  body.cai-mobile-editor-on .cai-mobile-dock button:last-child { background:#007fa9; color:#fff; }
  body.cai-mobile-editor-on .cai-mobile-dock .cai-mobile-icon { font-family:Arial,sans-serif; font-weight:900; font-size:20px; line-height:1.2; }
  body.cai-mobile-editor-on .cai-mobile-dock button:focus-visible, 
  body.cai-mobile-editor-on .cai-mobile-quickbar button:focus-visible,
  body.cai-mobile-editor-on .cai-mobile-close-controls:focus-visible { outline:3px solid #e51d68!important; outline-offset:2px!important; }
  /* No mostrar dos pantallas de herramientas de golpe: una mesa protagonista. */
  body.cai-mobile-editor-on .cai-mobile-quickbar {
    display:block!important; margin:10px 0 9px; border:1px solid #cfdee6;
    border-radius:15px; background:#fff; padding:10px; box-shadow:0 2px 10px rgba(15,31,46,.04);
  }
  body.cai-mobile-editor-on .cai-mobile-quickbar-lead { display:flex; gap:6px; flex-wrap:wrap; align-items:baseline; justify-content:space-between; margin:0 0 9px; }
  body.cai-mobile-editor-on .cai-mobile-quickbar-lead strong { font-size:16px; color:#172e3b; }
  body.cai-mobile-editor-on .cai-mobile-quickbar-lead small { font-size:11px; color:#496b7d; }
  body.cai-mobile-editor-on .cai-mobile-quickbar-row { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
  body.cai-mobile-editor-on .cai-mobile-quickbar-row button { display:flex; align-items:center; justify-content:center; gap:6px; min-width:0; min-height:44px; padding:7px 4px; background:#eaf8fd; border:1px solid #b5ddea; border-radius:9px; font-size:12px; font-weight:800; color:#075778; }
  body.cai-mobile-editor-on .cai-mobile-quickbar-row button:nth-child(1) { background:#e51d68; color:#fff; border-color:#e51d68; }
  body.cai-mobile-editor-on .cai-mobile-quickbar-row .cai-mobile-icon { font-size:16px; }
  body.cai-mobile-editor-on .cai-mobile-more-toggle { display:block!important; width:100%; min-height:42px; margin-top:7px; padding:7px; color:#19465c; border:1px solid #ccdce5; border-radius:9px; background:#f7fafc; font-size:12px; font-weight:800; }
  body.cai-mobile-editor-on .cai-designer-tools:not(.cai-mobile-open) { display:none!important; }
  body.cai-mobile-editor-on .cai-designer-tools.cai-mobile-open { display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:7px!important; width:100%!important; margin:0 0 11px!important; }
  body.cai-mobile-editor-on .cai-designer-tools.cai-mobile-open >button,
  body.cai-mobile-editor-on .cai-designer-tools.cai-mobile-open >label { min-height:44px!important; font-size:12px!important; }
  /* La mesa se ve antes que las herramientas avanzadas, sin alterar el canvas JS. */
  body.cai-mobile-editor-on .cai-designer .cai-editor-shell { display:flex!important; flex-direction:column!important; gap:0!important; min-width:0!important; overflow:visible!important; }
  body.cai-mobile-editor-on .cai-editor-shell > .cai-canvas-area { order:0!important; display:grid!important; min-height:0!important; width:100%!important; }
  body.cai-mobile-editor-on .cai-editor-shell > .image-controls:not(.cai-mobile-controls-open) { display:none!important; }
  body.cai-mobile-editor-on .cai-canvas-wrap { min-height:0!important; max-height:none!important; overflow:hidden!important; padding:7px!important; border:1px solid #d8e3ea!important; border-radius:12px!important; background:#eaf0f4!important; }
  body.cai-mobile-editor-on .cai-canvas-wrap canvas { display:block!important; width:auto!important; height:auto!important; max-width:100%!important; max-height:56vh!important; max-height:56dvh!important; margin:auto!important; object-fit:contain!important; }
  body.cai-mobile-editor-on .cai-align-controls { padding:8px 4px!important; margin:0 0 6px!important; }
  body.cai-mobile-editor-on .cai-align-controls button { min-height:44px!important; font-size:11px!important; padding:8px 4px!important; }
  body.cai-mobile-editor-on .cai-canvas-area, body.cai-mobile-editor-on .cai-plotter-sim { min-width:0!important; }
  /* Panel inferior con la mesa a la vista; sólo aparece cuando se solicita editar. */
  body.cai-mobile-editor-on .cai-editor-shell > .image-controls.cai-mobile-controls-open { 
    display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:8px!important;
    position:fixed!important; order:1!important; z-index:1330!important;
    left:7px!important; right:7px!important; bottom:calc(77px + env(safe-area-inset-bottom, 0px))!important;
    width:auto!important; max-width:none!important; max-height:52vh!important; max-height:52dvh!important;
    overflow-y:auto!important; overscroll-behavior:contain;
    margin:0!important; padding:12px!important;
    background:#fff!important; border:1px solid #b9cbd6!important; border-radius:14px!important;
    box-shadow:0 -12px 33px rgba(0,0,0,.18)!important;
  }
  body.cai-mobile-editor-on .cai-editor-shell > .image-controls.cai-mobile-controls-open >label { font-size:12px!important; }
  body.cai-mobile-editor-on .cai-editor-shell > .image-controls.cai-mobile-controls-open input:not([type="range"]),
  body.cai-mobile-editor-on .cai-editor-shell > .image-controls.cai-mobile-controls-open select { min-height:42px!important; font-size:16px!important; }
  body.cai-mobile-editor-on .cai-mobile-close-controls { display:block!important; grid-column:1/-1!important; width:100%!important; min-height:44px!important; border:0!important; border-radius:9px!important; margin:0!important; padding:8px!important; color:#fff!important; background:#173c51!important; font-size:13px!important; font-weight:900!important; }
  body.cai-mobile-editor-on .cai-editor-shell > .image-controls.cai-mobile-controls-open .cai-text-options { grid-column:1/-1!important; }
  body.cai-mobile-editor-on .cai-designer:not(.cai-text-selected) .cai-text-options { display:none!important; }
  body.cai-mobile-editor-on .cai-designer.cai-text-selected .cai-text-options { display:grid!important; }
  body.cai-mobile-editor-on .cai-proof-actions { scroll-margin-top:14px; }
  body.cai-mobile-editor-on .cai-proof-actions label { font-size:13px!important; line-height:1.45!important; }
  body.cai-mobile-editor-on .cai-product-presentation, body.cai-mobile-editor-on form.cart { min-width:0; }
  body.cai-mobile-editor-on .cai-design-purchase .single_add_to_cart_button,
  body.cai-mobile-editor-on .cai-roller-purchase .single_add_to_cart_button { min-height:54px!important; }
  body.cai-mobile-editor-on .cai-background-picker button,
  body.cai-mobile-editor-on .cai-templates-panel button,
  body.cai-mobile-editor-on .cai-design-library button { touch-action:manipulation; }
  body.cai-mobile-editor-on .cai-templates-panel,
  body.cai-mobile-editor-on .cai-background-picker,
  body.cai-mobile-editor-on .cai-graphics-panel,
  body.cai-mobile-editor-on .cai-design-library { max-width:100%; }
  body.cai-mobile-editor-on .cai-background-picker>div { overflow-x:auto; }
}
@media (max-width:380px) {
  body.cai-mobile-editor-on .cai-mobile-dock button { font-size:9px; }
  body.cai-mobile-editor-on .cai-mobile-quickbar-row button { font-size:11px; }
  body.cai-mobile-editor-on .cai-editor-shell > .image-controls.cai-mobile-controls-open { grid-template-columns:1fr!important; }
}
@media (min-width:768px) {
  .cai-mobile-dock, .cai-mobile-quickbar, .cai-mobile-close-controls { display:none!important; }
}
@media (prefers-reduced-motion:reduce) {
  .cai-mobile-dock button, .cai-mobile-quickbar button { transition:none!important; animation:none!important; }
}

/* CAI 60.8.1 — Experiencia móvil: importamos el mismo editor de escritorio, no una copia. */
.cai-mobile-upload-hero,.cai-mobile-fit-actions { display:none !important; }
@media (max-width:767px) {
  body.cai-mobile-editor-on .cai-mobile-upload-hero {
    position:relative; display:block!important; isolation:isolate; overflow:hidden;
    padding:19px 16px 16px; margin:0 0 12px; border:1px solid #cee1ec;
    border-radius:18px; color:#102e40;
    background:linear-gradient(136deg,#effbff 0%,#fff 63%,#fff0f6 100%);
    box-shadow:0 9px 28px rgba(5,58,82,.075); box-sizing:border-box;
  }
  body.cai-mobile-editor-on .cai-mobile-upload-hero:before {
    content:'✦';position:absolute;right:14px;top:9px;z-index:-1;
    color:#e51d68;opacity:.15;font-size:73px;font-weight:900;
    animation:cai-spark-drift 4s ease-in-out infinite;
  }
  @keyframes cai-spark-drift { 0%,100%{transform:translateY(0) rotate(-10deg)}50%{transform:translateY(5px) rotate(8deg)} }
  body.cai-mobile-editor-on .cai-mobile-hero-badge {
    display:inline-block;background:#fff;border:1px solid #c6e7f1;border-radius:99px;
    color:#08769e;padding:5px 10px;font-size:10px;font-weight:900;letter-spacing:.055em;
  }
  body.cai-mobile-editor-on .cai-mobile-hero-title {
    margin:10px 0 4px!important;padding:0!important;font-size:23px!important;
    font-weight:950!important;line-height:1.08!important;letter-spacing:-.025em;color:#102e40!important;
  }
  body.cai-mobile-editor-on .cai-mobile-hero-subtitle {
    margin:0 0 15px!important;max-width:280px;color:#4a6574!important;
    font-size:12px!important;line-height:1.5!important;
  }
  body.cai-mobile-editor-on .cai-mobile-hero-cta {
    position:relative!important;display:flex!important;align-items:center;justify-content:center!important;
    gap:11px;isolation:isolate;width:100%!important;min-height:63px!important;
    padding:12px 36px 12px 14px!important;border:0!important;border-radius:14px!important;
    color:#fff!important;background:linear-gradient(100deg,#d91565,#e51d68 42%,#f04b85)!important;
    text-align:center!important;font-size:18px!important;font-weight:900!important;line-height:1.2!important;
    box-shadow:0 8px 17px rgba(229,29,104,.23);
    animation:cai-upload-attention 3.5s ease-in-out infinite;
    touch-action:manipulation;cursor:pointer;
  }
  body.cai-mobile-editor-on .cai-upload-busy .cai-mobile-hero-cta{animation:none!important;opacity:.8}
  body.cai-mobile-editor-on .cai-upload-ready .cai-mobile-hero-cta{
    background:linear-gradient(105deg,#007ba7,#00a8df)!important;box-shadow:0 7px 18px rgba(0,168,223,.18);animation:none;
  }
  body.cai-mobile-editor-on .cai-mobile-hero-cta .cai-upload-cta-icon {
    width:34px;height:34px;flex:0 0 34px;border-radius:50%;background:rgba(255,255,255,.22);
    display:grid;place-items:center;font-size:27px;font-weight:900;line-height:1;
  }
  body.cai-mobile-editor-on .cai-upload-cta-glint {
    position:absolute;top:7px;right:12px;font-size:17px;color:#fff9b4;
  }
  @keyframes cai-upload-attention {0%,100%{box-shadow:0 8px 17px rgba(229,29,104,.2)}50%{box-shadow:0 8px 19px rgba(229,29,104,.32),0 0 0 5px rgba(229,29,104,.08)}}
  body.cai-mobile-editor-on .cai-mobile-upload-details {display:flex;align-items:center;gap:10px;min-width:0;margin-top:11px}
  body.cai-mobile-editor-on .cai-mobile-upload-thumbnail:not([hidden]) {
    display:block!important;flex:0 0 53px;width:53px!important;height:53px!important;
    object-fit:contain!important;border:1px solid #d4e2e9!important;border-radius:10px!important;
    padding:4px!important;background:#fff;
  }
  body.cai-mobile-editor-on .cai-mobile-upload-details>div {flex:1;min-width:0}
  body.cai-mobile-editor-on .cai-mobile-upload-note{font-weight:750;margin:0 0 2px!important;color:#305267!important;font-size:11px!important;line-height:1.4!important}
  body.cai-mobile-editor-on .cai-mobile-upload-filename{display:block;max-width:100%;overflow-wrap:anywhere;color:#657984;font-size:10px!important}

  /* Controles que llaman directamente las MISMAS funciones de encuadre del editor PC. */
  body.cai-mobile-editor-on .cai-mobile-fit-actions:not([hidden]) {display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:10px 0 3px}
  body.cai-mobile-editor-on .cai-mobile-fit-actions >button {
    display:flex!important;align-items:center;justify-content:center;gap:5px;flex-direction:column;
    min-height:58px!important;padding:7px 3px!important;
    background:#fff!important;color:#154b64!important;
    border:1px solid #b9d7e5!important;border-radius:11px!important;
    font-size:11px!important;font-weight:850!important;line-height:1.15;text-align:center;
  }
  body.cai-mobile-editor-on .cai-mobile-fit-actions >button .cai-mobile-icon{font-size:20px;line-height:1}
  body.cai-mobile-editor-on .cai-mobile-zoom-row {grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  body.cai-mobile-editor-on .cai-mobile-zoom-row>button {
    min-height:43px!important;display:flex;align-items:center;justify-content:center;gap:7px;
    border:1px solid #d2e4ed!important;border-radius:9px!important;
    background:#f4fbfe!important;color:#184a62!important;font-weight:850!important;font-size:12px!important;
  }
  body.cai-mobile-editor-on .cai-mobile-zoom-row .cai-mobile-icon {font-size:18px}
  body.cai-mobile-editor-on .cai-mobile-quickbar-row button:nth-child(1) {background:#e51d68!important;color:#fff!important;border-color:#e51d68!important}

  /* Evitar que los estilos de escritorio para pendones y formatos verticales deformen la mesa. */
  body.cai-custom-product.cai-mobile-editor-on .cai-designer .cai-canvas-wrap,
  body.cai-custom-product.cai-mobile-editor-on .cai-designer.is-portrait .cai-canvas-wrap,
  body.cai-custom-product.cai-mobile-editor-on .cai-designer.is-landscape .cai-canvas-wrap {
    display:flex!important;align-items:center!important;justify-content:center!important;
    min-height:0!important;height:auto!important;max-height:none!important;
    padding:9px!important;overflow:hidden!important;box-sizing:border-box!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-designer .cai-canvas-wrap canvas,
  body.cai-custom-product.cai-mobile-editor-on .cai-designer.is-portrait .cai-canvas-wrap canvas,
  body.cai-custom-product.cai-mobile-editor-on .cai-designer.is-landscape .cai-canvas-wrap canvas {
    display:block!important;flex:0 1 auto!important;width:auto!important;height:auto!important;
    max-width:100%!important;max-height:55vh!important;max-height:55dvh!important;
    object-fit:contain!important;touch-action:none!important;user-select:none!important;
    -webkit-user-select:none!important;-webkit-touch-callout:none!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-editor-shell {max-width:100%!important;overflow:visible!important}
  body.cai-mobile-editor-on .cai-mobile-quickbar {scroll-margin-top:14px}
  body.cai-mobile-editor-on .cai-mobile-upload-hero{scroll-margin-top:14px}
  body.cai-mobile-editor-on .cai-canvas-area{scroll-margin-top:14px}
  body.cai-mobile-editor-on .cai-canvas-wrap canvas.is-editing{cursor:grabbing!important}
  /* Conservar las acciones reales del editor sin superponer menús. */
  body.cai-mobile-editor-on .image-controls.cai-mobile-controls-open {font-size:13px!important}
  body.cai-mobile-editor-on .cai-designer-tools.cai-mobile-open .tool-upload {position:relative}
  body.cai-mobile-editor-on .cai-designer-tools.cai-mobile-open .tool-upload input[type=file] {
    position:absolute!important;inset:0!important;opacity:0!important;width:100%!important;height:100%!important;cursor:pointer;
  }

  /* WooCommerce Productos relacionados — anular el antiguo ancho de cinco columnas. */
  body.single-product.cai-custom-product main.site-main>.related.products {
    width:100%!important;max-width:100%!important;margin:28px 0 20px!important;
    padding:22px 0 10px!important;box-sizing:border-box!important;clear:both!important;
  }
  body.single-product.cai-custom-product main.site-main>.related.products>h2 {
    font-size:22px!important;line-height:1.15!important;text-align:left!important;
    margin:0 0 13px!important;letter-spacing:-.025em;
  }
  body.single-product.cai-custom-product main.site-main>.related.products ul.products,
  body.single-product.cai-custom-product.cai-related-compact main.site-main>.related.products ul.products {
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:11px!important;align-items:stretch!important;width:100%!important;min-width:0!important;
    padding:0!important;margin:0!important;list-style:none!important;
  }
  body.single-product.cai-custom-product main.site-main>.related.products ul.products:before,
  body.single-product.cai-custom-product main.site-main>.related.products ul.products:after{display:none!important;content:none!important}
  body.single-product.cai-custom-product main.site-main>.related.products ul.products li.product,
  body.single-product.cai-custom-product.cai-related-compact main.site-main>.related.products ul.products li.product {
    display:flex!important;flex-direction:column!important;float:none!important;
    width:100%!important;max-width:100%!important;min-width:0!important;
    min-height:0!important;clear:none!important;margin:0!important;padding:10px!important;
    border:1px solid #dce7ed!important;border-radius:15px!important;
    box-shadow:0 3px 12px rgba(6,55,76,.05)!important;background:#fff!important;
    overflow:hidden!important;box-sizing:border-box!important;
  }
  body.single-product.cai-custom-product main.site-main>.related.products li.product .woocommerce-LoopProduct-link {
    display:block!important;flex:1;min-width:0;text-decoration:none!important;
  }
  body.single-product.cai-custom-product main.site-main>.related.products li.product img,
  body.single-product.cai-custom-product.cai-related-compact main.site-main>.related.products li.product img {
    display:block!important;float:none!important;width:100%!important;height:auto!important;
    aspect-ratio:4 / 3!important;max-height:145px!important;object-fit:contain!important;
    background:#f5f9fb!important;padding:7px!important;margin:0 0 8px!important;
    border-radius:10px!important;box-sizing:border-box!important;
  }
  body.single-product.cai-custom-product main.site-main>.related.products li.product .woocommerce-loop-product__title {
    display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:2;
    overflow:hidden!important;font-size:13px!important;line-height:1.3!important;
    font-weight:850!important;min-height:0!important;max-height:2.6em!important;
    margin:0 0 6px!important;padding:0!important;
  }
  body.single-product.cai-custom-product main.site-main>.related.products li.product .price {
    display:block!important;font-size:15px!important;font-weight:900!important;
    color:#006d97!important;line-height:1.3!important;margin:6px 0 9px!important;
  }
  body.single-product.cai-custom-product main.site-main>.related.products li.product .button,
  body.single-product.cai-custom-product main.site-main>.related.products li.product a.button {
    display:flex!important;align-items:center!important;justify-content:center!important;
    width:100%!important;min-height:43px!important;min-width:0!important;
    padding:8px 7px!important;margin:0!important;white-space:normal!important;
    color:#fff!important;background:#0086b5!important;
    border:0!important;border-radius:9px!important;line-height:1.2!important;
    font-size:11px!important;font-weight:800!important;text-align:center!important;box-sizing:border-box!important;
  }
}
@media(max-width:360px){
  body.single-product.cai-custom-product main.site-main>.related.products ul.products {gap:7px!important}
  body.single-product.cai-custom-product main.site-main>.related.products ul.products li.product{padding:7px!important}
  body.cai-mobile-editor-on .cai-mobile-fit-actions >button{font-size:10px!important}
}
@media(prefers-reduced-motion:reduce){
  body.cai-mobile-editor-on .cai-mobile-upload-hero:before,
  body.cai-mobile-editor-on .cai-mobile-hero-cta{animation:none!important}
}


/* ==========================================================
   CAI 60.8.2 — MOBILE COMPACT FIRST, canvas & proportional UI
   Resuelve los huecos entre medidas, formas, fotos y herramientas.
   NO aplica a escritorio.
   ========================================================== */
@media (max-width:767px){
  body.cai-custom-product.cai-mobile-editor-on .cai-print-options{
    padding:9px!important;margin:6px 0 14px!important;overflow:visible!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-print-options>h3{display:none!important}
  body.cai-custom-product.cai-mobile-editor-on .cai-order-invite{
    padding:7px 10px!important;margin:0 0 8px!important;line-height:1.25!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-order-invite strong{font-size:13px!important}
  body.cai-custom-product.cai-mobile-editor-on .cai-order-invite>span{font-size:11px!important}
  body.cai-custom-product.cai-mobile-editor-on .cai-fields{display:block!important;overflow:visible!important}
  body.cai-custom-product.cai-mobile-editor-on .cai-fields>.cai-mobile-config{
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
    align-items:start!important;gap:6px 8px!important;width:100%!important;
    margin:0 0 8px!important;padding:9px!important;border:1px solid #d8e5eb!important;
    border-radius:12px!important;background:#fff!important;box-sizing:border-box!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config-title{
    grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:6px;
    padding:0 0 3px;border-bottom:1px solid #e8eff2;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config-title strong{font-size:13px!important;color:#183a4b!important}
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config-title small{font-size:10px!important;color:#5d7381!important}
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config>p,
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config>div{
    min-width:0!important;width:100%!important;margin:0!important;padding:0!important;box-sizing:border-box!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config>p.wide,
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config>.cai-cut-option,
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config>.cai-fixed-summary,
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config>.cai-custom-size-fields,
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config>.cai-sticker-meter-calculator,
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config>.cai-banner-config,
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config>.cai-orientation-option{grid-column:1/-1!important}
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config label,
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config strong{font-size:12px!important;line-height:1.25!important}
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config label{display:block!important;margin:0 0 2px!important}
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config input:not([type=hidden]):not([type=checkbox]),
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config select{
    width:100%!important;max-width:100%!important;min-height:39px!important;height:auto!important;
    padding:6px 8px!important;font-size:14px!important;border-radius:8px!important;box-sizing:border-box!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config p{margin:0!important}
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config small,
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config .cai-sticker-meter-calculator>p{
    font-size:10px!important;line-height:1.35!important;margin:3px 0!important
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config .cai-fixed-summary{
    display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:2px 7px!important;
    border:0!important;border-radius:8px!important;background:#f2f8fb!important;
    padding:6px 8px!important;font-size:11px!important;line-height:1.3!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config .cai-fixed-summary strong,
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config .cai-fixed-summary span{font-size:11px!important}
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config .cai-cut-option{
    padding:5px 0 0!important;border:0!important;background:transparent!important;overflow:hidden!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config .cai-cut-option>label{font-size:12px!important;margin:0 0 3px!important}
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config .cai-cut-option>small{display:none!important}
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config .cai-cut-shape-buttons{
    display:flex!important;flex-wrap:nowrap!important;grid-template-columns:none!important;
    overflow-x:auto!important;overflow-y:hidden!important;gap:6px!important;
    padding:2px 1px 5px!important;margin:0!important;scrollbar-width:thin;
    -webkit-overflow-scrolling:touch;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config .cai-cut-shape-buttons button{
    flex:0 0 auto!important;width:auto!important;min-width:91px!important;max-width:140px!important;
    min-height:37px!important;height:auto!important;margin:0!important;padding:5px 7px!important;
    gap:5px!important;border-width:1px!important;border-radius:8px!important;
    font-size:10px!important;line-height:1.1!important;justify-content:center!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config .cai-cut-icon{
    flex:0 0 auto!important;width:19px!important;height:17px!important;border-width:2px!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config .cai-cut-circle,
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config .cai-cut-rounded-square,
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config .cai-cut-free{width:18px!important;height:18px!important}
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config .cai-cut-option.is-portrait .cai-cut-rectangle,
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config .cai-cut-option.is-portrait .cai-cut-rounded-rectangle{width:13px!important;height:21px!important}
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config .cai-orientation-option{padding:4px 0!important;border:0!important}
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config .cai-orientation-option>div{margin:3px 0!important}
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config .cai-orientation-option button{
    min-height:36px!important;min-width:0!important;padding:4px 10px!important;font-size:11px!important;
  }
  /* UNA sola barra principal de acción; el lienzo aparece inmediatamente debajo. */
  body.cai-custom-product.cai-mobile-editor-on .cai-designer{
    margin:0!important;padding:7px!important;overflow:visible!important;min-width:0!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-designer .designer-steps{
    margin:-7px -7px 7px!important;min-height:0!important;gap:0!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-designer .designer-steps b{
    font-size:9px!important;line-height:1.1!important;padding:7px 1px!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-designer>h4{
    margin:0 0 5px!important;padding:0!important;font-size:15px!important;line-height:1.2!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-upload-hero{
    padding:6px!important;margin:0 0 6px!important;border-radius:11px!important;
    background:#fff!important;box-shadow:none!important;border:1px solid #dce6ec!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-upload-hero:before,
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-hero-badge,
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-hero-title,
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-hero-subtitle{display:none!important}
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-hero-cta{
    min-height:44px!important;font-size:13px!important;padding:7px 13px!important;gap:7px!important;
    border-radius:9px!important;box-shadow:none!important;
    animation:cai-upload-attention 4.8s ease-in-out infinite!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-hero-cta .cai-upload-cta-icon{
    width:23px!important;height:23px!important;flex:0 0 23px!important;font-size:19px!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-upload-details{
    margin:3px 2px 0!important;gap:6px!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-upload-details p{
    display:none!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-upload-filename{
    font-size:10px!important;line-height:1.2!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-upload-thumbnail:not([hidden]){
    width:29px!important;height:29px!important;flex:0 0 29px!important;padding:2px!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-editor-shell{margin:0!important;gap:0!important}
  body.cai-custom-product.cai-mobile-editor-on .cai-canvas-area{
    display:flex!important;flex-direction:column!important;gap:3px!important;
    margin:0!important;min-width:0!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-canvas-area>.cai-canvas-wrap{
    order:0!important;grid-row:auto!important;margin:0!important;padding:5px!important;
    min-height:0!important;border-radius:10px!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-canvas-area>.cai-align-controls{
    order:1!important;grid-row:auto!important;display:flex!important;justify-content:center!important;
    align-items:center!important;gap:5px!important;flex-wrap:nowrap!important;
    margin:0!important;padding:4px!important;min-height:0!important;border:0!important;
    border-radius:8px!important;box-sizing:border-box!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-align-controls strong{
    display:none!important
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-align-controls button{
    flex:1 1 0!important;min-width:0!important;min-height:35px!important;
    padding:5px 1px!important;font-size:10px!important;line-height:1.05!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-quickbar{
    margin:5px 0 4px!important;padding:6px!important;border-radius:10px!important;box-shadow:none!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-quickbar-lead{margin:0 0 4px!important;gap:4px!important}
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-quickbar-lead strong{font-size:12px!important}
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-quickbar-lead small{font-size:10px!important}
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-quickbar-row{gap:5px!important}
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-quickbar-row button{
    min-height:39px!important;padding:5px 2px!important;font-size:11px!important;gap:4px!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-fit-actions:not([hidden]){
    grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:5px!important;margin:5px 0 0!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-fit-actions>button{
    min-height:42px!important;flex-direction:row!important;font-size:10px!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-fit-actions>button .cai-mobile-icon{font-size:15px!important}
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-zoom-row{gap:5px!important}
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-zoom-row>button{min-height:38px!important;font-size:11px!important}
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-more-toggle{
    min-height:35px!important;margin-top:5px!important;padding:5px!important;font-size:11px!important;
  }
  /* Especificidad explícita: estilos anteriores mantenían abiertas 8 herramientas enormes. */
  body.cai-custom-product.cai-mobile-editor-on .cai-designer .cai-designer-tools:not(.cai-mobile-open){display:none!important}
  body.cai-custom-product.cai-mobile-editor-on .cai-designer .cai-designer-tools.cai-mobile-open{
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:5px!important;margin:4px 0 5px!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-designer .cai-designer-tools.cai-mobile-open>button,
  body.cai-custom-product.cai-mobile-editor-on .cai-designer .cai-designer-tools.cai-mobile-open>label{
    min-height:39px!important;padding:6px 4px!important;font-size:11px!important;
  }
  body.cai-custom-product.cai-mobile-editor-on .cai-help{
    margin:5px 0 8px!important;font-size:10px!important;line-height:1.3!important;
  }
}
@media (max-width:355px){
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config{gap:5px!important;padding:6px!important}
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-config .cai-cut-shape-buttons button{min-width:82px!important}
  body.cai-custom-product.cai-mobile-editor-on .cai-designer .designer-steps b{font-size:8px!important}
}
@media (prefers-reduced-motion:reduce){
  body.cai-custom-product.cai-mobile-editor-on .cai-mobile-hero-cta{animation:none!important}
}
