/* KICKSTW reskin: product list page (shop, category, brand, sale, search), printed by
   templates/listing/archive.php. Our own markup (main.kt-list, the filter form, chips, drawer) plus
   what WooCommerce and other plugins print inside it (count, sort, grid, Load More, the category
   text, notices). Cards are card.css's; buttons, fields, notices, prices, pagination are skin.css's.
   Every selector starts body.kt-skin-listing. Layout per site_prototype/listing.html: the filter is
   a 240px column from 721px and a drawer below (once listing.js runs; without it the form stays in
   the page above the results); three cards a row from 1025px, two below. */

/* The page: the theme still wraps it in #content > .ast-container (flex on some layouts); Astra's
   #primary and #secondary are no longer printed. */
body.kt-skin-listing #content main.kt-list {
  display: block;
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0 0 64px;
  float: none;
}
body.kt-skin-listing main.kt-list .kt-list__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
body.kt-skin-listing #content main.kt-list nav.woocommerce-breadcrumb {
  margin: 12px 0;
}

/* Head: the title and the short line; no list page has a banner picture */
body.kt-skin-listing main.kt-list .kt-list__head {
  margin: 12px 0 24px;
}
body.kt-skin-listing #content main.kt-list h1.kt-list__title {
  margin: 0;
  font: var(--type-title);
  letter-spacing: -0.015em;
  text-transform: uppercase;
  color: var(--ink);
  overflow-wrap: anywhere;
}
/* Brand and search titles keep the case they are printed in: the words hold brand names */
body.kt-skin-listing.tax-product_brand #content main.kt-list h1.kt-list__title,
body.kt-skin-listing.search #content main.kt-list h1.kt-list__title {
  text-transform: none;
}
body.kt-skin-listing main.kt-list p.kt-list__lede {
  margin: 8px 0 0;
  font: 400 14px/1.5 var(--font-body);
  color: var(--muted);
}
/* A brand's page (19 Nov): no banner; the short text is the brand's introduction, in the
   prototype's lede. The script folds it at five lines (three on a phone) when it runs over and
   adds "Read more"; without the script it shows whole */
body.kt-skin-listing main.kt-list p.kt-list__lede.kt-list__lede--intro {
  max-width: 65ch;
  margin: 12px 0 0;
  font: 400 16px/1.55 var(--font-body);
}
body.kt-skin-listing main.kt-list p.kt-list__lede--intro.is-folded {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  overflow: hidden;
}

/* Toolbar: the filter button (drawer only), the count, the sort */
body.kt-skin-listing main.kt-list .kt-list__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
}
body.kt-skin-listing #content main.kt-list button.kt-list__filter-open {
  display: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 40px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
  font: 600 14px var(--font-body);
  text-transform: none;
  box-shadow: none;
  cursor: pointer;
}
body.kt-skin-listing #content main.kt-list p.woocommerce-result-count {
  float: none;
  margin: 0;
  font: 500 14px var(--font-body);
  color: var(--ink);
}
body.kt-skin-listing #content main.kt-list form.woocommerce-ordering {
  float: none;
  width: auto; /* beats .archive .woocommerce-ordering (blaze-online archive stylesheet, 100%) */
  margin: 0 0 0 auto; /* beats .archive .woocommerce-ordering (blaze-online archive stylesheet, 25px below) */
}
body.kt-skin-listing #content main.kt-list select.orderby {
  height: 40px;
  min-height: 40px;
  padding: 0 40px 0 12px; /* beats .archive .woocommerce-ordering select (blaze-online archive stylesheet) */
  border: 1px solid var(--chip-line); /* beats .archive .woocommerce-ordering select (blaze-online archive stylesheet) */
  color: var(--ink); /* beats .archive .woocommerce-ordering select (blaze-online archive stylesheet) */
  font: 500 14px var(--font-body);
}

