/* All Categories page (collections/categories.php). Scoped to .tbcp; colours follow the store's brand colour (--primary). */
.tbcp { --p: var(--primary, #1e3a5f); --tint: color-mix(in srgb, var(--p) 7%, #fff); --line: color-mix(in srgb, var(--p) 14%, #e6e3ee);
  max-width: 1320px; margin: 0 auto; padding: 22px 24px 48px; font-family: "Inter", "Poppins", -apple-system, "Segoe UI", sans-serif; color: #1f1b2e; }
.tbcp, .tbcp * { box-sizing: border-box; letter-spacing: 0; text-transform: none; }
.tbcp a { color: inherit; text-decoration: none; }
.tbcp ul { list-style: none; margin: 0; padding: 0; }

.tbcp-hero { position: relative; padding: 22px 26px; margin-bottom: 22px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(120deg, var(--tint), color-mix(in srgb, var(--p) 14%, #fff)); border: 1px solid var(--line); }
.tbcp-crumbs { display: flex; gap: 6px; font-size: 12.5px; color: #6b6880; margin-bottom: 8px; }
.tbcp-crumbs a:hover { color: var(--p); text-decoration: underline; }
.tbcp .tbcp-title { margin: 0; font: 800 28px/1.15 "Inter", "Poppins", sans-serif; color: #1f1b2e; }
.tbcp-sub { margin: 6px 0 0; font-size: 14px; color: #4b4860; }
.tbcp-find { display: flex; align-items: center; gap: 8px; max-width: 420px; height: 44px; margin-top: 16px; padding: 0 14px; border-radius: 10px;
  background: #fff; border: 1.5px solid var(--line); color: var(--p); cursor: text; }
.tbcp-find:focus-within { border-color: var(--p); box-shadow: 0 0 0 3px color-mix(in srgb, var(--p) 14%, transparent); }
.tbcp-find input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: 500 14.5px "Inter", sans-serif; color: #1f1b2e; padding: 0; }

.tbcp-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.tbcp-card { display: flex; flex-direction: column; background: #fff; border: 1px solid #ece9f2; border-radius: 14px; overflow: hidden;
  transition: box-shadow .2s, transform .2s, border-color .2s; }
.tbcp-card[hidden] { display: none; }
.tbcp-card:hover { box-shadow: 0 10px 26px rgba(20, 16, 30, .09); transform: translateY(-2px); border-color: var(--line); }
.tbcp-card__media { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; background: var(--tint); overflow: hidden; color: var(--p); }
.tbcp-card__media img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; transition: transform .35s; }
.tbcp-card:hover .tbcp-card__media img { transform: scale(1.04); }
.tbcp-card__initial { font: 800 46px/1 "Inter", sans-serif; opacity: .55; }
.tbcp-card__body { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px 14px; }
.tbcp-card__name { font-size: 15px; font-weight: 700; line-height: 1.3; color: #1f1b2e; }
.tbcp-card__name:hover { color: var(--p); }
.tbcp-card__count { font-size: 12.5px; color: #6b6880; }
.tbcp-subs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px !important; }
.tbcp-subs a { display: inline-block; max-width: 100%; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-size: 11.5px; font-weight: 600; color: #3b3752; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbcp-subs a:hover { border-color: var(--p); color: var(--p); }
.tbcp-subs .tbcp-subs__more { color: var(--p); border-style: dashed; }
.tbcp-card--all .tbcp-card__media { background: color-mix(in srgb, var(--p) 12%, #fff); }
.tbcp-none { padding: 30px 0; text-align: center; color: #4b4860; }
.tbcp-none a { color: var(--p); font-weight: 700; text-decoration: underline; }

@media (max-width: 1199.98px) { .tbcp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 899.98px) { .tbcp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
@media (max-width: 767.98px) {
  body.tbcp-page { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); overflow-x: hidden; }
  .tbcp { padding: 12px 14px 28px; }
  .tbcp-hero { padding: 16px 16px 18px; margin-bottom: 14px; border-radius: 14px; }
  .tbcp .tbcp-title { font-size: 22px; }
  .tbcp-sub { font-size: 13px; }
  .tbcp-find { height: 42px; margin-top: 12px; max-width: none; }
  .tbcp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tbcp-card { border-radius: 12px; }
  .tbcp-card:hover { transform: none; }
  .tbcp-card__body { padding: 9px 10px 11px; }
  .tbcp-card__name { font-size: 13.5px; }
  .tbcp-card__count { font-size: 11.5px; }
  .tbcp-subs { gap: 5px; margin-top: 6px !important; }
  .tbcp-subs a { padding: 3px 8px; font-size: 10.5px; }
}
@media (prefers-reduced-motion: reduce) { .tbcp-card, .tbcp-card__media img { transition: none; } .tbcp-card:hover { transform: none; } .tbcp-card:hover .tbcp-card__media img { transform: none; } }
