/* Entire form in a column */
/*.search-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 500px;
  margin: 40px auto;
*/	
.fixed
{
  position: sticky;
  top: 120px;
}

/* Disable sticky on tablets + phones */
@media (max-width: 1024px) {
  .search-form {
    position: static;
  }
}

.search-form {
  position: sticky;
  top: 120;
  z-index: 1000;
  gap: 20px;
  max-width: 500px;
  margin: 40px auto;
}

/* Group wrapper */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Group title */
.group-title {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.search-form input,
.search-form select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Inputs */
.search-form input[type='text'],
.search-form input[type='number'] {
  padding: 10px 14px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.type-group label,
.color-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}


/* Type checkboxes layout */
.type-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}

/* Bigger checkboxes */
.type-group input[type='checkbox'],
.color-group input[type='checkbox'] {
  width: 20px;
  height: 20px;
  transform: scale(1.3);
  margin-right: 6px;
}

/* Group layout */
.color-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}

.type-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px 16px;
  align-items: center;
}


/* Dropdown styling */
.dropdown {
  padding: 8px 12px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: fit-content;
}

.stat-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.stat-compare {
  padding: 8px 12px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

/* Submit button */
#submitBtn {
  padding: 12px 16px;
  font-size: 16px;
  background-color: #897089;
  color: white;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
}

#submitBtn:hover {
  background-color: #6d5a6d;
}

/* Style the input */
#userInput {
  padding: 10px 14px;
  font-size: 16px;
  width: 250px;
  border: 1px solid #ccc;
}
/* Style the button */
#submitBtn {
  padding: 10px 16px;
  font-size: 16px;
  background-color: #897089;
  color: white;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
}
#submitBtn:hover {
  background-color: #005fcc;
}
#results {
  margin-top: 20px;
  display: grid;

  /* Up to 6 columns, but shrink as needed */
  grid-template-columns: repeat(auto-fit, minmax(244px, 1fr));

  max-width: calc(244px * 6 + 12px * 5); /* 6 cards + gaps */
  margin-left: auto;
  margin-right: auto;

  gap: 12px;
  justify-items: center;
}

.card-img {
  width: 244px;
  height: 340px;
  opacity: 0;
  animation: fadeIn 0.4s ease forwards;
  transition: transform 0.2s ease;
  will-change: transform;
}

.card-img:hover {
  transform: scale(1.08);
  z-index: 2;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Loading spinner */
#spinner {
  display: none;
  margin: 20px auto;
  border: 6px solid #ddd;
  border-top: 6px solid #444;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* No results message */
#noResults {
  display: none;
  margin-top: 20px;
  text-align: center;
  font-size: 1.2rem;
  color: #666;
}

#scrollSentinel { 
	display: block; 
	height: 20px; 
}

.card-wrapper {
  position: relative;
  display: inline-block;
}

.card-wrapper.multi-face:hover::after {
  content: "⇆";
  position: absolute;
  top: 20px;
  left: 20px;
  background: rgba(0,0,0,0.65);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 24px;
  pointer-events: none;
  z-index: 10;
}

.card-wrapper.multi-face:hover { 
	transform: scale(1.08) rotate(1deg); 
}

#clearBtn {
  padding: 10px 16px;
  font-size: 16px;
  background-color: #ccc;
  color: #333;
  border: 1px solid #aaa;
  border-radius: 6px;
  cursor: pointer;
  width:50%;
	margin:1px
}

#clearBtn:hover {
  background-color: #bbb;
}
