/**
 * Ticket CAT-CRO-1 / CAT-CRO-6 — Raccourcis orientation mobile (leaf chips)
 * Scope strict : body.category uniquement.
 * 2 lignes max + ellipsis via span interne (line-clamp sur <a> incompatible Safari).
 */

body.category .category-leaf-anchors--mobile {
  display: block;
  background: transparent;
  padding: 0;
  border-bottom: none;
}

body.category .category-leaf-anchors--mobile__track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline-start: 15px;
  padding-left: 15px;
  padding-right: 15px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

body.category .category-leaf-anchors--mobile__track::-webkit-scrollbar {
  display: none;
}

@media (max-width: 767px) {
  body.category .category-leaf-anchors--mobile__track {
    align-items: flex-start;
    margin-left: -15px;
    margin-right: -15px;
  }

  body.category .category-leaf-anchors--mobile__chip {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    flex: 0 0 auto;
    flex-shrink: 0;
    min-width: 0;
    max-width: min(85vw, 300px);
    min-height: 36px;
    max-height: 50px;
    padding: 8px 16px;
    overflow: hidden;
    color: var(--prozon-black-color);
    background: transparent;
    border: 1px solid var(--prozon-black-color);
    border-radius: 20px;
    text-decoration: none;
    scroll-snap-align: start;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  }

  body.category .category-leaf-anchors--mobile__chip-label {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    width: 100%;
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
    letter-spacing: 0.01em;
    text-transform: none;
    overflow-wrap: break-word;
    word-break: break-word;
  }
}

body.category .category-leaf-anchors--mobile__chip:hover {
  background: var(--prozon-black-color);
  color: #fff;
  border-color: var(--prozon-black-color);
}

body.category .category-leaf-anchors--mobile__chip:focus-visible {
  outline: 2px solid var(--prozon-accent-color);
  outline-offset: 2px;
}

body.category .category-leaf-anchors--mobile__chip:active {
  background: var(--prozon-black-color);
  color: var(--prozon-accent-color);
  border-color: var(--prozon-black-color);
}

@media (min-width: 768px) {
  body.category .category-leaf-anchors--mobile {
    display: none;
  }
}
