/* ORIGEX — ORX-P01 | PG09 Product Categories composition | Copyright © ORVEAX
 * M7 second pass: B2B directory hierarchy, category scanning and responsive filter/card refinement.
 * Frozen content/IA preserved; no new runtime dependency or feature family.
 */

/* --------------------------------------------------------------------------
   Hero — category-first entry with controlled commercial map
   -------------------------------------------------------------------------- */
.orx-category-hero {
  padding-block: clamp(3.75rem, 6vw, 6rem);
}

.orx-category-hero .orx-hero__grid {
  align-items:center;
  gap:clamp(2rem,4.5vw,4.75rem);
}

.orx-category-hero .orx-hero__grid > div:first-child {
  max-inline-size:45rem;
}

.orx-category-hero .orx-media--hero {
  min-inline-size:0;
  min-block-size:clamp(23rem,34vw,30rem);
  overflow:hidden;
  background:
    radial-gradient(circle at 86% 12%,rgba(255,255,255,.10),transparent 34%),
    linear-gradient(145deg,var(--orx-primary-strong),var(--orx-primary));
  color:#fff;
  display:grid;
  place-items:center;
  padding:clamp(1.35rem,3vw,2.25rem);
  border-color:color-mix(in srgb,var(--orx-primary) 72%,var(--orx-border));
  box-shadow:var(--orx-shadow-e2);
}

.orx-category-orbit {
  inline-size:min(100%,620px);
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:.7rem;
}

.orx-category-orbit__item {
  min-inline-size:0;
  min-block-size:7.5rem;
  padding:1rem;
  border:1px solid rgba(255,255,255,.14);
  border-radius:var(--orx-radius-md);
  background:rgba(255,255,255,.055);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:.65rem;
  align-items:flex-start;
}

.orx-category-orbit__item .orx-icon {
  flex:0 0 auto;
  inline-size:1.35rem;
  block-size:1.35rem;
  opacity:.92;
}

.orx-category-orbit__item strong {
  display:block;
  line-height:1.35;
}

.orx-category-orbit__item span {
  display:block;
  margin-block-start:.2rem;
  font-size:var(--orx-fs-small);
  line-height:1.45;
  opacity:.72;
}

/* --------------------------------------------------------------------------
   Category facts — commercial context strip, not three generic promo cards
   -------------------------------------------------------------------------- */
.orx-category-facts {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:0;
  margin-block-start:2rem;
  border-block:1px solid var(--orx-border);
}

.orx-category-fact {
  min-inline-size:0;
  padding:1.3rem clamp(1rem,2.5vw,1.6rem);
  border:0;
  border-radius:0;
  background:transparent;
}

.orx-category-fact + .orx-category-fact {
  border-inline-start:1px solid var(--orx-border);
}

.orx-category-fact strong {
  display:block;
  font-size:1.05rem;
  margin-block-end:.45rem;
  color:var(--orx-primary-strong);
}

.orx-category-fact p {
  margin:0;
  color:var(--orx-text-muted);
  line-height:1.65;
}

/* --------------------------------------------------------------------------
   Filter toolbar — functional control, visually separated from content cards
   -------------------------------------------------------------------------- */
.orx-category-filterbar {
  display:flex;
  gap:.55rem;
  flex-wrap:wrap;
  align-items:center;
  margin-block-end:1.5rem;
  padding:.75rem;
  border:1px solid var(--orx-border);
  border-radius:var(--orx-radius-lg);
  background:var(--orx-surface);
  box-shadow:var(--orx-shadow-e1);
}

.orx-category-filterbar .orx-btn {
  min-block-size:44px;
  border-radius:var(--orx-radius-pill);
}

.orx-category-filterbar .orx-btn[aria-pressed="true"] {
  border-color:var(--orx-primary-strong);
  background:var(--orx-primary-strong);
  color:#fff;
}

/* --------------------------------------------------------------------------
   Six-category directory — premium B2B cards, not ecommerce/product tiles
   -------------------------------------------------------------------------- */
.orx-category-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:1rem;
}

.orx-category-card {
  position:relative;
  min-inline-size:0;
  block-size:100%;
  min-block-size:19rem;
  display:flex;
  flex-direction:column;
  padding:clamp(1.25rem,2.5vw,1.65rem);
  border:1px solid var(--orx-border);
  border-block-start:3px solid var(--orx-border-strong);
  border-radius:var(--orx-radius-lg);
  background:var(--orx-surface);
  box-shadow:none;
  transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}

.orx-category-card:nth-child(2) { border-block-start-color:var(--orx-secondary); }
.orx-category-card:nth-child(3) { border-block-start-color:var(--orx-accent); }
.orx-category-card:nth-child(4) { border-block-start-color:var(--orx-primary); }
.orx-category-card:nth-child(5) { border-block-start-color:var(--orx-border-strong); }
.orx-category-card:nth-child(6) { border-block-start-color:var(--orx-secondary); }

