/* Catalog page: /catalog/ and /catalog/<slug>/.
   The product tiles themselves come from product-card.css - this file owns
   the page around them: heading, toolbar, the table view and paging. */

.catalog-page {
  padding-block: 18px 8px;
}

.catalog-heading {
  margin-block: 18px 0;
}

.catalog-heading h1 {
  color: var(--site-text);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.08;
}

.catalog-heading__text {
  max-width: 900px;
  margin-block-start: 12px;
  color: var(--site-text-muted);
  font-size: 15px;
  line-height: 1.6;
  text-wrap: pretty;
}

/* Wider tiles than the product grid below (three per row, not five) - a
   handful of category names read better at this size than squeezed into
   five narrow columns, and three currently divides the six root
   categories into two even rows. Left-aligned, like the heading and
   breadcrumbs above it: a category page's lone subcategory tile sits at
   the leading edge with its siblings, not floating mid-row on its own. */
.catalog-children {
  --catalog-tile-columns: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-block-start: 20px;
}

.catalog-children > * {
  flex: 0 0 calc((100% - (var(--catalog-tile-columns) - 1) * 12px) / var(--catalog-tile-columns));
  min-width: 0;
}


/* The filters trigger uses the shared .site-button--ghost skin; this file
   only owns its placement in the catalog toolbar. */

/* Filter controls deliberately mirror the admin control geometry while
   staying in storefront tokens. The trigger itself is promoted to the
   shared accent button whenever at least one filter is active. */
.catalog-filters-trigger.site-button--ghost {
  border-color: var(--site-border);
}

.catalog-filters-trigger.site-button--ghost:hover {
  border-color: var(--site-border-strong);
  background: var(--site-surface-raised);
  color: var(--site-text);
}

.catalog-filters-toolbar-reset[hidden] {
  display: none;
}

.catalog-filters-toolbar-reset {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--site-text-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: color 120ms var(--site-ease);
}

.catalog-filters-toolbar-reset:hover,
.catalog-filters-toolbar-reset:focus-visible {
  color: var(--site-accent);
}

.catalog-filters-toolbar-reset:focus-visible {
  outline: 2px solid rgba(139, 200, 80, .35);
  outline-offset: 3px;
  border-radius: 5px;
}

.catalog-filters-toolbar-reset svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.catalog-filters-modal .site-modal__header p {
  margin: 4px 0 0;
  color: var(--site-text-muted);
  font-size: 13px;
}

.catalog-filters-modal {
  height: min(640px, calc(100dvh - 48px));
}

.catalog-filters-modal .site-modal__shell {
  height: 100%;
}

.catalog-filters-modal .site-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-block-end: 24px;
}

.catalog-quick-filters {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.catalog-quick-filter {
  position: relative;
}

/* /model/<brand>/<key>/: the model's part categories are catalog tiles
   (.catalog-children + .home-category-card) with a count; the selected one
   is outlined in the accent. The chip variant below is the search page's
   model list. */
.catalog-model-categories[hidden] {
  display: none;
}

.catalog-model-categories .home-category-card.is-active {
  border-color: var(--site-accent);
}

.catalog-model-categories__chip {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--site-border);
  border-radius: 8px;
  color: var(--site-text);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: border-color 120ms var(--site-ease), background-color 120ms var(--site-ease), color 120ms var(--site-ease);
}

.catalog-model-categories__chip:hover {
  border-color: var(--site-border-strong);
  background: var(--site-surface-raised);
}

.catalog-model-categories__chip:focus-visible {
  border-color: var(--site-accent);
  outline: 2px solid rgba(139, 200, 80, .28);
  outline-offset: 2px;
}

.catalog-model-categories__count {
  color: var(--site-text-muted);
  font-weight: 600;
}

.catalog-model-categories__chip.is-active {
  border-color: var(--site-accent);
  background: var(--site-accent);
  color: var(--site-accent-contrast);
}

.catalog-model-categories__chip.is-active:hover {
  border-color: var(--site-accent-hover);
  background: var(--site-accent-hover);
}

.catalog-model-categories__chip.is-active .catalog-model-categories__count {
  color: inherit;
  opacity: .7;
}

.catalog-quick-filter__trigger {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  padding: 0 11px 0 12px;
  border: 1px solid var(--site-border);
  border-radius: 8px;
  background: transparent;
  color: var(--site-text);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  outline: 0;
  transition: border-color 120ms var(--site-ease), background-color 120ms var(--site-ease), color 120ms var(--site-ease);
}

