/* =============================== */
/* RESET */
/* =============================== */
* {
  box-sizing: border-box;
}

body, html {
  overflow-x: hidden;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  background-color: #F0E7DE;
  overflow-x: hidden;
}

/* =============================== */
/* HEADER */
/* =============================== */
.header {
  padding: 5px 10px ;
  background: #F0E7DE;
  position: sticky;
  top: 0;
  z-index: 1000;
  text-align: center;
}

/* contenedor logo centrado */
.header-top {
  display: flex;
  align-items: center;
  justify-content: center;
}

/*logo */
.logo {
  height: 90px;
}
  
/* título */
.header h1 {
  margin: 0;
  font-size: 48px;
  color: #000;
  font-weight: bold;
  line-height: 1.1;    /* 🔴 compacta altura */
}

/* buscador */
.buscador-container {
  width: 100%;
  margin-top: 5px;
}

.buscador-container input {
  width: 100%;
  max-width: 400px;
  padding: 10px;
  border-radius: 20px;
  border: 1px solid #ccc;
  font-size: 14px;
}

/* =============================== */
/* GRID CATALOGO */
/* =============================== */
#catalogo {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
  max-width: 1200px;
  margin: 10px auto;
  padding: 10px;
  width: 100%;
}

/* producto */
.producto {
  background: #fff;
  position: relative;
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
}

.producto:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* imagen */
.producto img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

/* info */
.info {
  background: #C5A280;
  color: white;
  height: 55px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6px;
}

.info .descripcion {
  font-size: 12px;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.info .precio {
  font-size: 12px;
  font-weight: bold;
}

/* =============================== */
/* BADGE PRODUCTO */
/* =============================== */
.badge-producto {
  position: absolute;
  top: 8px;
  right: 8px;
  background: red;
  color: white;
  font-size: 12px;
  font-weight: bold;
  padding: 4px 7px;
  border-radius: 50%;
  z-index: 2;
}

.producto-con-cantidad::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 220px; /* mismo alto que la imagen */

  background: rgba(130, 214, 245, 0.45); /* azul con transparencia */

  pointer-events: none; /* no bloquea clicks */
  z-index: 1;
}

.producto{
  position: relative;
}

/* =============================== */
/* PAGINACION */
/* =============================== */
.paginacion {
  text-align: center;
  margin: 20px 0;
}

.paginacion button {
  padding: 8px 15px;
  margin: 0 10px;
  font-size: 14px;
  background-color: #E08D3A;
  color: white;
  border: none;
  border-radius: 5px;
}

/* =============================== */
/* BOTON PEDIDOS */
/* =============================== */
.btn-pedidos {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

#btnVerPedido {
  position: relative;
  background-color: #25D366;
  color: white;
  border: none;
  padding: 12px 18px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: bold;
}

/* badge pedidos */
.badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  background: red;
  color: white;
  font-size: 11px;
  border-radius: 50%;
  text-align: center;
  line-height: 18px;
}

/* =============================== */
/* MODAL */
/* =============================== */
#modalPedido {
  display: none;
  position: fixed;
  z-index: 2000;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
}

#modalContenido {
  background-color: #fff;
  margin: 80px auto;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
}

/* =============================== */
/* 📱 RESPONSIVE */
/* =============================== */
@media (max-width: 900px) {
  #catalogo {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .btn-pedidos {
    bottom: 15px;
    right: 15px;
  }
}

@media (max-width: 500px) {
  #catalogo {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .producto img {
    height: 150px;
  }

  .logo {
    width: 50%;
    height: auto;
  }

  .header h1 {
    font-size: 26px;
  }

  .producto {
    padding: 8px;
    font-size: 13px;
  }

  .cantidad button {
    font-size: 16px;
    padding: 5px 10px;
  }  
}

@media (max-width: 380px) {
  #catalogo {
    grid-template-columns: 1fr;
  }
}

.cliente-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 14px;
}

.cliente-box span {
  font-weight: bold;
}

.cliente-box input {
  border: none;
  background: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 14px;
  width: 180px;
}

.acciones-header {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 10px 0;
  flex-wrap: wrap;
}

.acciones-header button {
  padding: 8px 12px;
  font-size: 13px;
  border: none;
  border-radius: 6px;
  background: #007bff; /*4fc3f7*/
  color: white;
  cursor: pointer;
}

.acciones-header button:active {
  transform: scale(0.97);
}