/**
 * Listing pages (category, manufacturer, search…): header, sub-categories, top sellers, filters,
 * product grid, pagination, selection block, buying guide text, FAQ.
 * Product cards themselves: modules/kixcategorycustomize/views/css/mh-product-cards.css (mh-pcard).
 * Loaded last in <head> (stylesheets.tpl). Bump ?v= on every change (static files cached a year).
 */

:root {
  --mh-navy: #0c193a;
  --mh-orange: #e65021;
  --mh-orange-dark: #cf4419;
  --mh-line: #e8ebf0;
  --mh-text: #4b5568;
  --mh-muted: #8a93a3;
  --mh-soft: #f6f7fa;
}

/* ------------------------------------------------------------------ */
/* Breadcrumb + header                                                 */
/* ------------------------------------------------------------------ */
.page-category .breadcrumb,
.page-manufacturer .breadcrumb {
  margin: 20px 0 0 !important;
  padding: 0 !important;
  font-size: 13px;
  background: none !important;
}

.page-category .breadcrumb a,
.page-category .breadcrumb li,
.page-category .breadcrumb span,
.page-manufacturer .breadcrumb a,
.page-manufacturer .breadcrumb li,
.page-manufacturer .breadcrumb span {
  color: var(--mh-muted) !important;
}

.page-category .breadcrumb a:hover,
.page-manufacturer .breadcrumb a:hover {
  color: var(--mh-orange) !important;
}

#_desktop_category_header {
  margin: 14px 0 28px;
  padding: 0;
}

#_desktop_category_header h1.h1,
#_desktop_category_header .h1 {
  max-width: 900px;
  margin: 0 0 12px !important;
  padding: 0 !important;
  font-size: 36px !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  letter-spacing: -0.02em;
  text-align: left !important;
  text-transform: none !important;
  color: var(--mh-navy) !important;
}

#_desktop_category_header h1.h1::after,
#_desktop_category_header .h1::after {
  content: none !important;
  display: none !important;
}

#_desktop_category_header .category-intro {
  max-width: 860px;
  margin: 0 !important;
  font-size: 16px !important;
  line-height: 1.65 !important;
  color: var(--mh-text) !important;
}

/* ------------------------------------------------------------------ */
/* Sub-categories: compact tiles                                       */
/* ------------------------------------------------------------------ */
.page-category .sub_cat {
  margin: 0 0 32px !important;
  padding: 0 !important;
}

.page-category .sub_cat .subcategories-modern {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.page-category .sub_cat .subcategory-card {
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #fff !important;
  border: 1px solid var(--mh-line) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  transform: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.page-category .sub_cat .subcategory-card:hover {
  border-color: rgba(230, 80, 33, 0.45) !important;
  box-shadow: 0 8px 20px rgba(12, 25, 58, 0.07) !important;
}

.page-category .sub_cat .subcategory-link {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 12px;
  height: 100%;
  min-height: 64px;
  padding: 8px 14px 8px 8px !important;
  text-decoration: none !important;
}

.page-category .sub_cat .subcategory-image {
  flex: 0 0 auto;
  width: 48px !important;
  height: 48px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  background: #fff !important;
  border-radius: 8px;
}

.page-category .sub_cat .subcategory-image picture,
.page-category .sub_cat .subcategory-image img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}

.page-category .sub_cat .subcategory-content {
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
}

.page-category .sub_cat .subcategory-name {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  text-align: left !important;
  text-transform: none !important;
  color: var(--mh-navy) !important;
}

.page-category .sub_cat .subcategory-card:hover .subcategory-name {
  color: var(--mh-orange) !important;
}

.page-category .sub_cat .subcategory-card.no-image .subcategory-link {
  padding-left: 16px !important;
}

/* ------------------------------------------------------------------ */
/* Top sellers (products_promo.tpl)                                    */
/* ------------------------------------------------------------------ */
.mh-top {
  margin: 0 0 36px;
}

.mh-top .mh-top__title {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mh-orange);
}

