/* Isolated homepage room explorer. Dimensions reserved before catalog boot. */
.whr {
  margin: 20px auto 24px;
  min-height: 561.5px;
  color: var(--ink, #17213b);
}
.whr[hidden] {
  display: none;
}
.whr * {
  box-sizing: border-box;
}
.whr button,
.whr a {
  font: inherit;
}
.whr button {
  cursor: pointer;
  color: inherit;
  background: #fff;
  border: 1px solid #dedee5;
  border-radius: 24px;
  min-height: 44px;
  padding: 8px 16px;
  font-size: 14px;
}
.whr button[aria-selected="true"],
.whr-chips button[aria-pressed="true"] {
  background: #17213b;
  color: #fff;
  border-color: #17213b;
}
.whr :is(button, a, [tabindex]):focus-visible {
  outline: 3px solid #3f5ce8;
  outline-offset: 3px;
}
.whr-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.whr-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.whr-room-icon {
  width: 18px;
  height: 18px;
  flex: none;
}
.whr-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 20px;
  align-items: start;
}
.whr-visual {
  background: #f8f7f3;
  border: 1px solid #e8e7e2;
  border-radius: 24px;
  overflow: hidden;
  padding: 12px;
}
.whr-scene {
  position: relative;
  aspect-ratio: 3/2;
  container-type: inline-size;
  isolation: isolate;
}
.whr-room {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 14px;
}
.whr .whr-device {
  position: absolute;
  transform: translate(-50%, -50%);
  width: max(44px, var(--pw));
  height: max(44px, var(--ph));
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.whr-device img {
  width: var(--pw);
  height: var(--ph);
  max-width: none;
  object-fit: contain;
  filter: drop-shadow(2px 4px 3px #17213b44);
  transition: transform 0.15s;
}
.whr-device:hover img,
.whr-device:focus-visible img {
  transform: scale(1.08);
}
.whr .whr-device[aria-pressed="true"] {
  outline: 2px solid #3f5ce8;
  outline-offset: 2px;
}
.whr-caption {
  font-size: 13px;
  margin: 8px 0;
  color: #5b6273;
}
.whr-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.whr-chips button {
  padding: 7px 12px;
}
.whr-panel {
  min-width: 0;
  border: 1px solid #e8e7e2;
  border-radius: 24px;
  padding: 16px;
  height: 450px;
  display: flex;
  flex-direction: column;
}
.whr-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}
.whr h3 {
  font-size: 19px;
  line-height: 1.4;
  margin: 0;
}
.whr-all {
  font-size: 14px;
  white-space: nowrap;
  color: #3f5ce8;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.whr-all[hidden] {
  display: none;
}
.whr-count {
  font-size: 14px;
  color: #5b6273;
  margin: 6px 0 10px;
}
.whr .whr-back {
  align-self: start;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 44px;
  padding: 4px 10px;
  margin-bottom: 0;
}
.whr-meta {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.whr-arrows {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}
.whr-arrows[hidden] {
  display: none;
}
.whr .whr-arrows button {
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
}
.whr-arrows button:disabled {
  opacity: 0.35;
  cursor: default;
}
.whr-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  min-height: 0;
  min-width: 0;
  flex: 1;
  padding: 6px;
  scroll-padding: 6px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.whr-scroll::-webkit-scrollbar {
  display: none;
}
.whr-cards {
  display: flex;
  gap: 10px;
  height: auto;
  align-items: flex-start;
}
.whr-card {
  flex: 0 0 44%;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid #e5e5eb;
  border-radius: 16px;
  padding: 9px;
  color: inherit;
  text-decoration: none;
  background: #fff;
}
.whr-card img {
  display: block;
  width: 100%;
  height: 128px;
  flex-shrink: 0;
  object-fit: contain;
}
.whr h4 {
  font-size: 14px;
  line-height: 1.45;
  margin: 6px 0 4px;
  display: block;
  min-height: 0;
}
.whr-status {
  font-size: 12px;
  line-height: 1.5;
  color: #376c5a;
}
.whr-card strong {
  font-size: 18px;
  margin: 6px 0;
}
.whr-cta {
  margin-top: 6px;
  flex-shrink: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #3f5ce8;
  color: white;
  border-radius: 24px;
  font-size: 14px;
}
.whr:empty {
  height: 561.5px;
}
@media (max-width: 759px) {
  .whr {
    margin-top: 14px;
    margin-bottom: 20px;
    --whr-reserved: calc((100vw - 50px) / 1.5 + 535px);
    min-height: var(--whr-reserved);
  }
  .whr:empty {
    height: var(--whr-reserved);
  }
  .whr-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin-bottom: 10px;
  }
  .whr-tabs button {
    flex-direction: column;
    gap: 2px;
    line-height: 20px;
    font-size: 14px;
    padding: 3px 2px;
    white-space: nowrap;
  }
  .whr-room-icon {
    width: 16px;
    height: 16px;
  }
  .whr-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .whr-visual {
    padding: 8px;
    border-radius: 18px;
  }
  .whr-caption {
    font-size: 12px;
    margin: 4px 0;
  }
  .whr-chips {
    gap: 4px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
  }
  .whr-chips button {
    font-size: 13px;
    line-height: 1.4;
    padding: 5px 3px;
  }
  .whr-panel {
    height: 380px;
    padding: 10px;
    border-radius: 18px;
  }
  .whr-cards {
    gap: 8px;
  }
  .whr-card {
    flex-basis: 84%;
  }
  .whr-meta {
    min-height: 44px;
  }
  .whr-arrows {
    display: none;
  }
  .whr-card img {
    height: 88px;
  }
  .whr h3 {
    font-size: 16px;
  }
  .whr h4 {
    font-size: 14px;
    min-height: 0;
    margin: 6px 0 4px;
  }
  .whr-card strong {
    font-size: 16px;
    margin: 4px 0;
  }
  .whr-count {
    margin: 0;
  }
  .whr-card {
    padding: 7px;
  }
  .whr-all {
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .whr-device img {
    transition: none;
  }
}

/* Reserve the taller wrapped names on narrow phones without stretching cards. */
@media (max-width: 374px) {
  .whr-panel {
    height: 400px;
  }
  .whr {
    --whr-reserved: calc((100vw - 50px) / 1.5 + 560px);
  }
  .whr:empty {
    height: var(--whr-reserved);
  }
}

/* Three quiet hints on room entry, then stillness while reading product cards.
   Only the decorative halo animates; the product and hit target never move. */
@media (prefers-reduced-motion: no-preference) {
  .whr-device::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
  }
  .whr-device[aria-pressed="false"]:not(:hover):not(:focus)::after {
    animation: whr-device-signal 2.8s ease-out 3;
  }
  @keyframes whr-device-signal {
    0%,
    65%,
    100% {
      opacity: 0;
      box-shadow: 0 0 0 0 rgba(63, 92, 232, 0);
    }
    20% {
      opacity: 0.65;
      box-shadow:
        0 0 0 2px rgba(63, 92, 232, 0.3),
        0 0 12px 2px rgba(63, 92, 232, 0.18);
    }
    55% {
      opacity: 0;
      box-shadow:
        0 0 0 8px rgba(63, 92, 232, 0),
        0 0 18px 4px rgba(63, 92, 232, 0);
    }
  }
}

/* Desktop cards share their row height; mobile keeps its compact natural flow. */
@media (min-width: 760px) {
  .whr-panel {
    height: 450px;
    min-height: 450px;
  }
  .whr-card {
    flex-basis: max(44%, 270px);
  }
  .whr-card h4 {
    flex-shrink: 0;
  }
  .whr-card img {
    flex-shrink: 1;
    min-height: 0;
  }
  .whr-cards {
    height: 100%;
    align-items: stretch;
  }
  .whr-cta {
    margin-top: auto;
  }
}
