/* Garantías estructurales y de acceso; sin identidad de marca para visual.base=plantilla. */
.web-motor dialog.dt4-confirmacion { width:min(90vw,480px); overflow:auto; }
.web-motor dialog.dt4-confirmacion .dt4-modal-cabecera { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.web-motor dialog.dt4-confirmacion .dt4-modal-cabecera h2 { margin:0; font-size:1.25rem; line-height:1.3; overflow-wrap:anywhere; }
.web-motor dialog.dt4-confirmacion .dt4-cerrar { flex-shrink:0; min-width:44px; min-height:44px; }
.web-motor dialog.dt4-confirmacion .dt4-pie { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:12px; }
.web-motor dialog.dt4-confirmacion .dt4-cuerpo { padding-block:16px; overflow-wrap:anywhere; }
.web-motor *, .web-motor *::before, .web-motor *::after { box-sizing:border-box; }
.web-motor [hidden] { display:none!important; }
.web-motor .dt4-icono { width:1.5em; height:1.5em; flex-shrink:0; }
.web-motor .dt4-imagen>img { object-position:var(--dt4-imagen-x,50%) var(--dt4-imagen-y,50%); transform:scale(var(--dt4-imagen-zoom,1)); }
.web-motor:not(:where([data-dt4-base=plantilla])) .web-volver { background:var(--dt-dorado); color:var(--dt-espresso); }
.web-motor .web-logo-compacto { margin:0; flex-shrink:0; }
.web-motor .web-logo-compacto .dt4-imagen { width:100%; height:100%; }
.web-motor .web-logo-compacto .dt4-imagen>img { width:100%; height:100%; object-fit:inherit; }
.web-motor .web-marca-compacta { font:inherit; }
@media(max-width:360px) { .web-motor .web-marca-compacta .dt4-imagen { display:block; } }
.web-motor[data-dt4-base=plantilla] { min-height:100dvh; }
.web-motor[data-dt4-base=plantilla] .dt4-nodo { min-width:0; position:relative; }
.web-motor[data-dt4-base=plantilla] :is(button,a,input,textarea,select,summary):focus-visible { outline:2px solid currentColor; outline-offset:3px; }
.web-motor[data-dt4-base=plantilla] .dt4-botonFlotante { position:fixed; inset:auto; margin:0; }
.web-motor[data-dt4-base=plantilla] .dt4-imagen { display:block; position:relative; width:100%; overflow:hidden; aspect-ratio:var(--dt4-imagen-proporcion,4/3); object-fit:var(--dt4-imagen-ajuste,cover); }
.web-motor[data-dt4-base=plantilla] .dt4-imagen>img { position:absolute; inset:0; width:100%; height:100%; object-fit:inherit; }
.web-motor[data-dt4-base=plantilla] .dt4-imagen[data-estado=cargando]>img { opacity:0; }
.web-motor[data-dt4-base=plantilla] .dt4-fotoMensaje { position:absolute; inset:0; display:grid; place-content:center; text-align:center; }
.web-motor[data-dt4-base=plantilla] dialog { position:fixed; max-width:calc(100vw - 24px); max-height:calc(100dvh - 24px); overflow:auto; }
/* Avisos con las mismas clases Bootstrap de confirmación que la aplicación. */
.web-motor .dt4-botonFlotante.dt4-solo-icono { width:56px; height:56px; padding:0; border-radius:50%; background:var(--dt4-v-carrito-fondo,#a31b1b); color:var(--dt4-v-carrito-icono,#fff); box-shadow:0 4px 8px #52101033; overflow:visible; }
.web-motor .dt4-botonFlotante.dt4-solo-icono .dt4-icono { width:32px; height:32px; }
.web-motor .dt4-botonFlotante.dt4-solo-icono .dt4-contador { position:absolute; top:-6px; right:-6px; width:32px; height:32px; min-width:0; min-height:0; padding:0; display:grid; place-items:center; border-radius:50%; background:var(--dt4-v-carrito-insignia,#e2e7ff); color:var(--dt4-v-carrito-contador,#a31b1b); font:500 18px/1 Arial,sans-serif; }
@media(max-width:650px) { .web-motor .dt4-botonFlotante.dt4-solo-icono { width:50px; height:50px; } .web-motor .dt4-botonFlotante.dt4-solo-icono .dt4-icono { width:30px; height:30px; } .web-motor .dt4-botonFlotante.dt4-solo-icono .dt4-contador { width:28px; height:28px; font-size:16px; } }
.web-publica .dt4-aviso[popover] { position:fixed; inset:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) auto auto; width:min(360px,calc(100vw - 32px)); margin:0; padding:16px 48px 16px 20px; border-radius:12px; box-shadow:0 4px 20px #0002; }
.web-publica .dt4-aviso .btn-close { position:absolute; right:16px; top:16px; }
.web-motor .dt4-carrito-total { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:12px; flex-shrink:0; padding:12px 20px; border-block:1px solid var(--dt-arena); background:var(--dt-crema); }
.web-motor .dt4-carrito-total .dt4-total { margin:0; font:600 20px/1.3 var(--dt-fuente-texto); }
.web-motor .dt4-carrito-total .dt4-vaciar { min-height:44px; }
.web-motor .dt4-item { display:grid; grid-template-columns:minmax(0,1fr) minmax(80px,120px) minmax(90px,auto) 44px; align-items:start; gap:12px; padding:16px; margin-bottom:12px; }
.web-motor .dt4-item-nombre { grid-column:1/-2; overflow-wrap:anywhere; }
.web-motor .dt4-item-precio,.web-motor .dt4-item-subtotal,.web-motor .dt4-item-cantidad { display:grid; grid-template-rows:20px 44px; align-items:center; gap:4px; min-width:0; font-size:14px; }
.web-motor .dt4-item>label.dt4-item-cantidad { display:grid; }
.web-motor .dt4-retirar { grid-column:4; grid-row:1/3; align-self:center; padding:10px; }
.web-motor .dt4-item input { width:100%; min-width:0; height:44px; }
.web-motor .dt4-item-precio strong,.web-motor .dt4-item-subtotal strong { overflow-wrap:anywhere; }
.web-motor .dt4-resumen-datos { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); gap:16px; }
.web-motor :is(.dt4-contacto,.dt4-entrega,.dt4-productos) { padding:16px; border:1px solid var(--dt-arena); border-radius:12px; margin-bottom:16px; overflow-wrap:anywhere; }
.web-motor .dt4-resumen h3 { font-size:20px; margin:0 0 12px; }
.web-motor .dt4-resumen dl { display:grid; gap:12px; margin:0; }
.web-motor .dt4-resumen dd { margin:0; }
.web-motor .dt4-linea-resumen { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px 16px; padding:12px 0; border-bottom:1px solid var(--dt-arena); }
.web-motor .dt4-linea-resumen>strong:first-child { grid-column:1/-1; }
.web-motor .dt4-linea-resumen>strong:last-child { text-align:right; }
.web-motor .dt4-aviso-pedido { font-size:14px; color:var(--dt-secundario); }
.web-motor .dt4-detalle .dt4-informacion { display:flex; flex-direction:column; align-items:stretch; min-width:0; }
.web-motor .dt4-detalle>[data-contraer] { grid-column:1/-1; align-self:stretch!important; justify-self:stretch!important; width:100%!important; max-width:none; margin-top:auto; display:flex; align-items:center; justify-content:center; gap:8px; min-height:48px; padding:12px 16px; line-height:1.4; }
.web-motor .dt4-detalle>[data-contraer]>svg { width:20px; height:20px; flex-shrink:0; }
.web-motor [data-ampliar-producto] { cursor:zoom-in; }
.web-motor dialog.dt4-visor-foto[data-dt4-modal] { width:min(96vw,1100px); max-width:calc(100vw - 24px); height:min(92dvh,900px); max-height:calc(100dvh - 24px); padding:16px; overflow:hidden; }
.web-motor dialog.dt4-visor-foto[open] { display:flex; flex-direction:column; gap:16px; }
.web-motor .dt4-visor-foto>.dt4-modal-cabecera { display:flex; flex-shrink:0; align-items:center; justify-content:space-between; gap:16px; margin:0; }
.web-motor .dt4-visor-foto>.dt4-modal-cabecera strong { font-size:1rem; line-height:1.4; overflow-wrap:anywhere; }
.web-motor .dt4-visor-foto .dt4-cerrar { min-width:44px; min-height:44px; flex-shrink:0; }
.web-motor .dt4-visor-contenido { flex:1; min-height:0; min-width:0; display:grid; place-items:center; overflow:auto; }
.web-motor .dt4-visor-contenido>img { display:block; width:100%; height:100%; min-height:0; object-fit:contain; transform:none; }
.web-motor .dt4-detalle .dt4-informacion>.dt4-agregar { margin-bottom:16px; }
.web-menu-publico { padding-top:env(safe-area-inset-top); padding-bottom:env(safe-area-inset-bottom); }
.web-menu-publico nav { min-height:0; flex:1; }
.web-menu-cabecera { flex-wrap:wrap; }
@media(max-width:500px) {
  .web-motor .dt4-item { grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px; gap:10px; }
  .web-motor .dt4-item-nombre { grid-column:1/3; }
  .web-motor .dt4-retirar { grid-column:3; grid-row:1; align-self:start; }
  .web-motor .dt4-item-precio { grid-column:1/-1; grid-row:2; display:flex; flex-wrap:wrap; gap:8px; }
  .web-motor .dt4-item-cantidad { grid-column:1; grid-row:3; }
  .web-motor .dt4-item-subtotal { grid-column:2/4; grid-row:3; }
  .web-motor .dt4-carrito-total { padding:10px 16px; }
  .web-motor .dt4-carrito-total .dt4-total { font-size:18px; }
}

.web-motor .web-marca-compacta { flex-wrap:wrap; justify-content:center; max-width:100%; }
.web-motor .web-marca-compacta>div { min-width:0; max-width:100%; }

/* Cabecera compacta: controles táctiles y marca comparten una sola fila. */
.web-motor .web-cabecera.web-modo-compacto>.web-cabecera-movil { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; }
.web-motor .web-marca-compacta { width:100%; min-width:0; margin:0; flex-wrap:nowrap; justify-content:flex-start; text-align:left; overflow-wrap:anywhere; }
.web-motor .web-marca-compacta>div { flex:0 1 auto; min-width:0; max-width:100%; }
.web-motor .web-marca-compacta strong { display:block; max-width:100%; white-space:normal; }
.web-motor .web-marca-compacta small { display:block; max-width:100%; white-space:normal; word-break:normal; overflow-wrap:anywhere; }
.web-motor .web-marca-compacta :is(strong,small) { text-align:left!important; }
.web-motor .web-logo-compacto { max-width:60px; }
.web-motor .web-login-compacto { white-space:nowrap; justify-self:end; }
@media(max-width:600px) {
 .web-motor .web-cabecera.web-modo-compacto>.web-cabecera-movil { grid-template-columns:44px minmax(0,1fr) 44px; gap:8px; }
 .web-motor .web-menu-abrir { grid-column:1; grid-row:1; justify-self:start; }
 .web-motor .web-cabecera-movil>.web-login-compacto { grid-column:3; grid-row:1; }
 .web-motor .web-cabecera-movil .web-marca-compacta { grid-column:2; grid-row:1; container-type:inline-size; justify-content:flex-start; gap:6px; }
 .web-motor .web-cabecera-movil .web-logo-compacto { width:clamp(24px,12cqi,40px)!important; height:clamp(24px,12cqi,40px)!important; }
 .web-motor .web-cabecera-movil .web-marca-compacta>div:not(.web-logo-compacto) { flex:1 1 0; min-width:0; }
 .web-motor .web-cabecera-movil .web-marca-compacta strong { font-size:clamp(12px,12cqi,30px)!important; line-height:1.1!important; white-space:nowrap!important; overflow-wrap:normal; margin:0; }
 .web-motor .web-cabecera-movil .web-marca-compacta small { font-size:clamp(6px,5cqi,12px)!important; line-height:1.4!important; letter-spacing:.06em!important; white-space:nowrap!important; overflow-wrap:normal; margin:2px 0 0; }
 .web-motor .web-cabecera-movil .web-marca-compacta :is(strong,small) * { font-size:inherit!important; line-height:inherit!important; letter-spacing:inherit!important; white-space:inherit!important; }
 .web-motor .web-cabecera-movil .web-marca-compacta :is(strong,small) span { display:inline!important; }
 .web-motor .web-cabecera-movil .web-marca-compacta>a { display:block!important; }
}
@media(max-width:280px) { .web-motor .web-cabecera.web-modo-compacto>.web-cabecera-movil { gap:6px; padding-inline:8px; } .web-motor .web-cabecera-movil .web-marca-compacta { gap:4px; } }
/* Conserva transición/transformación del diseño y contrasta el estado oscuro. */
.web-motor .dt4-agregar:is(:hover,:focus-visible) { background-color:var(--dt-espresso,#231510)!important; color:#fff!important; }
.web-motor .dt4-agregar:is(:hover,:focus-visible) :is(span,strong,small) { color:inherit!important; }
.web-motor .dl-logo .dt4-imagen { background:inherit; }

.web-motor .web-cabecera-movil { background-color:var(--web-cabecera-fondo,transparent); background-image:var(--web-cabecera-imagen,none); color:var(--web-cabecera-color,inherit); }

/* También reduce iconos de diseños guardados; el límite es configurable en JSON. */
.web-motor .dt4-botonFlotante .dt4-icono { max-width:var(--dt4-v-carrito-icono-maximo,32px); max-height:var(--dt4-v-carrito-icono-maximo,32px); }
@media(max-width:650px) { .web-motor .dt4-botonFlotante .dt4-icono { max-width:var(--dt4-v-carrito-icono-maximo,30px); max-height:var(--dt4-v-carrito-icono-maximo,30px); } }
