@font-face {
  font-family: "BB Casual Pro";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/bbcasualerem/v4/bbcasualpro-regular.woff2") format("woff2");
}

@font-face {
  font-family: "BB Casual Pro";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/bbcasualerem/v4/bbcasualpro-medium.woff2") format("woff2");
}

@font-face {
  font-family: "BB Casual Pro";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/bbcasualerem/v4/bbcasualpro-ultra.woff2") format("woff2");
}

@font-face {
  font-family: "BB Casual Pro";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("/fonts/bbcasualerem/v4/bbcasualpro-super.woff2") format("woff2");
}

:root {
  font-family: "BB Casual Pro", system-ui, sans-serif;
  font-feature-settings: "ss18" 1;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  color: #000;
  background: #f3f3f3;
  color-scheme: light;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible { outline: 2px solid #000; outline-offset: 3px; }
[hidden] { display: none !important; }

.rack-app { height: 100svh; }
.experience {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100svh;
  overflow: hidden;
  background: #f3f3f3;
}

.intro {
  position: absolute;
  z-index: 2;
  top: 30px;
  left: clamp(20px, 3.35vw, 64px);
  pointer-events: none;
}
.intro h1 {
  margin: 0;
  font-size: clamp(24px, 2vw, 30px);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.intro p {
  margin: 8px 0 0;
  color: #757575;
  font-size: 14px;
  line-height: 1.3;
}

.scene {
  position: relative;
  z-index: 1;
  grid-row: 1;
  grid-column: 1;
  min-height: 0;
  touch-action: pan-y;
  cursor: pointer;
}
.scene canvas { display: block; width: 100%; height: 100%; }
.loading {
  position: relative;
  z-index: 4;
  grid-row: 1;
  grid-column: 1;
  display: grid;
  place-items: center;
  background: #f3f3f3;
  font-size: 18px;
  font-weight: 800;
  transition: opacity 0.3s ease;
}
.loading.done { opacity: 0; pointer-events: none; }
.loading:not(.done) ~ .product-bar { visibility: hidden; }

.product-bar {
  position: relative;
  z-index: 3;
  grid-row: 2;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 24px;
  min-height: 124px;
  padding: 18px clamp(20px, 3.35vw, 64px);
  border-top: 1px solid #e9e6e8;
  background: #fff;
}
.product-copy { min-width: 0; }
.item-number {
  display: block;
  margin-bottom: 6px;
  color: #757575;
  font-size: 12px;
  letter-spacing: 0.08em;
}
.product-copy h2 {
  margin: 0;
  font-size: clamp(19px, 1.55vw, 23px);
  font-weight: 400;
  line-height: 1.2;
}
.product-copy p {
  margin: 5px 0 0;
  color: #5e5e5e;
  font-size: 13px;
  line-height: 1.35;
}
.product-actions, .detail-actions { display: flex; align-items: center; gap: 20px; }
.product-actions { grid-column: 2; }
.product-actions button, .detail-actions button, .close-detail {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #000;
  font-size: 14px;
  font-weight: 400;
  transition: opacity 0.18s ease;
}
.product-actions button:hover, .detail-actions button:hover, .close-detail:hover { opacity: 0.6; }
.product-actions button:not(.explore) { padding: 10px 0; white-space: nowrap; }
.product-actions .explore {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 10px 0;
  border-bottom: 1px solid #000;
  white-space: nowrap;
}
.detail-actions { display: none; grid-column: 2; }
.detail-actions button { padding: 10px 0; white-space: nowrap; }
.buy-product {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  background: #000;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
  transition: color 0.18s ease, background 0.18s ease;
}
.buy-product:hover { background: #fff; color: #000; outline: 1px solid #000; }
.close-detail {
  position: absolute;
  z-index: 5;
  top: 25px;
  right: clamp(20px, 3.35vw, 64px);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 0 15px;
  font-size: 14px;
  font-weight: 400;
}
.close-detail span { display: none; }

.detail-backdrop {
  position: absolute;
  z-index: 0;
  inset: 0;
  background-size: 100% 100%;
  filter: blur(5px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.detail-open .detail-backdrop { opacity: 0.16; }
.detail-open .intro { opacity: 0; }
.detail-open .product-actions { display: none; }
.detail-open .detail-actions { display: flex; }
.detail-open .scene { cursor: grab; }
.detail-open .scene:active { cursor: grabbing; }

@media (max-width: 800px) {
  .intro { top: 20px; left: 20px; }
  .intro h1 { font-size: 24px; }
  .intro p { font-size: 12px; }
  .close-detail { top: 16px; right: 20px; }
  .product-bar {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    min-height: 0;
    padding: 15px 20px 20px;
  }
  .product-copy, .product-actions, .detail-actions, .buy-product { grid-column: 1; }
  .product-copy h2 { font-size: 20px; }
  .product-actions { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; }
  .product-actions .explore { justify-self: center; }
  .detail-actions { justify-content: stretch; }
  .detail-actions button { flex: 1; }
  .buy-product { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
