/* ============================================================
   Templates page — category / subcategory browsing
   (reuses .tpl-grid / .tpl-card / .tpl-thumb / .tpl-use from tryon.css)
   ============================================================ */

/* ---- Filter bar ---- */
.tpl-filter{
  position: sticky;
  top: 89px; /* sits just below the sticky navbar */
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 0;
  margin-bottom: 22px;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #f0e6ec;
}

.tpl-filter-sep{
  width: 1px;
  height: 20px;
  background: #ecdfe8;
  margin: 0 2px;
}

.tpl-chip{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid #eadbe4;
  border-radius: 999px;
  background: #fff;
  color: #4a3d43;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.tpl-chip:hover{
  border-color: #e8589a;
  color: #b8306e;
}
.tpl-chip-cat{
  color: #8B3FE8;
  border-color: #e3d4f7;
  background: #faf6ff;
}
.tpl-chip.is-active{
  background: linear-gradient(135deg, #E8589A, #8B3FE8);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(140,40,140,.7);
}
.tpl-chip-n{
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
  color: inherit;
}
.tpl-chip.is-active .tpl-chip-n{ background: rgba(255,255,255,.25); }
.tpl-chip-cat .tpl-chip-n{ background: rgba(139,63,232,.12); }

/* ---- Category block ---- */
.tpl-cat{ margin-bottom: 40px; }
.tpl-cat[hidden]{ display: none; }

.tpl-cat-title{
  font-size: 30px;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f4e9f0;
  color: #1c1418;
}

/* ---- Subcategory block ---- */
.tpl-sub{ margin: 0 0 30px; scroll-margin-top: 150px; }
.tpl-sub[hidden]{ display: none; }

.tpl-sub-head{
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}
.tpl-sub-head h3{
  font-size: 19px;
  font-weight: 700;
  margin: 0;
  color: #2a1f25;
}
.tpl-count{
  font-size: 12.5px;
  font-weight: 600;
  color: #9a8a92;
}

/* ---- Empty / no-result states ---- */
.tpl-noresult,
.tpl-empty-msg{
  padding: 40px 0;
  text-align: center;
  color: #8a7d83;
  font-size: 15px;
}
.tpl-empty-msg code{
  background: #f6eef4;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 13px;
}

@media (max-width: 560px){
  .tpl-cat-title{ font-size: 24px; }
  .tpl-filter{ gap: 6px; padding: 10px 0; }
  .tpl-chip{ padding: 7px 12px; font-size: 12.5px; }
}
