/* ============================================================
   CATALOG PAGE
   ============================================================ */

.catalog-hero {
  position: relative;
  padding: 80px 0 60px;
  text-align: center;
  background: transparent;
  overflow: hidden;
}
.catalog-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: rgba(0,0,0,.55);
}
.catalog-hero__title {
  position: relative;
  font-family: var(--display);
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 12px;
}
.catalog-hero__sub {
  position: relative;
  font-family: "Caveat", cursive;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink-2);
}

.product-img-link { display: block; }
.product-img-link:hover img { transform: scale(1.04); }
.product-img-link img { transition: transform .35s var(--ease); }

/* ===== Catalog filter: marketplace-style left column ===== */
.catalog-layout {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}
.catalog-layout .products-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
.catalog-aside {
  position: sticky; top: 92px;
  max-height: calc(100vh - 110px); overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.catalog-filter__summary { display: none; }
.catalog-filter__head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 14px 16px 6px;
}
.catalog-filter__title {
  font-family: var(--display); font-weight: 800; font-size: 14px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink);
}
.catalog-filter__reset {
  font-size: 12px; font-weight: 700; color: var(--accent-bright); text-decoration: none;
}
.catalog-filter__reset:hover { text-decoration: underline; }
.catalog-filter__found--bar { padding: 0 16px 8px; font-size: 12px; color: var(--ink-3); }
.cf-group { padding: 11px 16px 12px; border-top: 1px solid var(--line); }
.cf-title {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0; font-family: var(--body); font-size: 13px; font-weight: 800;
  color: var(--ink); cursor: pointer; user-select: none;
}
.cf-title::after {
  content: ""; width: 7px; height: 7px; margin-right: 2px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg) translateY(-2px); transition: transform .2s var(--ease);
}
.cf-group.is-collapsed .cf-title::after { transform: rotate(-45deg); }
.cf-group.is-collapsed > ul, .cf-group.is-collapsed > .cf-more { display: none; }
.cf-group ul { list-style: none; margin: 8px 0 0; padding: 0; }
.cf-group li {
  display: flex; align-items: center; gap: 8px; margin: 0; padding: 0;
  font-size: 13px; line-height: 1.25;
}
.cf-group li.is-extra { display: none; }
.cf-group.is-expanded li.is-extra { display: flex; }
.cf-group li a, .cf-group li > span:not(.count) {
  flex: 1; display: flex; align-items: center; gap: 9px; padding: 5px 0;
  color: var(--ink-2); text-decoration: none; font-weight: 500;
  transition: color .15s var(--ease);
}
.cf-group li a:hover { color: var(--ink); }
.cf-group li > span:not(.count) { opacity: .4; }
.cf-group li a::before, .cf-group li > span:not(.count)::before {
  content: ""; flex: none; width: 15px; height: 15px; box-sizing: border-box;
  border: 1.5px solid var(--line-strong); border-radius: 4px; background: var(--surface-2);
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
.cf-group li a:hover::before { border-color: var(--accent-bright); }
.cf-group li.chosen a { color: var(--ink); font-weight: 700; }
.cf-group li.chosen a::before {
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center/11px no-repeat;
  border-color: var(--accent);
}
.cf-group li .count { flex: none; font-size: 11px; color: var(--ink-3); }
.cf-more {
  margin-top: 4px; padding: 3px 0; background: none; border: 0; cursor: pointer;
  font: 700 12px var(--body); color: var(--accent-bright);
}
.cf-more:hover { text-decoration: underline; }
/* category links: plain list, no checkboxes */
.cf-cats li a::before { display: none; }
.cf-cats li a { padding: 4px 0; }
.cf-cats li.chosen a { color: var(--accent-bright); }
.catalog-empty { text-align: center; padding: 60px 0; color: var(--ink-2); }
.catalog-empty a { color: var(--accent-bright); }

@media (max-width: 1100px) {
  .catalog-layout { grid-template-columns: 224px minmax(0, 1fr); gap: 20px; }
  .catalog-layout .products-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .catalog-layout { grid-template-columns: 1fr; gap: 18px; }
  .catalog-aside { position: static; max-height: none; overflow: visible; }
  .catalog-filter__head { padding: 0 16px; justify-content: flex-end; }
  .catalog-filter__title { display: none; }
  .catalog-filter__reset { padding: 12px 0 2px; font-size: 13px; }
  .catalog-filter__summary {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 16px; cursor: pointer; list-style: none;
    font-family: var(--display); font-weight: 800; font-size: 14px;
    letter-spacing: .1em; text-transform: uppercase; color: var(--ink);
  }
  .catalog-filter__summary::-webkit-details-marker { display: none; }
  .catalog-filter__summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--accent-bright); }
  .catalog-filter[open] > .catalog-filter__summary::after { content: "\2013"; }
  .catalog-filter__summary .catalog-filter__found { margin-left: auto; font: 600 12px var(--body); letter-spacing: 0; text-transform: none; color: var(--ink-2); }
}
@media (max-width: 640px) {
  .catalog-layout .products-grid { grid-template-columns: 1fr; gap: 14px; }
}

