/* ============================================================
   PRODUCT SHOWCASE — Industrial Dark Blue
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Source+Sans+3:ital,wght@0,300;0,400;0,600;1,300&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --ps-bg:          #05305e;
  --ps-bg-deep:     #031e3c;
  --ps-card-bg:     #072848;
  --ps-card-hover:  #0b3a6a;
  --ps-accent:      #2196f3;
  --ps-accent-glow: rgba(33,150,243,0.35);
  --ps-accent2:     #00e5ff;
  --ps-text:        #cfe3f5;
  --ps-text-dim:    #7aabbf;
  --ps-white:       #ffffff;
  --ps-border:      rgba(33,150,243,0.22);
  --ps-hp-size:     38px;
  --ps-radius:      6px;
  --ps-transition:  0.35s cubic-bezier(0.4,0,0.2,1);
}

/* ---------- Section Wrapper ---------- */
.ps-section-wrapper {
  background: var(--ps-bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(33,150,243,0.12) 0%, transparent 70%),
    repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(33,150,243,0.04) 60px),
    repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(33,150,243,0.04) 60px);
    /* font-family: 'Source Sans 3', sans-serif; */

}

.ps-section-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 40% at 80% 80%, rgba(0,229,255,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.ps-section {
    color: var(--ps-text);
    padding: 60px 40px 80px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}
/* ---------- Product Cards Grid ---------- */
.ps-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  max-width: 1200px;
  margin: 0 auto 0;
  position: relative;
  z-index: 1;
}

/* ---------- Individual Card ---------- */
.ps-card {
  background: var(--ps-card-bg);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: border-color var(--ps-transition), box-shadow var(--ps-transition), transform var(--ps-transition);
  position: relative;
  overflow: hidden;
}

.ps-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(33,150,243,0.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--ps-transition);
  pointer-events: none;
}

.ps-card:hover,
.ps-card.is-active {
  border-color: var(--ps-accent);
  box-shadow: 0 0 0 1px var(--ps-accent), 0 8px 32px rgba(33,150,243,0.25);
  transform: translateY(-3px);
}

.ps-card:hover::after,
.ps-card.is-active::after {
  opacity: 1;
}

.ps-card.is-active {
  transform: translateY(-3px);
}

/* Active indicator bar */
.ps-card.is-active::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ps-accent), var(--ps-accent2));
  z-index: 2;
}

/* ---------- Card Image ---------- */
.ps-card-image {
  position: relative;
  background: var(--ps-bg-deep);
  overflow: hidden;
  flex-shrink: 0;
}

.ps-card-image img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  padding: 16px;
  box-sizing: border-box;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
  display: block;
}

.ps-card:hover .ps-card-image img {
  transform: scale(1.05);
}

/* ---------- Card Body ---------- */
.ps-card-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.ps-card-title {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: var(--ps-white);
  margin: 0 0 10px;
  text-transform: uppercase;
}

.ps-card-desc {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--ps-text-dim);
  margin: 0 0 16px;
  flex: 1;
}

.ps-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ps-accent);
  text-decoration: none;
  transition: color var(--ps-transition), gap var(--ps-transition);
  width: fit-content;
}

.ps-card-link::after {
  content: '›';
  font-size: 1.1em;
  transition: transform var(--ps-transition);
}

.ps-card-link:hover {
  color: var(--ps-accent2);
  gap: 10px;
}

.ps-card-link:hover::after {
  transform: translateX(3px);
}

/* ---------- Detail Panel ---------- */
.ps-detail-panel {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  /* collapsed state */
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s cubic-bezier(0.4,0,0.2,1), opacity 0.5s ease, margin 0.5s ease;
  opacity: 0;
}

.ps-detail-panel.is-open {
  max-height: 900px;
  opacity: 1;
  margin-top: 32px;
  overflow: visible;
}

.ps-detail-inner {
  background: var(--ps-bg-deep);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius);
  position: relative;
  overflow: visible; /* allow infoboxes to extend beyond the panel */
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(33,150,243,0.15);
}

/* Corner accents */
.ps-detail-inner::before,
.ps-detail-inner::after {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  z-index: 2;
  pointer-events: none;
}
.ps-detail-inner::before {
  top: -1px; left: -1px;
  border-top: 2px solid var(--ps-accent);
  border-left: 2px solid var(--ps-accent);
}
.ps-detail-inner::after {
  bottom: -1px; right: -1px;
  border-bottom: 2px solid var(--ps-accent2);
  border-right: 2px solid var(--ps-accent2);
}

/* ---------- Detail Image Stage ---------- */
.ps-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 460px;
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(33,150,243,0.08) 0%, transparent 70%),
    var(--ps-bg-deep);
  padding: 40px;
  box-sizing: border-box;
}

/* Wrapper shrinks to match the rendered image exactly —
   heatpoints inside are % of the actual image, not the full stage */
.ps-image-wrapper {
  position: relative;
  display: inline-block;
  max-width: 65%;
}

.ps-stage-image {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.6));
  transition: opacity 0.4s ease;
}

/* ---------- Heat Points ---------- */
.ps-heatpoint {
  position: absolute;
  z-index: 10;
  cursor: pointer;
  /* offset by half the button size so the dot centres on the coordinate */
  transform: translate(-50%, -50%);
}

.ps-heatpoint-btn {
  width: var(--ps-hp-size);
  height: var(--ps-hp-size);
  border-radius: 50%;
  background: rgba(5, 48, 94, 0.85);
  border: 2px solid var(--ps-accent);
  color: var(--ps-white);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background var(--ps-transition), border-color var(--ps-transition), transform var(--ps-transition);
  box-shadow: 0 0 0 4px var(--ps-accent-glow);
}