.mh-top .mh-pgrid {
  margin: 0;
  gap: 14px;
}

/* Compact horizontal cards: quick picks that do not push the listing down. */
.mh-top .mh-pcard {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  grid-template-areas:
    'media body'
    'media foot';
}

.mh-top .mh-pcard .mh-pcard__media {
  grid-area: media;
  height: 100%;
  min-height: 156px;
  padding: 30px 12px 12px;
  border-right: 1px solid #f0f2f5;
  border-bottom: 0;
}

.mh-top .mh-pcard__badge {
  top: 8px;
  left: 8px;
  max-width: calc(100% - 16px);
  height: 20px;
  padding: 0 7px 0 6px;
  font-size: 10.5px;
  line-height: 20px;
}

.mh-top .mh-pcard__discount {
  top: auto;
  right: 8px;
  bottom: 8px;
  height: 20px;
  padding: 0 6px;
  font-size: 10.5px;
  line-height: 20px;
}

.mh-top .mh-pcard .mh-pcard__energy,
.mh-top .mh-pcard__reviews {
  display: none;
}

.mh-top .mh-pcard__body {
  grid-area: body;
  padding: 12px 14px 0;
}

.mh-top .mh-pcard__foot {
  grid-area: foot;
  padding: 8px 14px 12px;
}

.mh-top .mh-pcard__price {
  font-size: 18px;
}

.mh-top .mh-pcard .mh-pcard__btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

@media (max-width: 991.98px) and (min-width: 576px) {
  /* Three horizontal cards stacked: no orphan on a two-column grid. */
  .mh-top .mh-pgrid--3 {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
}

@media (max-width: 575.98px) {
  .mh-top .mh-pgrid--3 {
    grid-auto-columns: 88%;
  }

  .mh-top .mh-pcard {
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .mh-top .mh-pcard .mh-pcard__media {
    min-height: 140px;
  }
}

/* Brand pages: intro paragraph in the header, rest of the text under the products */
.mh-brand-intro p {
  margin: 0 !important;
  font-size: inherit !important;
  line-height: inherit !important;
  color: inherit !important;
}

.mh-brand-intro--clamp,
.mh-brand-intro--clamp p {
  display: -webkit-box !important;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.mh-brand-more {
  display: inline-flex;
  align-items: center;
  margin: 6px 0 0;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--mh-orange);
  background: none;
  border: 0;
  cursor: pointer;
}

.mh-brand-more::after {
  content: '';
  width: 7px;
  height: 7px;
  margin: -3px 0 0 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.mh-brand-more:hover {
  color: var(--mh-orange-dark);
}

.mh-brand-desc {
  max-width: 860px;
  margin: 56px 0 24px;
  padding-top: 40px;
  border-top: 1px solid var(--mh-line);
}

.mh-brand-desc #category-description p + p {
  margin-top: 14px;
}

/* ------------------------------------------------------------------ */
/* List bar above the grid: product count (follows the filters) + sort */
/* ------------------------------------------------------------------ */
#js-product-list .mh-listbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
}

#js-product-list .mh-listbar__count {
  margin: 0 !important;
  font-size: 14px;
  color: var(--mh-text);
}

#js-product-list .mh-listbar__count strong {
  font-weight: 700;
  color: var(--mh-navy);
}

#js-product-list .mh-listbar__sort {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--mh-muted);
  cursor: pointer;
}

#js-product-list select.mh-sort {
  height: 40px;
  padding: 0 38px 0 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--mh-navy);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230c193a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1px solid var(--mh-line);
  border-radius: 10px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s ease;
}

#js-product-list select.mh-sort:hover,
#js-product-list select.mh-sort:focus {
  border-color: var(--mh-navy);
  outline: none;
}

@media (max-width: 575.98px) {
  #js-product-list .mh-listbar__sort > span {
    display: none;
  }

  #js-product-list select.mh-sort {
    height: 38px;
    font-size: 13.5px;
  }
}

