/* ===== RESET ===== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #ffe082 0, #fff8e1 35%, #fafafa 70%, #f0f0f0 100%);
  color: #222;
}

/* ===== HEADER CON LOGO ANIMADO ===== */
header {
  align-items: center;
  top: 10px;
  z-index: 10;
  background: linear-gradient(135deg, #ffb300, #ff6f00);
  padding: 10px 12px;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}
#topBar {
  display: flex;
  gap: 10px;
  padding: 10px;
  align-items: center;
  overflow-x: auto;
  justify-content: center;
    flex-direction: column;


}
#buscadorBox {
  display: flex;
  align-items: center;
  gap: 6px;
flex-direction: row-reerse
}

#iconBuscar {
  font-size: 18px;
  cursor: pointer;
}

#buscador {
  width: 0;
  opacity: 0;
  padding: 0;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 13px;
  transition: all 0.25s ease;
}

#buscador.activo {
  width: 120px;
  opacity: 1;
  padding: 6px 8px;

}

#categorias {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
    justify-content: center;
}

#categorias .categoria {
  white-space: nowrap;
}

#buscador {
  min-width: 140px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  flex-shrink: 0;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 10px;
    justify-content: center;

}

.header-text h1 {
  margin: 0;
  font-size: 20px;
scale:0.7
}
.header-text p {
  margin: 2px 0 0;
  font-size: 13px;
}
.header-text small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  opacity: 0.9;
}

/* ===== LOGO ANIMADO ===== */
.scene {
  position: relative;
  width: 80px;
  height: 70px;
  overflow: visible;
  align-items: center;

}

.floor {
  position: absolute;
  bottom: -16px;
  left: -20px;
  right: -20px;
  height: 3px;
  background: rgba(0,0,0,0.4);
  border-radius: 999px;
  opacity: 0.3;
  filter: blur(2px);
  animation: floor-move 3.2s linear infinite;
}

.logo-wrapper {
  position: absolute;
  align-items: center;
  justify-content: center;
  animation:
    move-x 3.2s ease-in-out infinite,
    bob 0.9s ease-in-out infinite;
  transform-origin: center bottom;
}

.logo-wrapper img {
  max-width: 70px;
  height: auto;
  display: block;
}

.speed-lines {
  position: absolute;
  bottom: 12px;
  width: 30px;
  height: 30px;
  pointer-events: none;
  overflow: visible;
}

.speed-lines span {
  position: absolute;
  right: 0;
  height: 3px;
  border-radius: 999px;
  background: rgba(0,0,0,0.45);
  transform: translateX(0);
  animation: speed 0.55s linear infinite;
}

.speed-lines span:nth-child(1) { top: 2px;  width: 30px; animation-delay: 0s; }
.speed-lines span:nth-child(2) { top: 10px; width: 40px; animation-delay: 0.12s; }
.speed-lines span:nth-child(3) { top: 18px; width: 25px; animation-delay: 0.24s; }
.speed-lines span:nth-child(4) { top: 26px; width: 35px; animation-delay: 0.36s; }

@keyframes move-x {
  0%   { transform: translateX(-15px); }
  50%  { transform: translateX(15px); }
  100% { transform: translateX(-15px); }
}

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-3px) rotate(-0.8deg); }
  50% { transform: translateY(0) rotate(0.4deg); }
  75% { transform: translateY(-2px) rotate(-0.4deg); }
}

@keyframes speed {
  0% { transform: translateX(0); opacity: 0.9; }
  100% { transform: translateX(-40px); opacity: 0; }
}
			
@keyframes floor-move {
  0% { transform: translateX(0); }
  100% { transform: translateX(-20px); }
}

.mini {
  transform: scale(.9);
  transform-origin: center;
}

/* ===== CATEGORÍAS ===== */
#categorias {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

#categorias::-webkit-scrollbar {
  display: none;
}

