/* ============================================================
   SINGLE CATEGORY PAGE STYLES — Appbeeti
============================================================ */

.cat-single-main {
  min-height: 80vh;
  padding: 24px 0 80px;
}

/* Hero Section */
.cat-single-hero {
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: 24px;
  padding: clamp(28px, 5vw, 48px);
  margin-bottom: 24px;
  box-shadow: var(--sh);
  position: relative;
  overflow: hidden;
}
.cat-single-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 0%, var(--cat-bg, color-mix(in srgb, var(--ac) 14%, transparent)), transparent 60%);
  pointer-events: none;
}

.cat-hero-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.cat-hero-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--cat-grad, var(--cat-bg));
  border: 1px solid color-mix(in srgb, var(--cat-c, var(--ac2)) 30%, transparent);
  color: var(--cat-c, var(--ac2));
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.cat-hero-icon-badge svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.cat-hero-badge {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--cat-c, var(--ac2));
  background: var(--cat-bg, color-mix(in srgb, var(--ac) 12%, transparent));
  border: 1px solid color-mix(in srgb, var(--cat-c, var(--ac2)) 25%, transparent);
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: .02em;
}

.cat-single-hero h1 {
  font-size: clamp(28px, 4.2vw, 42px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 10px;
  color: var(--tx);
}

.cat-single-hero-sub {
  color: var(--mut);
  font-size: clamp(14px, 1.8vw, 16px);
  line-height: 1.6;
  max-width: 65ch;
  margin: 0 0 28px;
}

/* Stats Summary */
.cat-single-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding-top: 22px;
  border-top: 1px solid var(--bd);
}
@media (max-width: 768px) {
  .cat-single-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .cat-single-stats {
    grid-template-columns: 1fr 1fr;
  }
}

.cat-stat-card {
  background: color-mix(in srgb, var(--bg) 60%, var(--card));
  border: 1px solid var(--bd);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
}
.cat-stat-card .num {
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 800;
  color: var(--tx);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.cat-stat-card .num small {
  font-size: 13px;
  color: var(--mut);
  font-weight: 600;
}
.cat-stat-card .lbl {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--mut);
  margin-top: 3px;
}

/* Controls Toolbar */
.cat-single-controls {
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: 18px;
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: var(--sh);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.cat-single-search-box {
  position: relative;
  flex: 1;
  min-width: 260px;
}
.cat-single-search-box .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  stroke: var(--mut);
  fill: none;
  stroke-width: 2;
  pointer-events: none;
}
.cat-single-search-box input {
  width: 100%;
  padding: 11px 40px 11px 42px;
  border: 1px solid var(--bd);
  border-radius: 12px;
  background: var(--bg);
  color: var(--tx);
  font: 500 13.5px Inter, sans-serif;
  transition: all .15s ease;
  outline: none;
}
.cat-single-search-box input:focus {
  border-color: var(--ac2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac2) 18%, transparent);
}
.cat-single-search-box input::-webkit-search-decoration,
.cat-single-search-box input::-webkit-search-cancel-button,
.cat-single-search-box input::-webkit-search-results-button,
.cat-single-search-box input::-webkit-search-results-decoration {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: none !important;
}
.cat-single-search-box button {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: var(--mut);
  cursor: pointer;
  padding: 4px;
  font-size: 13px;
}

.cat-single-filters-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cat-single-select-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--mut);
  font-weight: 600;
}
.cat-single-select-group select {
  padding: 9px 12px;
  border: 1px solid var(--bd);
  border-radius: 10px;
  background: var(--bg);
  color: var(--tx);
  font: 600 12.5px Inter, sans-serif;
  cursor: pointer;
  outline: none;
  transition: border-color .15s;
}
.cat-single-select-group select:focus {
  border-color: var(--ac2);
}

.cat-single-platforms {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.cat-single-platforms .pf-pill {
  background: transparent;
  border: 0;
  padding: 6px 12px;
  border-radius: 7px;
  font: 600 12px Inter, sans-serif;
  color: var(--mut);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all .15s ease;
}
.cat-single-platforms .pf-pill svg {
  width: 13px;
  height: 13px;
}
.cat-single-platforms .pf-pill:hover {
  color: var(--tx);
}
.cat-single-platforms .pf-pill.active {
  background: var(--card);
  color: var(--tx);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .06);
}

/* Status Row */
.cat-single-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 14px;
  flex-wrap: wrap;
}
.back-link a {
  font-size: 13px;
  color: var(--ac2);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.15s;
}
.back-link a:hover {
  opacity: 0.85;
}

/* Grid of Cards (3 Columns) */
.cat-single-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 1080px) {
  .cat-single-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 680px) {
  .cat-single-grid {
    grid-template-columns: 1fr;
  }
}