/* ------------------------------------------------------------------ */
/* Filters (Amazzing Filter, horizontal layout)                        */
/* ------------------------------------------------------------------ */
.page-category #amazzing_filter.horizontal-layout,
.page-manufacturer #amazzing_filter.horizontal-layout {
  margin: 0 0 20px !important;
  padding: 12px 0 !important;
  background: rgba(255, 255, 255, 0.96) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--mh-line) !important;
  box-shadow: none !important;
}

#amazzing_filter.horizontal-layout .af_filter {
  margin: 0 8px 8px 0 !important;
}

#amazzing_filter.horizontal-layout .af_subtitle_heading {
  display: flex !important;
  align-items: center;
  height: 40px;
  padding: 0 14px !important;
  background: #fff !important;
  border: 1px solid #dfe3ea !important;
  border-radius: 10px !important;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

#amazzing_filter.horizontal-layout .af_subtitle_heading:hover,
#amazzing_filter.horizontal-layout .af_filter:not(.closed) .af_subtitle_heading {
  border-color: var(--mh-navy) !important;
}

#amazzing_filter.horizontal-layout .af_subtitle {
  margin: 0 !important;
  padding: 0 22px 0 0 !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  text-transform: none !important;
  color: var(--mh-navy) !important;
}

#amazzing_filter.horizontal-layout .af_subtitle {
  position: relative;
}

/* Chevron drawn by the module: it had both left and right set and sat on the label. */
#amazzing_filter.horizontal-layout .af_subtitle::before {
  top: 50% !important;
  right: 2px !important;
  left: auto !important;
  margin: -6px 0 0 !important;
  border-color: #8a93a3 !important;
}

#amazzing_filter.horizontal-layout .af_filter_content {
  border: 1px solid var(--mh-line) !important;
  border-radius: 12px !important;
  box-shadow: 0 16px 36px rgba(12, 25, 58, 0.14) !important;
}

/* ------------------------------------------------------------------ */
/* Product grid                                                        */
/* ------------------------------------------------------------------ */
#js-product-list .products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0 !important;
}

#js-product-list .products > .product-miniature {
  width: auto !important;
  max-width: none !important;
  flex: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Guide card inside the grid (article_1_listing.tpl) */
#js-product-list .mh-listing-guide {
  display: flex;
  border: 0 !important;
  background: none !important;
}

#js-product-list .mh-listing-guide .mh-guide__card {
  width: 100%;
}

#js-product-list .mh-listing-guide h3.mh-guide__name {
  margin: 0;
  padding: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  text-transform: none;
  color: #fff;
}

/* Pagination */
#js-product-list .u-a-i-c {
  margin: 36px 0 24px !important;
}

#js-product-list .u-a-i-c > .small {
  margin: 0 0 12px;
  font-size: 13px !important;
  color: var(--mh-muted) !important;
}

#js-product-list .pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0 !important;
}

#js-product-list .pagination .page-item .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  margin: 0 !important;
  padding: 0 12px !important;
  font-size: 14px;
  font-weight: 600;
  color: var(--mh-navy) !important;
  background: #fff !important;
  border: 1px solid #dfe3ea !important;
  border-radius: 10px !important;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

#js-product-list .pagination .page-item .page-link:hover {
  border-color: var(--mh-navy) !important;
}

#js-product-list .pagination .page-item.active .page-link {
  color: #fff !important;
  background: var(--mh-navy) !important;
  border-color: var(--mh-navy) !important;
}

#js-product-list .pagination .page-item.disabled .page-link {
  border-color: transparent !important;
  background: transparent !important;
}

/* ------------------------------------------------------------------ */
/* Selection block on category pages (products_selection.tpl)         */
/* ------------------------------------------------------------------ */
.page-category .fd-pushs-b.mh-selection {
  gap: 24px;
  margin: 24px 0 56px !important;
  padding: 40px !important;
  background: var(--mh-soft) !important;
  border-radius: 24px;
}

