/* ============================================================================
   shop.css — listing toolbar, category chips and pagination.
   Product cards, skeletons and the empty state come from storefront.css.
   Flat, neutral styling; hover and focus change color or border only.
   ========================================================================== */

.shop-page .section-heading { margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }

/* ---------- Toolbar ------------------------------------------------------- */
.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .9rem;
  justify-content: space-between;
  padding: .85rem 1rem;
  margin-bottom: 1.25rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.search-field {
  position: relative;
  flex: 1 1 260px;
  min-width: 0;
  max-width: 440px;
}
.search-field .icon {
  position: absolute;
  inset-inline-start: .95rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}
.search-field input {
  width: 100%;
  padding: .7rem 2.6rem;
  border: 1px solid #cfcfca;
  border-radius: var(--radius);
  background: #fff;
  transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}
.search-field input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}

.sort-field {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.sort-field .icon {
  position: absolute;
  inset-inline-start: .85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}
.sort-field select {
  appearance: none;
  -webkit-appearance: none;
  padding: .7rem 2.4rem;
  border: 1px solid #cfcfca;
  border-radius: var(--radius);
  background: #fff;
  font-weight: 600;
  font-size: .93rem;
  cursor: pointer;
  transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}
.sort-field select:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}
.sort-field::after {
  content: '';
  position: absolute;
  inset-inline-end: .95rem;
  top: 50%;
  width: 7px;
  height: 7px;
  border-inline-end: 1.5px solid var(--text-muted);
  border-block-end: 1.5px solid var(--text-muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

/* ---------- Results count ------------------------------------------------- */
.shop-count {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: .92rem;
  font-weight: 500;
}
.shop-count:empty { display: none; }

/* ---------- Category chips ------------------------------------------------ */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-muted);
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--speed) var(--ease), color var(--speed) var(--ease),
              border-color var(--speed) var(--ease);
}
.chip:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.chip.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ---------- Pagination ---------------------------------------------------- */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
}
.pagination[hidden] { display: none; }

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  min-width: 42px;
  height: 42px;
  padding-inline: .7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  font-weight: 600;
  font-size: .92rem;
  cursor: pointer;
  transition: background var(--speed) var(--ease), color var(--speed) var(--ease),
              border-color var(--speed) var(--ease);
}
.page-btn:hover:not(:disabled):not(.is-active) {
  border-color: var(--ink);
  background: var(--primary-soft);
}
.page-btn.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.page-btn:disabled { opacity: .4; cursor: default; }
.page-btn .icon { width: 16px; height: 16px; }

.page-ellipsis {
  min-width: 26px;
  text-align: center;
  color: var(--text-muted);
  font-weight: 600;
}

/* ---------- Responsive ---------------------------------------------------- */
@media (max-width: 720px) {
  .shop-toolbar { flex-direction: column; align-items: stretch; }
  .search-field { max-width: none; }
  .sort-field { width: 100%; }
  .sort-field select { width: 100%; }
}
@media (max-width: 400px) {
  .page-btn { min-width: 38px; height: 38px; }
}