/* =========================
   RESET
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =========================
   PAGE / BACKGROUND
========================= */
html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  position: relative;
  background-image: url("../assets/library.png");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #000;
  font-family: Georgia, "Times New Roman", serif;
  color: #f2eee7;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  pointer-events: none;
  z-index: 1;
}

.products-page {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 2;
}

/* =========================
   GLOBAL NAVBAR
========================= */
.global-nav {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 2rem;
  padding: 0.6rem 2rem;
  background: transparent;
}

.global-nav a {
  color: #ffffff;
  text-decoration: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.25s ease;
}

.global-nav a:hover {
  color: rgba(255, 210, 140, 0.9);
  transform: translateY(-1px);
  text-shadow: 0 0 6px rgba(255, 210, 140, 0.3);
}

/* =========================
   INTRO PLAQUE
========================= */
.products-intro {
  position: absolute;
  left: 2.2rem;
  top: 1.5rem;
  width: 250px;
  z-index: 8;
  padding: 1rem 1rem 1.2rem;
  border: 1px solid rgba(215, 194, 150, 0.14);
  border-radius: 14px;
  background:
    radial-gradient(circle at top left, rgba(255, 210, 120, 0.05), transparent 58%),
    linear-gradient(180deg, rgba(18, 14, 11, 0.56), rgba(6, 5, 4, 0.44));
  box-shadow:
    0 12px 35px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 240, 208, 0.02) inset;
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
}

.eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(232, 210, 172, 0.76);
  margin-bottom: 0.7rem;
}

.products-intro h1 {
  font-size: 1.25rem;
  line-height: 1.1;
  font-weight: 500;
  color: #f4eee3;
  margin-bottom: 0.7rem;
}

.products-intro p:last-child {
  font-size: 0.82rem;
  line-height: 1.5;
  color: rgba(240, 232, 220, 0.72);
}

/* =========================
   HOTSPOT LAYER
========================= */
.hotspot-layer {
  position: relative;
  width: 100%;
  height: 100%;
}

.hotspot {
  position: absolute;
  padding: 0;
  border: none;
  outline: none;
  background: transparent;
  cursor: pointer;
  z-index: 3;
}

.hotspot:hover,
.hotspot:focus-visible {
  background: transparent;
  box-shadow: none;
}

/* mapped zones */
.ghost-box {
  left: 530px;
  top: 285px;
  width: 167px;
  height: 140px;
}

.mug21-box {
  left: 1240px;
  top: 285px;
  width: 160px;
  height: 140px;
}

.bsharp-box {
  left: 885px;
  top: 445px;
  width: 155px;
  height: 135px;
}

.leaf-box {
  left: 530px;
  top: 600px;
  width: 150px;
  height: 140px;
}

.d20-box {
  left: 1250px;
  top: 600px;
  width: 150px;
  height: 150px;
}

/* =========================
   BOTTOM CTA INSCRIPTION
========================= */
.products-cta {
  position: absolute;
  left: 50%;
  bottom: 0.65rem;
  transform: translateX(-50%);
  width: 55vw;
  max-width: 980px;
  min-width: 720px;
  min-height: 120px;
  z-index: 8;
  padding: 0.85rem 2rem 1rem;
  text-align: center;
  background:
    radial-gradient(circle at center, rgba(0, 0, 0, 0.28), transparent 70%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.products-cta .eyebrow {
  margin-bottom: 0.35rem;
  color: rgba(232, 210, 172, 0.76);
  text-shadow:
    0 0 8px rgba(70, 255, 135, 0.16),
    0 2px 8px rgba(0, 0, 0, 0.75);
}

.cta-message {
  width: 100%;
  font-size: clamp(1rem, 1.3vw, 1.35rem);
  line-height: 1.25;
  color: rgba(240, 232, 220, 0.9);
  margin-bottom: 0.8rem;
  white-space: nowrap;
  text-shadow:
    0 0 8px rgba(0, 0, 0, 0.9),
    0 2px 8px rgba(0, 0, 0, 0.8);
}

.products-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border: 1px solid rgba(215, 194, 150, 0.2);
  text-decoration: none;
  color: #f2eee7;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.25s ease;
  background: rgba(0, 0, 0, 0.22);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}

.products-cta a:hover {
  transform: translateY(-2px);
  border-color: rgba(132, 255, 171, 0.35);
  color: rgba(132, 255, 171, 0.95);
  box-shadow: 0 0 14px rgba(70, 255, 135, 0.12);
}

/* =========================
   PRODUCT CARD
========================= */
.product-card-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(32vw, 520px);
  z-index: 20;
}

