.mpw-product-explorer__inner {
  width: 100%;
}

/* Webflow sets overflow:hidden on .section-references — breaks sticky filters */
.section-references.section-products {
  overflow: visible;
}

#mpw-product-explorer,
.mpw-product-explorer-mount {
  overflow: visible;
}

.mpw-product-explorer__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
  align-items: center;
  margin-bottom: 0.85rem;
}

.mpw-product-explorer__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mpw-product-explorer__content {
  flex: 1;
  min-width: 0;
}

.mpw-product-explorer__search-label {
  flex: 1 1 240px;
  margin: 0;
}

.mpw-product-explorer__search {
  width: 100%;
  border-radius: 999px !important;
  padding-top: 0.55rem !important;
  padding-bottom: 0.55rem !important;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
  font-size: 0.875rem !important;
}

.mpw-product-explorer__toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.mpw-product-filter-toggle,
.mpw-product-filter-reset {
  appearance: none;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.mpw-product-filter-toggle:hover,
.mpw-product-filter-reset:hover,
.mpw-product-filter-toggle:focus-visible,
.mpw-product-filter-reset:focus-visible {
  border-color: #111;
}

.mpw-product-filter-toggle.is-open {
  background: #111;
  border-color: #111;
  color: #fff;
}

.mpw-product-filter-reset {
  border-color: #111;
}

.mpw-product-filter-reset:hover {
  background: #111;
  color: #fff;
}

.mpw-product-explorer__filters {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid #ececec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.mpw-product-explorer__filters[hidden] {
  display: none;
}

.mpw-product-filter-group {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.35rem 0.65rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid #f2f2f2;
}

.mpw-product-filter-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.mpw-product-filter-group__title {
  flex: 0 0 6.75rem;
  margin: 0;
  padding-top: 0.28rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #888;
  line-height: 1.3;
  text-align: left;
}

.mpw-product-filter-group__options {
  display: flex;
  flex: 1 1 12rem;
  flex-wrap: wrap;
  gap: 0.3rem;
  min-width: 0;
}

.mpw-product-filter-chip {
  appearance: none;
  border: 1px solid #e4e4e4;
  border-radius: 999px;
  background: #fafafa;
  color: #444;
  padding: 0.22rem 0.55rem;
  font: inherit;
  font-size: 0.7rem;
  line-height: 1.25;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.mpw-product-filter-chip:hover,
.mpw-product-filter-chip:focus-visible {
  border-color: #bbb;
  background: #fff;
}

.mpw-product-filter-chip.is-active {
  background: #111;
  border-color: #111;
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.mpw-product-explorer__results {
  margin: 0;
  padding: 0.35rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #666;
  border-radius: 999px;
  background: #f5f5f5;
  white-space: nowrap;
}

.mpw-product-explorer__empty {
  margin: 0;
  padding: 2.5rem 1rem;
  text-align: center;
  color: #666;
  border: 1px dashed #d0d0d0;
  border-radius: 14px;
  background: #f7f7f7;
}

/* Gallery grid */
.mpw-product-gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.1rem;
  width: 100%;
}

.mpw-product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.mpw-product-card:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.mpw-product-card:hover {
  transform: translateY(-2px);
  border-color: #d8d8d8;
  box-shadow: 0 10px 28px rgba(17, 17, 17, 0.08);
}

.mpw-product-card__media {
  position: relative;
}

.mpw-product-card__badge {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  z-index: 1;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.82);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.38rem 0.55rem;
}

.mpw-product-card__image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  overflow: hidden;
}

.mpw-product-card__image:not(.mpw-product-card__image--photo) {
  color: #888;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  padding: 1rem;
  background: #f5f5f5;
}

.mpw-product-card__image--photo {
  background: #f8f8f8;
}

.mpw-product-card__image--photo .mpw-product-card__photo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.mpw-product-card__photo {
  object-fit: cover !important;
  object-position: center center;
}

.mpw-product-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.95rem 1rem 1.1rem;
}

.mpw-product-card__title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 700;
  color: #111;
}

.mpw-product-card__subtitle {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.35;
  font-weight: 600;
  color: #666;
}

.mpw-product-card__sku {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #999;
}

.mpw-product-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.mpw-product-card__tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #f3f3f3;
  color: #444;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.32rem 0.55rem;
}

.mpw-product-card__specs {
  margin: 0.15rem 0 0;
  font-size: 0.74rem;
  line-height: 1.45;
  color: #666;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 767px) {
  .mpw-product-explorer__inner,
  .mpw-product-explorer__body,
  .mpw-product-explorer__content {
    min-width: 0;
    max-width: 100%;
  }

  .mpw-product-gallery__grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .mpw-product-card__image {
    aspect-ratio: 1 / 1;
    max-height: min(72vw, 360px);
    background: #f8f8f8;
  }

  .mpw-product-card__image--photo {
    background: #f8f8f8;
  }

  .mpw-product-card__photo {
    object-fit: contain !important;
    object-position: center center;
  }

  .mpw-product-card__body {
    padding: 0.85rem 0.9rem 1rem;
  }

  .mpw-product-modal__dialog {
    width: min(100%, calc(100vw - 0.5rem));
    max-height: 96dvh;
    border-radius: 14px;
  }

  .mpw-product-modal__image-wrap {
    aspect-ratio: 1 / 1;
    min-height: min(72vw, 360px);
    max-height: min(70dvh, 420px);
  }

  .mpw-product-modal__nav {
    width: 2.35rem;
    height: 2.35rem;
    font-size: 1.35rem;
  }

  .mpw-product-modal__nav--prev {
    left: 0.4rem;
  }

  .mpw-product-modal__nav--next {
    right: 0.4rem;
  }

  .mpw-product-modal__thumbs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.35rem;
    scrollbar-width: thin;
  }

  .mpw-product-modal__thumb {
    flex: 0 0 auto;
    width: 72px;
    height: 54px;
  }

  .mpw-product-modal__content {
    padding: 1rem 1rem 1.25rem;
  }
}

