:root {
  --second-wave-filter-width: 176px;
}

.coverflow-hero {
  isolation: isolate;
  background: #1b2822;
}

.coverflow-hero::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -20px;
  background-image: url("assets/second-wave/hero/element-japan-factory-background-ej-original-v1.png");
  background-position: center 52%;
  background-size: cover;
  filter: blur(7px) sepia(0.3) hue-rotate(55deg) saturate(0.76) brightness(0.7) contrast(0.9);
  opacity: 0.82;
  transform: scale(1.04);
  pointer-events: none;
}

.coverflow-hero::after {
  z-index: 0;
  opacity: 0.1;
  background-color: rgba(22, 42, 33, 0.1);
  background-blend-mode: multiply;
  mix-blend-mode: normal;
}

@media (max-width: 720px) {
  .coverflow-hero::before {
    background-position: center 50%;
    filter: blur(5px) sepia(0.3) hue-rotate(55deg) saturate(0.76) brightness(0.68) contrast(0.9);
  }
}

.product-section {
  width: min(1500px, calc(100% - 48px));
  padding-block: clamp(54px, 6vw, 88px) 96px;
}

.second-wave-shop-shell {
  display: grid;
  grid-template-columns: var(--second-wave-filter-width) minmax(0, 1fr);
  gap: clamp(28px, 3vw, 48px);
}

.second-wave-filter--desktop {
  position: sticky;
  top: 112px;
  align-self: start;
}

.second-wave-filter-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.second-wave-filter-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 0 0 0 18px;
  border: 0;
  background: transparent;
  color: rgba(34, 34, 34, 0.58);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.second-wave-filter-button::before {
  content: "";
  position: absolute;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--charcoal-ink, #222);
  transition: width 150ms ease;
}

.second-wave-filter-button.is-active {
  color: var(--charcoal-ink, #222);
  font-weight: 700;
}

.second-wave-filter-button.is-active::before {
  width: 10px;
}

.second-wave-filter-button:focus-visible {
  outline: 2px solid var(--charcoal-ink, #222);
  outline-offset: 3px;
}

.second-wave-filter--mobile {
  display: none;
}

.second-wave-results-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line, rgba(34, 34, 34, 0.2));
  scroll-margin-top: 112px;
}

.second-wave-results-head h2 {
  margin: 0;
  font-size: clamp(21px, 2vw, 29px);
  font-weight: 650;
  letter-spacing: -0.035em;
}

.second-wave-results-head output {
  color: var(--weathered-gray, #6f6d68);
  font-size: 12px;
  white-space: nowrap;
}

.product-catalog.second-wave-product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(42px, 4vw, 64px) clamp(14px, 1.5vw, 24px);
  opacity: 1;
  transition: opacity 130ms ease;
}

.product-catalog.second-wave-product-grid.is-changing {
  opacity: 0;
}

.second-wave-card.selection-card {
  display: block;
  min-width: 0;
  margin: 0;
}

.second-wave-card.selection-card .product-photo {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 0;
  background: #fff;
}

.second-wave-card.selection-card .product-photo img,
.second-wave-card.selection-card .product-photo[data-open-product] img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: none;
  max-height: none;
  padding: 0;
  object-fit: contain;
  object-position: center;
  filter: none;
  mix-blend-mode: normal;
  transform: translate(var(--object-shift-x, 0), var(--object-shift-y, 0)) scale(var(--object-final-scale, 0.7));
  transform-origin: center;
}

.second-wave-card.selection-card .product-photo img.is-fixed-size {
  width: 88%;
  height: 88%;
  transform: translate(var(--object-shift-x, 0), var(--object-shift-y, 0));
}

.second-wave-card.selection-card.is-sold-out .product-photo img {
  filter: grayscale(1) saturate(0) brightness(0.56) contrast(0.9);
}

.second-wave-card .product-list-info {
  width: 100%;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.second-wave-card .product-list-price {
  margin-top: 12px;
}

.second-wave-card .product-list-status:empty {
  display: none;
}

.second-wave-card .product-list-status {
  color: rgba(34, 34, 34, 0.62);
}

.product-drawer.is-preorder-product .add-to-cart,
.product-drawer.is-preorder-product .mobile-add-to-cart {
  display: none;
}

.product-drawer.is-preorder-product .mobile-reservation-actions {
  grid-template-columns: 1fr;
}

.product-drawer.is-preorder-product [data-detail-image] {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transform: translate(var(--object-shift-x, 0), var(--object-shift-y, 0)) scale(var(--object-final-scale, 0.7));
  transform-origin: center;
}

.product-drawer.is-preorder-product [data-detail-image].is-fixed-size {
  width: 88%;
  height: 88%;
  transform: translate(var(--object-shift-x, 0), var(--object-shift-y, 0));
}

.product-drawer.is-preorder-product .product-detail-image-button {
  display: grid;
  place-items: center;
  overflow: hidden;
}

.reservation-message-preview {
  max-height: 280px;
  margin: 4px 0 0;
  padding: 15px;
  overflow: auto;
  border: 1px solid var(--line, rgba(34, 34, 34, 0.2));
  background: #f1efe9;
  color: var(--charcoal-ink, #222);
  font: 12px/1.7 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  white-space: pre-wrap;
}

@media (max-width: 1359px) {
  .product-catalog.second-wave-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) and (min-width: 768px) {
  :root {
    --second-wave-filter-width: 150px;
  }

  .second-wave-shop-shell {
    gap: 24px;
  }

  .product-catalog.second-wave-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .product-section {
    width: 100%;
    padding: 0 16px 64px;
  }

  .second-wave-shop-shell {
    display: block;
  }

  .second-wave-filter--desktop {
    display: none;
  }

  .second-wave-filter--mobile {
    position: sticky;
    top: 0;
    z-index: 15;
    display: block;
    width: calc(100% + 32px);
    margin: 0 -16px 28px;
    overflow-x: auto;
    border-bottom: 1px solid var(--line, rgba(34, 34, 34, 0.2));
    background: rgba(245, 244, 239, 0.96);
    backdrop-filter: blur(14px);
    scrollbar-width: none;
  }

  .second-wave-filter--mobile::-webkit-scrollbar {
    display: none;
  }

  .second-wave-filter--mobile .second-wave-filter-list {
    display: flex;
    width: max-content;
    padding: 0 16px;
  }

  .second-wave-filter--mobile .second-wave-filter-button {
    justify-content: flex-start;
    width: auto;
    min-height: 48px;
    margin-right: 22px;
    padding: 0;
    white-space: nowrap;
  }

  .second-wave-filter--mobile .second-wave-filter-button::before {
    top: auto;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 0;
  }

  .second-wave-filter--mobile .second-wave-filter-button.is-active::before {
    width: 100%;
    height: 2px;
  }

  .second-wave-results-head {
    margin-bottom: 18px;
    scroll-margin-top: 58px;
  }

  .second-wave-results-head h2 {
    font-size: 21px;
  }

  .product-catalog.second-wave-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 38px 12px;
  }

  .second-wave-card.selection-card .product-photo img.is-fixed-size {
    width: 88%;
    height: 88%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-catalog.second-wave-product-grid,
  .second-wave-filter-button::before {
    transition: none;
  }
}
