/* Controls */
.sq-grid-wrap {
  margin: 12px 0 18px;
}

.sq-grid-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin-bottom: 12px;
}

.sq-grid-controls .control {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
}

.sq-grid-controls label {
  font-size: 12px;
  color: #334155;
}

.sq-grid-controls select,
.sq-grid-controls input {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px;
  font-size: 14px;
  background: #fff;
  height: auto;
}

.sq-grid-controls button {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  color: white;
  background-color: var(--denim);
  min-height: auto;
}

.sq-grid-controls button:hover {
  border-color: var(--coal)
}

/* Grid (static selectors; per-instance columns via CSS variables) */
.sq-item-grid {
  display: grid;
  grid-template-columns: repeat(var(--sq-cols, 4), minmax(0, 1fr));
  gap: 16px;
  margin: 12px 0;
}

.sq-item-grid .sq-item-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
  text-align: center;
}

.sq-item-grid .sq-item-thumb {
  width: 100%;
  max-height: 160px;
  object-fit: contain;
  border-radius: 6px;
  margin-bottom: 8px;
}

.sq-item-grid .sq-item-name,
.sq-item-grid .sq-item-name:hover {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--coal);
  text-decoration: none;
}

/* Make the whole card clickable */
.sq-item-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.sq-item-card-link:hover,
.sq-item-card-link:focus {
  text-decoration: none;
}

.sq-item-rating .rating-a {
  display: inline-block;
  position: relative;
  color: var(--tango);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.4;
  margin-bottom: 0;
  margin-top: 2px;
}

.sq-item-rating .review-highlight-row .rating-a {
  width: 140px;
}

.sq-item-rating .rating-a .rating {
  display: block;
  overflow: hidden;
  position: relative;
  height: 16px;
  margin: 0 0 0 5px;
  padding: 0;
  box-shadow: none;
  border-radius: 0;
  background: none;
  text-align: left;
  text-indent: -3000em;
}

.sq-item-rating .rating-a .rating>* {
  display: block;
  position: relative;
  z-index: 2;
  float: left;
  width: 16px;
  height: 100%;
  margin: 0 4px 0 0;
}

.sq-item-rating .rating-a .rating>*:before {
  content: "";
  z-index: 1;
  background: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNS45IDE1LjMiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDE1LjkgMTUuMyI+PHN0eWxlIHR5cGU9InRleHQvY3NzIj4uc3Qwe2ZpbGw6I0VFNzAyNTt9PC9zdHlsZT48cGF0aCBkPSJNMTUuNCA1LjJjLS4yLS4yLS40LS40LS43LS40TDExIDQuMiA5LjMuOUM5LjEuNSA4LjguMiA4LjUuMSA4LjEgMCA3LjcgMCA3LjMuMWMtLjMuMi0uNS40LS43LjdMNSA0LjJsLTMuOC42Yy0uNCAwLS43LjItLjkuNS0uMi4zLS4zLjctLjMgMS4xIDAgLjMuMi42LjQuOGwyLjcgMi42LS42IDMuN2MtLjEuNCAwIC44LjIgMS4xLjIuMy41LjUuOS42LjMuMS43IDAgMS0uMmwzLjItMS43IDMuNCAxLjhjLjIuMS40LjEuNi4xLjIgMCAuNCAwIC41LS4xLjQtLjEuNy0uNC44LS44LjEtLjIuMS0uNS4xLS44bC0uNi0zLjcgMi43LTIuNmMuNy0uNS43LTEuNC4xLTJ6bS0uNyAxLjRsLTIuOSAyLjhjLS4xLjEtLjIuMy0uMS40bC43IDMuOWMwIC4xIDAgLjIgMCAuMi0uMS4zLS40LjQtLjYuM2wtMy42LTEuOXMtLjEgMC0uMSAwYy0uMSAwLS4yIDAtLjMgMGwtMy41IDEuOGMtLjEuMS0uMi4xLS4zLjEtLjIgMC0uNC0uMy0uNC0uNWwuNy00YzAtLjIgMC0uMy0uMS0uNEwxLjEgNi41YzAtLjEtLjEtLjItLjEtLjMgMC0uMSAwLS4yLjEtLjMuMS0uMS4yLS4xLjMtLjJsNC0uNmMuMiAwIC4zLS4xLjQtLjNsMS43LTMuNmMwLS4xLjEtLjIuMi0uMi4yIDAgLjMgMCAuNCAwIC4xIDAgLjIuMS4zLjNsMS44IDMuNmMuMS4xLjIuMi40LjNsMy45LjZjLjEgMCAuMi4xLjIuMS4yLjIuMi41IDAgLjd6IiBjbGFzcz0ic3QwIi8+PC9zdmc+) no-repeat;
  background-size: auto 100%;
  display: block;
}

.sq-item-rating .rating-a .rating>* .fill {
  right: auto;
  z-index: 2;
  background: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNS45IDE1LjMiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDE1LjkgMTUuMyI+PHN0eWxlIHR5cGU9InRleHQvY3NzIj4uc3Qwe2ZpbGw6I0VFNzAyNTt9PC9zdHlsZT48cGF0aCBkPSJNMTQuNyA0LjhMMTEgNC4yIDkuMy45QzkuMS41IDguOC4yIDguNS4xIDguMSAwIDcuNyAwIDcuMy4xYy0uMy4yLS41LjQtLjcuN0w1IDQuMmwtMy44LjZjLS40IDAtLjcuMi0uOS41LS4yLjMtLjMuNy0uMyAxLjEgMCAuMy4yLjYuNC44bDIuNyAyLjYtLjYgMy43Yy0uMS40IDAgLjguMiAxLjEuMi4zLjUuNS45LjYuMy4xLjcgMCAxLS4ybDMuMi0xLjcgMy40IDEuOGMuMi4xLjQuMS42LjEuMiAwIC40IDAgLjUtLjEuNC0uMS43LS40LjgtLjguMS0uMi4xLS41LjEtLjhsLS42LTMuNyAyLjctMi42Yy42LS42LjYtMS41IDAtMi4xLS4xLS4xLS4zLS4zLS42LS4zeiIgY2xhc3M9InN0MCIvPjwvc3ZnPg==) no-repeat;
  background-size: auto 100%;
  display: block;
}

.sq-item-rating .rating-a a {
  display: block;
  width: 100%;
  font-weight: 300;
  font-size: 0.65em;
  text-decoration: underline;
}

.sq-item-rating .list-collection .rating-a {
  font-size: 20px;
}

.sq-item-rating .rating-a .rating>*:before,
.rating-a .rating>* .fill {
  content: "";
  display: block;
  overflow: hidden;
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  text-align: left;
  text-indent: -3000em;
}

.sq-price-range {
  width: 260px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sq-price-range .labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #334155;
}

.sq-price-range .range {
  position: relative;
  height: 32px;
  display: flex;
  align-items: center;
}

.sq-price-range input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: #e5e7eb;
  border-radius: 999px;
  outline: none;
  position: relative;
}

.sq-price-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
  cursor: pointer;
}

.sq-price-range input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
  cursor: pointer;
}

.sq-price-range .track-fill {
  position: absolute;
  height: 4px;
  background: #0ea5e9;
  border-radius: 999px;
  pointer-events: none;
}

.sq-item-card{
  height: 100%;
  min-height: 315px;
}

.sq-item-card p {
  margin: 5px;
  font-size: 16px;
}

@media(max-width: 767px) {
  .sq-item-grid {
    grid-template-columns: repeat(var(--sq-cols-sm, 2), minmax(0, 1fr));
    gap: 8px;
    margin: 6px 0;
  }
}