.catalog-quick-filter__trigger:hover {
  border-color: var(--site-border-strong);
  background: var(--site-surface-raised);
  color: var(--site-text);
}

.catalog-quick-filter.is-active .catalog-quick-filter__trigger {
  border-color: var(--site-accent);
  background: var(--site-accent);
  color: var(--site-accent-contrast);
}

.catalog-quick-filter.is-active .catalog-quick-filter__trigger:hover,
.catalog-quick-filter.is-active .catalog-quick-filter__trigger:focus-visible {
  border-color: var(--site-accent-hover);
  background: var(--site-accent-hover);
  color: var(--site-accent-contrast);
}

.catalog-quick-filter.is-active .catalog-quick-filter__trigger svg {
  color: currentColor;
}

.catalog-quick-filter__trigger:focus-visible {
  border-color: var(--site-accent);
  outline: 2px solid rgba(139, 200, 80, .28);
  outline-offset: 1px;
}

.catalog-quick-filter__trigger svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: none;
  color: #bcc3cc;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 120ms var(--site-ease);
}

.catalog-quick-filter.is-open .catalog-quick-filter__trigger svg {
  transform: rotate(180deg);
}

.catalog-quick-filter__menu {
  position: absolute;
  z-index: 70;
  inset-block-start: calc(100% + 6px);
  inset-inline-start: 50%;
  width: max-content;
  transform: translateX(-50%);
  min-width: 220px;
  max-width: min(360px, calc(100vw - 24px));
  box-sizing: border-box;
  overflow: hidden;
  padding: 6px;
  border: 1px solid var(--site-border-strong);
  border-radius: 10px;
  background: var(--site-surface);
  box-shadow: 0 8px 16px rgba(0, 0, 0, .65), 0 20px 40px rgba(0, 0, 0, .35);
}

.catalog-quick-filter__menu[hidden] {
  display: none;
}

.catalog-quick-filter--price .catalog-quick-filter__menu {
  width: 240px;
}

.catalog-quick-filter--brand .catalog-quick-filter__menu {
  width: 320px;
}

.catalog-quick-filter__price-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.catalog-quick-filter__price-fields label {
  display: grid;
  gap: 6px;
  color: #9aa1ab;
  font-size: 12px;
  font-weight: 600;
}

.catalog-quick-filter__price-fields input,
.catalog-quick-filter__search {
  width: 100%;
  height: 42px;
  box-sizing: border-box;
  padding: 0 12px;
  border: 1px solid #343941;
  border-radius: 8px;
  background: #1e2126;
  color: #e9ecef;
  font: inherit;
  font-size: 14px;
  outline: 0;
}

.catalog-quick-filter__price-fields input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.catalog-quick-filter__price-fields input[type="number"]::-webkit-inner-spin-button,
.catalog-quick-filter__price-fields input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.catalog-quick-filter__price-fields input:focus,
.catalog-quick-filter__search:focus {
  border-color: var(--site-accent);
  box-shadow: inset 0 0 0 1px var(--site-accent);
}

.catalog-quick-filter__apply {
  width: 100%;
  min-height: 38px;
  margin-block-start: 8px;
}

.catalog-quick-filter__option {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 36px 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--site-text);
  font: inherit;
  font-size: 14px;
  text-align: start;
  cursor: pointer;
}

/* Same option look as the sort menu and the checkout suggestions: the
   chosen one in accent text with a check, the highlighted one filled. */
.catalog-quick-filter__option[aria-selected="true"] {
  color: var(--site-accent);
}

.catalog-quick-filter__option:not(:disabled):hover,
.catalog-quick-filter__option:focus-visible {
  background: var(--site-accent);
  color: var(--site-accent-contrast);
  box-shadow: none;
  outline: 0;
}

.catalog-quick-filter__option:disabled {
  opacity: .45;
  cursor: default;
}

