.yf-catalog-discovery {
  display: none;
  margin: 12px 0 21px;
  color: var(--yf-color-ink);
}
.yf-catalog-ready .yf-catalog-discovery { display: block; }
.yf-catalog-category-rail,
.yf-catalog-subcategory-rail,
.yf-catalog-actions,
.yf-catalog-active-filters {
  display: flex;
  align-items: center;
  gap: 8px;
}
.yf-catalog-category-rail { display: none; }
.yf-catalog-category-shell { display: none; }
.yf-category-swipe-hint { display: none; }
.woocommerce.archive #secondary .product-categories li a { border-bottom: 0 !important; }
.yf-catalog-subcategory-rail {
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.yf-catalog-category-rail a,
.yf-catalog-subcategory-rail a {
  flex: none;
  padding: 7px 12px;
  border: 1px solid var(--yf-color-line-strong);
  border-radius: 999px;
  color: var(--yf-color-text);
  font-size: 13px;
  text-decoration: none;
}
.yf-catalog-category-rail a.is-current,
.yf-catalog-subcategory-rail a.is-current {
  border-color: var(--yf-color-ink);
  background: var(--yf-color-ink);
  color: var(--yf-color-white);
}
.yf-catalog-toolbar {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.yf-catalog-controls {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  align-items: center;
}
.yf-catalog-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 38px;
  padding: 7px 15px;
  border: 1px solid var(--yf-color-line-strong);
  border-radius: 999px;
  background: var(--yf-color-white);
  color: var(--yf-color-ink);
  font: 600 13px/1.25 var(--yf-font-body);
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
}
.yf-catalog-action:hover { border-color: var(--yf-color-accent-2); background: var(--yf-color-cream); }
.yf-catalog-actions { flex: none; }
.yf-catalog-action { border-radius: 4px; min-width: 76px; }
.yf-catalog-action-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 3px;
  border-radius: 50%;
  background: var(--yf-color-ink);
  color: var(--yf-color-white);
  font-size: 11px;
}
.yf-catalog-meta {
  color: var(--yf-color-muted);
  font-size: 13px;
}
.yf-catalog-active-filters {
  flex-wrap: wrap;
  margin-top: 13px;
}
.yf-catalog-active-filters a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 3px;
  background: var(--yf-color-cream);
  color: var(--yf-color-text);
  font-size: 12px;
  text-decoration: none;
}
.yf-catalog-active-filters a.yf-catalog-clear {
  padding-inline: 5px;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}
html.yf-dialog-open { overflow: hidden; }
.yf-catalog-dialog {
  position: fixed;
  inset: 0 0 0 auto;
  box-sizing: border-box;
  display: none;
  flex-direction: column;
  width: min(440px, 100vw);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--yf-color-white);
  color: var(--yf-color-ink);
  box-shadow: -10px 0 40px color-mix(in srgb, var(--yf-color-ink) 15%, transparent);
}
.yf-catalog-dialog[open] { display: flex; }
.yf-catalog-dialog::backdrop { background: color-mix(in srgb, var(--yf-color-ink) 45%, transparent); }
.yf-dialog-head,
.yf-dialog-foot { flex: none; background: var(--yf-color-white); }
.yf-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--yf-color-line);
}
.yf-dialog-head h2 { margin: 0; color: var(--yf-color-ink); font: 400 23px/1.2 var(--yf-font-display); text-transform: none; }
.yf-dialog-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: var(--yf-color-cream);
  color: var(--yf-color-ink);
  font: 400 28px/1 var(--yf-font-body);
  cursor: pointer;
}
.yf-dialog-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 24px; }
.yf-dialog-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 24px max(15px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--yf-color-line);
}
.yf-dialog-foot .yf-filter-submit { flex: 1; width: auto; margin: 0; }
.yf-dialog-foot .yf-filter-reset { flex: none; margin: 0; }
.yf-catalog-dialog .yf-catalog-filter-panel summary { display: none; }
.yf-catalog-dialog .yf-catalog-filter-body { padding: 0; }
.yf-catalog-dialog .yf-catalog-filter-body form { display: block; }
.yf-catalog-dialog .yf-catalog-filter-body fieldset { scroll-margin-top: 10px; }
.yf-sort-choices { display: grid; gap: 2px; }
.yf-sort-choice {
  width: 100%;
  padding: 14px 2px;
  border: 0;
  border-bottom: 1px solid var(--yf-color-line);
  background: transparent;
  color: var(--yf-color-ink);
  font: 500 15px/1.3 var(--yf-font-body);
  text-align: left;
  text-transform: none;
  cursor: pointer;
}
.yf-sort-choice[aria-current="true"] { color: var(--yf-color-accent-2-dark); font-weight: 700; }
.yf-sort-choice[aria-current="true"]::after { content: '✓'; float: right; }
.yf-sort-choice:hover { color: var(--yf-color-accent-2-dark); }
.yf-catalog-action:focus-visible,
.yf-catalog-dialog button:focus-visible,
.yf-catalog-dialog a:focus-visible { outline: 2px solid var(--yf-color-accent-2); outline-offset: 2px; }
.yf-catalog-ready .woocommerce.archive .kadence-shop-top-row { display: none !important; }

@media (max-width: 1100px) {
  .woocommerce.archive.has-left-sidebar .content-container { display: block !important; }
  .yf-catalog-category-shell { display: block; margin-bottom: 13px; }
  .yf-catalog-category-rail {
    display: flex;
    overflow-x: auto;
    padding: 0 0 4px;
    scrollbar-width: none;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
  }
  .yf-catalog-category-rail::-webkit-scrollbar { display: none; }
  .yf-category-swipe-hint {
    display: block;
    visibility: hidden;
    height: 14px;
    margin-top: 1px;
    color: var(--yf-color-muted);
    font-size: 11px;
    line-height: 1.2;
    text-align: right;
  }
  .yf-catalog-category-shell.has-more .yf-catalog-category-rail {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 34px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 34px), transparent);
  }
  .yf-catalog-category-shell.has-more .yf-category-swipe-hint {
    visibility: visible;
  }
  .yf-catalog-subcategory-rail { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 11px; scrollbar-width: none; }
  .yf-catalog-ready .woocommerce.archive #secondary { display: none !important; }
}
@media (max-width: 700px) {
  .yf-catalog-discovery { margin: 8px 0 16px; }
  .yf-catalog-toolbar { display: block; }
  .yf-catalog-controls { display: block; }
  .yf-catalog-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .yf-catalog-action { width: 100%; min-height: 42px; }
  .yf-catalog-meta { margin-top: 8px; }
  .yf-catalog-dialog {
    inset: auto 0 0;
    width: 100%;
    height: min(88dvh, 850px);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -10px 40px color-mix(in srgb, var(--yf-color-ink) 15%, transparent);
  }
  .yf-catalog-dialog.yf-sort-dialog { height: auto; max-height: 88dvh; }
  .yf-sort-dialog .yf-dialog-body { flex: 0 1 auto; }
  .yf-dialog-head { padding: 15px 18px; }
  .yf-dialog-body { padding: 18px; }
  .yf-dialog-foot { padding: 12px 18px max(12px, env(safe-area-inset-bottom)); }
}
