@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600&display=swap');

body {
  font-family: 'Montserrat', sans-serif;
  background-color: #f4f4f2;
  margin: 0;
  color: #222;
}

header {
  background-color: #111;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

header h1 {
  margin: 0;
  font-weight: 600;
  letter-spacing: 1px;
  font-size: 1.4em;
}

header span {
  display: block;
  font-weight: 400;
  font-size: 0.85em;
  color: #aaa;
  margin-top: 2px;
}

/* Botón chevron dentro del header */
#back-btn {
  position: absolute;
  left: 12px;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8em;
  line-height: 1;
  cursor: pointer;
  display: none;
  padding: 0;
}

#back-btn:active {
  opacity: 0.6;
}

/* ---- MENÚ INICIAL ---- */
#home {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 80vh;
  gap: 25px;
  text-align: center;
}

a.menu-btn {
  display: inline-block;
  background: #111;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.2em;
  padding: 18px 24px;
  border-radius: 50px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  width: 80%;
  max-width: 400px;
  margin: 0 auto 18px auto;
  word-break: break-word;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  a.menu-btn {
    width: 80vw;
    max-width: 80vw;
    font-size: 1em;
    padding: 14px 8px;
  }
}

footer {
  color: #999;
  font-size: 0.8em;
  padding: 20px 0;
  text-align: center;
  width: 100%;
}

/* ---- LISTA DE TIRADORES ---- */
#tiradores {
  display: none;
  animation: fadeIn 0.3s ease;
}

/* ---- LISTA DE LATAS Y BOTELLAS ---- */
#latas {
  display: none;
  animation: fadeIn 0.3s ease;
}

#beer-list, #latas-list {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.beer, .lata {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.beer:hover, .lata:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
}

.beer h2, .lata h2 {
  margin-top: 0;
  color: #111;
  font-size: 1.3em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta {
  font-size: 0.9em;
  color: #555;
  line-height: 1.5;
}

.volumes {
  margin-top: 10px;
  font-weight: 600;
  color: #222;
}

.icono-sin-gluten {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.tap-number {
  display: inline-block;
  background: #111;
  color: #fff;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  line-height: 26px;
  text-align: center;
  font-size: 0.9em;
  font-weight: 600;
}

/* Spinner */
#loading, #loading-latas {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 50vh;
  font-weight: 600;
  color: #111;
  font-size: 1.1em;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #ddd;
  border-top-color: #111;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Notice text styling */
.notice {
  background-color: #f8f9fa;
  border: 2px solid #111;
  border-radius: 8px;
  padding: 15px 20px;
  margin: 20px;
  text-align: center;
  font-weight: 600;
  color: #111;
  font-size: 1.1em;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Marca header styling */
.marca-header {
  background-color: #111;
  color: #fff;
  padding: 15px 20px;
  margin: 30px 0 15px 0;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.marca-header h2 {
  margin: 0;
  font-size: 1.4em;
  font-weight: 600;
  letter-spacing: 1px;
}

.latas-marca {
  margin-bottom: 30px;
}

/* Filtros styling */
.filtros-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.filtro-btn {
  background: #fff;
  border: 2px solid #111;
  color: #111;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9em;
  transition: all 0.2s ease;
}

.filtro-btn:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

.filtro-btn.active {
  background: #111;
  color: #fff;
}

/* Dropdown styling */
.filtro-dropdown {
  position: relative;
  display: inline-block;
}

.filtro-dropdown-btn {
  background: #fff;
  border: 2px solid #111;
  color: #111;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9em;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filtro-dropdown-btn:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

.dropdown-arrow {
  transition: transform 0.2s ease;
  font-size: 0.8em;
}

.filtro-dropdown-content {
  display: none;
  position: absolute;
  background: #fff;
  border: 2px solid #111;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  z-index: 1000;
  min-width: 200px;
  top: 100%;
  left: 0;
  margin-top: 5px;
  padding: 10px;
  flex-direction: column;
  gap: 5px;
}

.filtro-dropdown-content.show {
  display: flex;
}

.filtro-dropdown-content .filtro-btn {
  width: 100%;
  margin: 0;
  border-radius: 15px;
  text-align: left;
}

/* Alerta styling */
.alerta-container {
  background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
  color: #fff;
  padding: 15px 20px;
  margin: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 4px 8px rgba(255, 107, 107, 0.3);
  border-left: 5px solid #ff4444;
}

.alerta-icono {
  font-size: 1.5em;
  flex-shrink: 0;
}

.alerta-texto {
  font-weight: 600;
  font-size: 1em;
  line-height: 1.4;
}

/* Popup overlay for filtros */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.popup-overlay.show {
  display: flex;
}

.popup-content {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  padding: 38px 18px 18px 18px;
  min-width: 220px;
  max-width: 95vw;
  width: 350px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: fadeIn 0.2s;
}

@media (max-width: 600px) {
  .popup-content {
    width: 95vw;
    min-width: unset;
    padding: 34px 6px 14px 6px;
  }
}

.popup-close {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 2.4em;
  color: #111;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: bold;
  z-index: 2;
  padding: 0.15em 0.45em;
  border-radius: 50px;
  transition: color 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 0 rgba(0,0,0,0);
}

.popup-close:hover, .popup-close:focus {
  color: #fff;
  background: #111;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  outline: none;
}

/* Añadir estilo para botón principal de desplegable activo */
.filtro-dropdown-btn.active {
  background: #111;
  color: #fff;
}
