/* ===== Base Layout ===== */

body {
  font-family: Arial, sans-serif;
  background: #f4f4f4;
  margin: 0;
  padding: 20px;
}

header {
  text-align: center;
  margin-bottom: 30px;
}

h1 {
  margin-bottom: 5px;
}

.subtitle {
  color: #666;
  margin-top: 0;
}

#stats {
  margin-top: 10px;
  font-weight: bold;
}

/* ===== Controls (Search + Sort) ===== */

.controls {
  margin: 15px 0;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

input {
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ccc;
  min-width: 220px;
  font-size: 14px;
}

input:focus {
  outline: none;
  border-color: #888;
}

select {
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
  cursor: pointer;
}

select:focus {
  outline: none;
  border-color: #888;
}

/* ===== Gallery Grid ===== */

.gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, 180px);
	justify-content: center;
	gap: 10px 30px;
}

/* ===== Card Style ===== */

.card {
  width: 180px;
  background: white;
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.card img {
  width: 100%;
}

.card h3 {
  margin: 8px 0 4px;
  font-size: 14px;
  line-height: 1.2;
}

.card p {
  font-size: 12px;
  color: #888;
}

.card-id {
  font-weight: 700;   /* negrito */
}

.card-name {
  font-weight: 400;   /* normal */
}

.faded {
  opacity: 0.3;
}

/* ===== Responsive Adjustment ===== */

@media (max-width: 600px) {
  body {
    padding: 10px;
  }

  .controls {
    flex-direction: column;
    align-items: center;
  }

  input {
    width: 100%;
    max-width: 300px;
  }

  select {
    width: 100%;
    max-width: 300px;
  }
}
