/* Reset básico */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-image: url('../imagenes/fondo.jpg'); /* ajustado para estructura de carpetas */
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Menú de navegación */
.menu {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.menu ul {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.menu a {
  text-decoration: none;
  color: #0077cc;
  font-weight: bold;
  font-size: 16px;
  transition: color 0.3s ease;
}

.menu a:hover {
  color: #005fa3;
}

/* Contenedor principal */
.container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  backdrop-filter: blur(2px);
}

/* Logo como imagen */
.logo-img {
  max-width: 120px;
  height: auto;
  margin-bottom: 10px;
  border-radius: 50%;
}

/* Título */
h1 {
  font-size: 26px;
  margin-bottom: 20px;
  text-align: center;
  color: #0077cc;
}

/* Caja de acceso */
.access-wrapper {
  width: 100%;
  max-width: 400px;
}

.access-box {
  background: rgba(255, 255, 255, 0.95);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  text-align: center;
}

/* Formularios */
form {
  margin-top: 20px;
}

input {
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

button {
  width: 100%;
  padding: 12px;
  background-color: #0077cc;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #005fa3;
}

/* Enlace de ayuda */
.help {
  margin-top: 15px;
  font-size: 14px;
}

.help a {
  color: #0077cc;
  text-decoration: none;
}

.help a:hover {
  text-decoration: underline;
}

/* Mensajes */
.success-msg,
.error-msg,
#loginError {
  margin-top: 10px;
  font-weight: bold;
  font-size: 14px;
}

/* Footer */
footer {
  background-color: #222;
  color: white;
  text-align: center;
  padding: 20px;
  font-size: 14px;
  margin-top: auto;
}

footer a {
  color: #ffffff;
  text-decoration: underline;
}

/* Tarjetas para tiendas */
.galeria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 30px;
  width: 100%;
  max-width: 1000px;
}

.tarjeta {
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  text-align: center;
  padding: 20px;
  transition: transform 0.3s ease;
}

.tarjeta:hover {
  transform: scale(1.03);
}

.tarjeta img {
  max-width: 100%;
  height: 120px;
  object-fit: contain;
  margin-bottom: 10px;
}

.tarjeta h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.tarjeta button {
  padding: 8px 16px;
  background-color: #0077cc;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.tarjeta button:hover {
  background-color: #005fa3;
}

/* Tabla resumen de pedidos */
table {
  margin-top: 20px;
  background: white;
  width: 100%;
  border-collapse: collapse;
}

th, td {
  border: 1px solid #ccc;
  padding: 10px;
  text-align: center;
}

/* ========================= */
/* 📱 Adaptación a móviles   */
/* ========================= */
@media (max-width: 768px) {
  .menu ul {
    flex-direction: column;
    gap: 15px;
  }

  .menu a {
    font-size: 14px;
  }

  h1 {
    font-size: 22px;
  }

  .container {
    padding: 20px 10px;
  }

  .logo-img {
    max-width: 90px;
  }

  .access-box {
    padding: 20px;
  }

  input, button, select, textarea {
    font-size: 14px;
    padding: 10px;
  }

  .galeria {
    grid-template-columns: 1fr;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  th, td {
    font-size: 13px;
    padding: 8px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 20px;
  }

  .menu a {
    font-size: 13px;
  }

  .tarjeta {
    padding: 15px;
  }

  .tarjeta img {
    height: 100px;
  }

  button {
    font-size: 14px;
    padding: 10px;
  }

}
