

/* ============================================= */
/*          ESTILOS DA VENDA BALCÃO (PDV)        */
/* ============================================= */

#venda-balcao {
  padding-top: 0.75rem;
}

#venda-balcao .columns {
  min-height: calc(100vh - 88px);
  align-items: stretch;
}

.pdv-layout {
  gap: 14px;
}

.pdv-products-column,
.pdv-cart-column {
  min-width: 0;
}

.pdv-cart-column {
  position: sticky;
  top: 16px;
  align-self: flex-start;
  height: calc(100vh - 32px);
  max-height: calc(100vh - 32px);
}

.pdv-section {
  background-color: var(--card-bg-color);
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.pdv-section.left {
  /* Era overflow:auto: virava o "contêiner de rolagem" do sticky e as categorias nunca fixavam.
     Agora a rolagem é da página e a .pdv-bar fica fixa no topo. */
  overflow: visible;
  height: auto;
}

/* Barra fixa (título · busca · categorias): ocupa a largura do cartão */
.pdv-bar.page-bar {
  margin: -1rem -1rem 0.75rem;
  padding: 0.75rem 1rem 0;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--card-bg-color);
}
.pdv-bar.page-bar .page-bar-row { min-height: 40px; }

.pdv-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.pdv-cart-panel {
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

.pdv-cart-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

#pdv-categorias-tabs li {
  cursor: pointer;
}

/* Categorias: chips na .pdv-bar (estilo em .page-bar-chips / .filter-pill) */


/* ============================================= */
/*            ESTILOS DA COMANDA (CARRINHO)      */
/* ============================================= */

.pdv-cart-items {
  flex-grow: 1;
  overflow-y: auto;
  padding: 0 0.25rem 0.75rem;
  margin-bottom: 0;
  min-height: 0;
}

.pdv-cart-item {
  padding: 0.8rem;
  margin-bottom: 0.65rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--card-bg-color);
  box-shadow: var(--shadow-xs);
}

.pdv-cart-item-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.pdv-cart-item-info {
  min-width: 0;
}

.pdv-cart-item-name {
  margin: 0;
  color: var(--text-color);
  font-size: var(--font-size-md);
  font-weight: 800;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdv-cart-item-details,
.pdv-cart-item-unit {
  margin: 3px 0 0;
  color: var(--subtitle-color);
  font-size: var(--font-size-xs);
  line-height: 1.25;
}

.pdv-cart-item-total {
  color: var(--text-color);
  font-size: var(--font-size-sm);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pdv-cart-controls {
  display: grid;
  grid-template-columns: 40px minmax(36px, 1fr) 40px 40px 40px;
  gap: 6px;
  align-items: center;
  margin-top: 10px;
}

.pdv-qty-control,
.pdv-remove-item {
  width: 40px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-color);
  color: var(--text-color);
  cursor: pointer;
  font-weight: 800;
}

.pdv-qty-control:hover,
.pdv-qty-control:focus-visible {
  border-color: var(--primary-color);
  color: var(--primary-color);
  outline: none;
}

.pdv-remove-item {
  background: var(--danger-soft);
  border-color: rgba(var(--danger-rgb), 0.22);
  color: var(--danger-color);
}

.pdv-remove-item:hover,
.pdv-remove-item:focus-visible {
  background: var(--danger-color);
  color: var(--white);
  outline: none;
}

.pdv-qty-value {
  min-width: 36px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--card-bg-color);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.pdv-cart-empty {
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted-text-color);
}

.pdv-cart-empty-icon {
  font-size: 3rem;
}

.pdv-summary {
  position: sticky;
  bottom: 0;
  z-index: 15;
  margin: auto -1rem -1rem;
  padding: 1rem;
  background: var(--card-bg-color);
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

.pdv-summary hr {
  margin: 0.75rem 0;
}

/* ============================================= */
/*             MODAL DE PAGAMENTO                */
/* ============================================= */

/* Campo para pagamento em dinheiro (troco) */
#campo-dinheiro {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background-color: var(--bg-color);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

#valor-troco {
  color: #23d160;
}

.pdv-search-results {
  display: none; /* Começa oculto */
  position: absolute;
  width: 100%;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--radius-xs) var(--radius-xs);
  max-height: 200px;
  overflow-y: auto;
  z-index: 10; /* Garante que fique sobre outros elementos */
}

.pdv-result-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
}

.pdv-result-item:hover {
  background-color: var(--card-bg-color);
}

.pdv-result-item small {
  display: block;
  color: var(--muted-text-color);
}

/* --- Grid do PDV Ajustado --- */
.pdv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1rem;
  padding: 0.25rem;
  align-content: start;
}

