/* ============================================================================
   EZ42 — Product page shell
   ----------------------------------------------------------------------------
   The hero band, signature strip, side panel, toolbar and section headings
   shared by every product page: kits, pages and tracks, in both the store and
   the owned ("my") views.

   Prefix: .hp-   Activity cards live in css/activity-card.css.

   Panel variants
 store  — label, price, CTA, includes list, collectible strip, fine print
 owned  — label, counter, rail, completion block, CTA

   Both variants keep one fixed slot order so blocks appear and disappear
   without the others moving.
   ============================================================================ */

/* ======================================================================
   Kit store page — direction 1a (storefront), card treatment 2b.
   Prefix: .hp-  |  Activity cards come from css/activity-card.css.
   ====================================================================== */

.hp-page {
  --hp-purple: #8b5cf6;
  --hp-purple-deep: #7c3aed;
  --hp-orange: #ff7f4d;
  --hp-orange-hover: #ea580c;
  --hp-green: #15803d;
  --hp-green-deep: #166534;
  --hp-text: #1e293b;
  --hp-text-soft: #475569;
  --hp-text-muted: #64748b;
  --hp-text-light: #94a3b8;
  --hp-canvas: #f8fafc;
  --hp-surface: #ffffff;
  --hp-border: #e2e8f0;
  --hp-border-soft: #f1f5f9;
  --hp-ease: cubic-bezier(0.4, 0, 0.2, 1);

  direction: rtl;
  text-align: right;
  font-family: 'Assistant', 'Heebo', system-ui, sans-serif;
  color: var(--hp-text-soft);
}

.hp-page *,
.hp-page *::before,
.hp-page *::after { box-sizing: border-box; }

.hp-page :focus-visible {
  outline: 2px solid var(--hp-purple);
  outline-offset: 2px;
}

/* ---------- Hero ---------- */

/* Full-bleed: the gradient runs edge to edge. The 1200px cap applies to
   the content inside the hero, not to the gradient itself. */
.hp-hero {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  display: block;
}

.hp-hero-inner {
  max-width: none;
  margin: 0 auto;
  padding: 44px 56px 40px;
  display: grid;
  grid-template-columns: 1fr 372px;
  gap: 48px;
  align-items: start;
}

.hp-hero-main { min-width: 0; }

/* Catalogue pages have no side panel — the hero runs as one column. */
.hp-hero-inner.is-single { grid-template-columns: 1fr; }

/* Everything below the strip is capped and centred to match the hero. */
.hp-wrap {
  max-width: none;
  margin: 0 auto;
  padding: 0 56px 48px;
}

.hp-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 0.75rem;
}

/* Solid orange: a translucent fill fails contrast against the purple. */
.hp-eyebrow-badge {
  background: #ea580c;
  color: #ffffff;
  border-radius: 999px;
  padding: 4px 12px;
  letter-spacing: 0.04em;
}

.hp-title {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.15;
  color: #ffffff;
  margin: 0 0 0.85rem;
}

.hp-lead {
  font-size: 19px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
  /* Prose only — long lines are hard to track back to the next one. */
  max-width: 105ch;
  margin: 0 0 1rem;
}

.hp-meta {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.hp-meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  display: inline-block;
}

.hp-skills {
  margin-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1rem;
}

.hp-skills-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 0.7rem;
}

.hp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.hp-chip {
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
}

/* Overflow chip: white fill, purple text — reads as "there is more",
   not as another skill. Not interactive. */
.hp-chip-more {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--hp-purple-deep);
  font-weight: 700;
}

/* Certified skill: the same white-fill move as the overflow chip, in green,
   so an earned skill reads as a different kind of thing from the rest of the
   row rather than as a louder version of it. This one is a link. */
.hp-chip-certified {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #ffffff;
  border-color: #ffffff;
  color: var(--hp-green);
  font-weight: 800;
  text-decoration: none;
}

.hp-chip-certified:hover {
  color: var(--hp-green-deep);
}