/* App Card */
.cat-app-card {
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--sh);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: transform .22s cubic-bezier(.16,1,.3,1), border-color .22s ease, box-shadow .22s ease;
}
.cat-app-card:hover {
  transform: translateY(-4px);
  border-color: var(--ac2);
  box-shadow: 0 14px 32px -8px rgba(15, 23, 42, .08);
}
:root[data-theme="dark"] .cat-app-card:hover {
  box-shadow: 0 14px 32px -8px rgba(0, 0, 0, .45);
}

/* Head */
.cat-app-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.cat-app-rank {
  font-size: 12px;
  font-weight: 800;
  color: var(--mut);
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}
.cat-app-rank.rank-top {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 11px;
}
.cat-app-rank.rank-1 {
  background: #fef3c7;
  color: #b45309;
}
.cat-app-rank.rank-2 {
  background: #f1f5f9;
  color: #475569;
}
.cat-app-rank.rank-3 {
  background: #ffedd5;
  color: #c2410c;
}

.cat-app-icon {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.cat-app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.cat-app-meta {
  flex: 1;
  min-width: 0;
}
.cat-app-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 750;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.cat-app-title a {
  color: var(--tx);
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .15s;
}
.cat-app-title a:hover {
  color: var(--ac2);
}

.cat-app-vendor {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--mut);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v-badge {
  color: #0284c7;
  font-weight: 700;
}

.cat-app-score {
  flex-shrink: 0;
  background: color-mix(in srgb, var(--ac) 10%, var(--card));
  border: 1px solid color-mix(in srgb, var(--ac2) 30%, transparent);
  border-radius: 11px;
  padding: 5px 8px;
  text-align: center;
}
.cat-app-score b {
  font-size: 14px;
  color: var(--ac2);
  display: block;
  line-height: 1.1;
  font-weight: 800;
}
.cat-app-score small {
  font-size: 9.5px;
  color: var(--mut);
  font-weight: 600;
}

/* Quote */
.cat-app-quote {
  background: color-mix(in srgb, var(--bg) 60%, var(--card));
  border: 1px solid var(--bd);
  border-left: 3px solid var(--ac2);
  border-radius: 10px;
  padding: 9px 12px;
}
.cat-app-quote p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--tx);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Stats */
.cat-app-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 2px;
}
.cat-app-stars {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--tx);
}
.cat-app-stars .stars {
  color: #f59e0b;
  font-size: 12px;
}
.cat-app-stars .ct {
  font-size: 11px;
  color: var(--mut);
  font-weight: 500;
}

.price-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--mut) 12%, transparent);
  color: var(--mut);
}
.price-pill.free {
  background: color-mix(in srgb, #10b981 14%, transparent);
  color: #059669;
}
:root[data-theme="dark"] .price-pill.free {
  color: #34d399;
}

/* Actions */
.cat-app-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--bd);
}
.btn-get {
  flex: 1;
  background: var(--tx);
  color: var(--bg);
  text-decoration: none;
  font: 600 12.5px Inter, sans-serif;
  padding: 8px 14px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all .15s ease;
}
.btn-get:hover {
  opacity: .88;
  transform: translateY(-1px);
}

.btn-act {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--bg);
  border: 1px solid var(--bd);
  color: var(--mut);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  flex-shrink: 0;
  transition: all .15s ease;
}
.btn-act:hover {
  border-color: var(--ac2);
  color: var(--tx);
}
.btn-act svg {
  width: 15px;
  height: 15px;
}
.btn-act.active,
.btn-act.saved {
  color: #e11d48;
  border-color: color-mix(in srgb, #e11d48 35%, var(--bd));
  background: color-mix(in srgb, #e11d48 10%, transparent);
}
.btn-act.active svg,
.btn-act.saved svg {
  fill: currentColor;
}

/* Toast */
.cat-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--tx);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.cat-toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Empty State */
.cat-single-empty {
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: 20px;
  padding: 48px 24px;
  text-align: center;
  box-shadow: var(--sh);
  margin-top: 20px;
}
.cat-single-empty .empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--mut) 12%, transparent);
  color: var(--mut);
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
}
.cat-single-empty .empty-icon svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}
.cat-single-empty h3 {
  margin: 0 0 8px;
  color: var(--tx);
  font-size: 19px;
}
.cat-single-empty p {
  color: var(--mut);
  margin: 0 0 20px;
  font-size: 14px;
}
.btn-reset-cat-app {
  background: var(--ac2);
  color: #fff;
  border: 0;
  padding: 10px 20px;
  border-radius: 10px;
  font: 600 13px Inter, sans-serif;
  cursor: pointer;
  transition: opacity .15s;
}
.btn-reset-cat-app:hover {
  opacity: .9;
}
