/* products.css - Styles specific to the products listing page */

/* Slick select control */
.ui-select{
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 38px 10px 12px;
  font: inherit;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
}

/* Align the control row with the grid spacing */
.filters-row{ display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin:8px 0 24px; }

.ui-select:hover{ border-color: var(--accent); }
.ui-select:focus{ outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(10,132,255,0.12); }

/* Compact variant on very small screens */
@media (max-width: 480px){
  .ui-select{ padding: 8px 34px 8px 10px; border-radius: 10px; }
}

/* ===================================================== */
/* GRID: STANDARDIZED CARD SIZE FOR SEARCH RESULTS       */
/* ===================================================== */
/* Smart grid that maintains consistent card sizes regardless of result count */
.products-grid{
  display: grid;
  gap: 20px;
  /* Key fix: Use auto-fill instead of auto-fit to prevent expansion */
  /* This creates empty columns rather than expanding existing cards */
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  /* Center the grid when there are fewer cards than can fit */
  justify-content: center;
}

/* On small screens (mobile), allow full width single column */
@media (max-width: 640px){
  .products-grid{ 
    grid-template-columns: 1fr; 
    justify-content: stretch;
  }
}

/* On very large screens, prevent the grid from getting too wide */
@media (min-width: 1200px){
  .products-grid{
    max-width: 1200px;
    margin: 0 auto;
  }
}