.hidden {
  display: none;
}

/* =========================
   ANIMATION
========================= */
.materialize {
  opacity: 0;
  filter: blur(10px);
  animation: materializeCard 0.95s ease forwards;
}

.dematerialize {
  animation: dematerializeCard 0.95s ease forwards;
}

@keyframes materializeCard {
  0% {
    opacity: 0;
    filter: blur(10px);
    transform: translate(-50%, calc(-50% + 14px)) scale(0.985);
  }
  45% {
    opacity: 0.38;
    filter: blur(5px);
    transform: translate(-50%, calc(-50% + 6px)) scale(0.992);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes dematerializeCard {
  0% {
    opacity: 1;
    filter: blur(0);
    transform: translate(-50%, -50%) scale(1);
  }
  55% {
    opacity: 0.38;
    filter: blur(5px);
    transform: translate(-50%, calc(-50% + 6px)) scale(0.992);
  }
  100% {
    opacity: 0;
    filter: blur(10px);
    transform: translate(-50%, calc(-50% + 14px)) scale(0.985);
  }
}

/* =========================
   CARD DESIGN
========================= */
.product-card-panel {
  position: relative;
  width: 100%;
  padding: 2.6rem 2.2rem 2.2rem;
  border-radius: 18px;
  border: 1px solid rgba(215, 194, 150, 0.22);
  background:
    radial-gradient(circle at top, rgba(255, 210, 120, 0.08), transparent 55%),
    linear-gradient(
      180deg,
      rgba(20, 16, 12, 0.95) 0%,
      rgba(10, 8, 6, 0.95) 100%
    );
  box-shadow:
    0 0 0 1px rgba(255, 240, 208, 0.05) inset,
    0 18px 60px rgba(0, 0, 0, 0.6),
    0 0 28px rgba(255, 180, 90, 0.06);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  overflow: hidden;
}

.product-card-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 210, 120, 0.08), transparent 55%);
  opacity: 0.6;
  animation: cardFlicker 6s ease-in-out infinite;
}

@keyframes cardFlicker {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.75;
  }
}

/* =========================
   CLOSE BUTTON
========================= */
.close-card {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(40, 40, 40, 0.7);
  border-radius: 50%;
  background: rgba(5, 5, 5, 0.9);
  color: #f2eee7;
  font-size: 1.15rem;
  cursor: pointer;
  z-index: 3;
  transition: all 0.25s ease;
}

.close-card:hover {
  transform: scale(1.05);
}

/* =========================
   TEXT STYLING
========================= */
.product-status {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(232, 210, 172, 0.75);
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
}

.product-status.is-live {
  color: rgba(132, 255, 171, 0.92);
  text-shadow:
    0 0 8px rgba(70, 255, 135, 0.35),
    0 0 18px rgba(70, 255, 135, 0.16);
}

.product-card-panel h1 {
  font-size: clamp(2.2rem, 3vw, 3rem);
  font-weight: 500;
  line-height: 1;
  color: #f4eee3;
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
  padding-top: 0.6rem;
}

.product-card-panel h1::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  width: 60px;
  height: 1px;
  background: rgba(215, 194, 150, 0.35);
}