/* Chips: what is chosen, each a link that removes it, then Clear all */
body.kt-skin-listing main.kt-list .kt-list__chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
}
body.kt-skin-listing #content main.kt-list a.kt-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px 0 16px;
  border: 1px solid var(--chip-line);
  background: var(--white);
  color: var(--ink);
  font: 500 13px var(--font-body);
  text-decoration: none;
}
body.kt-skin-listing #content main.kt-list a.kt-chip:hover {
  border-color: var(--ink);
}
body.kt-skin-listing main.kt-list a.kt-chip svg {
  flex: 0 0 auto;
}
body.kt-skin-listing #content main.kt-list a.kt-list__clear {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 8px;
  color: var(--ink);
  font: 600 13px var(--font-body);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* The filter column and the results */
body.kt-skin-listing main.kt-list .kt-list__filter {
  min-width: 0;
}
body.kt-skin-listing main.kt-list .kt-list__filter-head {
  display: none;
}
body.kt-skin-listing main.kt-list .kt-list__backdrop {
  display: none;
}
body.kt-skin-listing main.kt-list .kt-list__results {
  min-width: 0;
}

/* The filter form (templates/listing/filter.php) */
body.kt-skin-listing main.kt-list form.kt-filter {
  margin: 0;
  border-top: 1px solid var(--line);
}
body.kt-skin-listing main.kt-list .kt-filter__group {
  border-bottom: 1px solid var(--line);
}
body.kt-skin-listing main.kt-list .kt-filter__group > summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  color: var(--ink);
  font: 600 14px var(--font-body);
  list-style: none;
  cursor: pointer;
}
body.kt-skin-listing main.kt-list .kt-filter__group > summary::-webkit-details-marker {
  display: none;
}
body.kt-skin-listing main.kt-list .kt-filter__group > summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* Box groups (discount, sizes): an even grid of square-cornered boxes, one value at a time */
body.kt-skin-listing main.kt-list .kt-filter__boxes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 8px;
  margin: 0 0 16px;
}
body.kt-skin-listing main.kt-list label.kt-filter__box {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
}
body.kt-skin-listing #content main.kt-list label.kt-filter__box input[type="checkbox"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}
body.kt-skin-listing main.kt-list label.kt-filter__box span {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 40px;
  padding: 0 4px;
  border: 1px solid var(--chip-line);
  background: var(--white);
  color: var(--ink);
  font: 500 13px var(--font-body);
  text-align: center;
}
body.kt-skin-listing main.kt-list label.kt-filter__box:hover span {
  border-color: var(--ink);
}
body.kt-skin-listing main.kt-list label.kt-filter__box input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}
body.kt-skin-listing main.kt-list label.kt-filter__box input:focus-visible + span {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* Lists (gender, categories as a tree, brands, stock status) */
body.kt-skin-listing main.kt-list ul.kt-filter__list {
  max-height: 480px;
  margin: 0 0 16px;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}
body.kt-skin-listing main.kt-list li.kt-filter__item {
  margin: 0;
  padding: 0;
  list-style: none;
}
body.kt-skin-listing main.kt-list li.kt-filter__item[data-depth="1"] {
  padding-left: 24px;
}
body.kt-skin-listing main.kt-list li.kt-filter__item[data-depth="2"],
body.kt-skin-listing main.kt-list li.kt-filter__item[data-depth="3"] {
  padding-left: 48px;
}
body.kt-skin-listing main.kt-list li.kt-filter__item label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  margin: 0;
  color: var(--ink);
  font: 400 14px/1.3 var(--font-body);
  cursor: pointer;
}
body.kt-skin-listing #content main.kt-list li.kt-filter__item input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
}
body.kt-skin-listing main.kt-list .kt-filter__label {
  flex: 1 1 auto;
  min-width: 0;
}
body.kt-skin-listing main.kt-list .kt-filter__count {
  flex: 0 0 auto;
  color: var(--muted);
  font: 500 12px var(--font-body);
}