.catalog-quick-filter__option-check {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: 12px;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.catalog-quick-filter__search-wrap {
  position: relative;
}

.catalog-quick-filter__search-wrap > svg {
  position: absolute;
  z-index: 1;
  inset-block-start: 50%;
  inset-inline-start: 12px;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  fill: none;
  color: #9aa1ab;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}

.catalog-quick-filter__search {
  padding-inline-start: 38px;
}

.catalog-quick-filter__search::placeholder {
  color: #737b86;
}

.catalog-quick-filter__options {
  display: grid;
  max-height: 220px;
  overflow-y: auto;
  gap: 2px;
  padding-block-start: 6px;
  scrollbar-width: none;
}

.catalog-quick-filter__options::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.catalog-check-option {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--site-text);
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color 120ms var(--site-ease);
}

/* A checked option is accent text without a fill, like the dropdowns'
   chosen one. The hover stays neutral: a click here only ticks the box
   (Apply commits), so the accent fill is left to Apply. */
.catalog-check-option:has(.catalog-filter-checkbox:checked) {
  color: var(--site-accent);
}

.catalog-check-option:hover,
.catalog-check-option:has(.catalog-filter-checkbox:focus-visible) {
  background: var(--site-surface-raised);
}

.catalog-check-option__label {
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
}

.catalog-filter-checkbox {
  position: relative;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 1.5px solid #454b56;
  border-radius: 4px;
  background: #101215;
  cursor: pointer;
  transition: background-color 150ms var(--site-ease), border-color 150ms var(--site-ease);
}

.catalog-filter-checkbox:hover {
  border-color: var(--site-accent);
}

.catalog-filter-checkbox:checked {
  border-color: var(--site-accent);
  background: var(--site-accent);
}

.catalog-filter-checkbox::after {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  width: 4px;
  height: 8px;
  border: solid var(--site-accent-contrast);
  border-width: 0 2px 2px 0;
  content: "";
  opacity: 0;
  transform: translate(-50%, -55%) rotate(45deg) scale(.4);
  transform-origin: center;
  transition: opacity 120ms var(--site-ease), transform 180ms var(--site-ease);
}

.catalog-filter-checkbox:checked::after {
  opacity: 1;
  transform: translate(-50%, -55%) rotate(45deg) scale(1);
}

.catalog-filter-checkbox:focus-visible {
  outline: 2px solid rgba(139, 200, 80, .4);
  outline-offset: 1px;
}

.catalog-filter-modal-empty {
  margin: 0;
  padding: 28px 16px;
  color: var(--site-text-muted);
  font-size: 14px;
  text-align: center;
}

.catalog-filters-modal .site-modal__footer .site-button:disabled {
  opacity: .45;
  cursor: default;
}


.catalog-filters-modal .site-modal__body,
.catalog-filter-dropdown__options {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.catalog-filters-modal .site-modal__body::-webkit-scrollbar,
.catalog-filter-dropdown__options::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.catalog-filter-section {
  padding: 12px 4px 14px;
}

.catalog-filter-section + .catalog-filter-section {
  border-block-start: 1px solid var(--site-border);
}

.catalog-filter-section__title {
  margin: 0 0 8px;
  color: var(--site-text);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
}

.catalog-filter-dropdown {
  position: relative;
  min-width: 0;
}

.catalog-filter-dropdown__trigger {
  display: flex;
  width: 100%;
  height: 42px;
  box-sizing: border-box;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px 0 14px;
  border: 1px solid #343941;
  border-radius: 8px;
  background: #171a1f;
  color: #e9ecef;
  font: inherit;
  font-size: 14px;
  text-align: start;
  cursor: pointer;
  outline: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .015);
  transition: border-color 150ms var(--site-ease), box-shadow 150ms var(--site-ease), background-color 150ms var(--site-ease);
}

.catalog-filter-dropdown__trigger:hover {
  border-color: #343941;
  background: #171a1f;
}

.catalog-filter-dropdown__trigger:focus-visible {
  border-color: var(--site-accent);
  box-shadow: none;
}

.catalog-filter-dropdown__value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-filter-dropdown:not(.has-value) .catalog-filter-dropdown__value {
  color: #737b86;
}

.catalog-filter-dropdown__trigger > svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  color: #bcc3cc;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 120ms var(--site-ease), color 120ms var(--site-ease);
}

.catalog-filter-dropdown.is-open .catalog-filter-dropdown__trigger > svg {
  transform: rotate(180deg);
}

@keyframes catalog-filter-dropdown-menu-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.catalog-filter-dropdown__menu {
  position: absolute;
  z-index: 40;
  inset-block-start: calc(100% + 6px);
  inset-inline: 0;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  padding: 6px;
  border: 1px solid var(--site-border-strong);
  border-radius: 10px;
  background: var(--site-surface);
  box-shadow: 0 8px 16px rgba(0, 0, 0, .65), 0 20px 40px rgba(0, 0, 0, .35);
  transform-origin: top center;
  animation: catalog-filter-dropdown-menu-in 140ms var(--site-ease);
}

