body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #efeded;
}

/* ======== ENCABEZADO ======== */
.encabezado {
  background-color: #efeded;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  height: 120px;
  overflow: hidden;
}

.cinta-negra {
  background-color: #0f2c2b;
  width: 70%;
  height: 100%;
  clip-path: polygon(0 0, 95% 0, 80% 100%, 0% 100%);
  display: flex;
  align-items: center;
  padding-left: 40px;
  color: white;
  font-size: 13px;
}

.datos-contacto div {
  margin: 3px 0;
  font-weight: 500;
}

.logo-box {
  padding-right: 30px;
}

.logo-box img {
  max-height: 80px;
}

/* ======== TÍTULO ======== */
h1 {
  text-align: center;
  margin: 30px 0 10px;
  font-size: 24px;
}

/* ======== ABECEDARIO ======== */

.abecedario {
  text-align: center;
  margin: 20px 10px;
  flex-wrap: wrap;
}

.abecedario button {
  margin: 4px;
  padding: 8px 12px;
  border: none;
  background-color: #444;
  color: white;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
}

.abecedario button:hover {
  background-color: #222;
}

/* ======== FORMULARIO AGREGAR ======== */
#formulario-producto {
  max-width: 600px;
  margin: 0 auto 30px;
  padding: 15px;
  background-color: #f2f2f2;
  border-radius: 8px;
  display: none;
}

#formulario-producto input,
#formulario-producto button {
  display: block;
  margin: 8px 0;
  padding: 10px;
  width: 100%;
  box-sizing: border-box;
}

#formulario-producto button {
  background-color: #4caf50;
  border: none;
  color: white;
  font-weight: bold;
  cursor: pointer;
  border-radius: 5px;
}

/* ======== PRODUCTOS ======== */
.catalogo {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 20px 40px 60px;
  max-width: 1200px;
  margin: auto;
  min-height: 900px; /* asegura espacio visual uniforme */
}

.producto-celda {
  background: white;
  position: relative;
  border-left: 4px solid #c48f55;
  border-right: 4px solid #c48f55;
  padding-bottom: 30px;
  clip-path: polygon(0 0, 100% 0, 100% 85%, 95% 100%, 5% 100%, 0 85%);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  overflow: hidden;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.producto-celda.vacia {
  background: transparent;
  border: none;
  clip-path: none;
  box-shadow: none;
}

.producto {
  padding: 20px 10px 0;
  text-align: center;
}

.producto img {
  height: 100px;
  object-fit: contain;
  margin-bottom: 10px;
}

.codigo {
  font-size: 11px;
  font-weight: bold;
  color: #c48f55;
  margin-bottom: 5px;
}

.producto h3 {
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  margin: 5px 0;
}

.ref {
  font-size: 12px;
  color: #333;
}

/* ======== NAVEGACIÓN / PÁGINAS ======== */
.navegacion {
  text-align: center;
  margin: 30px 0 80px;
  position: relative;
  z-index: 10;
}

.navegacion button {
  margin: 0 5px;
  padding: 10px 15px;
  background-color: #c48f55;
  border: none;
  color: white;
  font-weight: bold;
  cursor: pointer;
  border-radius: 5px;
}

/* ======== BOTÓN FLOTANTE ======== */
#boton-flotante {
  position: fixed;
  bottom: 20px;
  right: 20px;
  font-size: 28px;
  background-color: #c48f55;
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 1000;
}

#boton-flotante:hover {
  background-color: #a7723e;
}

/* ======== PIE DECORATIVO FIJO ======== */
.footer-decorativo {
  position: relative;
  width: 100%;
  height: 120px;
  z-index: 5;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  margin-top: 30px;
}

.footer-decorativo .forma-verde {
  position: absolute;
  width: 100%;
  height: 60px;
  background-color: #0f2c2b;
  bottom: 0;
  left: 0;
  z-index: 1;
}

.footer-decorativo .forma-dorada {
  position: absolute;
  width: 30%;
  height: 60px;
  background-color: #c48f55;
  clip-path: polygon(0 0, 75% 0, 100% 100%, 0 100%);
  bottom: 0;
  left: 0;
  z-index: 2;
}

