/* Catalog prep: structured filter, price benefit, unified card action */

:root {
  --knp-accent: #ff6bb5;
  --knp-accent-2: #FF70B8;
  --knp-ink: #2B211D;
  --knp-muted: #8C7A72;
  --knp-line: #EAE0D6;
  --knp-surface: #fff;
  --knp-gold: #0a4a38;
  --knp-gold-bg: #87EAD2;
}

/* --- Price block --- */
.cost.prices .offers_price_wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
}
.cost.prices .offers_price_wrapper .offers_price {
  margin-right: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--knp-ink);
  line-height: 1.2;
}
.cost.prices .offers_price_wrapper .offers_price .price_measure {
  font-size: 11px;
  font-weight: 400;
  color: var(--knp-muted);
  margin-left: 2px;
}
.cost.prices .offers_price_old,
.cost.prices .price.discount:not([style*="display: none"]) {
  color: var(--knp-muted);
  text-decoration: line-through;
  font-size: 13px;
  font-weight: 400;
}
.cost.prices .offers_price_wrapper .sale_block {
  width: auto !important;
  position: static !important;
  left: auto !important;
  top: auto !important;
}
.cost.prices .sale_block .sale_wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0;
}
.cost.prices .sale_block .value {
  display: inline-block;
  background: var(--knp-gold-bg);
  color: var(--knp-gold);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 999px;
}
.cost.prices .sale_block .text {
  display: none;
}
.cost.prices .with_matrix .sale_block,
.cost.prices .sale_block.matrix[style*="display: none"] {
  display: none !important;
}

.knp-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin-top: 2px;
}
.knp-price-now {
  font-size: 16px;
  font-weight: 600;
  color: var(--knp-ink);
  line-height: 1.2;
}
.knp-price-old {
  font-size: 13px;
  color: var(--knp-muted);
  text-decoration: line-through;
}
.knp-price-badge {
  display: inline-block;
  background: var(--knp-gold-bg);
  color: var(--knp-gold);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 999px;
}
.cost.prices.has-knp-loyalty > .price,
.cost.prices.has-knp-loyalty > .sale_block,
.cost.prices.has-knp-loyalty .offers_price_wrapper {
  display: none !important;
}

/* --- Filter: Goldapple-style chips + full panel --- */
.catalog .inner_wrapper {
  display: block;
}
#content .left_block.catalog.compact,
#content .left_block.catalog.vertical {
  display: block !important;
  float: none !important;
  width: 100% !important;
  max-width: 100%;
  margin: 0 0 12px;
  padding: 0;
  /* Aspro .left_block has z-index:112; that painted over the header cart dropdown */
  z-index: 0;
}
@media (min-width: 992px) {
  #header {
    position: relative;
    z-index: 400 !important;
  }
}
#content .right_block.catalog {
  padding-left: 0 !important;
}
#content .left_block.catalog .bx_filter {
  display: none !important;
}
#content .left_block.catalog .internal_sections_list {
  display: block !important;
  position: relative;
  margin: 0;
}
#content .left_block.catalog .sections_list_wrapp {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 10px !important;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 4px 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
@media (min-width: 768px) {
  #content .left_block.catalog .sections_list_wrapp {
    gap: 15px !important;
  }
}
#content .left_block.catalog .sections_list_wrapp > li.item {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 60px !important;
  border: 1px solid #e6e6e6 !important;
  background: #fff !important;
  overflow: hidden !important;
  isolation: isolate;
  clip-path: inset(0 round 9999px);
  box-shadow: none !important;
  transition: border-color 0.2s ease !important;
}
@media (min-width: 768px) {
  #content .left_block.catalog .sections_list_wrapp > li.item {
    height: 80px !important;
  }
}
#content .left_block.catalog .sections_list_wrapp > li.item:hover,
#content .left_block.catalog .sections_list_wrapp > li.item.cur {
  border-color: #FFB8E3 !important;
  background: #fff !important;
  box-shadow: none !important;
}
#content .left_block.catalog .sections_list_wrapp > li.item::after {
  content: none !important;
  display: none !important;
  box-shadow: none !important;
}
#content .left_block.catalog .sections_list_wrapp > li.item a {
  position: relative;
  z-index: 1;
  padding: 0 16px 0 60px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 15.6px !important;
  white-space: nowrap !important;
}
@media (min-width: 768px) {
  #content .left_block.catalog .sections_list_wrapp > li.item a {
    padding: 0 24px 0 80px !important;
    font-size: 16px !important;
    line-height: 19.2px !important;
  }
}
#content .left_block.catalog .sections_list_wrapp > li.item .img {
  position: absolute !important;
  z-index: 0 !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 44px !important;
  height: 44px !important;
  left: 8px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  background: transparent !important;
  box-shadow: none !important;
}
@media (min-width: 768px) {
  #content .left_block.catalog .sections_list_wrapp > li.item .img {
    width: 56px !important;
    height: 56px !important;
    left: 12px !important;
  }
}
#content .left_block.catalog .sections_list_wrapp > li.item:hover .img,
#content .left_block.catalog .sections_list_wrapp > li.item.cur .img {
  left: 8px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: transparent !important;
}
@media (min-width: 768px) {
  #content .left_block.catalog .sections_list_wrapp > li.item:hover .img,
  #content .left_block.catalog .sections_list_wrapp > li.item.cur .img {
    left: 12px !important;
  }
}
#content .left_block.catalog .sections_list_wrapp > li.item .img .prew_left,
#content .left_block.catalog .sections_list_wrapp > li.item img.prew_left,
#content .left_block.catalog .prew_left,
#content .left_block.catalog .sections_list_wrapp > li.item:hover .prew_left,
#content .left_block.catalog .sections_list_wrapp > li.item:hover img.prew_left {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  background: transparent !important;
  transform: none !important;
  box-shadow: none !important;
}
.knp-filter-col,
.filter-compact-block {
  position: relative;
  z-index: 20;
  width: 100%;
  margin: 0 0 16px;
  overflow: visible;
}
.catalog .inner_wrapper > .adaptive_filter {
  display: none !important;
}