/* Price: two number fields */
body.kt-skin-listing main.kt-list .kt-filter__price {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}
body.kt-skin-listing main.kt-list .kt-filter__price label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  margin: 0;
}
body.kt-skin-listing main.kt-list .kt-filter__price label > span {
  font: var(--type-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
body.kt-skin-listing #content main.kt-list .kt-filter__price input[type="number"] {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 40px;
  min-height: 40px;
}

/* Apply and Clear */
body.kt-skin-listing main.kt-list .kt-filter__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0 0;
}
body.kt-skin-listing #content main.kt-list button.kt-filter__apply {
  box-sizing: border-box;
  height: 40px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
  font: 600 14px var(--font-body);
  text-transform: none;
  box-shadow: none;
  cursor: pointer;
}
body.kt-skin-listing #content main.kt-list button.kt-filter__apply:hover {
  background: var(--panel);
}
body.kt-skin-listing #content main.kt-list a.kt-filter__clear {
  color: var(--ink);
  font: 500 14px var(--font-body);
  text-decoration: underline;
}

/* The grid of cards (the cards are card.css's), in the results and in the search's other products */
body.kt-skin-listing #content main.kt-list ul.products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 20px;
  margin: 0 !important; /* beats .woocommerce .products (blaze-online archive stylesheet) */
  padding: 0;
  list-style: none;
}
body.kt-skin-listing #content main.kt-list ul.products::before,
body.kt-skin-listing #content main.kt-list ul.products::after {
  content: none;
}
body.kt-skin-listing #content main.kt-list ul.products > li {
  min-width: 0;
}
body.kt-skin-listing #content main.kt-list ul.products li.product {
  width: auto !important; /* beats .woocommerce .products.columns-3 li.product (blaze-online archive stylesheet) */
}

/* Load More (BeRocket) */
body.kt-skin-listing #content main.kt-list .lmp_load_more_button {
  margin-top: 48px;
}
body.kt-skin-listing #content main.kt-list .lmp_load_more_button a.lmp_button {
  margin-bottom: 0 !important; /* beats .archive .btn-load-more (blaze-online archive stylesheet) */
}

/* The category text, below the results; listing.js folds it to three lines */
body.kt-skin-listing main.kt-list .kt-list__about {
  max-width: 72ch;
  margin: 48px 0 0;
  color: var(--muted);
  font: 400 14px/1.6 var(--font-body);
}
body.kt-skin-listing main.kt-list .kt-list__about.is-folded {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}
body.kt-skin-listing #content main.kt-list .term-description {
  margin: 0;
}
body.kt-skin-listing #content main.kt-list .term-description h2,
body.kt-skin-listing #content main.kt-list .term-description h3 {
  margin: 0 0 8px;
  font: var(--type-block);
  color: var(--ink);
}
body.kt-skin-listing #content main.kt-list .term-description p {
  margin: 0 0 12px;
}
body.kt-skin-listing #content main.kt-list .term-description a {
  color: var(--ink);
  text-decoration: underline;
}
body.kt-skin-listing #content main.kt-list button.kt-list__fold {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: 600 13px var(--font-body);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-transform: none;
  box-shadow: none;
  cursor: pointer;
}

/* No products; a search with none: the hints and other products */
body.kt-skin-listing #content main.kt-list .woocommerce-no-products-found {
  margin: 0 0 24px;
}
body.kt-skin-listing #content main.kt-list .woocommerce-no-products-found .woocommerce-info {
  text-align: left;
}
body.kt-skin-listing #content main.kt-list h2.kt-list__hints-title,
body.kt-skin-listing #content main.kt-list .kt-list__more > h2 {
  margin: 32px 0 16px;
  font: var(--type-block);
  text-transform: none;
  color: var(--ink);
}
body.kt-skin-listing main.kt-list ul.kt-list__hints {
  margin: 0 0 48px;
  padding: 0 0 0 20px;
  color: var(--muted);
  font: 400 14px/1.6 var(--font-body);
}
body.kt-skin-listing #content main.kt-list ul.kt-list__hints a {
  text-decoration: underline;
}