/* --- Novo Card Moderno e Compacto --- */
.pdv-card-modern {
  background: var(--card-bg-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border-color);
  position: relative;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}

/* Esqueleto: mesmo tamanho do card real, sem interação */
.pdv-card-skeleton { cursor: default; pointer-events: none; }
.pdv-sk-img { width: 100%; height: 124px; border-radius: 0; }
.pdv-sk-corpo { display: grid; gap: 8px; padding: 12px; }

.pdv-card-modern:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.pdv-card-image-wrapper {
  width: 100%;
  height: 124px;
  background-color: var(--card-bg-color);
  position: relative;
}

.pdv-card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none; 
}

.pdv-drag-handle {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 28px;
  height: 28px;
  background: var(--bg-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--subtitle-color);
  cursor: grab;
  z-index: 5;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s;
}

.pdv-add-cue {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--primary-color);
  color: var(--white);
  z-index: 6;
  box-shadow: var(--shadow-sm);
}

.pdv-drag-handle:hover {
  background: var(--primary-color);
  color: white;
}

.pdv-drag-handle:active {
  cursor: grabbing;
}

.pdv-qty-badge {
  position: absolute;
  background-color: var(--danger-color);
  color: white;
  font-size: var(--font-size-xs);
  font-weight: bold;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  z-index: 5;
  box-shadow: var(--shadow-sm);
}

/* Conteúdo do Texto */
.pdv-card-info {
  padding: 10px;
  text-align: left;
  background: var(--card-bg-color);
  height: 100%;
}

.pdv-card-title {
  font-size: var(--font-size-md);
  font-weight: 800;
  color: var(--text-color);
  /* até 2 linhas (nomes longos como "Feijoada (não vendemos arroz)" não ficam cortados no meio) */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.25;
  min-height: 2.5em;
  margin-bottom: 2px;
}

.pdv-card-price {
  font-size: var(--font-size-md);
  font-weight: 700;
  color: var(--primary-color);
}

@media (max-width: 1024px) {
  #venda-balcao .columns {
    min-height: auto;
  }

  .pdv-cart-column {
    position: static;
    height: auto;
    max-height: none;
  }

  .pdv-cart-panel {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .pdv-summary {
    position: sticky;
    bottom: 74px;
  }
}

@media (max-width: 768px) {
  .pdv-layout {
    gap: 12px;
  }

  .pdv-section {
    padding: 0.85rem;
  }

  .pdv-grid {
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 0.75rem;
  }

  .pdv-card-image-wrapper {
    height: 104px;
  }

  .pdv-cat-tabs {
    margin-right: -0.85rem;
    margin-left: -0.85rem;
    padding-right: 0.85rem;
    padding-left: 0.85rem;
  }

  .pdv-summary {
    margin-right: -0.85rem;
    margin-left: -0.85rem;
    margin-bottom: -0.85rem;
  }
}

/* --- Estilos da Zona de Drop (Carrinho) --- */
.pdv-cart-drop-zone {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    position: relative;
}

.pdv-cart-drop-zone.drag-over {
    background-color: rgba(50, 115, 220, 0.1);
    border: 2px dashed var(--primary-color);
    box-shadow: inset 0 0 20px rgba(50, 115, 220, 0.2);
}

.pdv-cart-drop-zone.drag-over::after {
    content: 'Solte para adicionar +1';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: bold;
    pointer-events: none;
    z-index: 50;
}

/* Cards de Tamanho */
.size-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.size-card {
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--white);
}
.size-card:hover { border-color: var(--muted-text-color); }
.size-card.selected {
    border-color: #48c774;
    background-color: #effaf3;
    color: #257942;
    font-weight: bold;
}

/* Grupos de Opções */
.option-group {
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--white);
}
.option-group-title {
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}
.option-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--surface-hover);
}
.option-item:last-child {
    border-bottom: 0;
}
.option-controls { display: flex; align-items: center; gap: 10px; }

.qty-btn {
    width: 28px; height: 28px;
    border-radius: 50%; border: 1px solid var(--slate-300);
    background: white; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800;
}

/* Badge de Desconto (canto superior esquerdo) */
.pdv-discount-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, var(--warning-color) 0%, var(--warning-strong) 100%);
    color: white;
    font-size: var(--font-size-2xs);
    font-weight: 800;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    z-index: 5;
    box-shadow: 0 2px 6px rgba(var(--warning-rgb), 0.4);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* Ajuste no qty-badge para não sobrepor */
.pdv-qty-badge {
    bottom: 8px;
    right: 8px; /* Mantém no canto direito */
}

