/* FILE NAME: css/pdv.css */

/* Layout Centralizado e Compacto */
.pdv-layout-touch {
  display: flex;
  flex-direction: row;
  height: 100vh;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  box-shadow: 0 0 40px rgba(0,0,0,0.15);
  background: #f3f4f6;
  overflow: hidden;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Coluna Esquerda: Vitrine */
.pdv-vitrine {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #f3f4f6;
  border-right: 1px solid #e5e7eb;
}

/* Header Vitrine */
.pdv-vitrine-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.2rem; /* Reduzido */
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  z-index: 10;
}

.pdv-search-touch {
  width: 100%;
  max-width: 350px;
  padding: 0.6rem 1rem; /* Reduzido */
  border-radius: 20px;
  border: 1px solid #d1d5db;
  font-size: 0.9rem; /* Reduzido */
  outline: none;
  background: #f9fafb;
  transition: all 0.3s ease;
}
.pdv-search-touch:focus {
  border-color: #3b82f6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Categorias em Pills */
.pdv-categorias-pills {
  display: flex;
  gap: 0.6rem; /* Reduzido */
  padding: 0.8rem 1.2rem; /* Reduzido */
  overflow-x: auto;
  white-space: nowrap;
  background: #f3f4f6;
  scrollbar-width: none;
}
.pdv-categorias-pills::-webkit-scrollbar { display: none; }

.pdv-pill-btn {
  padding: 0.4rem 1.2rem; /* Reduzido */
  border-radius: 20px;
  border: none;
  background: #e5e7eb;
  color: #4b5563;
  font-weight: 600;
  font-size: 0.85rem; /* Reduzido */
  cursor: pointer;
  transition: all 0.2s ease;
}
.pdv-pill-btn.ativa {
  background: #3b82f6;
  color: #fff;
  box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
}

/* Grid de Produtos - Muito mais itens por linha */
.pdv-grid-produtos {
  flex: 1;
  padding: 0.5rem 1.2rem 1.2rem 1.2rem;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); /* Reduzido de 160px para 120px */
  gap: 0.8rem; /* Reduzido */
  align-content: flex-start;
}

.pdv-touch-card {
  background: #fff;
  border-radius: 12px;
  padding: 1rem 0.6rem; /* Reduzido */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  border: 2px solid transparent;
}
.pdv-touch-card:active {
  transform: scale(0.95);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  border-color: #3b82f6;
}
.pdv-touch-avatar {
  width: 50px; /* Reduzido de 70px */
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.4rem; /* Reduzido */
  font-weight: bold;
  margin-bottom: 0.6rem;
}
.pdv-touch-nome {
  font-size: 0.85rem; /* Reduzido */
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.3rem;
  line-height: 1.2;
  min-height: 2.4em;
}
.pdv-touch-preco {
  font-size: 1.05rem; /* Reduzido */
  font-weight: 800;
  color: #111827;
}

/* Coluna Direita: Carrinho - Estreitada */
.pdv-sidebar {
  flex: 0 0 360px; /* Reduzido de 420px para 360px */
  width: 360px;
  background: #fff;
  display: flex;
  flex-direction: column;
  z-index: 20;
}

.pdv-sidebar-header {
  padding: 1rem; /* Reduzido */
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pdv-sidebar-header h2 { margin: 0; font-size: 1.2rem; color: #111827; }

/* Lista do Carrinho */
.pdv-cart-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.6rem; /* Reduzido */
  background: #f9fafb;
}
.pdv-cart-item {
  background: #fff;
  border-radius: 10px;
  padding: 0.8rem; /* Reduzido */
  margin-bottom: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  border: 1px solid #e5e7eb;
}
.pdv-cart-item-topo {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.pdv-cart-item-nome { font-weight: 700; color: #374151; font-size: 0.95rem; } /* Reduzido */
.pdv-cart-item-preco { font-weight: 800; color: #111827; font-size: 1rem; }

/* Controles de Qtd Compactos */
.pdv-touch-qty-ctrl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f3f4f6;
  border-radius: 30px;
  padding: 0.2rem;
  width: 110px; /* Reduzido */
}
.pdv-touch-qty-btn {
  width: 30px; /* Reduzido */
  height: 30px;
  border-radius: 50%;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #111827;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.pdv-touch-qty-btn:active { background: #e5e7eb; }

.pdv-btn-lixeira {
  background: #fee2e2;
  color: #ef4444;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 0.5rem 0.8rem; /* Reduzido */
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Rodapé de Pagamento */
.pdv-payment-footer {
  padding: 1rem; /* Reduzido */
  background: #fff;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -4px 10px rgba(0,0,0,0.02);
}

.pdv-formas-grid-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.pdv-forma-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.2rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #6b7280;
  font-size: 0.7rem;
  font-weight: 600;
}
.pdv-forma-tile.ativa {
  border-color: #f97316; 
  background: #fff7ed;
  color: #ea580c;
}
.pdv-forma-tile svg {
  width: 20px; /* Reduzido */
  height: 20px;
  margin-bottom: 0.2rem;
  fill: currentColor;
}