.categoria {
  padding: 7px 14px;
  background: rgba(255,255,255,0.9);
  border-radius: 999px;
  white-space: nowrap;
  font-size: 13px;
  border: 1px solid rgba(0,0,0,0.06);
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: all 0.15s ease;
}

.categoria:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0,0,0,0.12);
}

.categoria.activa {
  background: #ffb300;
  color: #fff;
  border-color: #ffb300;
}

/* ===== LISTA DE PRODUCTOS ===== */
#productos {
  padding: 10px 10px 80px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.producto {
  background: rgba(255,255,255,0.96);
  border-radius: 14px;
  padding: 8px;
  text-align: left;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
  position: relative;
}

.producto img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  border-radius: 10px;
  background: #eee;
}

.producto h4 {
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 600;
  min-height: 32px;
}

.producto p {
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: #2e7d32;
}

/* Botón agregar */
.addBtn {
  background: #25d366;
  padding: 7px;
  width: 100%;
  border: none;
  color: white;
  border-radius: 999px;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.18);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.addBtn::before {
  content: "＋";
  font-weight: 700;
}

.addBtn:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}

/* ===== BOTÓN FLOANTE CARRITO ===== */
#carritoBtn {
  position: fixed;
  bottom: 18px;
  right: 16px;
  background: #d325cc;
  padding: 10px 14px;
  border-radius: 999px;
  color: white;
  font-size: 19px;
  font-weight: 600;
  box-shadow: 0 5px 14px rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

#carritoBtn span {
  background: rgba(0,0,0,0.1);
  padding: 2px 7px;
  border-radius: 999px;
}

/* ===== MODALES ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  justify-content: center;
  padding: 0;
  z-index: 20;
flex-direction: column;
    align-items: center;
}

.modal-content {
  background: #ffffff;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  margin: 0 auto;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  padding: 14px 16px 18px;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.35);
  overflow-y: auto;
    display: inline-grid;
    justify-items: center;	

}

.modal-content h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.small-text {
  font-size: 13px;
  margin-top: 0;
  opacity: 0.85;
}

/* ===== FORMULARIO EN EL MODAL ===== */
#datosForm {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

#datosForm label {
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#datosForm input,
#datosForm textarea,
#penalSelect {
  border-radius: 10px;
  border: 1px solid #ddd;
  padding: 7px 9px;
  font-size: 13px;
  outline: none;
  background: #fafafa;
}

#datosForm input:focus,
#datosForm textarea:focus,
#penalSelect:focus {
  border-color: #ffb300;
  box-shadow: 0 0 0 2px rgba(255,179,0,0.25);
  background: #fff;
}

/* ===== LISTA DEL CARRITO ===== */
#carritoLista {
  border-radius: 10px;
  background: #fff9e6;
  padding: 8px 10px;
  margin-bottom: 10px;
  font-size: 13px;
}

#carritoLista p {
  margin: 4px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

/* Botones +/- dentro del carrito */
#carritoLista button {
  border-radius: 999px;
  border: none;
  width: 22px;
  height: 22px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eee;
  cursor: pointer;
}

/* ===== TOTALES ===== */
.total {
  border-top: 1px dashed #ddd;
  margin-top: 8px;
  padding-top: 8px;
  font-size: 13px;
}

.total p {
  margin: 3px 0;
}

.total h3 {
  margin: 6px 0 0;
  font-size: 16px;
}

/* ===== BOTONES MODAL ===== */
.wa {
  background: #25d366;
  width: 100%;
  padding: 10px;
  font-size: 15px;
  border: none;
  color: black;
  border-radius: 999px;
  margin-top: 10px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

button[type="button"] {
  width: 100%;
  margin-top: 8px;
  padding: 9px;
  border-radius: 999px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  font-size: 14px;
  cursor: pointer;
}

/* ===== RESPONSIVE MÁS ANCHO ===== */
@media (min-width: 768px) {
  #productos {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 900px;
    margin: 0 auto;
  }

  .modal {
    align-items: center;
  }

  .modal-content {
    border-radius: 16px;
  }
}
