    * { box-sizing: border-box; font-family: 'Poppins', Arial, sans-serif; -webkit-tap-highlight-color: transparent; }
    body { margin: 0; background: #f5f7fa; height: 100vh; height: 100dvh; display: flex; flex-direction: column; color: #333; overflow: hidden; }

    /* Barra superior */
    .topbar {
      display: flex; align-items: center; justify-content: space-between;
      background: #fff; padding: 10px 15px; border-bottom: 1px solid #ddd;
      height: 60px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); z-index: 20;
      flex-shrink: 0;
    }
    .topbar .logo img { height: 32px; }
    .topbar .fecha-hora { font-size: 12px; color: #555; font-weight: 500; text-align: center; flex: 1; padding: 0 10px; display: block; /* Visible en PC; se oculta en móvil (ver @media) */ }
    
    .topbar .acciones { display: flex; gap: 8px; }
    .topbar button {
      border: none; border-radius: 6px; padding: 8px 12px;
      font-weight: 600; font-size: 12px; cursor: pointer;
      display: flex; align-items: center; gap: 6px;
    }
    .btn-print { background: #2b6da3; color: #fff; }
    .btn-copy { background: #25D366; color: #fff; }
    .btn-copy.copiado { background: #128C7E; }

    /* Contenedor principal (2 columnas en PC, 1 en móvil) */
    .pos-container {
      display: flex; flex: 1; gap: 15px; padding: 15px; overflow: hidden; position: relative;
    }

    /* Columna izquierda: Búsqueda */
    .panel-busqueda {
      flex: 1; background: #fff; border: 1px solid #ddd; display: flex; flex-direction: column; position: relative; min-height: 0;
    }
    .panel-busqueda .header {
      background: #e9ecef; padding: 8px 12px; font-weight: 600; font-size: 13px;
      color: #555; text-align: center; border-bottom: 1px solid #ddd;
    }
    .search-input {
      border: none; border-bottom: 1px solid #ddd; padding: 12px 15px; font-size: 16px; outline: none;
      font-weight: 500; background: #fff; border-radius: 0;
    }
    .search-input:focus { background: #f8fbff; }

    /* Lista de resultados desplegable */
    .search-wrap { position: relative; display: flex; flex-direction: column; }
    .search-input { width: 100%; }
    /* La lista cuelga justo debajo del input (antes tenía top:100% + bottom:0 => altura 0) */
    .resultados-list {
      display: none; position: absolute; top: 100%; left: 0; right: 0;
      max-height: min(60vh, 480px);
      background: #fff; overflow-y: auto; z-index: 30;
      border: 1px solid #ddd; border-top: none;
      box-shadow: 0 4px 12px rgba(0,0,0,0.15);
      -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
    }
    .resultados-list.active { display: block; }

    .resultado-item {
      display: flex; justify-content: space-between; padding: 14px 15px;
      border-bottom: 1px solid #eee; cursor: pointer; font-size: 14px;
      align-items: center;
    }
    .resultado-item:hover, .resultado-item.focused { background: #e6f0fa; }
    .resultado-item .precio { font-weight: 600; color: #2b6da3; font-size: 15px; }
    .highlight { background: #fff3a3; font-weight: 600; padding: 0 2px; border-radius: 2px; }

    /* Columna derecha: Carrito */
    .panel-carrito {
      flex: 1; background: #fff; border: 1px solid #ddd; display: flex; flex-direction: column; min-height: 0;
    }
    .panel-carrito .header {
      background: #e9ecef; padding: 8px 12px; font-weight: 600; font-size: 13px;
      color: #555; display: flex; justify-content: space-between; border-bottom: 1px solid #ddd;
      position: sticky; top: 0; z-index: 5;
    }
    .carrito-list {
      flex: 1; overflow-y: auto; outline: none;
    }
    
    .carrito-item {
      display: flex; align-items: center; justify-content: space-between;
      padding: 12px 15px; border-bottom: 1px solid #eee; font-size: 13px;
    }
    .carrito-item .nombre { flex: 1; padding-right: 10px; line-height: 1.3; }
    .carrito-item .precio { font-weight: 600; width: 60px; text-align: right; margin-right: 10px; }
    
    .btn-eliminar {
      background: #fff; border: 1px solid #fca5a5; border-radius: 6px; width: 32px; height: 32px;
      display: flex; align-items: center; justify-content: center; cursor: pointer; 
      color: #e53e3e; font-weight: bold; font-size: 18px; flex-shrink: 0;
    }
    .btn-eliminar:active { background: #fee2e2; }

    /* Barra inferior: Total */
    .footer-total {
      background: #fff; padding: 12px 15px; border-top: 1px solid #ddd;
      display: flex; justify-content: space-between; align-items: center;
      z-index: 20; flex-shrink: 0;
    }
    .footer-total .total-texto { font-size: 22px; font-weight: 700; color: #2b6da3; }
    .footer-total button.btn-recomendaciones {
      background: #e0f0ff; color: #153060; border: 1px solid #9ccbf5; padding: 10px 16px;
      border-radius: 6px; font-weight: 600; cursor: pointer;
    }
    .footer-total button.btn-recomendaciones:active { background: #c7e3fb; }

    /* Modal de recomendaciones (mismo contenido que index.html) */
    .modal { position: fixed; z-index: 2000; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; }
    .modal-content { background: #fff; padding: 20px; max-width: 900px; width: 95%; border-radius: 10px; overflow-y: auto; max-height: 90vh; }
    .modal-content h2 { color: #153060; font-size: 18px; margin: 0 0 5px; }
    .modal .close { float: right; font-size: 28px; line-height: 1; cursor: pointer; color: #e53e3e; padding: 0 4px; }
    .recomendaciones-table { width: 100%; border-collapse: collapse; margin-top: 15px; font-size: 13px; }
    .recomendaciones-table th, .recomendaciones-table td { border: 1px solid #ddd; padding: 10px; vertical-align: top; text-align: left; }
    .recomendaciones-table th { background-color: #2aa2f1; color: #fff; }


    /* Banner superior y modal de privacidad: solo móvil */
    .banner-movil { display: none; }
    .modal-overlay { display: none; }
    .modal-overlay.visible {
      position: fixed; inset: 0; background: rgba(0,0,0,0.6);
      display: flex; align-items: center; justify-content: center; z-index: 9999;
    }
    .modal-box {
      background: #fff; max-width: 500px; width: 90%; padding: 25px;
      border-radius: 12px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    }
    .modal-box h2 { color: #153060; margin: 0 0 15px; }
    .modal-box p { font-size: 14px; color: #333; margin: 0 0 20px; }
    .modal-actions { display: flex; flex-direction: column; align-items: stretch; gap: 15px; }
    .modal-check { display: flex; align-items: center; gap: 10px; justify-content: center; }
    .modal-check input { transform: scale(1.2); accent-color: #153060; }
    .modal-check label { font-size: 14px; color: #333; }
    .modal-box button {
      padding: 12px 25px; border: none; border-radius: 8px; background: #153060; color: #fff;
      font-weight: 600; font-size: 14px; cursor: pointer; opacity: 0.6;
      display: inline-flex; align-items: center; gap: 8px; justify-content: center;
    }
    .modal-box button:enabled { opacity: 1; }
    .titulo-movil { display: none; }


    /* Botones del pie y modal de datos */
    .footer-botones { display: flex; gap: 8px; align-items: center; }
    .footer-total button.btn-whatsapp {
      background: #25D366; color: #fff; border: 1px solid #1ebe5b; padding: 10px 16px;
      border-radius: 6px; font-weight: 600; cursor: pointer;
    }
    .footer-total button.btn-whatsapp:active { background: #128C7E; }
    .modal-datos-box { text-align: left; max-height: 92vh; overflow-y: auto; }
    .modal-datos-box h2 { text-align: center; }
    .campo { margin-bottom: 14px; }
    .campo label { display: block; font-size: 13px; font-weight: 600; color: #333; margin-bottom: 6px; }
    .campo input {
      width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 8px;
      font-size: 16px; font-family: inherit;
    }
    .campo input:focus { outline: none; border-color: #153060; box-shadow: 0 0 0 2px rgba(21,48,96,0.15); }
    .campo input.invalido { border-color: #e53e3e; }
    .datos-error { color: #e53e3e; font-size: 13px; min-height: 18px; margin-bottom: 8px; }
    .datos-acciones { display: flex; flex-direction: column; gap: 10px; }
    .modal-box button.btn-modal { opacity: 1; width: 100%; padding: 13px 16px; }
    .btn-modal-wa { background: #25D366 !important; }
    .btn-modal-pdf { background: #153060 !important; }
    .modal-box button.btn-modal-cancelar { background: #eee !important; color: #555 !important; }
    .datos-nota { font-size: 12px; color: #777; margin: 14px 0 0; text-align: center; }

    ::-webkit-scrollbar { width: 6px; }
    ::-webkit-scrollbar-track { background: #f1f1f1; }
    ::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

    /* =========================================
       ESTILOS RESPONSIVOS (MÓVILES Y TABLETS) 
       ========================================= */
    @media (max-width: 768px) {
      /* En móvil se reemplaza la barra superior por el banner institucional */
      .topbar { display: none; }
      .banner-movil { display: block; width: 100%; height: auto; flex-shrink: 0; }
      .titulo-pc { display: none; }
      .titulo-movil { display: inline; }
      .topbar .fecha-hora { display: none; } /* Ocultar fecha para no saturar la barra */
      .topbar .logo img { height: 28px; }
      
      .topbar .acciones button { padding: 8px; font-size: 11px; }
      .topbar .acciones button i { font-size: 14px; }
      /* Ocultar el texto de los botones en móvil para que solo queden los iconos */
      .topbar .acciones button .texto-btn { display: none; } 

      .pos-container { flex-direction: column; gap: 10px; padding: 10px; }
      
      /* El panel de búsqueda y el carrito se dividen el espacio vertical */
      .panel-busqueda { flex: 0 0 auto; }
      
      /* En móvil, cuando la búsqueda está activa, la lista flota sobre el carrito */
      .resultados-list {
        max-height: 50vh; /* JS lo ajusta según el espacio visible sobre el teclado */
        border-radius: 0 0 8px 8px;
      }

      .panel-carrito { flex: 1; }
      
      /* Hacer los botones táctiles más grandes */
      .resultado-item { padding: 16px 12px; font-size: 15px; }
      .carrito-item { padding: 14px 12px; }
      .btn-eliminar { width: 36px; height: 36px; font-size: 20px; }
      
      .footer-total { padding: 12px 15px; }
      .footer-total .total-texto { font-size: 20px; }
      .footer-total button.btn-recomendaciones, .footer-total button.btn-whatsapp { padding: 8px 12px; font-size: 13px; }
      .footer-botones { gap: 6px; }
    }
  
