:root {
  --color-principal: #7b2cbf; /* Morado vibrante */
  --color-secundario: #9d4edd; /* Morado claro */
  --color-terciario: #c77dff; /* Morado pastel */
  --color-fondo: #f8f0ff; /* Blanco con tono morado claro */
  --color-texto: #2d0a4d; /* Morado oscuro casi negro */
  --color-gris-suave: #f5f3ff; /* Gris con tono morado */
  --color-borde: #e0aaff; /* Morado claro para bordes */
  --color-hover: #5a189a; /* Morado oscuro para hover */
}

body {
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 20px;
  background-color: var(--color-fondo);
  color: var(--color-texto);
  line-height: 1.6;
}

header {
  text-align: center;
  margin-bottom: 40px;
  padding: 20px 0;
  background: linear-gradient(
    135deg,
    var(--color-principal),
    var(--color-hover)
  );
  color: white;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 10px 20px rgba(123, 44, 191, 0.1);
}

header h1 {
  color: white;
  font-size: 2.5rem;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filters {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

select {
  padding: 12px 20px;
  border: 2px solid var(--color-borde);
  border-radius: 12px;
  background-color: white;
  color: var(--color-texto);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(123, 44, 191, 0.1);
}

select:hover {
  border-color: var(--color-secundario);
  box-shadow: 0 6px 12px rgba(123, 44, 191, 0.15);
}

select:focus {
  outline: none;
  border-color: var(--color-principal);
  box-shadow: 0 0 0 3px rgba(123, 44, 191, 0.2);
}

.catalog {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
}

.card {
  background-color: white;
  border: none;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  max-width: 320px;
  margin: 0 auto;
  box-shadow: 0 4px 8px rgba(123, 44, 191, 0.1);
  position: relative;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(123, 44, 191, 0.2);
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(
    90deg,
    var(--color-principal),
    var(--color-terciario)
  );
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card:hover img {
  transform: scale(1.05);
}

.card-body {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-body h3 {
  color: var(--color-principal);
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.4rem;
}

.price {
  color: var(--color-principal);
  font-weight: 700;
  font-size: 1.4rem;
  margin: 10px 0;
}

.old-price {
  text-decoration: line-through;
  color: #9ca3af;
  font-size: 1rem;
}

.discount {
  background: linear-gradient(
    135deg,
    var(--color-principal),
    var(--color-hover)
  );
  color: white;
  padding: 5px 12px;
  margin-top: 5px;
  text-align: center;
  font-weight: bold;
  border-radius: 20px;
  align-self: flex-start;
  font-size: 0.9rem;
}

button {
  margin-top: 15px;
  padding: 12px;
  background: linear-gradient(
    135deg,
    var(--color-principal),
    var(--color-hover)
  );
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 6px rgba(123, 44, 191, 0.2);
}

button:hover {
  background: linear-gradient(
    135deg,
    var(--color-hover),
    var(--color-principal)
  );
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(123, 44, 191, 0.3);
}

.detail {
  max-width: 800px;
  margin: 40px auto;
  padding: 30px;
  background-color: white;
  border-radius: 20px;
  border: none;
  box-shadow: 0 10px 30px rgba(123, 44, 191, 0.15);
}

.detail h2 {
  color: var(--color-principal);
  font-size: 2rem;
  margin-bottom: 20px;
  border-bottom: 3px solid var(--color-borde);
  padding-bottom: 10px;
}

.detail img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: 15px;
  margin-bottom: 20px;
  box-shadow: 0 5px 15px rgba(123, 44, 191, 0.1);
}

iframe {
  margin-top: 30px;
  width: 100%;
  height: 400px;
  border: none;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(123, 44, 191, 0.1);
}

@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }

  .card {
    max-width: 100%;
  }

  .detail {
    padding: 20px;
    margin: 20px;
  }

  .detail img {
    height: 250px;
  }

  iframe {
    height: 250px;
  }
}

/* Animaciones */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.catalog {
  animation: fadeIn 0.6s ease-out;
}

.card {
  animation: fadeIn 0.4s ease-out;
  animation-fill-mode: both;
}

.card:nth-child(1) {
  animation-delay: 0.1s;
}
.card:nth-child(2) {
  animation-delay: 0.2s;
}
.card:nth-child(3) {
  animation-delay: 0.3s;
}
.card:nth-child(4) {
  animation-delay: 0.4s;
}
