/* DOMIenCASA — experiencia móvil estilo App (solo presentación) */
@media (max-width: 600px){
  :root{--dc-orange:#EA773E;--dc-brown:#5E260A;--dc-bg:#f6f7f9;--dc-card:#fff;--dc-border:#e8eaee;--dc-shadow:0 8px 24px rgba(30,41,59,.08)}
  html{background:var(--dc-bg)!important;scroll-behavior:smooth}
  body{background:var(--dc-bg)!important;color:#1f2937!important;font-family:'Poppins','Segoe UI',sans-serif!important;min-height:100vh!important;padding-bottom:92px!important;-webkit-tap-highlight-color:transparent}
  body:before{content:'';display:block;height:env(safe-area-inset-top);background:var(--dc-orange);position:fixed;top:0;left:0;right:0;z-index:99990;pointer-events:none}

  /* Encabezados compactos */
  .dc-header,.dc-catalog-header,.logo-panel-band{border:0!important;background:#fff!important;box-shadow:0 1px 0 var(--dc-border)!important}
  .dc-header-inner,.dc-catalog-inner,.logo-panel-band .dc-header-inner{padding:10px 16px!important;min-height:62px!important}
  .dc-logo,.logo-panel-band .dc-logo{width:112px!important;height:48px!important}
  .dc-catalog-brand{min-height:58px!important;margin-bottom:8px!important;border:0!important}
  .dc-catalog-title{font-size:22px!important;margin-bottom:2px!important}
  .dc-catalog-subtitle{font-size:12px!important}

  /* Inicio / acceso */
  .contenedor-principal{width:100%!important;min-height:100vh!important;background:var(--dc-bg)!important}
  .encabezado{padding:14px 12px 18px!important;background:linear-gradient(145deg,#EA773E,#d96226)!important;border-radius:0 0 24px 24px!important;box-shadow:0 10px 28px rgba(234,119,62,.18)!important}
  .login-form{width:100%!important;display:grid!important;grid-template-columns:1fr!important;gap:9px!important}
  .login-form input{width:100%!important;height:48px!important;margin:0!important;border:1px solid #e5e7eb!important;border-radius:14px!important;background:#fff!important;font-size:15px!important;box-sizing:border-box!important}
  .botones-header{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;margin-top:2px!important}
  .btn-login,.btn-volver-tiendas{height:46px!important;border-radius:14px!important;font-size:13px!important;padding:10px!important}

  /* Catálogo: sensación de app, sin alterar enlaces ni JS */
  header{border-radius:0 0 20px 20px!important;box-shadow:0 8px 20px rgba(30,41,59,.08)!important}
  header h1{font-size:20px!important;line-height:1.15!important}
  header h4{font-size:12px!important}
  main{padding-top:4px!important}
  #productos{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;padding:0 2px!important}
  #productos .producto,.producto{width:100%!important;min-width:0!important;max-width:none!important;padding:8px!important;border:1px solid var(--dc-border)!important;border-radius:18px!important;background:var(--dc-card)!important;box-shadow:var(--dc-shadow)!important;transform:none!important}
  #productos .producto img,.producto img{aspect-ratio:1/1!important;height:auto!important;max-height:none!important;border-radius:13px!important;margin-bottom:6px!important}
  #productos .producto h3,.producto h3{font-size:14px!important;line-height:1.3!important;min-height:34px!important;margin:3px 2px 5px!important}
  #productos .producto p,.producto p{font-size:12px!important;line-height:1.35!important;margin:3px 2px!important}
  #productos .producto .precio-producto,.producto .precio-producto{font-size:16px!important;margin:6px 2px!important;color:var(--dc-orange)!important}
  #productos .producto button,.producto button{width:100%!important;height:38px!important;margin-top:6px!important;padding:6px!important;border-radius:12px!important;font-size:11px!important;font-weight:700!important;border:0!important;background:var(--dc-orange)!important;box-shadow:none!important}

  /* Categorías */
  .contenedor-categorias{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;padding:6px 10px 0!important}
  .categoria{width:100%!important;min-width:0!important;min-height:92px!important;padding:12px 8px!important;border:1px solid var(--dc-border)!important;border-radius:18px!important;background:#fff!important;box-shadow:var(--dc-shadow)!important;color:var(--dc-brown)!important}
  .categoria:hover{transform:none!important}

  /* Contenedores y secciones */
  .container,.contenedor,.contenido,.section{width:100%!important;max-width:none!important;box-sizing:border-box!important}
  .section,.card,.cards> .card{border-radius:18px!important;box-shadow:var(--dc-shadow)!important;border:1px solid var(--dc-border)!important}
  .cards{grid-template-columns:1fr!important;gap:12px!important}
  .grid-2{grid-template-columns:1fr!important;gap:10px!important}
  input,select,textarea{min-height:44px!important;border-radius:12px!important;box-sizing:border-box!important;font-size:14px!important}
  button,.btn{min-height:42px!important;border-radius:12px!important;font-size:13px!important}

  /* Tablas: conservamos toda la información y permitimos desplazamiento táctil */
  table{display:block!important;width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;border-radius:16px!important;box-shadow:var(--dc-shadow)!important;background:#fff!important}
  table thead,table tbody{width:max-content;min-width:100%}
  th,td{white-space:nowrap!important;padding:10px 12px!important;font-size:12px!important}

  /* Controles de catálogo: Volver a categorías a la izquierda y carrito arriba a la derecha */
  .btn-volver-flotante{position:fixed!important;top:calc(8px + env(safe-area-inset-top))!important;left:10px!important;right:auto!important;z-index:10005!important;padding:9px 12px!important;border-radius:12px!important;background:#fff!important;color:var(--dc-brown)!important;border:1px solid var(--dc-border)!important;box-shadow:0 6px 18px rgba(0,0,0,.12)!important;font-weight:700!important}
  .buscador-flotante{position:fixed!important;top:calc(58px + env(safe-area-inset-top))!important;left:12px!important;right:12px!important;width:auto!important;max-width:none!important;height:44px!important;border-radius:14px!important;border:1px solid var(--dc-border)!important;box-shadow:0 8px 22px rgba(30,41,59,.10)!important;font-size:13px!important;padding:0 14px!important;z-index:10004!important}
  .btn-carrito-flotante{position:fixed!important;left:auto!important;right:10px!important;top:calc(8px + env(safe-area-inset-top))!important;bottom:auto!important;width:60px!important;min-width:60px!important;height:60px!important;z-index:10006!important;border:1px solid #e5e7eb!important;border-radius:18px!important;background:#fff!important;color:#263238!important;box-shadow:0 8px 24px rgba(15,23,42,.18)!important;font-size:30px!important;line-height:1!important;font-weight:800!important;padding:10px!important;display:flex!important;align-items:center!important;justify-content:center!important}
  .btn-carrito-flotante .icono-carrito-moderno{width:36px!important;height:36px!important;display:block!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;stroke-linecap:round!important;stroke-linejoin:round!important;flex:none!important}
  .carrito-flotante{position:fixed!important;inset:0!important;left:0!important;right:0!important;top:0!important;bottom:0!important;width:100vw!important;max-width:none!important;height:100vh!important;max-height:none!important;box-sizing:border-box!important;border-radius:0!important;border:0!important;box-shadow:none!important;background:#fff!important;z-index:10007!important;padding:calc(66px + env(safe-area-inset-top)) 12px calc(132px + env(safe-area-inset-bottom))!important;overflow-y:auto!important}
  .carrito-flotante h4{position:sticky!important;top:0!important;z-index:2!important;background:#fff!important;padding:8px 4px 12px!important;margin:0 0 10px!important}
  /* Carrito abierto: el botón sigue arriba a la derecha y los controles inferiores no se solapan */
  body.carrito-abierto .btn-carrito-flotante{top:calc(8px + env(safe-area-inset-top))!important;right:10px!important;bottom:auto!important;z-index:10010!important}
  body.carrito-abierto .total-flotante{left:10px!important;right:10px!important;bottom:calc(64px + env(safe-area-inset-bottom))!important;top:auto!important;border-radius:14px!important;box-shadow:0 8px 20px rgba(15,23,42,.12)!important;z-index:10009!important;background:var(--dc-orange)!important;color:#fff!important}
  body.carrito-abierto .btn-confirmar-flotante{left:10px!important;right:10px!important;bottom:calc(12px + env(safe-area-inset-bottom))!important;top:auto!important;border-radius:14px!important;z-index:10011!important;background:#28a745!important;color:#fff!important}
  body.carrito-abierto .carrito-flotante{inset:0!important;z-index:10007!important}


  /* Paneles */
  .encabezado-panel{padding:10px 16px!important;min-height:80px!important;text-align:center!important}
  .encabezado-panel h1,.encabezado-panel h2{font-size:20px!important}
  .cerrar-panel{position:static!important;text-align:center!important;margin-top:8px!important}
  .top-buttons{position:fixed!important;left:0!important;right:0!important;bottom:0!important;top:auto!important;width:100%!important;margin:0!important;padding:8px 10px calc(8px + env(safe-area-inset-bottom))!important;background:rgba(255,255,255,.96)!important;border-top:1px solid var(--dc-border)!important;box-shadow:0 -8px 25px rgba(15,23,42,.10)!important;display:flex!important;justify-content:flex-start!important;gap:8px!important;overflow-x:auto!important;z-index:10000!important;backdrop-filter:blur(12px)!important}
  .top-buttons .btn-top{flex:0 0 auto!important;min-width:112px!important;height:42px!important;padding:8px 12px!important;border-radius:12px!important;font-size:12px!important}
  .boton-pago-plataforma-fijo{position:fixed!important;right:12px!important;bottom:72px!important;top:auto!important;border-radius:14px!important;z-index:9998!important}

  /* Panel usuario/repartidor: tarjetas apiladas y botones táctiles */
  .logo-panel-band .dc-header-inner{justify-content:center!important}
  .bienvenida,.info-usuario,.datos,.ticket,.pedido,.comentario-item{border-radius:18px!important}
  .ticket,.pedido{box-shadow:var(--dc-shadow)!important;border:1px solid var(--dc-border)!important}
  .calificaciones-recibidas #contenedorComentarios{gap:10px!important;padding:4px 2px 12px!important}
  .calificaciones-recibidas #contenedorComentarios > .comentario-item{flex:0 0 calc(100% - 6px)!important;width:calc(100% - 6px)!important;max-width:none!important}

  /* Modales ocupan la pantalla como vistas de App */
  .modal-contenido{width:calc(100vw - 24px)!important;max-width:none!important;max-height:88vh!important;margin:6vh auto!important;border-radius:20px!important;padding:18px!important;box-shadow:0 20px 55px rgba(15,23,42,.24)!important}
}

@media (max-width:360px){
  #productos{gap:8px!important}
  #productos .producto{padding:7px!important;border-radius:16px!important}
  #productos .producto h3{font-size:13px!important}
  #productos .producto button{font-size:10.5px!important}
}


/* Colores solicitados también en escritorio: Agregar naranja y Volver blanco/café. */
@media screen and (min-width: 601px) {
  #productos .producto button, .producto button {
    background: #C04F15 !important;
    color: #FFFFFF !important;
    border: none !important;
  }
  #productos .producto button:hover, .producto button:hover {
    background: #A94210 !important;
    color: #FFFFFF !important;
  }
  a.btn-volver-flotante, .btn-volver-flotante {
    background: #FFFFFF !important;
    color: #5D4037 !important;
    border: 1px solid #D8C7BD !important;
  }
  a.btn-volver-flotante:hover, .btn-volver-flotante:hover {
    background: #F7F1ED !important;
    color: #5D4037 !important;
  }
}
