{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  background-color: #f4f6f8;
  color: #333;
}

header {
  background: linear-gradient(135deg, #1d3557, #457b9d);
  color: white;
  text-align: center;
  padding: 2rem 1rem;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

header p {
  font-size: 1.2rem;
  font-weight: 300;
}

nav {
  background: #2c3e50;
}

nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 0.8rem 0;
}

nav ul li {
  margin: 0 1rem;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s, border-bottom 0.3s;
}

nav ul li a:hover,
nav ul li a[aria-current="page"] {
  color: #f1c40f;
  border-bottom: 2px solid #f1c40f;
  padding-bottom: 0.2rem;
}

.busqueda {
  text-align: center;
  padding: 2rem 1rem;
  background: #e9ecef;
  margin: 1rem auto;
  border-radius: 10px;
  max-width: 600px;
}

.busqueda input {
  width: 80%;
  max-width: 400px;
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
}

.filtros {
  padding: 2rem;
  text-align: center;
  background: #ffffff;
  margin: 1rem auto;
  border-radius: 10px;
  max-width: 700px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.filtros h2 {
  margin-bottom: 1rem;
  color: #1d3557;
}

.filtro {
  margin: 1rem 0;
}

.filtro label {
  margin-right: 0.5rem;
  font-weight: 600;
}

.filtro select,
.filtro input {
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #ccc;
}

#aplicarFiltros {
  background: #457b9d;
  color: white;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  margin-top: 1rem;
  transition: background 0.3s;
}

#aplicarFiltros:hover {
  background: #1d3557;
}

.catalogo {
  padding: 2rem;
  text-align: center;
}

.catalogo h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #1d3557;
}

.pieces-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.pieza {
  background: white;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.pieza:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

.pieza img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 0.8rem;
}

.pieza h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #333;
}

.pieza p {
  font-size: 1rem;
  color: #555;
}

.cta {
  text-align: center;
  padding: 2.5rem 1rem;
  background: #457b9d;
  color: white;
  margin: 2rem 0;
  border-radius: 10px;
}

.cta h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.cta p {
  margin-bottom: 1.5rem;
}

.cta .btn {
  display: inline-block;
  background: #f1c40f;
  color: #1d3557;
  padding: 0.8rem 1.5rem;
  border-radius: 30px;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s;
}

.cta .btn:hover {
  background: #d4ac0d;
}

/* ======== PIE DE PÁGINA ======== */
footer {
  background: #2c3e50;
  color: white;
  text-align: center;
  padding: 1rem;
}

footer a {
  color: #f1c40f;
  text-decoration: none;
  margin: 0 0.5rem;
}

footer a:hover {
  text-decoration: underline;
}


@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }

  .cta h2 {
    font-size: 1.5rem;
  }

  nav ul {
    flex-direction: column;
  }

  nav ul li {
    margin: 0.5rem 0;
  }

  .busqueda input {
    width: 100%;
  }
}
