/* Product Explorer — section shell, sticky stage, fallback, utilities. */

.pe-section {
  position: relative;
  display: block;
  background: var(--pe-bg);
  color: var(--pe-ink);
  font-family: var(--pe-font-en);
  isolation: isolate;
}

.pe-section *,
.pe-section *::before,
.pe-section *::after {
  box-sizing: border-box;
}

.pe-section h2,
.pe-section h3,
.pe-section h4,
.pe-section p,
.pe-section figure {
  margin: 0;
  padding: 0;
  font-weight: inherit;
}

.pe-section .pe-ar {
  font-family: var(--pe-font-ar);
  letter-spacing: 0 !important; /* tracking breaks Arabic letter joining */
  text-transform: none !important;
}

.pe-section .pe-en {
  font-family: var(--pe-font-en);
}

/* Both language lines share one edge (the section's start) instead of following their own dir */
.pe-section .pe-ar,
.pe-section .pe-en {
  text-align: left;
}

.pe-section[dir="rtl"] .pe-ar,
.pe-section[dir="rtl"] .pe-en,
[dir="rtl"] .pe-section .pe-ar,
[dir="rtl"] .pe-section .pe-en {
  text-align: right;
}

.pe-section .pe-title .pe-ar,
.pe-section .pe-title .pe-en,
.pe-section .pe-hub__label .pe-ar,
.pe-section .pe-hub__label .pe-en,
.pe-section .pe-node__label .pe-ar,
.pe-section .pe-node__label .pe-en,
.pe-section .pe-fallback__head .pe-ar,
.pe-section .pe-fallback__head .pe-en {
  text-align: center;
}

.pe-section .pe-rail__label .pe-ar,
.pe-section .pe-rail__label .pe-en {
  text-align: end;
}

/* Sticky stage — the viewport that the whole timeline plays inside */
.pe-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  overflow: clip;
}

.pe-anchor {
  position: absolute;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.pe-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ───────── No-JS / failed-module fallback (removed by ProductExplorer.init) ───────── */

.pe-fallback {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14vh 6vw;
}

.pe-fallback__head {
  text-align: center;
  margin-bottom: 7vh;
}

.pe-fallback__head .pe-ar {
  display: block;
  color: var(--pe-brand);
  font-size: 1.05rem;
  font-weight: 700;
}

.pe-fallback__head .pe-en {
  display: block;
  margin-top: 6px;
  font-size: var(--pe-fs-kicker);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--pe-ink-3);
}

.pe-fallback__head h2 {
  margin-top: 14px;
  font-size: var(--pe-fs-h);
  letter-spacing: -0.02em;
}

.pe-fallback__cat {
  margin-top: 8vh;
}

.pe-fallback__cat h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--pe-line);
  font-size: var(--pe-fs-card);
}

.pe-fallback__cat h3 .pe-ar {
  color: var(--pe-brand);
}

.pe-fallback ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 18px;
  margin-top: 22px;
}

.pe-fallback li {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--pe-line);
  border-radius: var(--pe-radius-sm);
  background: var(--pe-bg-2);
  font-size: var(--pe-fs-body);
}

.pe-fallback li .pe-ar {
  font-weight: 700;
}

.pe-fallback li .pe-en {
  color: var(--pe-ink-2);
}
