.search-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 800px;
  margin: 0 auto;
  padding: 15px;
  background-color: #f4f4f4;
  border-radius: 8px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

#searchForm {
  margin-bottom: 50px;
}

/* Grouping for each input field */
.input-group {
  flex: 1;
  min-width: 180px;
  display: flex;
  flex-direction: column;
}

/* Label style */
.search-container label {
  font-size: 14px;
  color: #333;
  font-weight: bold;
  margin-bottom: 5px;
}

/* Input fields style */
.search-container input {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  width: 100%;
}

/* Button style */
.search-btn {
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  margin-top: 10px;
  transition: background-color 0.3s ease;
}

.search-btn:hover {
  background-color: #0056b3;
}

/* ── Excluded Digits Section ── */
.excluded-digits-group {
  flex: 0 0 100%; /* Full row — digits need breathing room */
  min-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.excluded-digits-group > label {
  font-size: 14px;
  color: #333;
  font-weight: bold;
  margin-bottom: 2px;
}

.excluded-digits-hint {
  font-size: 12px;
  color: #888;
  margin-bottom: 6px;
}

.digit-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.digit-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.digit-label input[type="checkbox"] {
  display: none; /* Hidden — the digit-box acts as the toggle */
}

.digit-box {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  background-color: #f9f9f9;
  color: #333;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

/* Checked state — red to signal exclusion */
.digit-label input[type="checkbox"]:checked + .digit-box {
  background-color: #e74c3c;
  border-color: #c0392b;
  color: #fff;
}

/* Hover state */
.digit-label:hover .digit-box {
  border-color: #e74c3c;
  background-color: #fdecea;
  color: #c0392b;
}

/* Responsive Design for smaller screens */
@media (max-width: 600px) {
  .search-container {
    max-width: 100%;
    padding: 10px;
  }

  .input-group {
    min-width: 100%;
  }

  .search-btn {
    font-size: 14px;
    width: 100%;
  }

  .digit-box {
    width: 32px; /* Slightly smaller on mobile so all 10 fit */
    height: 32px;
    font-size: 14px;
  }

  .digit-checkboxes {
    gap: 6px;
  }
}

/* Very small phones (roughly 300px-400px wide) */
@media (max-width: 400px) {
  .search-container {
    padding: 10px;
    gap: 8px;
  }

  .digit-box {
    width: 27px;
    height: 27px;
    font-size: 12px;
  }

  .digit-checkboxes {
    gap: 5px;
  }

  .excluded-digits-group {
    padding: 10px;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   Search results — count summary, empty state, pagination
   Uses the gold/navy theme variables from style.css (with fallbacks)
   so this matches the product cards/navbar next to it.
   ══════════════════════════════════════════════════════════════════════ */

.results-meta {
  max-width: 800px;
  margin: 0 auto 16px;
  padding: 0 15px;
  font-size: 13px;
  color: #777;
  text-align: center;
}

.no-results {
  max-width: 500px;
  margin: 40px auto;
  padding: 30px 24px;
  background-color: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  color: #555;
  font-size: 15px;
  text-align: center;
}

/* ---------- Pagination — identical structure/style to products.php ---------- */
.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 30px 0 10px;
}

.pagination .page-link {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid #ddd;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: 0.2s;
}

.pagination .page-link:hover:not(.disabled):not(.active) {
  background: #f2f2f2;
}

.pagination .page-link.active {
  background: #ffeb36;
  border-color: #ffeb36;
  font-weight: 600;
}

.pagination .page-link.disabled {
  color: #bbb;
  cursor: not-allowed;
}

.pagination .page-ellipsis {
  padding: 0 4px;
  color: #999;
}

/* Small phones (roughly 300px-400px wide) */
@media (max-width: 400px) {
  .pagination {
    gap: 6px;
    margin: 22px 0 8px;
  }

  .pagination .page-link {
    padding: 6px 10px;
    font-size: 12.5px;
  }
}