.footer-decorativo .triangulo-derecha {
  position: absolute;
  width: 160px;
  height: 160px;
  background-color: #c48f55;
  clip-path: polygon(0% 0%, 0% 100%, 100% 100%);
  bottom: 0;
  left: 0;
  z-index: 3;
}

.form-editar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 0;
}

.editar-input {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
  width: 100%;
}

.editar-botones {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 10px;
}

.guardar-edicion,
.cancelar-edicion {
  background-color: #c8964e;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.cancelar-edicion {
  background-color: #999;
}

.guardar-edicion:hover {
  background-color: #a77b3a;
}

.cancelar-edicion:hover {
  background-color: #777;
}

.busqueda-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 20px auto;
  position: relative;
  max-width: 600px;
}

#busqueda {
  flex-grow: 1;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 20px;
  font-size: 16px;
  outline: none;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

#busqueda:focus {
  border-color: #444;
  box-shadow: 0 0 5px #999;
}

#filtro-toggle {
  padding: 10px 14px;
  background-color: #c8964e;
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

#filtro-toggle:hover {
  background-color: #444;
}

#menu-filtro {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #ccc;
  padding: 10px;
  z-index: 100;
  display: none;
  border-radius: 10px;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
}

#menu-filtro label {
  display: block;
  margin-bottom: 5px;
  cursor: pointer;
}

.icono {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 2px;
}

.marca {
  font-size: 13px;
  color: #555;
  font-style: italic;
}

.logout-boton {
  position: absolute;
  top: 20px;
  left: 20px;
  background-color: #d9534f;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
  z-index: 1000;
}
.logout-boton:hover {
  background-color: #c9302c;
}

.login-boton {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: #007bff;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
  z-index: 1000;
}
.login-boton:hover {
  background-color: #0056b3;
}

.sesion-container {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 999;
}

.btn-sesion {
  background-color: #c8964e;
  color: white;
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-sesion:hover {
  background-color: #c8964e;
}

#login-btn {
  margin-left: 20px; 
}


/* ======== RESPONSIVE ======== */
@media screen and (max-width: 768px) {
  .catalogo {
    grid-template-columns: 1fr 1fr;
  }
}

@media screen and (max-width: 500px) {
  .catalogo {
    grid-template-columns: 1fr;
  }
}

#marca-toggle {
  padding: 10px 14px;
  background-color: #c8964e;
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

#marca-toggle:hover {
  background-color: #444;
}

#filtro-marca {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 20px;
  font-size: 14px;
  background-color: white;
  color: #333;
}


@media screen and (max-width: 768px) {
  .encabezado {
    flex-direction: column;
    align-items: center;
    height: auto;
    gap: 10px;
    padding: 10px 0;
    text-align: center;
  }

  .cinta-negra {
    width: 100%;
    clip-path: none;
    padding: 10px;
    justify-content: center;
  }

  .logo-box {
    padding: 0;
  }

  .logo-box img {
    max-width: 200px;
    height: auto;
  }

  #login-btn,
  #logout-btn,
  .btn-sesion {
    position: static;
    margin-top: 10px;
    margin-bottom: 10px;
    display: inline-block;
    width: auto;
  }

  .sesion-container {
    position: static;
    width: 100%;
    text-align: center;
  }

  .abecedario {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 10px;
  }

  .abecedario button {
    font-size: 12px;
    padding: 6px 10px;
  }

  .catalogo {
    padding: 10px;
  }

  #busqueda {
    font-size: 14px;
  }

  #filtro-toggle {
    font-size: 12px;
  }
}

.producto-card {
    position: relative;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.producto-card img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
}

.info-producto {
    text-align: center;
}

.info-producto .nombre {
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    margin: 0;
}

.info-producto .codigo,
.info-producto .referencia,
.info-producto .marca {
    font-size: 12px;
    margin: 2px 0;
    color: #333;
}

.precio-top {
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 14px;
    font-weight: bold;
    color: #c49b58; /* Dorado */
}

.linea-lateral {
    position: absolute;
    top: 20%;
    bottom: 20%;
    width: 3px;
    background: #c49b58; /* Dorado */
}

.linea-lateral.izquierda {
    left: 0;
}

.linea-lateral.derecha {
    right: 0;
}