.hp-chip-certified svg,
.hp-skills-cert svg {
  width: 13px;
  height: 13px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Counter under the chip row. White on the purple hero, like .hp-meta. */
.hp-skills-cert {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
}

/* ---------- Signature strip ---------- */

.hp-strip {
  height: 4px;
  background: linear-gradient(90deg, #7c3aed 0%, #ff7f4d 100%);
}

/* ---------- Purchase panel ---------- */
/* Slot order is fixed in every state — blocks appear and disappear,
   they never move: notice, label, price, primary CTA, upsell notice,
   secondary CTA, includes, collectible, fine print. */

.hp-panel {
  background: var(--hp-surface);
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.22);
  overflow: hidden;
  position: sticky;
  top: 24px;
}

.hp-panel-cap {
  height: 4px;
  background: linear-gradient(90deg, #7c3aed 0%, #ff7f4d 100%);
}

.hp-panel-body { padding: 26px; }

.hp-panel-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--hp-text-muted);
  margin-bottom: 0.5rem;
}

.hp-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.hp-price {
  font-size: 46px;
  font-weight: 800;
  color: var(--hp-text);
  line-height: 1;
}

.hp-price-free {
  font-size: 34px;
  font-weight: 800;
  color: var(--hp-text);
  line-height: 1.2;
}

.hp-price-strike {
  font-size: 20px;
  color: var(--hp-text-muted);
  text-decoration: line-through;
}

.hp-price-note {
  font-size: 15px;
  color: var(--hp-text-muted);
  margin: 0.4rem 0 0;
}

.hp-vip-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--hp-purple-deep);
  color: #ffffff;
  font-size: 19px;
  font-weight: 800;
  border-radius: 999px;
  padding: 0.4rem 1rem;
}

.hp-vip-pill svg { width: 18px; height: 18px; fill: currentColor; }

/* Notices: amber carries status, purple carries plan information.
   Neither is ever a button or a link. */
.hp-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.hp-notice svg { width: 17px; height: 17px; flex: none; margin-top: 2px;
                 fill: none; stroke: currentColor; stroke-width: 2;
                 stroke-linecap: round; stroke-linejoin: round; }

.hp-notice-amber {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.hp-notice-purple {
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  color: #5b21b6;
  margin: 1rem 0 0;
}

.hp-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-top: 1.1rem;
  border-radius: 10px;
  border: 1px solid var(--hp-orange);
  background: var(--hp-orange);
  color: #ffffff;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 127, 77, 0.4);
  transition: background-color 150ms var(--hp-ease), transform 150ms var(--hp-ease);
}

.hp-cta:hover {
  background: var(--hp-orange-hover);
  border-color: var(--hp-orange-hover);
  transform: translateY(-1px);
  color: #ffffff;
}

.hp-cta-ghost {
  background: var(--hp-surface);
  border: 1px solid var(--hp-border);
  color: var(--hp-text-soft);
  box-shadow: none;
  font-size: 0.95rem;
  min-height: 44px;
  margin-top: 0.6rem;
}

.hp-cta-ghost:hover {
  background: var(--hp-border-soft);
  border-color: var(--hp-purple);
  color: var(--hp-text-soft);
}

.hp-includes {
  list-style: none;
  margin: 1.2rem 0 0;
  padding: 1.1rem 0 0;
  border-top: 1px solid var(--hp-border-soft);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.hp-include {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 15px;
  color: var(--hp-text-soft);
  line-height: 1.5;
}

.hp-include svg {
  width: 18px; height: 18px; flex: none; margin-top: 2px;
  fill: none; stroke: var(--hp-purple); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

/* The collectible is part of what the buyer gets, so it is shown at a size
   where the character is actually readable rather than as a thumbnail. */
.hp-collectible {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.6rem;
  margin-top: 1.2rem;
  padding: 1.2rem 1rem 1.1rem;
  border-top: 1px solid var(--hp-border-soft);
  border-radius: 12px;
}

.hp-collectible img {
  border: 2px solid var(--hp-purple);
  background: #ffffff;
  padding: 14px;
}

.hp-collectible img {
  width: 100%;
  max-width: 190px;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
}

.hp-collectible-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--hp-text-muted);
  margin: 0 0 0.15rem;
}

