/* Catalog controls keep a quiet hierarchy around the product photography. */
.nk-catalog-results > .nk-active-filters { order: initial; min-width: 0; }
.nk-catalog-results > .nk-active-filters li { min-width: 0; max-width: 100%; }
.nk-catalog-results > .nk-active-filters a { overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .nk-catalog-toolbar {
    display: grid; grid-template-columns: repeat(2, minmax(0, 128px));
    justify-content: start; gap: 8px;
  }
  .nk-catalog-toolbar .nk-toolbar-button {
    min-width: 0; width: 100%; min-height: var(--compact-control-height);
    padding-inline: var(--compact-control-padding); gap: var(--compact-control-gap);
    font-size: 14px; line-height: 1.4;
  }
  .nk-catalog-toolbar .filter-sheet-trigger {
    border-color: var(--btn); background: var(--btn); color: var(--on-btn);
  }
  .filter-sheet-trigger .nk-count {
    min-width: 20px; height: 20px; background: var(--on-accent); color: var(--accent-dark);
  }
  .nk-sort-value { min-width: 0; overflow-wrap: anywhere; }
  .nk-sort-select.is-enhanced select { opacity: 0; }
  .nk-sort-select:not(.is-enhanced) > :is(.icon, .nk-sort-value) { visibility: hidden; }
  .nk-sort-select:focus-within { outline: 2px solid var(--accent-dark); outline-offset: 3px; }
  .nk-catalog-toolbar .filter-sheet-trigger:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
  .nk-sort-select:hover { background: var(--soft); }
}
@media (max-width: 800px) {
  .nk-catalog-page-bar {
    display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px;
    min-height: var(--header-height); padding-block: calc(10px + var(--safe-top)) 10px;
    border-bottom: 0;
  }
  .nk-catalog-page-bar .nk-icon-btn { border-color: transparent; background: var(--surface); }
  .nk-catalog-page-bar .nk-icon-btn .icon { width: 21px; height: 21px; }
  .nk-catalog-page-bar .nk-badge { top: 0; left: 0; }
  .nk-catalog-head { display: flex; gap: 2px; padding: 14px var(--gutter) 2px; }
  .nk-catalog-head .nk-breadcrumb { display: none; }
  .nk-catalog-title { align-items: center; justify-content: space-between; gap: 12px; }
  .nk-catalog-title h1 { min-width: 0; font-size: clamp(32px, 9vw, 48px); line-height: 1.3; overflow-wrap: anywhere; }
  .nk-catalog-title > span {
    flex: none; padding: 4px 10px; border-radius: 999px; background: var(--soft); font-size: 14px;
  }
  .nk-catalog-lead { margin: 0; font-size: 17px; line-height: 1.7; }
  .nk-catalog-results { gap: 12px; padding-top: 0; }
  .nk-catalog-toolbar {
    position: sticky; top: var(--header-height); z-index: 20;
    margin-top: 0; padding-block: 8px; background: var(--bg);
  }
  .nk-active-filters { display: flex; gap: 6px; margin-block: -12px -4px; }
}
@media (max-width: 360px) {
  .nk-catalog-title h1 { font-size: 28px; }
  .nk-catalog-toolbar { gap: 8px; }
}

/* The phone search lives in the page bar, between the back and bag buttons. */
.nk-catalog-search { position: relative; display: flex; align-items: center; gap: 4px; min-width: 0; height: 44px; margin: 0; padding: 0 4px 0 14px; border-radius: 999px; background: var(--soft); }
.nk-catalog-search:focus-within { outline: 0; background: var(--surface); }
.nk-catalog-search > input[type="search"] { flex: 1; width: 0; min-width: 0; min-height: 0; height: 44px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 400 16px var(--font); }
.nk-catalog-search > button { display: grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 999px; background: var(--surface); color: var(--accent-dark); cursor: pointer; }
.nk-catalog-search > button .icon { width: 16px; height: 16px; }
.nk-catalog-search .nk-search-panel.is-inline:not([hidden]) { position: absolute; inset: calc(100% + 8px) 0 auto; z-index: 45; width: 100%; min-height: 0; max-height: min(60dvh, 440px); overflow-y: auto; border-radius: 16px; }
@media (min-width: 801px) { .nk-catalog-search { display: none; } }
.nk-catalog-continuation {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 80px; padding: 16px 0; gap: 12px; overflow-anchor: none;
}
.nk-catalog-load-state {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--muted); font-size: 14px; line-height: 1.8; text-align: center;
}
.nk-catalog-loader { display: inline-flex; align-items: center; gap: 6px; height: 20px; }
.nk-catalog-loader i {
  display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-dark);
  animation: nk-catalog-pulse 1s ease-in-out infinite;
}
.nk-catalog-loader i:nth-child(2) { animation-delay: .15s; }
.nk-catalog-loader i:nth-child(3) { animation-delay: .3s; }
.nk-catalog-continuation.has-error .nk-catalog-load-state { color: var(--red); }
.nk-catalog-results.is-loading .nk-catalog-continuation { visibility: hidden; }
@keyframes nk-catalog-pulse {
  0%, 70%, 100% { transform: translateY(0); opacity: .4; }
  35% { transform: translateY(-5px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .nk-catalog-loader i { animation: none; opacity: .75; }
}