.catalog-filter-dropdown__menu[hidden] {
  display: none;
}

.catalog-filter-dropdown__search-wrap {
  position: relative;
  margin-block-end: 6px;
}

.catalog-filter-dropdown__search-wrap > svg {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 12px;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  fill: none;
  color: #9aa1ab;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}

.catalog-filter-dropdown__search {
  width: 100%;
  height: 42px;
  padding: 0 12px 0 38px;
  border: 1px solid #343941;
  border-radius: 8px;
  background: #1e2126;
  color: #e9ecef;
  font: inherit;
  font-size: 14px;
  outline: 0;
}

.catalog-filter-dropdown__search::placeholder {
  color: #737b86;
}

.catalog-filter-dropdown__search:hover:not(:focus):not(:disabled) {
  background: #1e2126;
}

.catalog-filter-dropdown__search:focus {
  background: #1e2126;
  border-color: var(--site-accent);
  box-shadow: inset 0 0 0 1px var(--site-accent);
}

.catalog-filter-dropdown__options {
  display: grid;
  max-height: 220px;
  overflow-y: auto;
  gap: 2px;
}

.catalog-filter-dropdown__option {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 36px 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--site-text);
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  text-align: start;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background-color 150ms var(--site-ease), color 150ms var(--site-ease);
}

/* Same option look as .catalog-quick-filter__option above. */
.catalog-filter-dropdown__option[aria-selected="true"] {
  color: var(--site-accent);
}

.catalog-filter-dropdown__option:not(:disabled):hover,
.catalog-filter-dropdown__option:focus-visible {
  background: var(--site-accent);
  color: var(--site-accent-contrast);
  box-shadow: none;
  outline: 0;
}

.catalog-filter-dropdown__option:disabled {
  color: var(--site-text-subtle);
  cursor: default;
  opacity: .5;
}

.catalog-filter-dropdown__option:disabled:hover {
  background: transparent;
}

.catalog-filter-dropdown__option-label {
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
}

.catalog-filter-dropdown__option-count {
  flex: 0 0 auto;
  color: #9aa1ab;
  font-size: 12px;
}

.catalog-filter-dropdown__option-check {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: 12px;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.catalog-filter-dropdown__empty {
  margin: 4px 0 0;
  padding: 10px;
  color: #9aa1ab;
  font-size: 14px;
  text-align: center;
}

html.catalog-filters-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .catalog-filter-dropdown__menu {
    animation: none;
  }

  .catalog-filter-dropdown__trigger,
  .catalog-filter-dropdown__trigger > svg,
  .catalog-filter-dropdown__option {
    transition: none;
  }
}

@media (max-width: 520px) {
  .catalog-filters-modal {
    width: calc(100vw - 20px);
    height: calc(100dvh - 20px);
    max-height: calc(100dvh - 20px);
  }
}

.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 14px 18px;
  margin-block: 24px 16px;
  padding-block-end: 16px;
  border-block-end: 1px solid var(--site-border);
}

.catalog-toolbar__controls {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.catalog-filter-group[hidden],
.catalog-filters-trigger[hidden] {
  display: none !important;
}

.catalog-filter-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.catalog-filter-group__label {
  color: var(--site-text-subtle);
  font-size: 13px;
}

.catalog-sort {
  position: relative;
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--site-text-subtle);
  font-size: 13px;
}

.catalog-view-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.catalog-view-group__label {
  color: var(--site-text-subtle);
  font-size: 13px;
}

/* View switch: two segments of one control, the pressed one filled. */
.catalog-view {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--site-border);
  border-radius: 10px;
  background: var(--site-surface);
  transition: border-color 120ms var(--site-ease);
}

.catalog-view:hover {
  border-color: var(--site-border-strong);
}

.catalog-view__button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--site-text-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 120ms var(--site-ease), color 120ms var(--site-ease);
}

.catalog-view__button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.catalog-view__button:hover {
  background: var(--site-surface-raised);
  color: var(--site-text);
}

.catalog-view__button[aria-pressed="true"] {
  background: var(--site-accent);
  color: var(--site-accent-contrast);
}

.catalog-view__button[aria-pressed="true"]:hover {
  background: var(--site-accent-hover);
  color: var(--site-accent-contrast);
}

.catalog-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