.page-category .fd-pushs-b.mh-selection .fd-b-l,
.page-category .fd-pushs-b.mh-selection .fd-b-r {
  width: auto !important;
  flex: 1 1 0;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

.page-category div.fd-pushs-b.mh-selection h2.mh-title {
  margin: 0 0 20px !important;
  font-size: 24px;
}

.page-category .fd-pushs-b.mh-selection .mh-pgrid {
  margin: 0;
}

/* ------------------------------------------------------------------ */
/* Buying guide text (category description) + image                    */
/* ------------------------------------------------------------------ */
:is(.page-category, .page-manufacturer) #category-description {
  font-size: 16px;
  line-height: 1.75;
  color: #3d4656;
}

:is(.page-category, .page-manufacturer) #category-description h2 {
  margin: 40px 0 14px !important;
  padding: 0 !important;
  font-size: 26px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  letter-spacing: -0.015em;
  text-align: left !important;
  text-transform: none !important;
  color: var(--mh-navy) !important;
}

:is(.page-category, .page-manufacturer) #category-description h2:first-child {
  margin-top: 0 !important;
}

:is(.page-category, .page-manufacturer) #category-description h3 {
  margin: 28px 0 10px !important;
  font-size: 19px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  text-transform: none !important;
  color: var(--mh-navy) !important;
}

:is(.page-category, .page-manufacturer) #category-description h2::after,
:is(.page-category, .page-manufacturer) #category-description h3::after {
  content: none !important;
}

:is(.page-category, .page-manufacturer) #category-description p,
:is(.page-category, .page-manufacturer) #category-description li {
  font-size: 16px !important;
  line-height: 1.75 !important;
  color: #3d4656 !important;
}

:is(.page-category, .page-manufacturer) #category-description a {
  font-weight: 600;
  color: var(--mh-navy) !important;
  text-decoration: underline;
  text-decoration-color: rgba(230, 80, 33, 0.5);
  text-underline-offset: 3px;
}

:is(.page-category, .page-manufacturer) #category-description a:hover {
  color: var(--mh-orange) !important;
}

:is(.page-category, .page-manufacturer) #category-description table {
  width: 100%;
  margin: 18px 0 24px !important;
  overflow: hidden;
  font-size: 14.5px;
  border-collapse: separate !important;
  border-spacing: 0;
  border: 1px solid var(--mh-line) !important;
  border-radius: 14px;
}

:is(.page-category, .page-manufacturer) #category-description th {
  padding: 12px 16px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
  color: var(--mh-navy) !important;
  background: var(--mh-soft) !important;
  border: 0 !important;
}

:is(.page-category, .page-manufacturer) #category-description td {
  padding: 12px 16px !important;
  vertical-align: top;
  line-height: 1.55 !important;
  border: 0 !important;
  border-top: 1px solid var(--mh-line) !important;
}

/* ------------------------------------------------------------------ */
/* FAQ                                                                 */
/* ------------------------------------------------------------------ */
.page-category section#faq {
  max-width: 900px;
  margin: 0 auto 64px !important;
  padding: 0 !important;
  background: none !important;
}

.page-category section#faq h2.tt {
  margin: 0 0 20px !important;
  font-size: 28px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.015em;
  text-align: left !important;
  text-transform: none !important;
  color: var(--mh-navy) !important;
}

.page-category section#faq h2.tt::after {
  content: none !important;
}

.page-category section#faq .faq-q {
  position: relative;
  margin: 0 !important;
  padding: 18px 48px 18px 20px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  text-align: left !important;
  text-transform: none !important;
  color: var(--mh-navy) !important;
  background: #fff !important;
  border: 1px solid var(--mh-line) !important;
  border-radius: 14px !important;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.page-category section#faq .faq-q + .faq-a + .faq-q,
.page-category section#faq .faq-q + .faq-q {
  margin-top: 10px !important;
}

.page-category section#faq .faq-q:hover {
  border-color: #cfd5df !important;
}

.page-category section#faq .faq-q span {
  position: absolute;
  top: 50%;
  right: 18px;
  display: flex;
  margin: 0 !important;
  transform: translateY(-50%);
}

.page-category section#faq .faq-q span svg {
  width: 14px;
  height: 14px;
}

