.explore-products {
  padding: 24px 24px 64px;
}

.explore-products__top {
  margin-top: 97px;
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.explore-products__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 18px;
  color: var(--neutral-800);
}

.explore-products__back-icon {
  width: 20px;
  height: 20px;
  transform: rotate(180deg);
  filter: invert(1) brightness(0.6);
}

.explore-products__layout {
  position: relative;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.explore-products__filters {
  background: var(--accent-800);
  box-shadow: 6px 6px 0 0 var(--accent-400);
  padding: 16px 20px;
}

.explore-products__filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--accent-200);
}

.explore-products__filters-head h2 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 22px;
  color: var(--neutral-100);
}

.explore-products__filters-close {
  display: none;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.explore-products__filters-close img {
  width: 100%;
  height: 100%;
}

.explore-products__filters-body {
  margin-top: 20px;
}

.explore-products__filters-label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 20px;
  color: var(--neutral-100);
}

.explore-products__categories {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.explore-products__category {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 17px;
  color: var(--neutral-100);
}

.explore-products__checkbox {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.explore-products__backdrop {
  display: none;
}

.explore-products__toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
}

.explore-products__filters-toggle {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-800);
  box-shadow: 6px 6px 0 0 var(--accent-400);
}

.explore-products__filters-toggle img {
  width: 26px;
  height: 26px;
}

.explore-products__search {
  position: relative;
  flex: 1;
  border: 1px solid var(--accent-500);
  height: 56px;
}

.explore-products__search-input {
  width: 100%;
  height: 100%;
  padding: 0 64px 0 16px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  color: var(--neutral-800);
  background: transparent;
}

.explore-products__search-input::placeholder {
  color: var(--neutral-600);
}

.explore-products__search-btn {
  position: absolute;
  right: 7px;
  top: 7px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-800);
}

.explore-products__search-btn img {
  width: 22px;
  height: 22px;
}

.explore-products__count {
  margin-top: 24px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  color: var(--neutral-800);
}

.explore-products__grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.explore-products__card {
  position: relative;
  border: 1px solid var(--neutral-300);
  padding: 11px;
}

.explore-products__group-heading {
  display: none;
  grid-column: 1 / -1;
  margin-top: 24px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--neutral-300);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  color: var(--accent-700);
}

.explore-products__group-heading:first-child {
  margin-top: 0;
}

.explore-products__grid.show-groups .explore-products__group-heading {
  display: block;
}

.explore-products__grid.show-groups .explore-products__group-heading.is-empty-group {
  display: none;
}

.explore-products__card .products__crosshair {
  width: 11px;
  height: 11px;
}

.explore-products__card-image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.explore-products__card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.explore-products__card-title {
  margin-top: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  line-height: normal;
  color: var(--accent-700);
}

.explore-products__view-spec {
  margin-top: 10px;
  width: 100%;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-700);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  color: var(--neutral-100);
}

.explore-products__empty {
  margin-top: 32px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--neutral-600);
}

.spec-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.spec-modal[hidden] {
  display: none;
}

.spec-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.spec-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 604px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: #fff;
  box-shadow: 0 0 55px 4px rgba(0, 0, 0, 0.25);
  padding: 24px;
}

.spec-modal__header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.spec-modal__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.spec-modal__logo {
  width: 24px;
  height: auto;
  flex-shrink: 0;
}

.spec-modal__brand span {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 16px;
  color: var(--brand-navy);
  white-space: nowrap;
}

.spec-modal__close {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.spec-modal__close img {
  width: 100%;
  height: 100%;
}

.spec-modal__title-row {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.spec-modal__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  color: var(--accent-700);
}

.spec-modal__download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--neutral-800);
}

.spec-modal__download img {
  width: 18px;
  height: 18px;
}

.spec-modal__zoom {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.spec-modal__zoom-btn {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--neutral-300);
  font-size: 16px;
  line-height: 1;
  color: var(--neutral-800);
}

.spec-modal__zoom-btn:hover {
  background: var(--neutral-100);
}

.spec-modal__zoom-level {
  min-width: 42px;
  text-align: center;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--neutral-600);
}

.spec-modal__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.spec-modal__image {
  width: 100%;
  max-width: none;
  display: block;
  touch-action: none;
}

@media (min-width: 744px) {
  .spec-modal__panel {
    padding: 32px;
  }

  .spec-modal__title {
    font-size: 20px;
  }
}

@media (min-width: 1100px) {
  .spec-modal__panel {
    padding: 42px;
  }

  .spec-modal__brand span {
    font-size: 19px;
  }

  .spec-modal__title {
    font-size: 22px;
  }
}

@media (min-width: 744px) {
  .explore-products {
    padding: 40px 40px 80px;
  }

  .explore-products__back {
    font-size: 24px;
  }

  .explore-products__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 36px;
  }

  .explore-products__card {
    flex-basis: auto;
    padding: 16px;
  }

  .explore-products__card .products__crosshair {
    width: 17px;
    height: 17px;
  }

  .explore-products__card-title {
    font-size: 20px;
  }

  .explore-products__view-spec {
    height: 44px;
    font-size: 18px;
  }
}

@media (min-width: 1100px) {
  body {
    overflow: hidden;
  }

  .explore-products {
    height: 100vh;
    padding: 0 52px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .explore-products__top {
    flex-shrink: 0;
    padding-bottom: 24px;
  }

  .explore-products__layout {
    flex: 1;
    min-height: 0;
    flex-direction: row;
    align-items: stretch;
    gap: 40px;
  }

  .explore-products__filters {
    flex: 0 0 302px;
    height: calc(100% - 32px);
    overflow-y: auto;
  }

  .explore-products__filters-close {
    display: none;
  }

  .explore-products__filters-toggle {
    display: none;
  }

  .explore-products__content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
  }

  .explore-products__toolbar,
  .explore-products__count {
    flex-shrink: 0;
  }

  .explore-products__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    flex: 1;
    min-height: 0;
    align-content: start;
    overflow-y: auto;
    padding-bottom: 40px;
  }

  .explore-products__card {
    flex-basis: auto;
  }
}

@media (min-width: 1920px) {
  .explore-products {
    padding: 0 65px;
  }

  .explore-products__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1099.98px) {
  body {
    overflow: hidden;
  }

  .explore-products {
    height: 100vh;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .explore-products__top {
    flex-shrink: 0;
  }

  .explore-products__layout {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .explore-products__content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .explore-products__toolbar,
  .explore-products__count {
    flex-shrink: 0;
  }

  .explore-products__grid {
    flex: 1;
    min-height: 0;
    align-content: start;
    overflow-y: auto;
    padding-bottom: 80px;
  }

  .explore-products__filters {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 210;
    transform: translateY(100%);
    transition: transform 0.25s ease;
    box-shadow: none;
  }

  .explore-products__filters.is-open {
    transform: translateY(0);
  }

  .explore-products__filters-close {
    display: flex;
  }

  .explore-products__backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.22);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .explore-products__backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
  }
}
