/* ESTILOS PERSONALIZADOS PARA POS VERDULERÍA - OPTIMIZADO PARA PANTALLAS TÁCTILES */

:root {
  --primary-color: #2e7d32;
  --primary-hover: #1b5e20;
  --secondary-color: #f4f6f8;
  --accent-color: #ff9800;
  --danger-color: #d32f2f;
  --text-dark: #2c3e50;
  --border-radius-lg: 16px;
  --border-radius-md: 12px;
  --box-shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.05);
  --box-shadow-hover: 0 8px 25px rgba(46, 125, 50, 0.15);
}

body {
  background-color: #f0f4f1;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text-dark);
  min-height: 100vh;
  user-select: none; /* Evita selección accidental de texto al tocar en tablet */
  -webkit-user-select: none;
}

/* Header POS */
.pos-navbar {
  background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.pos-navbar .navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: #ffffff;
}

.badge-store {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.9rem;
}

/* Tarjetas de Producto */
.product-card {
  border: none;
  border-radius: var(--border-radius-lg);
  background: #ffffff;
  box-shadow: var(--box-shadow-soft);
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--box-shadow-hover);
}

.product-card:active {
  transform: scale(0.96);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.product-icon-wrapper {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin: 12px 12px 0 12px;
  font-size: 2.8rem;
  transition: transform 0.2s ease;
}

.product-card:hover .product-icon-wrapper {
  transform: scale(1.08);
}

.product-body {
  padding: 12px 16px 16px 16px;
  text-align: center;
}

.product-title {
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 4px;
  color: #1a252c;
  line-height: 1.2;
}

.product-unit-badge {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #6c757d;
  background-color: #f8f9fa;
  padding: 2px 8px;
  border-radius: 10px;
  display: inline-block;
  margin-bottom: 8px;
}

.product-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-color);
}

/* Columna del Carrito / Ticket */
.ticket-card {
  border: none;
  border-radius: var(--border-radius-lg);
  background: #ffffff;
  box-shadow: var(--box-shadow-soft);
  position: sticky;
  top: 15px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 100px);
}

.ticket-header {
  background-color: #f8f9fa;
  border-bottom: 2px dashed #dee2e6;
  padding: 16px 20px;
  border-top-left-radius: var(--border-radius-lg);
  border-top-right-radius: var(--border-radius-lg);
}

.ticket-body {
  overflow-y: auto;
  padding: 12px;
  flex-grow: 1;
  min-height: 280px;
}

/* Items en lista del ticket */
.cart-item {
  background: #fbfbfb;
  border: 1px solid #edf2f7;
  border-radius: var(--border-radius-md);
  padding: 10px 14px;
  margin-bottom: 10px;
  transition: background-color 0.15s ease;
}

.cart-item:hover {
  background: #f1f8e9;
}

.cart-item-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-dark);
}

.cart-item-price {
  font-size: 0.9rem;
  color: #6c757d;
}

.qty-control-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: bold;
}

.btn-remove-item {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ticket-footer {
  background-color: #ffffff;
  border-top: 2px dashed #dee2e6;
  padding: 18px 20px;
  border-bottom-left-radius: var(--border-radius-lg);
  border-bottom-right-radius: var(--border-radius-lg);
}

.total-display {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--primary-color);
}

.btn-cobrar {
  background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
  border: none;
  font-size: 1.3rem;
  font-weight: 700;
  padding: 14px 20px;
  border-radius: var(--border-radius-md);
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
  transition: all 0.2s ease;
}

.btn-cobrar:hover:not(:disabled) {
  background: linear-gradient(135deg, #388e3c 0%, #2e7d32 100%);
  box-shadow: 0 6px 16px rgba(46, 125, 50, 0.4);
  transform: translateY(-2px);
}

.btn-cobrar:active:not(:disabled) {
  transform: scale(0.98);
}

/* Custom Scrollbar */
.ticket-body::-webkit-scrollbar {
  width: 6px;
}
.ticket-body::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 10px;
}
.ticket-body::-webkit-scrollbar-track {
  background: transparent;
}

/* Empty Cart View */
.empty-cart-state {
  text-align: center;
  padding: 40px 20px;
  color: #a0aec0;
}
.empty-cart-state i {
  font-size: 3.5rem;
  margin-bottom: 12px;
  opacity: 0.6;
}

.btn-edit-item {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #fff8e1;
  border-color: #ffe082;
  color: #f57f17;
}

.btn-edit-item:hover {
  background-color: #ffecb3;
  color: #e65100;
  border-color: #ffd54f;
}

.preset-chip {
  border-radius: 12px;
  font-weight: 700;
  padding: 8px 14px;
  font-size: 0.95rem;
  transition: all 0.15s ease;
}

.preset-chip:active {
  transform: scale(0.95);
}

.cart-count-badge {
  font-size: 0.75rem;
  padding: 4px 7px;
}