.orx-category-card:hover {
  transform:translateY(-2px);
  border-color:color-mix(in srgb,var(--orx-primary) 32%,var(--orx-border));
  box-shadow:var(--orx-shadow-e1);
}

.orx-category-card:focus-within {
  border-color:var(--orx-primary);
  box-shadow:var(--orx-shadow-e1);
}

.orx-category-card__head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:var(--orx-space-4);
  padding-block-end:1rem;
  border-block-end:1px solid var(--orx-border);
}

.orx-category-card h3 {
  margin:0;
}

.orx-category-card p {
  color:var(--orx-text-muted);
  margin-block:1rem 1.1rem;
  line-height:1.65;
}

.orx-category-card__facts {
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
  margin-block-end:1.25rem;
}

.orx-category-card__facts span {
  font-size:var(--orx-fs-small);
  line-height:1.35;
  padding:.38rem .62rem;
  border:1px solid var(--orx-border);
  border-radius:var(--orx-radius-pill);
  background:var(--orx-surface-soft);
  color:var(--orx-text-muted);
}

.orx-category-card__link {
  margin-block-start:auto;
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  min-block-size:44px;
  font-weight:700;
  text-decoration:none;
  color:var(--orx-primary);
}

.orx-category-card__link:hover,
.orx-category-card__link:focus-visible {
  text-decoration:underline;
  text-underline-offset:.22em;
}

.orx-category-card[hidden] {
  display:none!important;
}

/* --------------------------------------------------------------------------
   Buyer guidance — decision guidance, secondary to the category directory
   -------------------------------------------------------------------------- */
.orx-category-guidance {
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(280px,.85fr);
  gap:clamp(2rem,5vw,4.5rem);
  align-items:start;
}

.orx-category-guidance > div:first-child {
  max-inline-size:46rem;
}

.orx-category-guidance__panel {
  padding:clamp(1.25rem,3vw,1.75rem);
  border:1px solid var(--orx-border);
  border-inline-start:4px solid var(--orx-secondary);
  border-radius:var(--orx-radius-lg);
  background:
    radial-gradient(circle at 90% 10%,rgba(14,117,103,.06),transparent 34%),
    var(--orx-surface-soft);
}

.orx-category-guidance__panel ul {
  margin:1rem 0 0;
  padding-inline-start:1.2rem;
  display:grid;
  gap:.65rem;
}

[dir="rtl"] .orx-category-guidance__panel ul {
  padding-inline-start:0;
  padding-inline-end:1.2rem;
}

/* --------------------------------------------------------------------------
   Tablet
   -------------------------------------------------------------------------- */
@media(max-width:991.98px) {
  .orx-category-hero {
    padding-block:3rem 3.5rem;
  }

  .orx-category-hero .orx-hero__grid {
    grid-template-columns:1fr;
    gap:1.5rem;
  }

  .orx-category-hero .orx-media--hero {
    min-block-size:0;
  }

  .orx-category-orbit,
  .orx-category-grid,
  .orx-category-facts {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .orx-category-fact:nth-child(3) {
    grid-column:1 / -1;
    border-inline-start:0;
    border-block-start:1px solid var(--orx-border);
  }

  .orx-category-guidance {
    grid-template-columns:1fr;
    gap:1.5rem;
  }
}

/* --------------------------------------------------------------------------
   Mobile
   -------------------------------------------------------------------------- */
@media(max-width:767.98px) {
  .orx-category-hero {
    padding-block:2.6rem 3rem;
  }

  .orx-category-hero .orx-media--hero {
    padding:1rem;
  }

  .orx-category-orbit,
  .orx-category-grid,
  .orx-category-facts {
    grid-template-columns:1fr;
  }

  .orx-category-orbit {
    gap:.6rem;
  }

  .orx-category-orbit__item {
    min-block-size:0;
    display:grid;
    grid-template-columns:auto 1fr;
    align-items:start;
  }

  .orx-category-facts {
    border-block:0;
  }

  .orx-category-fact,
  .orx-category-fact + .orx-category-fact,
  .orx-category-fact:nth-child(3) {
    grid-column:auto;
    border-inline-start:0;
    border-block-start:1px solid var(--orx-border);
    border-block-end:0;
    padding-inline:0;
  }

  .orx-category-fact:last-child {
    border-block-end:1px solid var(--orx-border);
  }

  .orx-category-filterbar {
    gap:.45rem;
    padding:.6rem;
  }

  .orx-category-filterbar .orx-btn {
    flex:1 1 calc(50% - .45rem);
    justify-content:center;
    padding-inline:.75rem;
  }

  .orx-category-card {
    min-block-size:0;
  }

  .orx-category-card:hover {
    transform:none;
  }
}

@media(prefers-reduced-motion:reduce) {
  .orx-category-card {
    transition:none;
  }
}