.knp-hybrid-filter.bx_filter.compact {
  position: relative;
  z-index: 21;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 0 8px !important;
  border-radius: 0;
}
.knp-hybrid-filter .bx_filter_section {
  margin: 0 !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
}
.knp-hybrid-filter .bx_filter_parameters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 0 !important;
}
.knp-hybrid-filter .bx_filter_parameters_box.title {
  display: none !important;
}

.knp-all-filters-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  margin: 0;
  border: 1px solid var(--knp-ink);
  border-radius: 999px;
  background: var(--knp-surface);
  color: var(--knp-ink);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  order: -1;
}
.knp-all-filters-btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}
.knp-all-filters-btn:hover {
  border-color: var(--knp-accent);
  color: var(--knp-accent);
}
.knp-all-filters-count {
  display: none;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--knp-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.knp-all-filters-btn.has-count .knp-all-filters-count {
  display: inline-block;
}

.knp-hybrid-filter .bx_filter_parameters_box {
  display: inline-block !important;
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  position: relative;
  background: transparent !important;
  box-shadow: none !important;
  vertical-align: top;
}
.knp-hybrid-filter .knp-chip-more {
  display: none !important;
}
.knp-hybrid-filter .bx_filter_parameters_box > .bx_filter_parameters_box_title,
.knp-hybrid-filter .bx_filter_parameters_box > .bx_filter_parameters_box_title.title {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px 0 16px !important;
  margin: 0 !important;
  border: 1px solid var(--knp-line) !important;
  border-radius: 999px !important;
  background: var(--knp-surface) !important;
  color: var(--knp-ink) !important;
  font-size: 13.5px !important;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none !important;
}
.knp-hybrid-filter .bx_filter_parameters_box.set > .bx_filter_parameters_box_title,
.knp-hybrid-filter .bx_filter_parameters_box.active > .bx_filter_parameters_box_title {
  border-color: var(--knp-accent) !important;
  box-shadow: inset 0 0 0 1px var(--knp-accent) !important;
}
.knp-hybrid-filter .bx_filter_parameters_box > .bx_filter_parameters_box_title .svg-inline-down {
  position: static !important;
  top: auto !important;
  right: auto !important;
  width: 10px;
  opacity: .55;
}
.knp-hybrid-filter .bx_filter_parameters_box > .bx_filter_parameters_box_title .delete_filter {
  display: none;
}

/* Dropdown under the chip, not a modal */
.knp-hybrid-filter .bx_filter_block:not(.limited_block),
.knp-hybrid-filter .bx_filter_block.limited_block {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  left: 0 !important;
  right: auto !important;
  display: none;
  min-width: 260px;
  max-width: min(420px, 90vw);
  max-height: min(360px, 70vh);
  overflow: auto;
  z-index: 30;
  padding: 14px 16px 10px !important;
  margin: 0 !important;
  background: var(--knp-surface) !important;
  border: 1px solid var(--knp-line) !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 32px rgba(43, 33, 29, .14) !important;
  box-sizing: border-box;
}
.knp-hybrid-filter .bx_filter_parameters_box.active .bx_filter_block:not(.limited_block),
.knp-hybrid-filter .bx_filter_parameters_box.active .bx_filter_block.limited_block {
  display: block !important;
}
.knp-hybrid-filter .bx_filter_parameters_box.prices .bx_filter_block {
  min-width: 300px;
  padding: 16px !important;
}
.knp-hybrid-filter .bx_filter_button_box {
  display: none;
}

.knp-filter-panel-head,
.knp-filter-panel-foot {
  display: none;
}

.knp-filter-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20000;
  background: rgba(43, 33, 29, .45);
}
#knp-filter-drawer {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  width: min(420px, 100vw);
  z-index: 20010;
  background: #fff;
  box-shadow: -8px 0 32px rgba(43, 33, 29, .18);
  overflow: hidden;
  flex-direction: column;
}