/* Preço com desconto - destaque visual */
.pdv-card-price .has-text-success-dark {
    color: var(--success-color) !important;
}

/* ============================================= */
/*        MODAL PIZZA MEIA-MEIA                  */
/* ============================================= */

.pizza-step {
    display: inline-block;
    width: 50px;
    transition: all 0.3s ease;
}

.pizza-step .step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--border-color);
    color: var(--muted-text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.pizza-step.active .step-number {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-700) 100%);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.pizza-step.completed .step-number {
    background: var(--success-color);
    color: white;
}

.pizza-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
}

.pizza-card {
    background: var(--card-bg-color);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.pizza-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.pizza-card.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.pizza-card.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(1);
}

.pizza-card-img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.pizza-card-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pizza-card-price {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--success-color);
}

.pizza-half-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
}

.pizza-selected-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--primary-color);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-2xs);
}

.pizza-disabled-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-2xs);
    font-weight: bold;
}

.pdv-cat-tabs {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 6px 2px 10px;
    flex-shrink: 0;
}

/* Cada botão de categoria */
.pdv-cat-tabs ul {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pdv-cat-tabs li a {
    display: inline-block;
    padding: 6px 16px;
    border-radius: var(--radius-xl);
    font-size: var(--font-size-sm);
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    border: 2px solid var(--border-color);
    color: var(--text-color);
    background: var(--card-bg-color);
    transition: all 0.2s ease;
    text-decoration: none;
}

.pdv-cat-tabs li a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pdv-cat-tabs li.is-active a {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 3px 10px rgba(var(--primary-color-rgb, 102, 126, 234), 0.35);
}

/* ============================================================
   MODAL DE CHECKOUT — PDV
   ============================================================ */
.pdv-checkout-card {
    width: 480px;
    max-width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.pdv-checkout-head {
    background: var(--white);
    border-bottom: 1px solid var(--surface-hover);
}
.pdv-checkout-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--success-color), #06d6a0);
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    color: var(--white); font-size: var(--font-size-lg);
}
.pdv-checkout-body { padding: 20px 24px; }
.pdv-checkout-total-display {
    background: linear-gradient(135deg, var(--slate-800), #16213e);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 22px;
}
.pdv-checkout-total-label {
    color: rgba(255,255,255,0.6); font-size: var(--font-size-sm);
}
.pdv-checkout-total-value {
    color: #4eff91; font-size: 1.9rem; font-weight: 900; letter-spacing: -0.5px;
}
.pdv-payment-label {
    font-size: var(--font-size-xs); font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.5px; color: var(--muted-text-color); margin-bottom: 10px;
}
.pdv-payment-methods {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
    margin-bottom: 20px;
}
.pdv-payment-method-card {
    border: 2px solid #e8e8e8;
    border-radius: var(--radius-md);
    padding: 12px 8px;
    display: flex; flex-direction: column; align-items: center;
    gap: 6px; cursor: pointer;
    transition: all 0.18s ease;
    font-size: var(--font-size-compact); font-weight: 600; color: var(--subtitle-color);
}
.pdv-payment-method-card i { font-size: var(--font-size-xl); color: var(--muted-text-color); transition: color 0.18s; }
.pdv-payment-method-card:hover { border-color: var(--success-color); color: var(--success-color); }
.pdv-payment-method-card:hover i { color: var(--success-color); }
.pdv-payment-method-card.selected {
    border-color: var(--success-color);
    background: var(--success-bg);
    color: var(--success-strong);
    box-shadow: 0 0 0 3px rgba(72,199,142,0.15);
}
.pdv-payment-method-card.selected i { color: var(--success-color); }

/* Botões rápidos (Dinheiro) */
.pdv-quick-amounts { margin-bottom: 4px; }
.pdv-quick-label {
    font-size: var(--font-size-xs); font-weight: 700; text-transform: uppercase;
    color: var(--muted-text-color); display: block; margin-bottom: 8px;
}
.pdv-quick-btns-wrap { display: flex; gap: 8px; flex-wrap: wrap; }
.pdv-quick-btn {
    border: 1.5px solid var(--border-color); border-radius: var(--radius-sm); padding: 6px 12px;
    font-size: var(--font-size-sm); font-weight: 600; background: var(--white);
    cursor: pointer; transition: all 0.15s;
    display: flex; align-items: center; gap: 5px;
}
.pdv-quick-btn:hover { border-color: var(--success-color); color: var(--success-strong); }
.pdv-quick-btn.is-exact { border-color: var(--success-color); color: var(--success-strong); background: var(--success-bg); }
.pdv-quick-btn.ativo { background: var(--success-color); color: var(--white); border-color: var(--success-color); }

/* Troco */
.pdv-troco-row {
    display: flex; justify-content: space-between; align-items: center;
    background: #f6fffe; border: 1.5px solid var(--success-bg-strong);
    border-radius: var(--radius-md); padding: 10px 16px; margin-top: 10px;
}
.pdv-troco-label { font-size: var(--font-size-sm); color: var(--subtitle-color); }
.pdv-troco-value { font-size: var(--font-size-2xl); font-weight: 800; color: var(--success-color); }

/* ============================================================
   MODAL DE OPÇÕES DE PRODUTO — PDV
   ============================================================ */
.pdv-opcoes-card {
    width: min(940px, 96vw);
    max-width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.pdv-opcoes-head {
    border-bottom: 1px solid var(--surface-hover);
    padding: 14px 18px;
}
.pdv-opcoes-body {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
    max-height: min(68vh, 560px);
    overflow: hidden;
    background: var(--surface-muted);
}
.pdv-opcoes-side {
    min-width: 0;
}
.pdv-opcoes-side-info {
    margin-top: 10px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--white);
}
.pdv-opcoes-side-label {
    display: block;
    margin-bottom: 4px;
    color: var(--muted-text-color);
    font-size: var(--font-size-2xs);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.pdv-opcoes-side-info strong {
    display: block;
    color: var(--text-color);
    font-size: var(--font-size-md);
    line-height: 1.25;
}
.pdv-opcoes-side-info small {
    display: block;
    margin-top: 4px;
    color: var(--slate-500);
    line-height: 1.35;
}
.pdv-opcoes-content {
    min-width: 0;
    overflow-y: auto;
    padding-right: 4px;
}
.pdv-opcoes-img-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background: var(--border-color);
}
.pdv-opcoes-img-wrap img {
    width: 100%; height: 100%; object-fit: cover;
    display: block;
}
.pdv-opcoes-footer {
    justify-content: space-between !important;
    gap: 14px;
    padding: 14px 18px;
}
.pdv-opcoes-qty-ctrl {
    display: flex; align-items: center; gap: 10px;
}
.pdv-opcoes-qty-btn {
    width: 34px; height: 34px;
    border: 2px solid var(--border-color); border-radius: 50%;
    background: var(--white); cursor: pointer; font-size: var(--font-size-lg);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s; font-weight: 700; color: var(--subtitle-color);
}
.pdv-opcoes-qty-btn:hover:not(:disabled) { border-color: var(--success-color); color: var(--success-color); }
.pdv-opcoes-qty-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.pdv-opcoes-qty-val {
    font-size: var(--font-size-xl); font-weight: 800; min-width: 28px; text-align: center;
}
.pdv-opcoes-total-wrap {
    display: flex; flex-direction: column; align-items: flex-start;
}
.pdv-opcoes-total-label { font-size: var(--font-size-xs); color: var(--muted-text-color); }
.pdv-opcoes-total-val { font-size: var(--font-size-xl); font-weight: 800; color: var(--success-color); }
.pdv-opcoes-add-btn { padding-left: 20px; padding-right: 20px; }

@media (max-width: 780px) {
    .pdv-opcoes-card {
        width: 96vw;
        max-height: 92vh;
    }

    .pdv-opcoes-body {
        grid-template-columns: 1fr;
        max-height: 62vh;
        overflow-y: auto;
    }

    .pdv-opcoes-side {
        display: grid;
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 12px;
        align-items: stretch;
    }

    .pdv-opcoes-side-info {
        margin-top: 0;
    }

    .pdv-opcoes-footer {
        flex-wrap: wrap;
    }

    .pdv-opcoes-add-btn {
        width: 100%;
    }
}

/* ============================================================
   EDITAR PEDIDO — ADICIONAR PRODUTO
   ============================================================ */
.nex-add-product-section { margin-top: 16px; }
.nex-search-box {
    position: relative;
    margin-top: 8px;
}
.nex-search-box .nex-input { padding-left: 36px; }
.nex-prod-resultados-list {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0;
    background: var(--white);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 100;
    max-height: 280px; overflow-y: auto;
    overflow: hidden;
}
.nex-prod-resultado-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; cursor: pointer;
    transition: background 0.12s;
    border-bottom: 1px solid var(--surface-hover);
}
.nex-prod-resultado-item:last-child { border-bottom: none; }
.nex-prod-resultado-item:hover { background: #f8f9fa; }
.nex-prod-resultado-thumb {
    width: 42px; height: 42px; border-radius: var(--radius-sm);
    object-fit: cover; flex-shrink: 0;
}
.nex-thumb-placeholder {
    width: 42px; height: 42px; border-radius: var(--radius-sm);
    background: var(--surface-hover); display: flex; align-items: center; justify-content: center;
    color: var(--slate-300); font-size: var(--font-size-md); flex-shrink: 0;
}
.nex-prod-resultado-info {
    flex: 1; display: flex; flex-direction: column;
}
.nex-prod-resultado-nome { font-size: var(--font-size-sm); font-weight: 600; }
.nex-prod-resultado-preco { font-size: var(--font-size-compact); color: var(--success-color); font-weight: 700; }
.nex-prod-vazio { padding: 14px; text-align: center; color: var(--muted-text-color); font-size: var(--font-size-sm); }

/* Picker de tamanho inline */
.nex-tamanho-picker { padding: 8px; }
.nex-tamanho-picker-header {
    display: flex; flex-direction: column; padding: 10px 12px 8px;
    border-bottom: 1px solid var(--surface-hover); margin-bottom: 4px;
}
.nex-tamanho-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 14px; cursor: pointer; border-radius: var(--radius-sm);
    transition: background 0.12s;
}
.nex-tamanho-item:hover { background: var(--success-bg); }
.nex-tamanho-cancel {
    display: block; width: 100%; padding: 8px;
    text-align: center; color: var(--muted-text-color); font-size: var(--font-size-compact);
    cursor: pointer; border-top: 1px solid var(--surface-hover); margin-top: 4px;
    background: none; border-left: none; border-right: none; border-bottom: none;
}
.nex-tamanho-cancel:hover { color: #e74c3c; }

/* Legenda de atalhos de teclado (PDV) */
.pdv-atalhos-hint {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    margin-left: auto;
    font-size: var(--font-size-xs);
    color: var(--muted-text-color);
    white-space: nowrap;
}
.pdv-atalhos-hint kbd {
    display: inline-block;
    padding: 1px 6px;
    margin-right: 3px;
    border: 1px solid var(--border-color);
    border-bottom-width: 2px;
    border-radius: var(--radius-xs);
    background: var(--surface-muted);
    color: var(--subtitle-color);
    font-family: inherit;
    font-size: var(--font-size-2xs);
    font-weight: 700;
}


/* ============================================= */
/*   COMANDA: cliente, resumo, observação         */
/* ============================================= */

/* Cliente em uma linha; a busca abre só ao "Identificar/Trocar" */
.pdv-client-box {
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--card-bg-color);
}
.pdv-client-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.pdv-client-row > i { color: var(--muted-text-color); }
.pdv-client-row > p {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--font-size-sm);
  color: var(--subtitle-color);
}
.pdv-client-row > p .tag { margin-left: 0.4rem; vertical-align: middle; }
.pdv-client-trocar {
  flex-shrink: 0;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--card-bg-color);
  color: var(--primary-color);
  font-size: var(--font-size-xs);
  font-weight: 700;
  cursor: pointer;
}
.pdv-client-trocar:hover { border-color: var(--primary-color); background: var(--primary-50); }
#pdv-cliente-busca-wrap { margin-top: 0.6rem; }

