/* Reset y tipografía */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background: linear-gradient(120deg, #f2f2f2 0%, #e6f7ff 100%); }

/* Promo-box */
.promo-box {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 180px;
  padding: 0.75rem;
  background: #fff;
  border-right: 1px solid #f0c040;
  border-radius: 0 8px 8px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.promo-box.hidden { transform: translateX(-100%); opacity: 0; }
.promo-box .promo-close {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  color: #333;
}

/* Header */
header.main-header {
  background: #111;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}
header.main-header.hidden { transform: translateY(-100%); }
header.main-header .container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
}
.logo img { max-height: 140px; width: 140px; }

/* Hamburger & Nav */
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }
.main-nav ul {
  display: flex;
  gap: 1rem;
  white-space: nowrap;
  overflow-x: auto;
  padding: 0.5rem 0;
}
.main-nav ul li { flex: none; }
.main-nav ul li a {
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  transition: background 0.3s, transform 0.3s;
}
.main-nav ul li a:hover { background: #333; transform: scale(1.05); }

/* Colapsar menú hasta 1024px */
@media (max-width: 1024px) {
  .nav-toggle { display: block; }
  .main-nav ul { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; background: #111; width: 100%; padding: 0.5rem 0; }
  .main-nav ul.show { display: flex !important; }
}

/* Search + filters */
.search-filters {
  max-width: 1000px;
  margin: 2rem auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.search-filters .search-bar {
  flex: 1;
  display: flex;
  border: 2px solid #111;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}
.search-filters .search-bar input { flex: 1; border: none; padding: 0.75rem 1rem; font-size: 1rem; }
.search-filters .search-bar button { background: #111; color: #fff; border: none; padding: 0 1.5rem; cursor: pointer; font-family: 'Inter', sans-serif; }
.search-filters .filters {
  display: flex;
  align-items: center;
  background: #fff;
  border: 2px solid #111;
  border-radius: 999px;
  padding: 0.5rem 1rem;
}
.search-filters .filters label { margin-right: 0.5rem; font-weight: 600; }
.search-filters .filters select { border: none; background: transparent; font-size: 1rem; cursor: pointer; outline: none; font-family: 'Inter', sans-serif; }

/* Apilar en móviles y tablet ≤768px */
@media (max-width: 768px) {
  .search-filters { flex-direction: column; align-items: stretch; }
  .search-filters .search-bar, .search-filters .filters { width: 100%; }
  .search-filters .filters { margin-top: 1rem; }
}

/* Contenedor principal con márgenes laterales y límite ancho */
main#catalogue {
  margin: 0 auto 2rem;
  padding: 0 1rem;
  max-width: 1440px;
}

/* Grid de productos */
.grid {
  display: grid;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 0.75rem; } }
/* A partir de 1440px: máximo 6 columnas */
@media (min-width: 1440px) { .grid { grid-template-columns: repeat(6, 1fr); } }

/* Tarjetas */
.card {
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 4px 16px rgba(0,0,0,0.15); }
.card img { width: 100%; height: 160px; object-fit: cover; }
.card h4 { margin: 0.75rem 0 0.5rem; font-size: 1rem; padding: 0 0.5rem; flex-grow: 1; }
.card .price { color: #0074d9; font-weight: bold; margin: 0.5rem 0; }

/* Aviso legal */
.legal-notice {
  background: #111;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  text-align: center;
  padding: 1rem;
  border-top: 1px solid #333;
  margin-top: 2rem;
}
.legal-notice p { margin: 0; line-height: 1.4; }