.product-description {
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(240, 232, 220, 0.82);
  position: relative;
  z-index: 2;
  padding-right: 4.5rem;
}

/* =========================
   LINKS
========================= */
.product-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
  position: relative;
  z-index: 2;
}

.product-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid rgba(215, 194, 150, 0.25);
  text-decoration: none;
  color: #f2eee7;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.25s ease;
  background: rgba(0, 0, 0, 0.18);
}

.product-link-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(132, 255, 171, 0.35);
  color: rgba(132, 255, 171, 0.95);
  box-shadow: 0 0 14px rgba(70, 255, 135, 0.12);
}

/* =========================
   SYMBOL IMAGE
========================= */
.product-symbol {
  position: absolute;
  right: 18px;
  bottom: 14px;
  width: 55px;
  height: 55px;
  object-fit: contain;
  opacity: 0.85;
  filter:
    drop-shadow(0 0 6px rgba(0, 0, 0, 0.6))
    drop-shadow(0 0 4px rgba(255, 180, 90, 0.15));
  pointer-events: none;
  z-index: 2;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1200px) {
  .products-intro {
    left: 1.2rem;
    top: 4rem;
    width: 240px;
  }

  .products-cta {
    width: 58vw;
    min-width: 640px;
    bottom: 1rem;
  }

  .cta-message {
    font-size: 1rem;
  }
}

@media (max-width: 900px) {
  html,
  body {
    overflow: auto;
    min-height: 100%;
  }

  body {
    background-size: cover;
    background-position: center;
  }

  .products-page {
    min-height: 100vh;
    padding: 5.2rem 1rem 2rem;
  }

  .global-nav {
    gap: 1rem;
    padding: 0.5rem 1rem;
    flex-wrap: wrap;
  }

  .global-nav a {
    font-size: 0.72rem;
  }

  .products-intro,
  .products-cta {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    transform: none;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0 auto 1rem;
  }

  .products-cta {
    min-height: 145px;
  }

  .cta-message {
    white-space: normal;
    font-size: 1rem;
  }

  .hotspot-layer {
    height: 50vh;
    min-height: 420px;
  }

  .product-card-wrap {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
  }

  @keyframes materializeCard {
    0% {
      opacity: 0;
      filter: blur(10px);
      transform: translate(-50%, calc(-50% + 14px)) scale(0.985);
    }
    45% {
      opacity: 0.38;
      filter: blur(5px);
      transform: translate(-50%, calc(-50% + 6px)) scale(0.992);
    }
    100% {
      opacity: 1;
      filter: blur(0);
      transform: translate(-50%, -50%) scale(1);
    }
  }

  @keyframes dematerializeCard {
    0% {
      opacity: 1;
      filter: blur(0);
      transform: translate(-50%, -50%) scale(1);
    }
    55% {
      opacity: 0.38;
      filter: blur(5px);
      transform: translate(-50%, calc(-50% + 6px)) scale(0.992);
    }
    100% {
      opacity: 0;
      filter: blur(10px);
      transform: translate(-50%, calc(-50% + 14px)) scale(0.985);
    }
  }
}

@media (max-width: 640px) {
  .products-page {
    padding-top: 6rem;
  }

  .products-intro,
  .products-cta {
    padding: 1.1rem;
  }

  .products-intro h1 {
    font-size: 1.45rem;
  }

  .cta-message {
    font-size: 1rem;
    line-height: 1.4;
  }

  .product-card-panel {
    padding: 1.8rem 1.2rem 1.8rem;
  }

  .product-card-panel h1 {
    font-size: 2rem;
  }

  .product-description {
    font-size: 0.96rem;
    line-height: 1.55;
    padding-right: 4rem;
  }

  .product-links {
    flex-direction: column;
  }

  .product-link-btn {
    width: 100%;
  }

  .product-symbol {
    width: 48px;
    height: 48px;
    right: 14px;
    bottom: 12px;
  }
}