/* Admin → Themes (th-*). Builds on dashboard.css tokens (.db). Catalog comes from Rentify. */

.th-intro { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 22px !important; }
.th-intro > div:first-child { flex: 1 1 420px; min-width: 0; }
.th-intro-actions { display: flex; gap: 8px; flex-wrap: wrap; }


.th-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.th-card { overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s, border-color .15s; }
.th-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(16, 24, 40, .08) !important; }
.th-card-active { border-color: var(--db-gold) !important; box-shadow: 0 0 0 1px var(--db-gold) !important; }

.th-shot { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--db-soft); overflow: hidden; border-bottom: 1px solid var(--db-line); }
.th-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; transition: transform .35s; }
.th-card:hover .th-shot img { transform: scale(1.03); }
.th-shot-empty { display: flex; align-items: center; justify-content: center; gap: 8px; height: 100%; color: var(--db-muted); font-size: 13px; text-align: center; padding: 16px; }

.th-badges { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.th-badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.th-badge-free { background: #dcfce7; color: #166534; }
.th-badge-paid { background: #fef3c7; color: #92400e; }
.th-badge-live { background: var(--db-gold, var(--adm-blue, #2563eb)); color: #fff; }
.th-badge-owned { background: #dbeafe; color: #1e40af; }
.th-badge-pending { background: #fde68a; color: #78350f; }

.th-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.th-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.th-title h4 { margin: 0; font-size: 16.5px; font-weight: 700; color: var(--db-ink); }
.th-desc { margin: 0; font-size: 13.5px; color: var(--bs-gray-600); }
.th-feature-list { list-style: none; padding: 0; margin: 4px 0 0; flex: 1; }
.th-feature-list li { position: relative; padding: 2px 0 2px 20px; font-size: 12.5px; color: var(--bs-gray-700); }
.th-feature-list li::before { content: "\2713"; position: absolute; left: 2px; font-weight: 800; color: var(--db-green); }
.th-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* Card: price/ownership tag next to the name, actions pinned to the bottom */
.th-title h4 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-tag { flex-shrink: 0; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.th-tag-free { background: rgba(31, 157, 99, .12); color: var(--db-green); }
.th-tag-paid { background: rgba(217, 138, 11, .14); color: #a86a05; }
.th-tag-owned { background: rgba(62, 106, 225, .12); color: var(--db-blue); }
.th-foot { margin-top: auto; padding-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.th-foot .th-actions { margin-top: 0; flex-wrap: nowrap; }
.th-primary { flex: 1 1 auto; min-width: 0; }
.th-foot .btn { white-space: nowrap; }
.th-status-live { flex: 1 1 auto; min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; border-radius: .475rem; font-size: 12.5px; font-weight: 700; color: var(--db-green); background: rgba(31, 157, 99, .1); }
.th-note { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; font-size: 12.5px; color: #8a5a06; background: rgba(217, 138, 11, .1); }
.th-note i { margin-top: 2px; }

/* Live now */
.th-live { display: flex; align-items: center; gap: 22px; padding: 18px 22px !important; }
.th-live-shot { flex: 0 0 220px; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: var(--db-soft); border: 1px solid var(--db-line); }
.th-live-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.th-live-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.th-live-label { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--db-green); }
.th-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--db-green); box-shadow: 0 0 0 3px rgba(31, 157, 99, .2); }
.th-live-name { margin: 0; font-size: 20px; font-weight: 800; color: var(--db-ink); }
.th-live-side { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; align-self: flex-start; }

/* How it works */
.th-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.th-step { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px dashed var(--db-line); border-radius: 12px; }
.th-step b { display: block; font-size: 13px; color: var(--db-ink); }
.th-step span:not(.th-step-no) { display: block; font-size: 12.5px; color: var(--bs-gray-600); }
.th-step-no { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 800; color: var(--db-gold); background: rgba(37, 99, 235, .1); }
.th-count { display: inline-block; min-width: 18px; margin-left: 4px; padding: 0 5px; border-radius: 999px; font-size: 11px; background: rgba(0, 0, 0, .07); }
.btn-primary .th-count { background: rgba(255, 255, 255, .25); }

@media (max-width: 767.98px) {
    .th-live { flex-direction: column; align-items: stretch; }
    .th-live-shot { flex-basis: auto; }
    .th-live-side { align-items: flex-start; }
    .th-steps { grid-template-columns: 1fr; }
    .th-grid { grid-template-columns: minmax(0, 1fr); }
    .th-foot .th-actions { flex-wrap: wrap; }
    .th-status-live, .th-primary { flex-basis: 100%; min-height: 34px; }
}

/* style.bundle grey-s every i[class*=" fa-"]; these icons take their label's colour */
.th-badge i, .th-status-live i, .th-live-label i, .th-note i, .th-gateway-icon i, .th-shot-empty i { color: inherit; }

.th-name-link { color: inherit; }
.th-name-link:hover { color: var(--db-gold); }
.th-badges-static { position: static; }

/* Details page */
.th-detail { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.th-main { display: block; width: 100%; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--db-soft); aspect-ratio: 16 / 10; cursor: zoom-in; }
.th-main.th-shot-empty { cursor: default; }
.th-main img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.th-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 12px; }
.th-thumb { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--db-soft); text-align: left; cursor: pointer; }
.th-thumb.active { border-color: var(--db-gold); }
.th-thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; display: block; }
.th-thumb span { display: block; padding: 4px 8px; font-size: 11.5px; color: var(--bs-gray-700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-name { font-size: 22px; font-weight: 800; color: var(--db-ink); margin: 0 0 6px; }
.th-price { font-size: 24px; font-weight: 800; color: var(--db-ink); margin: 12px 0 14px; }
.th-features { list-style: none; padding: 0; margin: 0 0 6px; }
.th-features li { position: relative; padding: 6px 0 6px 24px; font-size: 13.5px; border-bottom: 1px dashed var(--db-line); }
.th-features li::before { content: "\2713"; position: absolute; left: 2px; font-weight: 800; color: var(--db-green); }

/* Lightbox */
.th-lightbox { position: fixed; inset: 0; z-index: 3000; background: rgba(10, 12, 20, .9); display: none; align-items: center; justify-content: center; padding: 50px 16px 60px; }
.th-lightbox.open { display: flex; }
.th-lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.th-lb-btn { position: absolute; border: 0; background: rgba(255, 255, 255, .15); color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 22px; cursor: pointer; }
.th-lb-btn:hover { background: rgba(255, 255, 255, .28); }
.th-lb-close { top: 12px; right: 12px; }
.th-lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.th-lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.th-lb-caption { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #fff; font-size: 14px; }

@media (max-width: 1199.98px) {
    .th-detail { grid-template-columns: 1fr; }
}

/* Buy dialog: payment methods */
.th-gateways { display: grid; gap: 10px; }
.th-gateway { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 12px 14px; border: 1px solid var(--db-line, var(--bs-border-color)); border-radius: 12px; transition: border-color .15s; }
.th-gateway:hover { border-color: var(--db-gold, var(--bs-primary)); }
.th-gateway-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.th-gateway-logo { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; background: var(--bs-gray-100); flex-shrink: 0; }
.th-gateway-icon { display: inline-flex; align-items: center; justify-content: center; color: var(--bs-gray-600); }

@media (max-width: 575.98px) {
    .th-grid { grid-template-columns: 1fr; }
}

/* Themes: search + filter */
.th-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.th-search { position: relative; flex: 0 1 320px; min-width: 0; }
.th-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--db-muted); font-size: 12px; pointer-events: none; }
.th-search input { padding-left: 34px; }
.th-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.th-card[hidden], .th-no-match[hidden] { display: none !important; }
.th-no-match { margin-bottom: 16px; }
@media (max-width: 575.98px) { .th-search { flex-basis: 100%; } }
