/* ============================================================
   AFF — Brand / Category Page
   assets/category.css
   ============================================================ */

/* ── Breadcrumb ───────────────────────────────────────────── */
.aff-breadcrumb {
  background: #0f172a; padding: 10px 24px 0;
}
.aff-breadcrumb__list {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  list-style: none; padding: 0;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 11.5px; color: rgba(255,255,255,.4);
}
.aff-breadcrumb__list li { display: flex; align-items: center; gap: 6px; }
.aff-breadcrumb__list li + li::before { content: '/'; opacity: .4; }
.aff-breadcrumb__list a { color: rgba(255,255,255,.55); text-decoration: none; transition: color .15s; }
.aff-breadcrumb__list a:hover { color: #fff; }
.aff-breadcrumb__list [aria-current="page"] { color: rgba(255,255,255,.75); font-weight: 600; }

/* ── Brand Hero ───────────────────────────────────────────── */
.aff-cat-hero {
  background: #0f172a;
  padding: 20px 24px 28px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.aff-cat-hero__inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 20px;
}
.aff-cat-hero__left { display: flex; align-items: flex-start; gap: 16px; flex: 1; min-width: 260px; }
.aff-cat-hero__icon {
  font-size: 38px; flex-shrink: 0;
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.06); border-radius: 16px;
  border: 1px solid rgba(255,255,255,.1);
}
.aff-cat-hero__label {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: #60a5fa; margin-bottom: 6px;
}
.aff-cat-hero__title {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: clamp(22px, 3.5vw, 32px); font-weight: 900;
  color: #f8fafc; line-height: 1.1; margin: 0 0 8px; letter-spacing: -.4px;
}
.aff-cat-hero__title span { color: #60a5fa; }
.aff-cat-hero__desc {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 13.5px; color: rgba(255,255,255,.62);
  line-height: 1.65; margin: 0; max-width: 480px;
}

.aff-cat-hero__stats {
  display: flex; align-items: center; gap: 0;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: 14px 20px; flex-shrink: 0;
  align-self: center;
}
.aff-cat-hero__stat { text-align: center; padding: 0 16px; }
.aff-cat-hero__stat-n {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 22px; font-weight: 900; color: #f8fafc;
  display: block; letter-spacing: -.4px; line-height: 1.1;
}
.aff-cat-hero__stat-l {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 10px; font-weight: 600; color: rgba(255,255,255,.4);
  text-transform: uppercase; letter-spacing: .5px; display: block; margin-top: 3px;
}
.aff-cat-hero__stat-div { width: 1px; height: 32px; background: rgba(255,255,255,.1); flex-shrink: 0; }

/* ── Model Filter Pills ───────────────────────────────────── */
.aff-cat-filters {
  background: #f8f9fb;
  border-bottom: 1.5px solid #e9edf2;
  position: sticky; top: 0; z-index: 40;
}
.aff-cat-filters__inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.aff-cat-filters__scroll {
  display: flex; align-items: center; gap: 6px;
  overflow-x: auto; padding: 10px 0;
  scrollbar-width: none;
}
.aff-cat-filters__scroll::-webkit-scrollbar { display: none; }

.aff-cat-filter-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 99px; white-space: nowrap;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 12px; font-weight: 600; text-decoration: none;
  background: #fff; border: 1.5px solid #e2e8f0; color: #475569;
  transition: border-color .15s, background .15s, color .15s;
  flex-shrink: 0;
}
.aff-cat-filter-pill:hover { border-color: #2563eb; color: #2563eb; background: #eff6ff; }
.aff-cat-filter-pill.is-active { background: #0f172a; border-color: #0f172a; color: #fff; }
.aff-cat-filter-pill.is-active .aff-cat-filter-pill__count { background: rgba(255,255,255,.15); color: rgba(255,255,255,.7); }
.aff-cat-filter-pill__count {
  font-size: 10.5px; font-weight: 700;
  background: #f1f5f9; color: #94a3b8;
  padding: 1px 6px; border-radius: 99px;
}

/* ── Body layout ──────────────────────────────────────────── */
.aff-cat-body {
  background: #f8f9fb; padding: 24px 24px 64px;
}
.aff-cat-body > .aff-cat-body { padding: 0; } /* prevent nesting */
/* Actually the inner layout: */
.aff-cat-body {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Toolbar ──────────────────────────────────────────────── */
.aff-cat-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; flex-wrap: wrap; gap: 10px;
}
.aff-cat-toolbar__count {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 12.5px; color: #64748b; margin: 0;
}
.aff-cat-toolbar__count strong { color: #0f172a; font-weight: 800; }
.aff-cat-toolbar__sort { display: flex; align-items: center; gap: 7px; }
.aff-cat-toolbar__sort-label { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-size: 12px; color: #94a3b8; font-weight: 500; }
.aff-cat-toolbar__sort-wrap { position: relative; display: flex; align-items: center; }
.aff-cat-toolbar__sort-wrap svg { position: absolute; right: 10px; pointer-events: none; color: #64748b; }
.aff-cat-toolbar__select {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-size: 12.5px;
  font-weight: 600; color: #0f172a; background: #fff;
  border: 1.5px solid #e2e8f0; border-radius: 8px;
  padding: 6px 30px 6px 10px; appearance: none; cursor: pointer; outline: none;
  transition: border-color .15s;
}
.aff-cat-toolbar__select:focus { border-color: #2563eb; }

/* ── Firmware card grid ───────────────────────────────────── */
.aff-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.aff-cat-card {
  background: #fff; border: 1.5px solid #e9edf2; border-radius: 14px;
  padding: 16px; text-decoration: none; display: flex; flex-direction: column; gap: 10px;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.aff-cat-card:hover { border-color: #bfdbfe; box-shadow: 0 4px 18px rgba(37,99,235,.08); transform: translateY(-2px); }

.aff-cat-card__top { display: flex; gap: 10px; align-items: flex-start; }
.aff-cat-card__icon {
  font-size: 22px; flex-shrink: 0;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  background: #f1f5f9; border-radius: 10px;
}
.aff-cat-card__info { flex: 1; min-width: 0; }
.aff-cat-card__brand {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 10.5px; font-weight: 700; color: #2563eb;
  text-transform: uppercase; letter-spacing: .4px; margin-bottom: 3px;
}
.aff-cat-card__brand span { color: #94a3b8; font-weight: 600; text-transform: none; }
.aff-cat-card__title {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 13px; font-weight: 700; color: #0f172a;
  line-height: 1.35; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.aff-cat-card__tags { display: flex; flex-wrap: wrap; gap: 5px; }
.aff-cat-card__tag {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 10.5px; font-weight: 600;
  padding: 2px 8px; border-radius: 99px;
  background: #f1f5f9; color: #64748b;
}
.aff-cat-card__tag--android { background: #dcfce7; color: #166534; }
.aff-cat-card__tag--size    { background: #fef3c7; color: #92400e; }

.aff-cat-card__footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px; border-top: 1px solid #f1f5f9; margin-top: auto;
}
.aff-cat-card__date { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-size: 11px; color: #94a3b8; }
.aff-cat-card__dl {
  display: flex; align-items: center; gap: 4px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 11.5px; font-weight: 700; color: #2563eb;
}

/* ── Empty state ──────────────────────────────────────────── */
.aff-cat-empty {
  grid-column: 1/-1; text-align: center; padding: 64px 24px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}
.aff-cat-empty__icon { font-size: 40px; margin-bottom: 12px; }
.aff-cat-empty h3 { font-size: 18px; font-weight: 900; color: #0f172a; margin-bottom: 8px; }
.aff-cat-empty p { font-size: 14px; color: #64748b; }
.aff-cat-empty a { color: #2563eb; text-decoration: underline; }

/* ── Pagination ───────────────────────────────────────────── */
.aff-cat-pagination { margin-bottom: 32px; }
.aff-cat-pagination .page-numbers {
  display: flex; flex-wrap: wrap; gap: 6px;
  list-style: none; padding: 0; margin: 0; align-items: center;
}
.aff-cat-pagination .page-numbers li { display: block; }
.aff-cat-pagination .page-numbers a,
.aff-cat-pagination .page-numbers span {
  display: flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 10px;
  border-radius: 8px; border: 1.5px solid #e2e8f0;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 13px; font-weight: 600; color: #475569;
  background: #fff; text-decoration: none;
  transition: border-color .15s, background .15s, color .15s;
}
.aff-cat-pagination .page-numbers a:hover { border-color: #2563eb; color: #2563eb; background: #eff6ff; }
.aff-cat-pagination .page-numbers .current { background: #0f172a; border-color: #0f172a; color: #fff; }
.aff-cat-pagination .page-numbers .dots { border: none; background: none; color: #94a3b8; }

/* ── SEO text block ───────────────────────────────────────── */
.aff-cat-seo {
  background: #fff; border: 1.5px solid #e9edf2; border-radius: 14px;
  padding: 24px 28px;
}
.aff-cat-seo__title {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 15px; font-weight: 900; color: #0f172a;
  margin: 0 0 12px; letter-spacing: -.2px;
}
.aff-cat-seo__body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 13.5px; color: #64748b; line-height: 1.75;
}
.aff-cat-seo__body p { margin: 0 0 10px; }
.aff-cat-seo__body p:last-child { margin-bottom: 0; }
.aff-cat-seo__body strong { color: #0f172a; }

/* ── Sidebar ──────────────────────────────────────────────── */
.aff-cat-sidebar { display: flex; flex-direction: column; gap: 16px; }

.aff-cat-sidebar-block {
  background: #fff; border: 1.5px solid #e9edf2; border-radius: 14px; padding: 18px;
}
.aff-cat-sidebar-block__title {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .6px; color: #94a3b8; margin-bottom: 12px;
}
.aff-cat-brands-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.aff-cat-brands-list__item.is-active .aff-cat-brands-list__link { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.aff-cat-brands-list__link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px; border-radius: 8px; border: 1px solid transparent;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 13px; font-weight: 500; color: #475569; text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.aff-cat-brands-list__link:hover { background: #f8f9fb; color: #0f172a; }
.aff-cat-brands-list__count {
  font-size: 11px; font-weight: 700; color: #94a3b8;
  background: #f1f5f9; padding: 1px 7px; border-radius: 99px;
}
.aff-cat-sidebar-all {
  display: block; text-align: center; margin-top: 10px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 12px; font-weight: 600; color: #2563eb; text-decoration: none;
}
.aff-cat-sidebar-all:hover { text-decoration: underline; }

.aff-cat-sidebar-block--warn {
  background: #fffbeb; border-color: #fde68a;
  display: flex; gap: 10px; align-items: flex-start;
}
.aff-cat-sidebar-block__warn-icon { font-size: 18px; flex-shrink: 0; }
.aff-cat-sidebar-block--warn p {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 12.5px; color: #92400e; line-height: 1.55; margin: 0;
}
.aff-cat-sidebar-block--warn strong { color: #78350f; font-weight: 800; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .aff-cat-body { grid-template-columns: 1fr; }
  .aff-cat-sidebar { display: none; } /* collapse on mobile */
}
@media (max-width: 600px) {
  .aff-cat-hero__inner { flex-direction: column; }
  .aff-cat-hero__stats { width: 100%; justify-content: center; }
  .aff-cat-grid { grid-template-columns: 1fr; }
}
