/* UGM_CAT_DEPTH:CTqInc01
   Category hierarchy visual markers for top_tabs + dir-tree.
   L1 roots / L2 secondary / L3 secondary / platform chips must read as different layers. */

/* ——— L1 root chips (primary rail) ——— */
.ctn--top-tabs > .shop-nav-rail.ctn-tabs,
.ctn--top-tabs > .ctn-tabs:not(.ctn-tabs--secondary) {
  position: relative;
  gap: 0.55rem !important;
  padding: 0.35rem 0.2rem 0.55rem !important;
  margin-bottom: 0.15rem !important;
  border-bottom: 1px solid color-mix(in srgb, var(--ctn-accent, #e8a838) 22%, transparent);
}

.ctn--top-tabs > .shop-nav-rail.ctn-tabs::before,
.ctn--top-tabs > .ctn-tabs:not(.ctn-tabs--secondary)::before {
  content: "L1 · Category";
  display: block;
  width: 100%;
  flex-basis: 100%;
  margin: 0 0 0.35rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ctn-accent, #e8a838) 78%, #fff);
  font-size: 0.62rem;
  font-weight: 800;
}

.ctn--top-tabs > .shop-nav-rail .ctn-item--chip,
.ctn--top-tabs > .ctn-tabs:not(.ctn-tabs--secondary) .ctn-item--chip {
  min-height: 2.7rem !important;
  border-radius: 999px !important;
  border-width: 1.5px !important;
  font-weight: 750;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28) !important;
}

.ctn--top-tabs > .shop-nav-rail .ctn-item--chip .ctn-item-label,
.ctn--top-tabs > .ctn-tabs:not(.ctn-tabs--secondary) .ctn-item--chip .ctn-item-label {
  font-size: 0.9rem !important;
  font-weight: 800 !important;
}

/* ——— L2 / L3 secondary tiers ——— */
.ctn-secondary-block[data-ctn-tier] {
  position: relative;
  margin-top: 0.35rem !important;
  padding: 0.45rem 0.55rem 0.55rem 0.7rem !important;
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel, #12151c) 72%, transparent);
}

.ctn-secondary-block[data-ctn-tier="1"] {
  border-left: 3px solid color-mix(in srgb, #7dd3fc 70%, #38bdf8);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #7dd3fc 18%, transparent);
}

.ctn-secondary-block[data-ctn-tier="2"] {
  margin-left: 0.55rem !important;
  border-left: 3px dashed color-mix(in srgb, #c4b5fd 75%, #a78bfa);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #c4b5fd 16%, transparent);
  background: color-mix(in srgb, #1a1428 55%, transparent);
}

.ctn-secondary-block[data-ctn-tier="3"] {
  margin-left: 1rem !important;
  border-left: 3px dotted color-mix(in srgb, #86efac 70%, #4ade80);
}

.ctn-secondary-block[data-ctn-tier="1"] > .ctn-group-label::before {
  content: "L2 · ";
  color: #7dd3fc;
  letter-spacing: 0.08em;
}

.ctn-secondary-block[data-ctn-tier="2"] > .ctn-group-label::before {
  content: "L3 · ";
  color: #c4b5fd;
  letter-spacing: 0.08em;
}

.ctn-secondary-block[data-ctn-tier="3"] > .ctn-group-label::before {
  content: "L4 · ";
  color: #86efac;
  letter-spacing: 0.08em;
}

/* If a secondary tier has no group label node, inject one. */
.ctn-secondary-block[data-ctn-tier="1"]:not(:has(> .ctn-group-label))::before,
.ctn-secondary-block[data-ctn-tier="2"]:not(:has(> .ctn-group-label))::before,
.ctn-secondary-block[data-ctn-tier="3"]:not(:has(> .ctn-group-label))::before {
  display: block;
  margin: 0 0 0.35rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.58rem;
  font-weight: 800;
}

.ctn-secondary-block[data-ctn-tier="1"]:not(:has(> .ctn-group-label))::before {
  content: "L2 · Subcategory";
  color: #7dd3fc;
}

.ctn-secondary-block[data-ctn-tier="2"]:not(:has(> .ctn-group-label))::before {
  content: "L3 · Detail";
  color: #c4b5fd;
}

.ctn-secondary-block[data-ctn-tier="3"]:not(:has(> .ctn-group-label))::before {
  content: "L4 · Detail";
  color: #86efac;
}

.ctn-secondary-block[data-ctn-tier] .ctn-group-label {
  margin-bottom: 0.3rem !important;
  font-size: 0.62rem !important;
  font-weight: 800 !important;
}

/* L2 chips: quieter than L1 */
.ctn-secondary-block[data-ctn-tier="1"] .ctn-item--chip {
  min-height: 2.25rem !important;
  border-radius: 10px !important;
  background: color-mix(in srgb, #0b1220 70%, transparent) !important;
  box-shadow: none !important;
}

.ctn-secondary-block[data-ctn-tier="1"] .ctn-item--chip .ctn-item-label {
  font-size: 0.78rem !important;
  font-weight: 650 !important;
}

/* L3 chips: denser / more indented look */
.ctn-secondary-block[data-ctn-tier="2"] .ctn-item--chip,
.ctn-secondary-block[data-ctn-tier="3"] .ctn-item--chip {
  min-height: 2.05rem !important;
  border-radius: 8px !important;
  padding: 0.35rem 0.65rem 0.35rem 0.45rem !important;
  background: color-mix(in srgb, #140f22 75%, transparent) !important;
  box-shadow: none !important;
}

.ctn-secondary-block[data-ctn-tier="2"] .ctn-item--chip .ctn-item-label,
.ctn-secondary-block[data-ctn-tier="3"] .ctn-item--chip .ctn-item-label {
  font-size: 0.74rem !important;
  font-weight: 600 !important;
  opacity: 0.95;
}

/* Platform layer chips */
.ctn-item--platform.ctn-item--chip,
.ctn-item--platform.ctn-item--grid,
.ctn-item--platform.ctn-item--list {
  border-style: solid !important;
  border-color: color-mix(in srgb, #fbbf24 45%, transparent) !important;
}

.ctn-item--platform .ctn-item-label::before {
  content: "⌁ ";
  color: #fbbf24;
  font-weight: 900;
}

/* ——— Dir-tree depth markers (nav_rail deep trees) ——— */
.ctn--dir-tree .catalog-dir-node.depth-0 > .catalog-dir-row .catalog-dir-label {
  font-size: 0.82rem !important;
  font-weight: 800 !important;
}

.ctn--dir-tree .catalog-dir-node.depth-0 > .catalog-dir-row .catalog-dir-label span::before {
  content: "L1 ";
  color: color-mix(in srgb, var(--ctn-accent, #e8a838) 85%, #fff);
  font-size: 0.68em;
  letter-spacing: 0.08em;
  margin-right: 0.2rem;
}

.ctn--dir-tree .catalog-dir-node.depth-1 > .catalog-dir-row .catalog-dir-label {
  font-size: 0.74rem !important;
  font-weight: 650 !important;
  padding-left: 0.15rem !important;
}

.ctn--dir-tree .catalog-dir-node.depth-1 > .catalog-dir-row .catalog-dir-label span::before {
  content: "L2 ";
  color: #7dd3fc;
  font-size: 0.68em;
  letter-spacing: 0.08em;
  margin-right: 0.2rem;
}

.ctn--dir-tree .catalog-dir-node.depth-2 > .catalog-dir-row .catalog-dir-label {
  font-size: 0.7rem !important;
  font-weight: 600 !important;
  opacity: 0.95;
}

.ctn--dir-tree .catalog-dir-node.depth-2 > .catalog-dir-row .catalog-dir-label span::before {
  content: "L3 ";
  color: #c4b5fd;
  font-size: 0.68em;
  letter-spacing: 0.08em;
  margin-right: 0.2rem;
}

.ctn--dir-tree .catalog-dir-children {
  border-left-width: 2px !important;
  margin-left: 0.35rem !important;
  padding-left: 0.35rem !important;
}

.ctn--dir-tree .catalog-dir-node.depth-1 > .catalog-dir-children {
  border-left-color: color-mix(in srgb, #7dd3fc 45%, transparent) !important;
}

.ctn--dir-tree .catalog-dir-node.depth-2 > .catalog-dir-children {
  border-left-color: color-mix(in srgb, #c4b5fd 45%, transparent) !important;
}