@media (min-width: 768px) {
  .mpw-product-gallery__grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
  }

  .mpw-product-filter-group__title {
    flex-basis: 7.25rem;
  }
}

@media (min-width: 992px) {
  .mpw-product-explorer__body {
    flex-direction: row;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .mpw-product-explorer__filters {
    flex: 0 0 17.5rem;
    width: 17.5rem;
    margin-bottom: 0;
    position: sticky;
    top: calc(1rem + env(safe-area-inset-top, 0px));
    align-self: flex-start;
    z-index: 2;
    max-height: calc(100dvh - 2rem - env(safe-area-inset-top, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .mpw-product-explorer__filters[hidden] {
    display: flex !important;
  }

  .mpw-product-filter-toggle {
    display: none;
  }

  .mpw-product-filter-group {
    border-bottom: 1px solid #f2f2f2;
    padding: 0.35rem 0;
  }

  .mpw-product-filter-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .mpw-product-gallery__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .mpw-product-gallery__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Product detail modal */
.mpw-product-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  background: rgba(17, 17, 17, 0.62);
  backdrop-filter: blur(2px);
}

.mpw-product-modal__dialog {
  position: relative;
  width: min(1480px, calc(100vw - 2rem));
  max-height: 96vh;
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(17, 17, 17, 0.22);
}

.mpw-product-modal__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.08);
  color: #111;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.mpw-product-modal__close:hover {
  background: rgba(17, 17, 17, 0.14);
}

.mpw-product-modal__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(240px, 0.8fr);
  gap: 0;
  align-items: start;
}

.mpw-product-modal__media {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0;
  border-right: 1px solid #ececec;
  background: #fff;
}

.mpw-product-modal__stage {
  position: relative;
  width: 100%;
}

.mpw-product-modal__image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f8f8f8;
}

.mpw-product-modal__image-open {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-select: none;
}

.mpw-product-modal__image-wrap > .mpw-product-modal__image,
.mpw-product-modal__image-open > .mpw-product-modal__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.mpw-product-modal__image {
  object-fit: contain;
  pointer-events: none;
}

.mpw-product-modal__image-hint {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 1;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.72);
  color: #fff;
  padding: 0.35rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 600;
  pointer-events: none;
}

.mpw-product-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.mpw-product-modal__nav--prev {
  left: 0.75rem;
}

.mpw-product-modal__nav--next {
  right: 0.75rem;
}

.mpw-product-modal__nav:hover {
  border-color: #111;
}

.mpw-product-modal__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0.75rem;
  background: #fff;
}

.mpw-product-modal__thumb {
  position: relative;
  width: 96px;
  height: 72px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  background: #f3f3f3;
  cursor: pointer;
}

.mpw-product-modal__thumb.is-active {
  border-color: #111;
}

.mpw-product-modal__thumb-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Fullscreen image lightbox with zoom */
.mpw-product-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10100;
  display: flex;
  flex-direction: column;
  background: rgba(10, 10, 10, 0.94);
  user-select: none;
  -webkit-user-select: none;
}

.mpw-product-lightbox__toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
}

.mpw-product-lightbox__close {
  min-width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.mpw-product-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.mpw-product-lightbox__viewport {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 1rem;
  cursor: default;
}

.mpw-product-lightbox__image {
  max-width: min(96vw, 1600px);
  max-height: calc(96vh - 4rem);
  width: auto;
  height: auto;
  object-fit: contain;
  transform-origin: center center;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-tap-highlight-color: transparent;
}

.mpw-product-lightbox__image.is-zoomed {
  cursor: zoom-out;
}

.mpw-product-modal__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  border-radius: 12px;
  border: 1px dashed #d0d0d0;
  color: #777;
  font-size: 0.875rem;
  font-weight: 600;
  background: #fff;
}

.mpw-product-modal__content {
  padding: 1.35rem 1.4rem 1.5rem;
}

.mpw-product-modal__sku {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #999;
}

.mpw-product-modal__title {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.25;
  font-weight: 700;
  color: #111;
}

.mpw-product-modal__subtitle {
  margin: 0.55rem 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
}

.mpw-product-modal__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.9rem;
}

.mpw-product-modal__specs {
  margin: 0.95rem 0 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #555;
}

.mpw-product-modal__downloads {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 1.1rem;
}

.mpw-product-modal__download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border-radius: 999px;
  border: 1px solid #111;
  padding: 0.55rem 0.95rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #111;
  text-decoration: none;
}

.mpw-product-modal__download:hover {
  background: #111;
  color: #fff;
}

@media (max-width: 900px) {
  .mpw-product-modal__dialog {
    width: min(100%, calc(100vw - 1rem));
    max-height: 96vh;
  }

  .mpw-product-modal__layout {
    grid-template-columns: 1fr;
  }

  .mpw-product-modal__media {
    border-right: none;
    border-bottom: 1px solid #ececec;
  }
}
