.pos-wrapper { display: flex; gap: 20px; height: calc(100vh - 170px); }
.pos-main { flex: 2; display: flex; flex-direction: column; }
.pos-info-bar { background: #e0e7ff; padding: 12px 20px; border-radius: 8px; margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center; font-size: 14px; border-left: 5px solid #4f46e5; color: #3730a3; }
.pos-products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 15px; overflow-y: auto; align-content: start; padding-right: 5px; }
.pos-product-card { background: white; padding: 15px; border-radius: 10px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); text-align: center; cursor: pointer; border: 2px solid transparent; transition: all 0.15s ease; user-select: none; display: flex; flex-direction: column; justify-content: space-between; height: 140px; }
.pos-product-card:hover { border-color: #0055a5; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.pos-product-card h4 { font-size: 14px; margin-bottom: 5px; color: #333; line-height: 1.2; }
.pos-product-card .price { font-size: 18px; font-weight: bold; color: #059669; }
.pos-product-card .stock { font-size: 11px; color: #666; background: #f3f4f6; padding: 2px 8px; border-radius: 10px; display: inline-block; margin-top: auto; }

.pos-cart { flex: 1; min-width: 320px; max-width: 400px; background: white; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.08); display: flex; flex-direction: column; overflow: hidden; }
.pos-cart-header { background: #003366; color: white; padding: 15px; text-align: center; font-size: 16px; font-weight: bold; }
.pos-cart-items { flex: 1; overflow-y: auto; padding: 10px 15px; }
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #eee; }
.cart-item-info { flex: 1; padding-right: 10px; }
.cart-item-title { font-size: 13px; font-weight: bold; color: #333; margin-bottom: 2px; }
.cart-item-price { font-size: 12px; color: #666; }
.cart-item-subtotal { font-weight: bold; color: #059669; width: 60px; text-align: right; font-size: 13px; }

.cart-controls { display: flex; align-items: center; gap: 4px; background: #f8f9fa; padding: 3px; border-radius: 6px; }
.btn-qty { width: 26px; height: 26px; border-radius: 4px; border: none; background: white; cursor: pointer; font-weight: bold; color: #003366; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.btn-qty:hover { background: #e0e7ff; }
.cart-qty-input { width: 38px; text-align: center; border: 1px solid #ccc; border-radius: 4px; font-weight: bold; padding: 3px 0; font-size: 13px; }

.pos-cart-footer { padding: 15px 20px; background: #f8f9fa; border-top: 1px solid #eee; }
.pos-total-row { display: flex; justify-content: space-between; font-size: 22px; font-weight: bold; margin-bottom: 10px; color: #003366; }
.btn-cobrar { width: 100%; padding: 14px; font-size: 18px; background: #10b981; color: white; border: none; border-radius: 8px; cursor: pointer; font-weight: bold; transition: background 0.2s; }
.btn-cobrar:hover { background: #059669; }
.btn-cobrar:disabled { background: #9ca3af; cursor: not-allowed; }

.pos-no-caja { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 60vh; color: #4b5563; text-align: center; }
.pos-no-caja .icon-alert { font-size: 60px; margin-bottom: 15px; color: #ef4444; }
.pos-no-caja h3 { color: #1f2937; margin-bottom: 5px; }

.ticket-pos-container { display: none; }

@media print {
  @page { size: 80mm auto; margin: 0mm; }
  body, html { width: 80mm !important; margin: 0 !important; padding: 0 !important; background: white !important; }
  body > *:not(#ticketImpresionPOS) { display: none !important; }
  #ticketImpresionPOS {
    display: block !important; position: absolute !important; left: 0 !important; top: 0 !important;
    width: 72mm !important; margin: 0 auto !important; padding: 2mm 3mm !important;
    font-family: 'Courier New', Courier, monospace !important; font-size: 11px !important; line-height: 1.2 !important;
    color: #000 !important; background: white !important; visibility: visible !important;
  }
  #ticketImpresionPOS * { visibility: visible !important; }
}

.ticket-header { text-align: center; margin-bottom: 6px; border-bottom: 1px dashed #000; padding-bottom: 4px; }
.ticket-header h3 { font-size: 14px; margin-bottom: 2px; font-weight: bold; }
.ticket-header p { font-size: 10px; margin: 1px 0; }
.ticket-info { margin-bottom: 6px; font-size: 10px; border-bottom: 1px dashed #000; padding-bottom: 4px; }
.ticket-info div { display: flex; justify-content: space-between; margin-bottom: 2px; }
.ticket-items-table { width: 100%; border-collapse: collapse; margin-bottom: 6px; font-size: 10px; }
.ticket-items-table th { border-bottom: 1px solid #000; text-align: left; padding-bottom: 2px; }
.ticket-items-table td { 
    padding: 2px 0 !important; /* Le da un poquito más de espacio arriba y abajo */
    vertical-align: top !important; 
    font-size: 12px !important; /* AUMENTA ESTE VALOR para hacer más grande el "1 x $1.00" */
    font-weight: 900 !important; /* Opcional: hace que el texto se vea un poco más grueso/negrito */
}
.ticket-items-table .text-right { text-align: right; }
.ticket-totales { border-top: 1px dashed #000; padding-top: 4px; margin-bottom: 6px; font-size: 10px; }
.ticket-totales .row-total { display: flex; justify-content: space-between; font-size: 14px; font-weight: bold; margin-bottom: 3px; }
.ticket-totales .row-pago { display: flex; justify-content: space-between; font-size: 10px; margin-bottom: 2px; }
.ticket-footer { text-align: center; font-size: 10px; border-top: 1px dashed #000; padding-top: 4px; }