/* ----- category chips, toolbar (sort), price filter ----- */
.catalog-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.catalog-cats a {
  display: inline-block; padding: 8px 14px; border-radius: 999px; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--line-strong);
  color: var(--ink-2); font: 600 13px/1.2 var(--body); text-decoration: none;
  transition: border-color .15s var(--ease), color .15s var(--ease);
}
.catalog-cats a:hover { border-color: var(--line-red); color: var(--ink); }
.catalog-cats a.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

.catalog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.catalog-toolbar__count { font: 600 13px var(--body); color: var(--ink-3); }
.catalog-toolbar .woocommerce-ordering { display: flex; align-items: center; gap: 8px; margin: 0; }
.catalog-toolbar .woocommerce-ordering label { font: 600 12px var(--body); color: var(--ink-3); }
.catalog-toolbar select {
  appearance: none; -webkit-appearance: none;
  padding: 9px 34px 9px 12px; border-radius: 8px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none' stroke='%238c7a71' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E") right 12px center / 10px no-repeat;
  border: 1px solid var(--line-strong); color: var(--ink); font: 600 13px var(--body); cursor: pointer;
}

.cf-title--static { cursor: default; }
.cf-title--static::after { display: none; }
.cf-price__form { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.cf-price__form span { color: var(--ink-3); }
.cf-price__form input {
  width: 100%; min-width: 0; box-sizing: border-box; padding: 8px;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 8px;
  color: var(--ink); font: 600 13px var(--body); -moz-appearance: textfield;
}
.cf-price__form input::-webkit-outer-spin-button,
.cf-price__form input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cf-price__form input::placeholder { color: var(--ink-3); font-weight: 500; }
.cf-price__form input:focus { outline: none; border-color: var(--accent-bright); }
.cf-price__form button {
  flex: none; padding: 9px 11px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--accent); color: #fff; font: 700 12px var(--body);
}

@media (max-width: 900px) {
  .catalog-cats {
    flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px 18px; padding: 2px 20px 6px;
    scrollbar-width: none; scroll-snap-type: x proximity;
  }
  .catalog-cats::-webkit-scrollbar { display: none; }
  .catalog-cats a { flex: none; scroll-snap-align: start; padding: 10px 15px; }
  .catalog-toolbar { flex-wrap: wrap; }
  .catalog-toolbar .woocommerce-ordering { flex: 1 1 auto; justify-content: flex-end; }
  .catalog-toolbar select, .cf-price__form input { font-size: 16px; }
  .cf-group li a, .cf-group li > span:not(.count) { padding: 9px 0; }
  .cf-title { padding: 4px 0; }
}

/* compact catalog hero + breadcrumbs right above the products */
.catalog-hero { padding: 34px 0 28px; }
.catalog-hero h1 { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.1; margin: 0 0 6px; }
.catalog-hero__sub { font-size: 18px; margin: 0; }
.catalog-hero + .breadcrumbs-bar { border-bottom: 0; }
.catalog-hero + .breadcrumbs-bar .breadcrumbs { padding: 16px 0 0; }
@media (max-width: 640px) {
  .catalog-hero { padding: 24px 0 18px; }
  .catalog-hero__sub { font-size: 16px; }
}

.catalog-filter__label { display: inline-flex; align-items: center; gap: 8px; }
.catalog-filter__badge {
  min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 10px;
  background: var(--accent); color: #fff; font: 700 11px/20px var(--body); text-align: center; letter-spacing: 0;
}
@media (max-width: 900px) {
  /* the toolbar right below already shows the result count */
  .catalog-filter__summary .catalog-filter__found { display: none; }
}
