/* Reseteo de márgenes */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Encabezado fijo */
header {
  position: fixed;
  top: 0;
  width: 100%;
  height: 80px;
  background-color: #F4E3C1;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 10px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 999;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 50px;
  margin-right: 10px;
}

.logo span {
  font-size: 1.5rem;
  color: #e74c3c;
  font-weight: bold;
}

/* Navegación */
.nav a {
  margin-left: 20px;
  text-decoration: none;
  color: #A93226;
  font-weight: bold;
  transition: color 0.3s ease;
}

.nav a:hover {
  color: #e67e22;
}

body {
  font-family: Arial, sans-serif;
  background: #fff8f0;
  color: #333;
  scroll-behavior: smooth;
}

main {
  padding: 20px;
  margin-top: 40px;
}

.categoria {
  margin-bottom: 40px;
}

.categoria h2 {
  color: #b35c1e;
  margin-bottom: 10px;
}

.productos {
  display: flex;
  overflow-x: auto;
  gap: 20px;
  padding-bottom: 10px;
  scroll-behavior: smooth;
  margin-top: 20px;
}

.productos::-webkit-scrollbar {
  height: 8px;
}

.productos::-webkit-scrollbar-thumb {
  background: #d2691e;
  border-radius: 10px;
}

.productos::-webkit-scrollbar-track {
  background: #f0e2d2;
}

.producto {
  flex: 0 0 auto;
  width: 250px;
  background: #fff;
  border: 2px solid #e0c3a3;
  border-radius: 10px;
  padding: 10px;
  position: relative;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.producto:hover {
  transform: scale(1.03);
  box-shadow: 4px 4px 15px rgba(0,0,0,0.2);
}

.producto img {
  width: 100%;
  border-radius: 8px;
  transition: opacity 0.3s ease;
  height: 200px;
  object-fit: cover;
}

.producto h3 {
  margin: 8px 0 4px;
  font-size: 1.1em;
}

.precio {
  margin: 4px 0;
  color: #d2691e;
  font-weight: bold;
  font-size: 1em;
}

/* Precio anterior tachado */
.precio-anterior {
  text-decoration: line-through;
  color: #888;
  margin-right: 8px;
  font-weight: normal;
  font-size: 0.95em;
}

/* Precio en oferta */
.precio-descuento {
  color: #dc3545;
  font-weight: bold;
  font-size: 1.1em;
}

/* Etiquetas (Nuevo, Oferta, etc.) */
.etiqueta {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  font-size: 0.8em;
  font-weight: bold;
  color: white;
  border-radius: 5px;
  z-index: 1;
}

.etiqueta.nuevo {
  background-color: #28a745;
}

.etiqueta.oferta {
  background-color: #dc3545;
}

/* Acciones de producto */
.acciones-producto {
  margin-top: 8px;
  display: flex;
  gap: 10px;
}

.cantidad-input {
  width: 50px;
  padding: 4px;
}

.agregar-carrito {
  padding: 5px 10px;
  background-color: #f39c12;
  border: none;
  color: white;
  font-weight: bold;
  cursor: pointer;
  border-radius: 4px;
}

.agregar-carrito:hover {
  background-color: #e67e22;
}

/* Barra superior con buscador */
.barra-superior {
  margin-top: 80px;
  padding: 10px 40px;
  background-color: #fdebd0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

#buscador {
  padding: 8px;
  width: 250px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

/* Carrito flotante */
#carrito-flotante {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background-color: #fff3e0;
  border: 2px solid #f0b27a;
  border-radius: 10px;
  padding: 15px;
  width: 250px;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  z-index: 1000;
}

#carrito-flotante h3 {
  margin-bottom: 10px;
  font-size: 1rem;
  color: #b35c1e;
}

#carrito-flotante ul {
  list-style: none;
  padding: 0;
  max-height: 150px;
  overflow-y: auto;
  margin-bottom: 10px;
}

#carrito-flotante li {
  font-size: 0.9em;
  margin-bottom: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#carrito-flotante button {
  background: none;
  border: none;
  color: #dc3545;
  font-size: 1em;
  cursor: pointer;
}

/* Footer */
footer {
  background-color: #5c4033;
  color: #fff8f0;
  padding: 40px 20px 20px;
  text-align: center;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-info, .footer-redes {
  flex: 1 1 300px;
}

.footer-info h3,
.footer-redes h4 {
  color: #f8d9b5;
  margin-bottom: 10px;
}

.footer-redes a {
  color: #ffe4c4;
  text-decoration: none;
  margin: 0 5px;
}

.footer-redes a:hover {
  text-decoration: underline;
  color: #ffd6a0;
}

.footer-copy {
  margin-top: 20px;
  font-size: 0.9rem;
  color: #d8c6b0;
}