/* 1025px and up: three cards a row */
@media (min-width: 1025px) {
  body.kt-skin-listing #content main.kt-list ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* 721px and up: the filter is a column beside the results; the count and sort sit above the results */
@media (min-width: 721px) {
  body.kt-skin-listing main.kt-list .kt-list__body {
    display: flex;
    align-items: flex-start;
    gap: 40px;
  }
  body.kt-skin-listing main.kt-list .kt-list__filter {
    flex: 0 0 240px;
    width: 240px;
  }
  body.kt-skin-listing main.kt-list .kt-list__results {
    flex: 1 1 auto;
  }
  body.kt-skin-listing main.kt-list:has(> .kt-list__body > .kt-list__filter) > .kt-list__bar,
  body.kt-skin-listing main.kt-list:has(> .kt-list__body > .kt-list__filter) > .kt-list__chips {
    margin-left: calc(240px + 40px);
  }
  body.kt-skin-listing #content main.kt-list p.woocommerce-result-count {
    display: block; /* beats .archive .woocommerce-result-count (blaze-online archive stylesheet, hidden below 922px) */
  }
}

/* 720px and below: two cards a row; with listing.js the filter is a drawer from the right,
   opened from the Filter button beside the sort */
@media (max-width: 720px) {
  body.kt-skin-listing main.kt-list p.kt-list__lede--intro.is-folded {
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
  body.kt-skin-listing #content main.kt-list ul.products {
    gap: 24px 12px;
  }
  body.kt-skin-listing main.kt-list .kt-list__filter {
    margin: 0 0 24px;
  }
  body.kt-skin-listing #content main.kt-list.has-drawer button.kt-list__filter-open {
    display: inline-flex;
    flex: 1 1 0;
    min-width: 0;
  }
  body.kt-skin-listing #content main.kt-list.has-drawer form.woocommerce-ordering {
    flex: 1 1 0;
    min-width: 0;
  }
  body.kt-skin-listing #content main.kt-list.has-drawer select.orderby {
    width: 100%;
  }
  body.kt-skin-listing main.kt-list.has-drawer .kt-list__filter {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 95;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: min(400px, 92vw);
    margin: 0;
    padding: 0 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--white);
    box-shadow: var(--shadow-over);
    transform: translateX(102%);
    visibility: hidden;
  }
  body.kt-skin-listing main.kt-list.has-drawer .kt-list__filter.is-open {
    transform: none;
    visibility: visible;
  }
  /* The WordPress admin bar (46px at this width) sits above the drawer; at 600px and under it
     scrolls away with the page, and the drawer starts where the bar ends in the window
     (--kt-wpbar-in-view, kept by header.js) */
  body.kt-skin-listing.admin-bar main.kt-list.has-drawer .kt-list__filter {
    top: var(--kt-wpbar-in-view, 46px);
  }
  body.kt-skin-listing main.kt-list.has-drawer .kt-list__filter-head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
    margin: 0 -16px;
    padding: 0 8px 0 16px;
    border-bottom: 1px solid var(--line);
    background: var(--white);
  }
  body.kt-skin-listing #content main.kt-list .kt-list__filter-title {
    margin: 0;
    font: var(--type-block);
    color: var(--ink);
  }
  body.kt-skin-listing #content main.kt-list button.kt-list__filter-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
    box-shadow: none;
    cursor: pointer;
  }
  body.kt-skin-listing main.kt-list.has-drawer form.kt-filter {
    border-top: 0;
  }
  body.kt-skin-listing main.kt-list.has-drawer .kt-filter__foot {
    position: sticky;
    bottom: 0;
    margin: 0 -16px;
    padding: 12px 16px;
    border-top: 1px solid var(--line);
    background: var(--white);
  }
  body.kt-skin-listing main.kt-list.has-drawer .kt-list__backdrop {
    position: fixed;
    inset: 0;
    z-index: 94;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: var(--scrim);
    cursor: default;
  }
  body.kt-skin-listing main.kt-list.has-drawer .kt-list__backdrop[hidden] {
    display: none;
  }
}
@media (max-width: 720px) and (prefers-reduced-motion: no-preference) {
  body.kt-skin-listing main.kt-list.has-drawer .kt-list__filter {
    transition: transform 0.22s ease, visibility 0s linear 0.22s;
  }
  body.kt-skin-listing main.kt-list.has-drawer .kt-list__filter.is-open {
    transition: transform 0.22s ease;
  }
}