.hp-collectible-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--hp-text);
  margin: 0;
}

.hp-collectible-note {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--hp-purple-deep);
  margin: 0.15rem 0 0;
}

.hp-finenote {
  font-size: 13.5px;
  color: var(--hp-text-muted);
  text-align: center;
  margin: 1rem 0 0;
}

/* ---------- Progress panel (owned products) ---------- */

.hp-rail {
  height: 8px;
  background: var(--hp-border-soft);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 1rem;
}

/* A number pair is an LTR run. Left to the RTL context the slash is treated
   as neutral and the two numbers swap, so "0 / 23" reads as "23 / 0". */
.hp-progress-count {
  font-size: 34px;
  font-weight: 800;
  color: var(--hp-text);
  line-height: 1.1;
  direction: ltr;
  text-align: right;
}

.hp-progress-note {
  font-size: 15px;
  color: var(--hp-text-muted);
  margin: 0.3rem 0 0;
}

.hp-rail-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #8b5cf6 0%, #7c3aed 100%);
  transition: width 600ms var(--hp-ease);
}

.hp-complete {
  display: none;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  color: var(--hp-purple-deep);
  font-size: 14.5px;
  font-weight: 700;
}

.hp-complete svg {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.hp-toolbar-end {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.hp-select {
  background: var(--hp-canvas);
  border: 1px solid var(--hp-border);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--hp-text);
  cursor: pointer;
  direction: rtl;
}

/* ---------- Content below the hero ---------- */

.hp-body { padding: 44px 0 0; }

.hp-body-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--hp-text);
  margin: 0 0 1rem;
}

.hp-body-content { color: var(--hp-text-soft); line-height: 1.7; }

.hp-section { padding: 44px 0 0; }

.hp-section-head {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.hp-section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--hp-text);
  margin: 0;
}

.hp-section-count {
  font-size: 0.95rem;
  color: var(--hp-text-muted);
}

/* ---------- Toolbar ---------- */

.hp-toolbar {
  background: var(--hp-surface);
  border: 1px solid var(--hp-border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.hp-filters { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.hp-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--hp-surface);
  border: 1px solid var(--hp-border);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--hp-text-soft);
  cursor: pointer;
  transition: background-color 150ms var(--hp-ease), border-color 150ms var(--hp-ease);
}

.hp-filter:hover { border-color: var(--hp-purple); }

.hp-filter.is-active {
  background: var(--hp-text);
  border-color: var(--hp-text);
  color: #ffffff;
  font-weight: 700;
}

.hp-filter-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
}

.hp-filter.is-active .hp-filter-dot { display: none; }

.hp-search { position: relative; width: 240px; }

.hp-search input {
  width: 100%;
  background: var(--hp-canvas);
  border: 1px solid var(--hp-border);
  border-radius: 10px;
  padding: 0.5rem 2.25rem 0.5rem 2rem;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--hp-text);
}

.hp-search input::placeholder { color: var(--hp-text-muted); }

.hp-search-icon {
  position: absolute;
  inset-inline-start: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--hp-text-light);
  pointer-events: none;
}

.hp-search-clear {
  position: absolute;
  inset-inline-end: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: var(--hp-border);
  color: var(--hp-text-muted);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Responsive ---------- */

@media (max-width: 1099px) {
  .hp-hero-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 36px 32px 32px;
  }
  .hp-panel { position: static; }
  .hp-wrap { padding: 0 32px 40px; }
}

@media (max-width: 719px) {
  .hp-hero-inner { padding: 28px 20px; }
  .hp-title { font-size: 32px; }
  .hp-lead { font-size: 17px; }
  .hp-wrap { padding: 0 20px 32px; }
  .hp-toolbar { flex-direction: column; align-items: stretch; }
  .hp-toolbar-end { flex-direction: column; align-items: stretch; }
  .hp-search { width: 100%; }
  .hp-cta { min-height: 48px; }
}