/* ============================================================================
   PRODUTOS
   Extraído de css/estilos-gerais.css para organizar por módulo.
   ============================================================================ */

.dados-produto .info-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dados-produto .info-row {
  display: flex;
  flex-direction: column;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 4px;
  border-left: 4px solid #c21a26;
  break-inside: avoid;
}

.dados-produto .info-label {
  font-weight: 600;
  color: #2c3338;
  margin-bottom: 5px;
  font-size: .95em;
}

.dados-produto .info-value {
  color: #c21a26;
  word-wrap: break-word;
  line-height: 1.4;
}

/* Product Image */
.produto-imagem {
  flex: 1 1 250px;
  max-width: 300px;
  min-width: 200px;
  margin: 0 auto;
  margin-top: 5px;
}

.produto-imagem img {
  width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: contain;
}

/* Price Row */
.preco-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 4px;
  border-left: 4px solid #c21a26;
}

.preco-container {
  display: flex;
  flex-direction: column;
}

.preco-label {
  font-weight: 600;
  color: #2c3338;
  margin-bottom: 5px;
  font-size: .95em;
}

.preco-valor {
  color: #c21a26;
  font-size: .95em;
  margin-bottom: 5px;
}

.botao-container {
  display: flex;
  align-items: center;
}

/* Sinopse toggle */
.sinopse-toggle {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  color: #c21a26;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 0;
  margin-top: 5px;
  cursor: pointer;
  transition: color .2s ease;
}

.sinopse-toggle:hover,
.sinopse-toggle:focus {
  background-color: #f8f9fa !important;
  color: #a50d17 !important;
}

.sinopse-toggle svg {
  margin-left: 5px;
  transition: transform .3s ease;
}

.sinopse-container {
  position: relative;
}

.sinopse-content {
  position: relative;
  width: 100%;
}

.sinopse-text {
  transition: max-height .3s ease-out;
  overflow: hidden;
}

.sinopse-text.collapsed {
  max-height: 50px;
  position: relative;
}

.sinopse-text.collapsed::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background: linear-gradient(transparent, #f8f9fa);
  pointer-events: none;
}

.collapse-text,
.collapse-icon {
  display: none;
}

.expand-text,
.expand-icon {
  display: inline-flex;
}

.sinopse-text:not(.collapsed)+.sinopse-toggle .collapse-text,
.sinopse-text:not(.collapsed)+.sinopse-toggle .collapse-icon {
  display: inline-flex;
}

.sinopse-text:not(.collapsed)+.sinopse-toggle .expand-text,
.sinopse-text:not(.collapsed)+.sinopse-toggle .expand-icon {
  display: none;
}

/* Modais / desconto / almoxarifado */
.desconto-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  overflow-y: auto;
}

.desconto-modal.active {
  display: block;
}

.desconto-modal-content {
  position: relative;
  background: white;
  margin: 5% auto;
  padding: 20px;
  width: 90%;
  max-width: 600px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  animation: modalOpen 0.3s ease-out;
}

@keyframes modalOpen {
  from {
    opacity: 0;
    transform: translateY(-40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.desconto-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #c21a26;
  margin-bottom: 20px;
}

.desconto-modal-header h3 {
  margin: 0;
  padding: 0;
  border: none;
}

.fechar-modal {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #666;
  transition: color 0.2s;
}

.fechar-modal:hover {
  color: #c21a26;
}

.produto-info {
  background: #f8f9fa;
  padding: 10px 15px;
  border-radius: 4px;
  margin-bottom: 20px;
  border-left: 4px solid #c21a26;
}

.produto-info p {
  margin: 8px 0;
}

.pesquisa-cliente-container {
  margin-bottom: 20px;
}

.pesquisa-cliente-container h4 {
  margin: 0px 0px 10px 0px;
  font-size: 1.1em;
  color: #333;
}

.resultado-calculo {
  padding: 15px;
  background: #f8f9fa;
  border-radius: 4px;
  margin-top: 20px;
}

.loading-calculo {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 10px;
}

.calculo-info {
  display: none;
}

.cliente-selecionado,
.preco-calculado,
.desconto-aplicado {
  margin: 8px 0;
  padding: 8px;
}

.cliente-selecionado {
  background: #ffe6e5;
  border-radius: 4px;
}

.preco-calculado {
  background: #e7f5eb;
  border-radius: 4px;
}

.preco-final {
  color: #28a745;
  font-size: 1.2em;
  font-weight: bold;
}

.desconto-aplicado {
  background: #fff3cd;
  border-radius: 4px;
}

body.modal-open {
  overflow: hidden;
}

.almox-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 15px;
}

.almox-tab {
  padding: 10px 20px;
  border: 2px solid #c21a26;
  background: #fff;
  color: #c21a26;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.almox-tab:hover {
  color: #c21a26;
  background: #fff5f5;
}

.almox-tab.active {
  background: #c21a26;
  color: #fff;
}

.almox-tab-content {
  display: none;
}

.almox-tab-content.active {
  display: block;
}

.localizacao-message {
  margin-top: 10px;
  padding: 10px;
  border-radius: 4px;
  display: none;
}

.localizacao-message.success {
  display: block;
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.localizacao-message.error {
  display: block;
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}