/* Resumo: Subtotal/Cashback discretos, TOTAL em destaque */
.pdv-sum-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.25rem;
  color: var(--subtitle-color);
  font-size: var(--font-size-sm);
}
.pdv-sum-row.is-cashback { color: var(--success-strong); font-weight: 700; }
.pdv-sum-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 0.4rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-color);
  font-size: var(--font-size-xl);
  font-weight: 800;
}
.pdv-sum-total > span:last-child { color: var(--success-strong); font-size: var(--font-size-2xl); }

/* Observação por item */
.pdv-obs-btn {
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--card-bg-color);
  color: var(--muted-text-color);
  cursor: pointer;
}
.pdv-obs-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
.pdv-obs-btn.has-obs { color: var(--primary-color); background: var(--primary-50); border-color: var(--primary-200); }
.pdv-obs-input { margin-top: 8px; }
.pdv-cart-item-obs {
  margin: 2px 0 0;
  color: var(--primary-color);
  font-size: var(--font-size-xs);
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* Linha recém-adicionada: destaque curto (sem toast por cima da comanda) */
@keyframes pdvFlash {
  0%   { box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.35); background: var(--primary-50); }
  100% { box-shadow: var(--shadow-xs); background: var(--card-bg-color); }
}
.pdv-cart-item.is-flash { animation: pdvFlash 0.7s ease-out; }

/* Foco visível para navegação por teclado nos cards */
.pdv-card-modern:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}
