body, html {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  box-sizing: border-box;
}
.background-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  background: url('images/pprecios.jpg?v=1') no-repeat center center;
  background-size: cover;
  background-color: #000;
  z-index: -1;
  filter: brightness(0.85);
}
header {
  padding: 0;
  display: block;
}
.logo {
  position: fixed;
  top: 32px;
  right: 48px;
  width: 140px;
  height: auto;
  max-width: 20vw;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  z-index: 2000;
}
main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 100vh;
  padding-bottom: 80px;
}
.titulo {
  font-size: 3.2rem;
  color: #fff;
  margin-bottom: 24px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.instruccion {
  font-size: 1.6rem;
  color: #f0f0f0;
  margin-bottom: 32px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.scanner-input-container {
  position: relative;
  width: 300px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 16px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
#barcode-input {
  width: 100%;
  background: transparent;
  border: none;
  color: white;
  font-size: 1.4rem;
  text-align: center;
  padding: 8px;
  outline: none;
  letter-spacing: 1px;
}
#barcode-input::placeholder {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.2rem;
}
.scanner-line {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: #fff;
  animation: scan 2s infinite;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}
@keyframes scan {
  0% { width: 0; }
  50% { width: 100%; }
  100% { width: 0; }
}
.codigo-barras {
  font-size: 2rem;
  margin-bottom: 6px;
  margin-top: 6px;
  color: #333;
  margin-bottom: 24px;
  text-align: center;
  font-family: monospace;
  letter-spacing: 1px;
  font-weight: 500;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
}
.resultado {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-height: 80vh;
  min-height: 160px;
  min-width: 700px;
  max-width: 900px;
  width: 90vw;
  padding: 32px 80px;
  background: rgba(255,255,255,0.95);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  backdrop-filter: blur(8px);
  z-index: 1000;
  border: 5px solid #ff6b00;
}
.resultado.oculto {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.nombre-articulo {
  font-size: 2.6rem;
  margin-bottom: 8px;
  margin-top: 6px;
  color: #222;
  text-align: center;
  line-height: 1.3;
}
.precio-articulo {
  font-size: 5.8rem;
  color: #ff6b00;
  font-weight: bold;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.vigencia-oferta {
  font-size: 2rem;
  margin-top: 6px;
  margin-bottom: 6px;
  color: #ff6b6b;
  text-align: center;
  font-weight: 500;
}
/* @media (max-width: 900px) {
  .background-overlay {
    background: url('images/pprecios-vertical.jpg?v=1') no-repeat center center;
    background-size: contain;
  }
  .titulo { font-size: 2.1rem; }
  .instruccion { font-size: 1.1rem; }
  .resultado { min-width: 220px; padding: 24px 12px; }
  .nombre-articulo { font-size: 1.2rem; }
  .precio-articulo { font-size: 2.1rem; }
  .logo { width: 80px; }
  header { padding: 16px 16px 0 0; }
}
@media (max-width: 600px) {
  main { margin-top: 10px; }
  .resultado { min-width: 120px; padding: 10px 2px; }
} */
/* Cuando la pantalla sea más angosta que 390px (tamaño estándar de iPhone) */
@media (max-width: 400px) {
  .background-overlay {
    background: url('images/pprecios-vertical.jpg?v=1') no-repeat center center;
    background-size: cover;
  }
}
@media (max-width: 900px) {
  .resultado {
    min-width: 220px;
    padding: 18px 10px;
  }
  .nombre-articulo {
    font-size: 1.8rem;
  }
  .precio-articulo {
    font-size: 3.2rem;
  }
  .leyenda-precio, .codigo-barras, .vigencia-oferta {
    font-size: 1.4rem;
  }
  .precio-regular, .precio-mayoreo {
    font-size: 3.2rem;
  }
  .scanner-input-container {
    width: 80%;
    max-width: 300px;
  }
  .codigo-barras {
    font-size: 1.4rem;
  }
  main {
    padding-bottom: 60px;
  }
}
@media (max-width: 600px) {
  .resultado {
    min-width: 120px;
    padding: 10px 2px;
    width: 99vw;
    max-width: 99vw;
  }
  .nombre-articulo {
    font-size: 1.2rem;
  }
  .precio-articulo {
    font-size: 2.1rem;
  }
  .logo {
    width: 80px;
  }
  .scanner-input-container {
    width: 90%;
  }
  .codigo-barras {
    font-size: 1.2rem;
  }
  main {
    padding-bottom: 40px;
  }
}

.precios-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.precio-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.leyenda-precio,
.precio-regular,
.precio-mayoreo,
.nombre-articulo,
.codigo-barras,
.vigencia-oferta {
  margin-top: 2px;
  margin-bottom: 2px;
}

.precio-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 8px 0;
}

.leyenda-precio {
  font-size: 2rem;
  font-weight: bold;
  color: #666;
  flex: 1 1 60%;
  text-align: left;
  margin: 0;
}

.precio-regular, .precio-mayoreo {
  font-size: 3.6rem;
  font-weight: bold;
  flex: 0 0 auto;
  min-width: 180px;
  text-align: right;
  margin: 0 0 0 24px;
}

.precio-regular {
  color: #000;
}

.precio-mayoreo {
  color: #ff6b00;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

@media (max-width: 900px) {
  .precio-row {
    margin: 4px 0;
  }
  .leyenda-precio {
    font-size: 1.2rem;
  }
  .precio-regular, .precio-mayoreo {
    font-size: 2rem;
    min-width: 90px;
    margin-left: 10px;
  }
} 

@media (max-width: 1000px) and (orientation: portrait) {
  .background-overlay {
    background: url('images/pprecios-vertical.jpg?v=1') no-repeat center center;
    background-size: cover;
  }
} 