/* Pulse ring */
.ps-heatpoint-btn::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid var(--ps-accent);
  opacity: 0.5;
  animation: ps-pulse 2.5s ease-in-out infinite;
}

.ps-heatpoint-btn::after {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px solid var(--ps-accent);
  opacity: 0.2;
  animation: ps-pulse 2.5s ease-in-out infinite 0.4s;
}

@keyframes ps-pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50%       { transform: scale(1.25); opacity: 0; }
}

.ps-heatpoint:hover .ps-heatpoint-btn,
.ps-heatpoint.is-active .ps-heatpoint-btn {
  background: var(--ps-accent);
  border-color: var(--ps-accent2);
  transform: scale(1.15);
  box-shadow: 0 0 0 6px rgba(33,150,243,0.4), 0 0 20px rgba(33,150,243,0.6);
}

/* Connector line from heatpoint to info box */
.ps-hp-line {
  position: absolute;
  background: var(--ps-accent);
  opacity: 0.6;
  pointer-events: none;
  transform-origin: 0 50%;
}

/* ---------- Info Boxes (desktop floating) ---------- */
.ps-infobox {
  position: absolute;
  z-index: 20;
  width: 220px;
  background: rgba(5, 30, 60, 0.95);
  border: 1px solid var(--ps-accent);
  border-radius: var(--ps-radius);
  padding: 16px 18px 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 0 0 1px rgba(33,150,243,0.1);
  backdrop-filter: blur(8px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.34,1.56,0.64,1);
}

.ps-infobox::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--ps-accent), var(--ps-accent2));
  border-radius: var(--ps-radius) var(--ps-radius) 0 0;
}

/* --- Side variants (desktop) --- */
.ps-infobox--right {
  left: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) translateX(-8px) scale(0.92);
}
.ps-infobox--left {
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) translateX(8px) scale(0.92);
}
.ps-infobox--right.is-visible {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(-50%) translateX(0) scale(1);
}
.ps-infobox--left.is-visible {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(-50%) translateX(0) scale(1);
}

/* above/below variants removed — mobile uses the slide-up panel instead */

/* ---------- Mobile Slide-up Info Panel ---------- */
.ps-mobile-panel {
  display: none; /* hidden on desktop */
}

/* ---------- Shared infobox content styles ---------- */

.ps-infobox-num {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ps-accent2);
  margin: 0 0 4px;
}

.ps-infobox-title {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ps-white);
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ps-infobox-desc {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--ps-text-dim);
  margin: 0;
}

.ps-infobox-close {
  position: absolute;
  top: 10px; right: 10px;
  width: 18px; height: 18px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--ps-text-dim);
  font-size: 14px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  transition: color var(--ps-transition);
}
.ps-infobox-close:hover { color: var(--ps-white); }

/* ---------- Detail Close Button ---------- */
.ps-detail-close {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 30;
  width: 32px; height: 32px;
  background: rgba(33,150,243,0.12);
  border: 1px solid var(--ps-border);
  border-radius: 50%;
  color: var(--ps-text-dim);
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--ps-transition), color var(--ps-transition);
}
.ps-detail-close:hover {
  background: rgba(33,150,243,0.3);
  color: var(--ps-white);
}

/* ---------- Scan line overlay on detail ---------- */
.ps-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.06) 3px,
    rgba(0,0,0,0.06) 4px
  );
  pointer-events: none;
  z-index: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .ps-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .ps-image-wrapper { max-width: 80%; }
  .ps-stage { min-height: 320px; padding: 24px; }
}

/* ----- Mobile: replace floating infoboxes with slide-up panel ----- */
@media (max-width: 768px) {
  /* Hide floating boxes — too cramped on mobile */
  .ps-infobox {
    display: none;
  }

  /* Mobile slide-up panel anchored to bottom of stage */
  .ps-mobile-panel {
    display: block;
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: rgba(3, 20, 42, 0.97);
    border-top: 1px solid var(--ps-accent);
    border-radius: 0 0 var(--ps-radius) var(--ps-radius);
    padding: 16px 18px 20px;
    z-index: 30;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.32s cubic-bezier(0.4,0,0.2,1), opacity 0.28s ease;
    pointer-events: none;
  }
  .ps-mobile-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--ps-accent), var(--ps-accent2));
  }
  .ps-mobile-panel.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .ps-mobile-panel .ps-infobox-num {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ps-accent2);
    margin: 0 0 4px;
  }
  .ps-mobile-panel .ps-infobox-title {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--ps-white);
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }
  .ps-mobile-panel .ps-infobox-desc {
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--ps-text-dim);
    margin: 0;
  }
  .ps-mobile-panel-close {
    position: absolute;
    top: 12px; right: 12px;
    width: 22px; height: 22px;
    background: rgba(33,150,243,0.15);
    border: 1px solid var(--ps-border);
    border-radius: 50%;
    color: var(--ps-text-dim);
    font-size: 14px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    padding: 0;
    transition: background var(--ps-transition), color var(--ps-transition);
  }
  .ps-mobile-panel-close:hover { background: rgba(33,150,243,0.3); color: var(--ps-white); }

  /* Stage needs overflow hidden so panel doesn't bleed out */
  .ps-stage { overflow: hidden; }
}

@media (max-width: 560px) {
  .ps-section { padding: 40px 20px 60px; }
  .ps-cards-grid { grid-template-columns: 1fr; }
  .ps-image-wrapper { max-width: 90%; }
}
