body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
  background: #f3f3f3;
}

/* Header */
header {
  background: #0d47a1; /* azul oscuro */
  color: #fff;
  padding: 1rem;
  text-align: center;
  position: relative;
}

#cart-icon {
  position: absolute;
  top: 1rem;
  right: 1rem;
  cursor: pointer;
}

#cart-icon img {
  width: 40px;
  height: 40px;
}

#cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: red;
  color: white;
  font-size: 14px;
  border-radius: 50%;
  padding: 2px 6px;
}

/* Contenedor de productos */
.container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.product {
  background: white;
  padding: 0.8rem;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
  text-align: center;
}

.product-images {
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.product-images img {
  display: none;
  width: auto;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.product-images img.active {
  display: block;
}

.image-controls {
  margin: 5px 0;
}

.image-controls button {
  background: #555;
  color: white;
  border: none;
  padding: 5px 10px;
  margin: 0 5px;
  border-radius: 4px;
  cursor: pointer;
}

button {
  background: #28a745;
  color: white;
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 5px;
}

.quantity-selector {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0.5rem 0;
}

.quantity-selector input {
  width: 50px;
  text-align: center;
  margin: 0 5px;
}

/* Carrito completamente oculto hasta tocar el ícono */
#cart {
  position: fixed;
  top: 0;
  right: -100%; /* fuera de la pantalla completamente */
  width: 350px;
  height: 100%;
  background: #f9f9f9;
  padding: 1rem;
  border-left: 1px solid #ccc;
  box-shadow: -2px 0 10px rgba(0,0,0,0.2);
  z-index: 1000;
  transition: right 0.3s ease-in-out;
  overflow-y: auto;
}

#cart.open {
  right: 0; /* aparece al tocar el ícono */
}

#cart h3 {
  margin-top: 0;
}

#cart ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#cart li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #ddd;
}

#cart li button {
  background: red;
  color: white;
  border: none;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
}

#cart button.send-order {
  width: 100%;
  background: #0d47a1;
  margin-top: 10px;
}
