/* ===============================
   THEME PREVIEW – MOMENLINK
   =============================== */

:root {
  --primary:      #2d4a35;
  --primary-hover:#243d2b;
  --primary-light:#eaf1ec;
  --primary-muted:#4a7058;
  --bg:           #f5f7f5;
  --surface:      #ffffff;
  --border:       #e2e8e3;
  --border-hover: #a8c0ae;
  --text:         #1e2e22;
  --muted:        #5a6e5e;
  --muted-light:  #9cb0a0;
  --radius-lg:    18px;
  --radius-md:    12px;
  --radius-sm:    8px;
  --shadow-soft:  0 4px 20px rgba(30,46,34,.07);
  --shadow-hover: 0 12px 36px rgba(30,46,34,.14);
}

/* ── RESET ── */
body {
  margin: 0;
  font-family: 'Poppins', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* ══════════════════════════════
   PAGE TITLE
══════════════════════════════ */
.page-title {
  margin: 32px 24px 0;
  padding: 32px 28px 28px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
}

.page-title h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.page-title p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

/* ══════════════════════════════
   FILTER BAR
══════════════════════════════ */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 24px 0;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

/* ── Tab Buttons ── */
.filter-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  font-family: 'Poppins', system-ui, sans-serif;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  border-color: var(--primary-muted);
  color: var(--primary);
  background: var(--primary-light);
}

.tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.tab-btn.active .tab-count {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--primary-light);
  color: var(--primary-muted);
  font-size: 11px;
  font-weight: 600;
}

.crown-icon {
  font-size: 12px;
}

/* ── Search ── */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 230px;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--muted-light);
  pointer-events: none;
  flex-shrink: 0;
}

#searchInput {
  width: 100%;
  padding: 9px 36px 9px 36px;
  border: 1.5px solid var(--border);
  border-radius: 99px;
  font-size: 13px;
  font-family: 'Poppins', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.18s, background 0.18s;
  box-sizing: border-box;
}

#searchInput:focus {
  border-color: var(--primary-muted);
  background: var(--surface);
}

#searchInput::placeholder {
  color: var(--muted-light);
}

.clear-btn {
  position: absolute;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: none;
  background: var(--muted-light);
  color: #fff;
  border-radius: 50%;
  font-size: 9px;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s;
}

.clear-btn:hover {
  background: var(--muted);
}

/* ══════════════════════════════
   GRID
══════════════════════════════ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  padding: 20px 24px 40px;
}

/* ══════════════════════════════
   CARD
══════════════════════════════ */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

/* ── Image ── */
.card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--bg);
  display: block;
}

/* ── Inner ── */
.card .inner {
  padding: 12px 14px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card .inner-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

/* ── Badge ── */
.badge {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 3px;
}

.badge-super {
  color: #a07c10;
}

.badge-premium {
  color: var(--primary-muted);
}

/* ── Nama tema ── */
.card h3 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── views dan jumlah digunakan ── */
.theme-stats{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin-top:5px;
    font-size:11px;
    color:#777;
}

.theme-stats span{
    display:flex;
    align-items:center;
    gap:6px;

    white-space:nowrap;
}

.theme-stats i{
    font-size:11px;
    font-weight:bold;
    color:#e25555;
}

.theme-stats .fa-eye{
    color:#6b7280;
}

.theme-stats .views{
    display:none;
}

/* ── Tombol preview ── */
.card a {
  display: inline-block;
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.2s ease;
}

.card a:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* ══════════════════════════════
   EMPTY STATE
══════════════════════════════ */
.empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 20px;
  text-align: center;
  gap: 6px;
}

.empty-icon {
  font-size: 38px;
  margin-bottom: 10px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.empty-state small {
  font-size: 13px;
  color: var(--muted-light);
}

.reset-btn {
  margin-top: 14px;
  padding: 8px 22px;
  border-radius: 99px;
  border: 1.5px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
  font-family: 'Poppins', system-ui, sans-serif;
  cursor: pointer;
  transition: all 0.18s;
}

.reset-btn:hover {
  background: var(--primary);
  color: #fff;
}

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 640px) {
  .page-title {
    margin: 20px 14px 0;
    padding: 24px 18px 20px;
  }

  .page-title h2 {
    font-size: 19px;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    margin: 14px 14px 0;
    gap: 10px;
  }

  .search-wrap {
    min-width: unset;
    width: 100%;
  }

  .filter-tabs {
    gap: 5px;
  }

  .tab-btn {
    font-size: 12px;
    padding: 6px 12px;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 14px 14px 32px;
  }

  .card .inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px 12px;
  }

  .card a {
    width: 100%;
    text-align: center;
    padding: 9px 0;
    font-size: 12.5px;
  }

  .card h3 {
    font-size: 13px;
    white-space: normal;
  }
}