/* Full filter panel — drawer lives on body to escape catalog stacking */
body.knp-all-filters-open {
  overflow: hidden;
}
body.knp-all-filters-open .knp-filter-overlay {
  display: block;
}
body.knp-all-filters-open #knp-filter-drawer {
  display: flex;
}
#knp-filter-drawer .knp-hybrid-filter.bx_filter.compact {
  position: relative !important;
  top: auto;
  right: auto;
  bottom: auto;
  width: 100% !important;
  height: 100%;
  margin: 0 !important;
  padding: 0 !important;
  background: #fff !important;
  border: none !important;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: auto;
}
#knp-filter-drawer .knp-hybrid-filter .bx_filter_section,
#knp-filter-drawer .knp-hybrid-filter form.smartfilter {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: #fff;
}
#knp-filter-drawer .knp-filter-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--knp-line);
  background: #fff;
}
#knp-filter-drawer .knp-filter-panel-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--knp-ink);
}
#knp-filter-drawer .knp-filter-panel-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #f6f1ec;
  color: var(--knp-ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
#knp-filter-drawer .knp-all-filters-btn {
  display: none !important;
}
#knp-filter-drawer .knp-hybrid-filter .bx_filter_parameters {
  display: block;
  flex: 1 1 auto;
  overflow: auto;
  padding: 0 4px 16px !important;
  background: #fff;
}
#knp-filter-drawer .knp-hybrid-filter .knp-chip-more,
#knp-filter-drawer .knp-hybrid-filter .knp-chip-main,
#knp-filter-drawer .knp-hybrid-filter .bx_filter_parameters_box:not(.title) {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  border-bottom: 1px solid var(--knp-line) !important;
  border-radius: 0 !important;
  background: #fff !important;
}
#knp-filter-drawer .knp-hybrid-filter .bx_filter_parameters_box.title {
  display: none !important;
}
#knp-filter-drawer .knp-hybrid-filter .bx_filter_parameters_box > .bx_filter_parameters_box_title,
#knp-filter-drawer .knp-hybrid-filter .bx_filter_parameters_box > .bx_filter_parameters_box_title.title {
  display: flex !important;
  width: 100%;
  height: auto;
  padding: 14px 16px !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: 14px !important;
  font-weight: 500;
  justify-content: space-between;
  background: #fff !important;
}
#knp-filter-drawer .bx_filter_parameters_box_title:before,
#knp-filter-drawer .bx_filter_parameters_box_title:after {
  display: none !important;
  content: none !important;
}
#knp-filter-drawer .knp-hybrid-filter .bx_filter_block:not(.limited_block),
#knp-filter-drawer .knp-hybrid-filter .bx_filter_block.limited_block {
  position: static !important;
  top: auto !important;
  display: none;
  min-width: 0;
  max-width: none;
  max-height: none;
  overflow: visible;
  padding: 0 16px 14px !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #fff !important;
}
#knp-filter-drawer .knp-hybrid-filter .bx_filter_parameters_box.active .bx_filter_block:not(.limited_block),
#knp-filter-drawer .knp-hybrid-filter .bx_filter_parameters_box.active .bx_filter_block.limited_block {
  display: block !important;
}
#knp-filter-drawer .knp-filter-panel-foot,
#knp-filter-drawer .knp-hybrid-filter .bx_filter_button_box {
  display: none !important;
}
#knp-filter-drawer .knp-hybrid-filter .bx_filter_search_reset,
#knp-filter-drawer .knp-hybrid-filter .bx_filter_search_button {
  display: inline-flex;
  width: calc(50% - 6px);
  margin: 0 3px;
  border-radius: 12px;
  justify-content: center;
}
#knp-filter-drawer .knp-hybrid-filter .bx_filter_search_button {
  background: var(--knp-accent) !important;
  border-color: var(--knp-accent) !important;
  color: #fff !important;
}

@media (max-width: 767px) {
  .knp-hybrid-filter .bx_filter_parameters {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 4px !important;
    -webkit-overflow-scrolling: touch;
  }
  .knp-hybrid-filter .bx_filter_parameters_box > .bx_filter_parameters_box_title {
    height: 36px;
    font-size: 13px !important;
  }
  #knp-filter-drawer {
    top: auto;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 86vh;
    border-radius: 20px 20px 0 0;
  }
  #knp-filter-drawer .knp-hybrid-filter .bx_filter_parameters {
    flex-wrap: wrap;
    overflow: auto;
  }
}

@media (max-width: 550px) {
  .knp-price-now,
  .cost.prices .offers_price_wrapper .offers_price {
    font-size: 14.5px;
  }
  .offers_price_wrapper .sale_block {
    left: auto !important;
    top: auto !important;
  }
}
