/* 🎸 CATALOGO DE VINILOS - ESTILO ROCK & ROLL PREMIUM */

/* 1. Base y Fondo */
body {
  font-family: 'Georgia', serif;
  background: #121212; /* Fondo casi negro */
  /* Textura sutil de cuero/vinilo */
  background-image: linear-gradient(rgba(0,0,0,0.85), rgba(0,0,0,0.85)), url('https://www.transparenttextures.com/patterns/leather.png');
  color: #e0e0e0;
  margin: 0;
  line-height: 1.6;
}

/* 2. Encabezado y Logo */
header {
  background: linear-gradient(to bottom, #1a1a1a, #000000);
  color: #f1c40f; /* Dorado rockero */
  text-align: center;
  padding: 40px 20px;
  border-bottom: 5px solid #960000; /* Rojo oscuro metálico */
  box-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

.logo-container {
  margin-bottom: 15px;
}

.main-logo {
  max-width: 140px;
  height: auto;
  filter: drop-shadow(0 0 8px rgba(241, 196, 15, 0.4));
  transition: transform 0.3s ease;
}

.main-logo:hover {
  transform: rotate(-5deg) scale(1.1);
}

h1 {
  font-size: 3rem;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 3px 3px 0px #4e0000;
}

header p {
  font-style: italic;
  color: #999;
  margin-top: 10px;
}

/* 3. Filtros */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 25px;
  justify-content: center;
  background: rgba(30, 30, 30, 0.5);
  border-bottom: 1px solid #333;
}

.filters div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

label {
  color: #f1c40f;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 1px;
}

select {
  padding: 10px 15px;
  border-radius: 4px;
  background: #252525;
  color: #fff;
  border: 1px solid #960000;
  cursor: pointer;
  outline: none;
}

select:focus {
  border-color: #f1c40f;
  box-shadow: 0 0 5px rgba(241, 196, 15, 0.3);
}

/* 4. Contenedor y Cartas de Vinilo */
#vinilos-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  padding: 40px 20px;
}

.vinilo-card {
  width: 240px;
  background: #1a1a1a;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  border: 2px solid #333;
  box-shadow: 8px 8px 15px rgba(0,0,0,0.5);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
}

.vinilo-card:hover {
  transform: translateY(-10px);
  border-color: #960000;
  box-shadow: 0 15px 30px rgba(150, 0, 0, 0.4);
}

.vinilo-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 15px;
  filter: grayscale(20%);
  transition: filter 0.3s;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.vinilo-card:hover img {
  filter: grayscale(0%);
}

.vinilo-card h3 {
  margin: 10px 0 5px;
  color: #f1c40f;
  font-size: 1.2rem;
}

.vinilo-card p {
  margin: 5px 0;
  font-size: 0.9rem;
  color: #bbb;
}

/* 5. Modal de Detalles */
.modal {
  display: none; 
  position: fixed;
  z-index: 2000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.92);
  overflow-y: auto;
}

.modal-content {
  background: #1a1a1a;
  margin: 5% auto;
  padding: 35px;
  width: 90%;
  max-width: 800px;
  border-radius: 12px;
  border: 3px solid #960000;
  position: relative;
  box-shadow: 0 0 50px rgba(150, 0, 0, 0.3);
}

.close-btn {
  position: absolute;
  right: 25px; top: 15px;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  color: #f1c40f;
  transition: color 0.2s;
}

.close-btn:hover { color: #fff; }

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.modal-grid img {
  width: 100%;
  border-radius: 8px;
  border: 2px solid #333;
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
}

.modal-grid h2 {
  color: #f1c40f;
  margin-top: 0;
  font-size: 2rem;
  text-transform: uppercase;
}

hr {
  border: 0;
  border-top: 1px solid #333;
  margin: 20px 0;
}

.modal-grid h3 { color: #960000; text-transform: uppercase; font-size: 1rem; }

.modal-grid ul {
  padding-left: 20px;
  list-style-type: decimal-leading-zero;
  color: #ccc;
}

.modal-grid li { margin-bottom: 8px; font-size: 0.95rem; }

/* 6. Responsividad */
@media (max-width: 768px) {
  .modal-grid { grid-template-columns: 1fr; }
  h1 { font-size: 2rem; }
  .modal-content { margin: 10% auto; padding: 20px; }
}

.search-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-grow: 1; /* Para que ocupe un poco más de espacio */
  max-width: 300px;
}

#search-input {
  padding: 10px 15px;
  border-radius: 4px;
  background: #252525;
  color: #fff;
  border: 1px solid #960000;
  outline: none;
}

#search-input:focus {
  border-color: #f1c40f;
}

#search-input::placeholder {
  color: #666;
  font-style: italic;
}

/* 📱 AJUSTES RESPONSIVOS Y MENSAJE DE ERROR */

/* Estilo para el mensaje de "No resultados" */
.no-results {
  text-align: center;
  padding: 50px;
  color: #f1c40f;
  width: 100%;
}

.no-results p {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.no-results span {
  color: #666;
  font-style: italic;
}

/* Media Query para pantallas pequeñas (Celulares) */
@media (max-width: 600px) {
  header {
    padding: 20px 10px;
  }

  h1 {
    font-size: 1.8rem; /* Título más pequeño en celular */
  }

  .main-logo {
    max-width: 100px;
  }

  .filters {
    flex-direction: column; /* Filtros uno debajo del otro */
    align-items: stretch;
    padding: 15px;
    gap: 15px;
  }

  .search-container {
    max-width: 100%; /* El buscador ocupa todo el ancho */
  }

  #vinilos-container {
    gap: 15px;
    padding: 15px;
  }

  .vinilo-card {
    width: 100%; /* Las cartas ocupan casi todo el ancho */
    max-width: 280px;
  }
}
