/*
 * MindKits category visual system v2.0.0 consolidated
 * Theme 63 review. Category-only, preserving native Cart structure/controls.
 */
body.Category {
  --mk-category-blue: #0b62e3;
  --mk-category-blue-dark: #084bb3;
  --mk-category-orange: #f15a24;
  --mk-category-ink: #212529;
  --mk-category-muted: #666;
  --mk-category-line: #d6d6d6;
  --mk-category-soft: #f7f7f7;
  --mk-category-radius: 8px;
  color: var(--mk-category-ink);
  background: linear-gradient(180deg, #f7f9fc 0, #eef2f6 100%) !important;
  font-family: Montserrat, Arial, sans-serif;
}

body.Category .LayoutMiddle {
  padding-top: 24px;
  padding-bottom: 64px;
}

/* Intro becomes the category equivalent of the approved technical hero. */
body.Category .LayoutMiddle .row > .col-12:has(> .post-category-name) {
  position: relative;
  margin-bottom: 28px;
  padding: clamp(26px, 4vw, 46px);
  overflow: hidden;
  border-radius: var(--mk-category-radius);
  color: #fff;
  background: linear-gradient(120deg, #084bb3 0%, #0b62e3 68%, #2c7df0 100%);
  box-shadow: 0 18px 42px rgba(8, 75, 179, .2);
}

body.Category .LayoutMiddle .row > .col-12:has(> .post-category-name)::before {
  position: absolute;
  top: -80px;
  right: -48px;
  width: 220px;
  height: 220px;
  border: 34px solid rgba(255, 255, 255, .09);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

body.Category .post-category-name {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 0 12px;
  color: var(--mk-category-ink);
  font-size: clamp(1.75rem, 3.6vw, 2.7rem) !important;
  line-height: 1.14;
  letter-spacing: -.035em;
}

/* Some category controls emit a Custom Title inside the hero wrapper. */
body.Category .LayoutMiddle .row > .col-12:has(> .post-category-name) .ControlHeader,
body.Category .LayoutMiddle .row > .col-12:has(> .post-category-name) h2,
body.Category .LayoutMiddle .row > .col-12:has(> .post-category-name) h3,
body.Category .LayoutMiddle .row > .col-12:has(> .post-category-name) h4 {
  color: #fff;
}

/* Custom Title outside the hero remains readable on white surfaces. */
body.Category .LayoutContent .ControlHeader,
body.Category .LayoutContent .CustomTitle,
body.Category .LayoutContent [class*="CustomTitle"] {
  color: var(--mk-category-ink);
}

body.Category .mk-category-header-content {
  position: relative;
  z-index: 1;
  max-width: 850px;
}

body.Category .mk-category-header-content p {
  margin: 0;
  color: var(--mk-category-muted);
  font-size: .96rem;
  line-height: 1.72;
}

body.Category .mk-category-header-content::after {
  display: block;
  width: 68px;
  height: 7px;
  margin-top: 22px;
  border-radius: 4px;
  background: var(--mk-category-orange);
  content: "";
  transition: width .24s ease;
}

/* Navigation and filters use the same floating-white-panel language. */
body.Category .LayoutLeftColumnInner {
  position: static;
}

body.Category .leftColumn {
  position: sticky;
  top: 108px;
  max-height: calc(100vh - 124px);
  padding: 10px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 0;
  border-radius: var(--mk-category-radius);
  background: #fff;
  box-shadow: 0 16px 38px rgba(33, 37, 41, .1);
}

body.Category .leftColumn > .Control {
  margin: 0;
  border-bottom: 1px solid #e6e9ee;
}

body.Category .leftColumn > .Control:last-child {
  border-bottom: 0;
}

body.Category .leftColumn .Control ul {
  display: block;
  max-height: 0;
  overflow: hidden;
}

body.Category .leftColumn .Control .all-leftColumn-header.active + ul {
  max-height: 420px;
  overflow-y: auto;
}

body.Category .all-leftColumn-link {
  padding: 9px 12px;
  border-radius: 5px;
  color: #3f4650;
  font-size: .875rem;
  transition: color .18s ease, background .18s ease, padding-left .18s ease;
}

body.Category .all-leftColumn-link:hover,
body.Category .all-leftColumn-link:focus-visible {
  padding-left: 16px;
  color: var(--mk-category-blue);
  background: #eef4ff;
}

/* Native sorting/product-count strip. */
body.Category .Manufacturer-topNavigation {
  min-height: 64px;
  margin-bottom: 18px !important;
  padding: 12px 14px;
  border: 0;
  border-radius: var(--mk-category-radius);
  background: #fff;
  box-shadow: 0 12px 30px rgba(33, 37, 41, .09);
}

body.Category .topNavigation-count {
  color: var(--mk-category-muted);
  font-size: 1rem;
}

body.Category .topNavigation-count b {
  color: var(--mk-category-blue);
}

body.Category .topNavigation .form-select {
  min-height: 40px;
  border: 1px solid var(--mk-category-line);
  border-radius: 5px;
  color: var(--mk-category-ink);
  background-color: #fff;
  font-size: .72rem;
}

body.Category .topNavigation-switch .btn,
body.Category .mk-category-drawer-trigger {
  min-height: 40px;
  border: 0;
  border-radius: 5px;
  color: #fff;
  background: var(--mk-category-blue);
}

/* Product cards remain native and directly cartable. */
body.Category .product-list {
  --bs-gutter-x: 18px;
}

body.Category .Search-productItem {
  margin-bottom: 18px !important;
}

body.Category .productItem-wrap {
  height: 100%;
  overflow: hidden;
  border: 0;
  border-radius: var(--mk-category-radius);
  background: #fff;
  box-shadow: 0 13px 32px rgba(33, 37, 41, .1);
  transition: transform .22s ease, box-shadow .22s ease;
}

body.Category .productItem-wrap::after {
  display: block;
  width: 58px;
  height: 6px;
  margin: 0 16px 14px auto;
  border-radius: 4px;
  background: var(--mk-category-orange);
  content: "";
  transition: width .24s ease;
}

body.Category .productItem-thumbnail {
  display: block;
  margin: 9px;
  overflow: hidden;
  border-radius: 6px;
  background: linear-gradient(145deg, #fbfcfe, #eef2f7);
}

body.Category .productItem-thumbnail-photo {
  min-height: 230px;
  display: grid;
  place-items: center;
}

body.Category .CategoryProductThumbnail {
  transition: transform .28s ease;
}

body.Category .productItem-caption {
  min-height: 86px;
  padding: 13px 16px 8px !important;
}

body.Category .productItem-caption-name {
  margin: 0 !important;
  font-size: .82rem !important;
  font-weight: 700 !important;
  line-height: 1.42;
}

body.Category .productItem-caption-name a {
  color: var(--mk-category-ink);
}

body.Category .productItem-wrap > .prodItemCapPrice-price {
  min-height: 44px;
  padding: 0 16px;
  color: var(--mk-category-muted);
  font-size: .68rem;
}

body.Category .CategoryProductPrice {
  color: var(--mk-category-blue);
  font-size: .86rem;
  font-weight: 800;
}

body.Category .CategoryProductPriceLabel {
  display: none;
}

body.Category .CategoryProductAddToCart {
  min-height: 38px;
  padding: 8px 13px;
  border: 0;
  border-radius: 5px;
  color: #fff;
  background: #242424 !important;
  font-size: .68rem;
  font-weight: 800;
  text-transform: none;
}

body.Category .CategoryProductAddToCart:hover,
body.Category .CategoryProductAddToCart:focus-visible {
  background: #111 !important;
}

body.Category .productItem-thumbnail-quickView {
  border: 0;
  border-radius: 5px;
  color: #fff;
  background: var(--mk-category-blue);
}

body.Category .bottomNav {
  margin-top: 8px;
  padding: 16px !important;
  border-radius: var(--mk-category-radius);
  background: #fff;
  box-shadow: 0 12px 30px rgba(33, 37, 41, .08);
}

@media (hover: hover) and (pointer: fine) {
  body.Category .LayoutMiddle .row > .col-12:has(> .post-category-name):hover .mk-category-header-content::after {
    width: 142px;
  }

  body.Category .productItem-wrap:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 48px rgba(33, 37, 41, .16);
  }

  body.Category .productItem-wrap:hover::after {
    width: 118px;
  }

  body.Category .productItem-wrap:hover .CategoryProductThumbnail {
    transform: scale(1.045);
  }
}

@media (max-width: 991px) {
  body.Category,
  body.Category .Layout,
  body.Category .LayoutMiddle,
  body.Category .LayoutContent,
  body.Category .LayoutContentInner {
    max-width: 100%;
    overflow-x: hidden;
  }

  body.Category .LayoutMiddle {
    padding-top: 14px;
  }

  body.Category .LayoutMiddle .row > .col-12:has(> .post-category-name) {
    margin-bottom: 16px;
    padding: 26px 22px;
  }

  body.Category .Manufacturer-topNavigation {
    padding: 10px;
  }

  body.Category .mk-mobile-category-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  body.Category .LayoutLeftColumnInner {
    position: static;
  }

  body.Category .leftColumn {
    position: fixed;
    max-height: none;
  }
}

@media (max-width: 575px) {
  body.Category .LayoutMiddle {
    padding-inline: 10px;
  }

  body.Category .LayoutMiddle .row > .col-12:has(> .post-category-name) {
    border-radius: 7px;
  }

  body.Category .post-category-name {
    font-size: 1.65rem !important;
  }

  body.Category .product-list {
    --bs-gutter-x: 10px;
  }

  body.Category .Search-productItem {
    margin-bottom: 10px !important;
  }

  body.Category .productItem-thumbnail {
    margin: 6px;
  }

  body.Category .productItem-thumbnail-photo {
    min-height: 150px;
  }

  body.Category .productItem-caption {
    min-height: 86px;
    padding: 10px 10px 6px !important;
  }

  body.Category .productItem-caption-name {
    font-size: .7rem !important;
  }

  body.Category .productItem-wrap > .prodItemCapPrice-price {
    min-height: 64px;
    padding: 0 10px;
    align-items: flex-start !important;
    flex-wrap: wrap;
  }

  body.Category .CategoryProductAddToCart {
    width: 100%;
  }
}

@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  body.Category .productItem-wrap,
  body.Category .CategoryProductThumbnail,
  body.Category .productItem-wrap::after,
  body.Category .mk-category-header-content::after,
  body.Category .all-leftColumn-link {
    transform: none !important;
    transition: none !important;
  }
}

/* Final readability overrides: retain approved values against theme utility classes. */
body.Category h1.post-category-name {
  color: #212529 !important;
}

body.Category .topNavigation .topNavigation-count,
body.Category .topNavigation-count,
body.Category .topNavigation-count span,
body.Category .topNavigation-count b {
  font-size: 16px !important;
  line-height: 1.4;
}


/* Canonical category navigation presentation. Full background shorthand clears legacy gradients. */
body.Category .leftColumn .all-leftColumn-header,
body.Category .leftColumn .all-leftColumn-header > strong,
body.Category .leftColumn .all-leftColumn-header .ControlHeader {
  color: #212529 !important;
  font-size: 16px !important;
  line-height: 1.35 !important;
}

body.Category .leftColumn .all-leftColumn-header.active,
body.Category .leftColumn .all-leftColumn-header.active > strong,
body.Category .leftColumn .all-leftColumn-header.active .ControlHeader {
  color: #212529 !important;
  background: #edf0f4 !important;
}

body.Category .leftColumn .all-leftColumn-link,
body.Category .leftColumn .all-leftColumn-link.category-link {
  color: #3f4650 !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
}