.page-category section#faq .faq-q span svg path {
  fill: var(--mh-orange) !important;
}

.page-category section#faq .faq-a {
  margin: 0 !important;
  padding: 14px 20px 6px !important;
  font-size: 15.5px;
  line-height: 1.7;
  color: #3d4656;
  background: none !important;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */
@media (max-width: 1199.98px) {
  #js-product-list .products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 991.98px) {
  #_desktop_category_header h1.h1,
  #_desktop_category_header .h1 {
    font-size: 28px !important;
  }

  #js-product-list .products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-category .fd-pushs-b.mh-selection {
    flex-direction: column;
    padding: 28px 20px !important;
  }
}

@media (max-width: 575.98px) {
  .page-category #wrapper > .container,
  .page-category #content-wrapper > .container,
  .page-category section#main.container {
    padding-right: 16px !important;
    padding-left: 16px !important;
  }

  #_desktop_category_header {
    margin: 8px 0 20px;
  }

  #_desktop_category_header h1.h1,
  #_desktop_category_header .h1 {
    font-size: 25px !important;
  }

  #_desktop_category_header .category-intro {
    font-size: 15px !important;
  }

  .page-category .sub_cat .subcategories-modern {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px !important;
  }

  .page-category .sub_cat .subcategory-link {
    min-height: 56px;
    gap: 8px;
  }

  .page-category .sub_cat .subcategory-image {
    width: 40px !important;
    height: 40px !important;
  }

  .page-category .sub_cat .subcategory-name {
    font-size: 13px !important;
  }

  /* Two compact cards per row on phones */
  #js-product-list .products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  #js-product-list .mh-pcard .mh-pcard__media {
    height: 150px;
    padding: 30px 10px 10px;
  }

  #js-product-list .mh-pcard__body {
    padding: 10px 10px 0;
  }

  #js-product-list .mh-pcard__meta .mh-pcard__ref {
    display: none;
  }

  #js-product-list article.mh-pcard h3.mh-pcard__name {
    height: 54px;
    font-size: 13px;
    line-height: 18px;
    -webkit-line-clamp: 3;
  }

  #js-product-list .mh-pcard__delivery {
    font-size: 11px;
  }

  #js-product-list .mh-pcard__foot {
    padding: 8px 10px 10px;
  }

  /* Tax label under the price: "excl. btw" no longer gets cut on narrow cards */
  #js-product-list .mh-pcard__prices {
    grid-template-rows: 13px 34px;
  }

  #js-product-list .mh-pcard__old {
    font-size: 11px;
    line-height: 13px;
  }

  #js-product-list .mh-pcard__price {
    font-size: 16px;
    line-height: 20px;
  }

  #js-product-list .mh-pcard__price small {
    display: block;
    margin: 0;
    font-size: 10.5px;
    line-height: 14px;
  }

  #js-product-list .mh-pcard .mh-pcard__btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  #js-product-list .mh-pcard .mh-pcard__btn svg {
    width: 17px;
    height: 17px;
  }

  #js-product-list .mh-pcard__badge,
  #js-product-list .mh-pcard__discount,
  #js-product-list .mh-pcard__flag {
    height: 20px;
    padding: 0 6px;
    font-size: 10px;
    line-height: 20px;
  }

  #js-product-list .mh-pcard__flags {
    top: 8px;
    left: 8px;
  }

  #js-product-list .mh-pcard__discount {
    top: 8px;
    right: 8px;
  }

  /* The guide spans the row: keep it after the 4th product so no row is left half empty. */
  #js-product-list .products > * {
    order: 2;
  }

  #js-product-list .products > :nth-child(-n + 5):not(.mh-listing-guide) {
    order: 0;
  }

  #js-product-list .mh-listing-guide {
    order: 1;
    grid-column: 1 / -1;
  }

  :is(.page-category, .page-manufacturer) #category-description h2 {
    font-size: 22px !important;
  }

  .page-category section#faq h2.tt {
    font-size: 23px !important;
  }
}