/* Table view follows the same structural contract as the admin grid-table:
   one shared column template for header/body rows, one border around each
   body row, 8px row gaps and row-level hover depth. Storefront tokens and
   storefront-specific content stay separate from admin CSS. */
.catalog-grid[hidden],
.catalog-table-wrap[hidden] {
  display: none !important;
}

.catalog-table-wrap {
  width: 100%;
  overflow-x: auto;
  padding-block: 2px 4px;
}

.catalog-table {
  --catalog-table-cols:
    84px
    124px
    minmax(260px, 1fr)
    116px
    122px
    126px
    64px;
  min-width: 1040px;
  display: grid;
  grid-template-columns: var(--catalog-table-cols);
  gap: 8px;
}

.catalog-table > .catalog-table__row--head,
.catalog-table > .catalog-table__body,
.catalog-table > .catalog-table__body > .catalog-table__row {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  align-items: center;
}

.catalog-table__row--head {
  min-height: 38px;
  position: relative;
  z-index: 1;
  border-radius: 10px;
  background: var(--site-bg);
}

.catalog-table__row--head > * {
  min-width: 0;
  padding: 10px 12px;
  color: var(--site-text-subtle);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.2;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.catalog-table__body {
  gap: 8px;
}

.catalog-table__row:not(.catalog-table__row--head) {
  min-height: 78px;
  overflow: hidden;
  border: 1px solid var(--site-border);
  border-radius: 10px;
  background: var(--site-surface);
  transition: box-shadow 120ms var(--site-ease), border-color 120ms var(--site-ease);
}

@media (hover: hover) {
  .catalog-table__row:not(.catalog-table__row--head):hover {
    border-color: var(--site-border-strong);
    box-shadow: 0 3px 10px rgba(0, 0, 0, .20);
  }
}

.catalog-table__row:not(.catalog-table__row--head) > * {
  min-width: 0;
  padding: 8px 12px;
}

.catalog-table__media {
  text-align: center;
}

.catalog-table__brand {
  text-align: center;
}

.catalog-table__stock,
.catalog-table__price,
.catalog-table__quantity,
.catalog-table__action {
  text-align: center;
}

.catalog-table__row--head .catalog-table__media,
.catalog-table__row--head .catalog-table__brand,
.catalog-table__row--head .catalog-table__stock,
.catalog-table__row--head .catalog-table__price,
.catalog-table__row--head .catalog-table__quantity,
.catalog-table__row--head .catalog-table__action {
  text-align: center;
}

.catalog-row__media {
  display: grid;
  width: 60px;
  height: 60px;
  margin-inline: auto;
  overflow: hidden;
  border-radius: 8px;
  background: var(--site-surface-light);
  color: var(--site-text-subtle);
  text-decoration: none;
  place-items: center;
  outline: 1px solid rgba(255, 255, 255, .10);
  outline-offset: -1px;
  transition: outline-color 120ms var(--site-ease);
}

.catalog-row__media:hover,
.catalog-row__media:focus-visible {
  outline-color: var(--site-border-strong);
}

.catalog-row__media:focus-visible {
  box-shadow: var(--site-focus);
}

.catalog-row__media img {
  width: 100%;
  height: 100%;
  padding: 5px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.catalog-row__placeholder {
  width: 22px;
  height: 22px;
  color: #9aa197;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.catalog-row__brand {
  display: block;
  overflow: hidden;
  color: var(--site-text-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-row__sku {
  display: block;
  margin-block-start: 5px;
  overflow: hidden;
  color: var(--site-text-muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-row__name {
  display: -webkit-box;
  width: fit-content;
  max-width: 100%;
  max-height: 40px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--site-text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  text-wrap: pretty;
  transition: color 120ms var(--site-ease);
}

.catalog-row__name:hover,
.catalog-row__name:focus-visible {
  color: var(--site-accent);
}

.catalog-row__name:focus-visible {
  outline: 2px solid var(--site-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.catalog-table__stock .home-product-card__stock {
  justify-content: center;
}

.catalog-row__prices {
  display: grid;
  min-height: 34px;
  justify-items: center;
  align-content: center;
  gap: 3px;
}

.catalog-row__old-price {
  color: var(--site-text-subtle);
  font-size: 11px;
  line-height: 1;
  text-decoration: line-through;
  white-space: nowrap;
}

.catalog-row__price {
  color: var(--site-text);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.1;
  white-space: nowrap;
}

.catalog-row__price.is-discounted {
  color: var(--site-danger);
}

.catalog-row__quantity-control {
  margin-inline: auto;
}

.catalog-row__buy {
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  gap: 0;
  padding: 0;
  border-radius: 9px;
  overflow: hidden;
  white-space: nowrap;
  transition:
    width 150ms cubic-bezier(0.2, 0, 0, 1),
    min-width 150ms cubic-bezier(0.2, 0, 0, 1),
    gap 150ms cubic-bezier(0.2, 0, 0, 1),
    padding 150ms cubic-bezier(0.2, 0, 0, 1),
    background-color 120ms var(--site-ease),
    scale 120ms var(--site-ease);
}

.catalog-row__buy svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}

.catalog-table__row.is-in-cart .catalog-table__quantity {
  display: none;
}

.catalog-table__row.is-in-cart .catalog-table__action {
  grid-column: 6 / 8;
  padding-inline: 12px;
}

.catalog-table__row.is-in-cart .catalog-row__buy {
  width: 146px;
  min-width: 146px;
  gap: 8px;
  padding: 0 14px;
}

.catalog-table__row.is-in-cart .catalog-row__buy [data-cart-label] {
  line-height: 1;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .catalog-row__buy {
    transition: none;
  }
}

.catalog-row__buy:disabled {
  border-color: var(--site-border);
  background: var(--site-surface-soft);
  color: var(--site-text-subtle);
  cursor: not-allowed;
}


.catalog-empty,
.catalog-error {
  margin: 0;
  padding-block: 48px;
  color: var(--site-text-muted);
  font-size: 15px;
  text-align: center;
}

.catalog-error {
  color: var(--site-danger);
}

/* Hybrid paging: the button appends, the numbered links stay real
   addresses so a page can be opened, shared and crawled directly. */
.catalog-pagination[hidden],
.catalog-pagination__more[hidden] {
  display: none !important;
}

.catalog-pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-block: 28px 8px;
}

.catalog-pages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.catalog-pages__link {
  min-width: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid var(--site-border);
  border-radius: 9px;
  background: var(--site-surface);
  color: var(--site-text-muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 120ms var(--site-ease), border-color 120ms var(--site-ease), color 120ms var(--site-ease);
}

.catalog-pages__link:hover,
.catalog-pages__link:focus-visible {
  border-color: var(--site-border-strong);
  color: var(--site-text);
}

.catalog-pages__link.is-current {
  border-color: var(--site-accent);
  background: var(--site-accent);
  color: var(--site-accent-contrast);
}

@media (max-width: 1180px) {
  .catalog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .catalog-quick-filters {
    width: 100%;
  }

  .catalog-quick-filter {
    flex: 1 1 auto;
  }

  .catalog-quick-filter__trigger {
    width: 100%;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-children {
    --catalog-tile-columns: 2;
  }

  .catalog-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

}

@media (max-width: 520px) {
  .catalog-quick-filter {
    flex: 1 1 calc(50% - 4px);
  }

  .catalog-quick-filter--brand {
    flex-basis: 100%;
  }

  .catalog-quick-filter__menu {
    max-width: calc(100vw - 20px);
  }

  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .catalog-children {
    --catalog-tile-columns: 1;
  }

  .catalog-view__button span {
    display: none;
  }

  .catalog-view__button {
    padding: 0 10px;
  }
}

/* Chosen quantity above the known stock (storefront.js applyStockLimit):
   looks disabled, stays focusable so its label/title can be read. */
.catalog-row__buy.is-over-stock,
.catalog-row__buy.is-over-stock:hover {
  border-color: var(--site-border);
  background: var(--site-surface-soft);
  color: var(--site-text-subtle);
  cursor: not-allowed;
}


/* Search page: appliance models matching the query, under the products -
   one row of model chips (.catalog-model-categories__chip) per type. */
.catalog-search-models {
  display: grid;
  gap: 16px;
  margin-block: 32px 0;
  padding-block-start: 24px;
  border-block-start: 1px solid var(--site-border);
}

.catalog-search-models[hidden] {
  display: none;
}

.catalog-search-models__title {
  margin: 0;
  color: var(--site-text);
  font-size: 20px;
  font-weight: 800;
}

.catalog-search-models__groups,
.catalog-search-models__group {
  display: grid;
  gap: 10px;
}

.catalog-search-models__groups {
  gap: 18px;
}

.catalog-search-models__type {
  margin: 0;
  color: var(--site-text-muted);
  font-size: 13px;
  font-weight: 700;
}

.catalog-search-models__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
