/* ============================================================
   InnoShop 应用市场 — TF-style design system
   Dark search-first header, item cards with generated covers,
   category tiles, ranked lists. Loads after app.css.
   ============================================================ */

:root {
  --mk-accent: #7c3aed;
  --mk-accent-deep: #5b21b6;
  --mk-accent-soft: #f3eefe;
  --mk-ink: #14122b;
  --mk-ink-header: #18142e;
  --mk-muted: #6b7280;
  --mk-bg: #f7f6fb;
  --mk-card: #ffffff;
  --mk-line: #e7e4f2;
  --mk-green: #16a34a;
}

body {
  background: var(--mk-bg);
  color: var(--mk-ink);
}

/* ============================================================
   Header: dark, search-first (ThemeForest pattern)
   ============================================================ */
.tf-header {
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 12px rgba(20, 18, 43, 0.18);
}

.tf-header-top {
  background: var(--mk-ink-header);
  padding: 12px 0;
}

.tf-header-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
}

.tf-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.05rem;
  white-space: nowrap;
}

.tf-logo i {
  font-size: 1.45rem;
  color: #b79bfd;
}

.tf-search {
  display: flex;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

.tf-search input {
  flex: 1;
  border: 0;
  outline: none;
  padding: 10px 16px;
  font-size: 0.98rem;
}

.tf-search button {
  border: 0;
  background: var(--mk-accent);
  color: #fff;
  padding: 0 22px;
  font-size: 1.05rem;
}

.tf-search button:hover {
  background: var(--mk-accent-deep);
}

.tf-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
}

.tf-header-link {
  color: #cfcbe4;
  text-decoration: none;
  font-size: 0.92rem;
}

.tf-header-link:hover {
  color: #fff;
}

.tf-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.92rem;
}

.tf-login:hover {
  border-color: #b79bfd;
  color: #b79bfd;
}

/* Category strip under the search bar */
.tf-header-nav {
  background: var(--mk-accent-deep);
  padding: 0;
}

.tf-nav-row {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
}

.tf-nav-row a {
  color: #e7defc;
  text-decoration: none;
  font-size: 0.92rem;
  padding: 10px 14px;
  border-radius: 8px 8px 0 0;
  white-space: nowrap;
}

.tf-nav-row a:hover,
.tf-nav-row a.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.tf-nav-row a.is-active {
  font-weight: 700;
}

.tf-nav-spacer {
  flex: 1;
}

.tf-nav-soft {
  color: #c9bcf2 !important;
}

/* ============================================================
   Hero: copy left, featured card right
   ============================================================ */
.tf-hero {
  background:
    radial-gradient(900px 380px at 85% -10%, rgba(124, 58, 237, 0.16), transparent),
    linear-gradient(180deg, #ffffff 0%, var(--mk-bg) 100%);
  padding: 48px 0 40px;
}

.tf-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 40px;
  align-items: center;
}

.tf-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--mk-accent-soft);
  color: var(--mk-accent);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.tf-hero-copy h1 {
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  font-weight: 800;
  color: var(--mk-ink);
  margin-bottom: 12px;
}

.tf-hero-copy p {
  color: var(--mk-muted);
  font-size: 1.05rem;
  margin-bottom: 22px;
}

.tf-hero-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.tf-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--mk-accent);
  color: #fff;
  padding: 11px 22px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}

.tf-btn-primary:hover {
  background: var(--mk-accent-deep);
  color: #fff;
}

.tf-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--mk-accent);
  border: 1px solid var(--mk-accent);
  padding: 11px 22px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}

.tf-btn-ghost:hover {
  background: var(--mk-accent-soft);
}

.tf-hero-stats {
  display: flex;
  gap: 34px;
}

.tf-hero-stats div {
  display: flex;
  flex-direction: column;
}

.tf-hero-stats strong {
  font-size: 1.5rem;
  color: var(--mk-ink);
}

.tf-hero-stats span {
  color: var(--mk-muted);
  font-size: 0.9rem;
}

/* Featured card in hero gets a lift */
.tf-hero-feature {
  background: var(--mk-card);
  border: 1px solid var(--mk-line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 18px 44px rgba(91, 33, 182, 0.14);
  position: relative;
}

.tf-hero-feature-label {
  position: absolute;
  top: -12px;
  left: 18px;
  background: var(--mk-accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}

.tf-hero-feature .tf-card {
  border: 0;
}

/* ============================================================
   Sections
   ============================================================ */
.tf-section {
  padding: 30px 0 6px;
}

.tf-section-alt {
  background: #fff;
  border-radius: 18px;
  padding: 30px 0;
  border: 1px solid var(--mk-line);
}

.tf-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.tf-section-head h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--mk-ink);
}

.tf-section-head h2 i {
  color: var(--mk-accent);
  margin-right: 6px;
}

.tf-more {
  color: var(--mk-accent);
  text-decoration: none;
  font-size: 0.92rem;
}

.tf-more:hover {
  color: var(--mk-accent-deep);
}

/* ============================================================
   Item card (ThemeForest pattern)
   ============================================================ */
.tf-card {
  display: block;
  background: var(--mk-card);
  border: 1px solid var(--mk-line);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  height: 100%;
}

.tf-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(91, 33, 182, 0.14);
}

.tf-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.tf-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tf-cover-letter {
  font-size: 3rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}

.tf-cover-icon {
  position: absolute;
  right: 14px;
  bottom: 12px;
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.75);
}

.tf-cover-type {
  position: absolute;
  left: 12px;
  top: 12px;
  background: rgba(20, 18, 43, 0.55);
  color: #fff;
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.tf-card-body {
  padding: 13px 15px 10px;
}

.tf-card-title {
  font-weight: 700;
  color: var(--mk-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tf-card-title:hover {
  color: var(--mk-accent);
}

.tf-card-author {
  color: var(--mk-muted);
  font-size: 0.86rem;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tf-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px 13px;
  border-top: 1px solid var(--mk-line);
}

.tf-card-price {
  font-weight: 800;
  color: var(--mk-ink);
}

.tf-free {
  color: var(--mk-green);
  font-weight: 700;
}

.tf-card-stats {
  display: flex;
  gap: 12px;
  color: var(--mk-muted);
  font-size: 0.88rem;
}

.tf-rating i {
  color: #f59e0b;
  margin-right: 3px;
}

.tf-sales i,
.tf-views i {
  margin-right: 3px;
}

/* ============================================================
   Category tiles
   ============================================================ */
.tf-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.tf-cat-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--mk-bg);
  border: 1px solid var(--mk-line);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--mk-ink);
  text-decoration: none;
  font-weight: 600;
}

.tf-cat-tile i {
  color: var(--mk-accent);
}

.tf-cat-tile:hover {
  border-color: var(--mk-accent);
  background: var(--mk-accent-soft);
}

/* ============================================================
   Ranked lists (best sellers / newest)
   ============================================================ */
.tf-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tf-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--mk-card);
  border: 1px solid var(--mk-line);
  border-radius: 12px;
  padding: 12px 16px;
  text-decoration: none;
}

.tf-list-item:hover {
  border-color: var(--mk-accent);
}

.tf-list-rank {
  font-weight: 800;
  color: #c9bcf2;
  font-size: 1.1rem;
  min-width: 30px;
}

.tf-list-icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--mk-accent-soft);
  padding: 4px;
}

.tf-list-body {
  flex: 1;
  min-width: 0;
}

.tf-list-name {
  font-weight: 600;
  color: var(--mk-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tf-list-meta {
  color: var(--mk-muted);
  font-size: 0.86rem;
}

.tf-list-arrow {
  color: var(--mk-muted);
}

/* ============================================================
   CTA + Footer
   ============================================================ */
.tf-cta {
  margin: 44px 0 0;
  padding: 52px 0;
  background: linear-gradient(120deg, var(--mk-accent-deep), var(--mk-accent));
  color: #fff;
}

.tf-cta h2 {
  font-weight: 800;
  margin-bottom: 10px;
}

.tf-cta p {
  opacity: 0.9;
  margin-bottom: 22px;
}

.site-footer {
  background: #131024;
  color: #cbc7dd;
  margin-top: 0;
}

.footer-main {
  padding: 44px 0 28px;
}

.market-logo-footer {
  color: #fff;
}

.market-logo-footer i {
  color: #b79bfd;
}

.footer-title {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links a {
  color: #cbc7dd;
  text-decoration: none;
  display: inline-block;
  padding: 4px 0;
}

.footer-links a:hover {
  color: #fff;
}

.footer-desc {
  color: #9c96b8;
  margin: 12px 0 12px 0;
  font-size: 0.95rem;
}

.btn-publish {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  background: rgba(183, 155, 253, 0.18);
  border: 1px solid rgba(183, 155, 253, 0.45);
  padding: 9px 18px;
  border-radius: 10px;
  text-decoration: none;
}

.btn-publish:hover {
  background: rgba(183, 155, 253, 0.3);
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 0;
  font-size: 0.9rem;
  color: #9c96b8;
}

.footer-family a {
  color: #9c96b8;
  margin-left: 14px;
  text-decoration: none;
}

.footer-family a:hover {
  color: #fff;
}

/* ============================================================
   Market list pages (plugins/themes/services) restyle
   ============================================================ */
.page-plugins .hero-section,
.page-themes .hero-section,
.page-services .hero-section {
  background: var(--mk-ink-header);
  color: #fff;
  padding: 40px 0;
}

/* Responsive */
@media (max-width: 991px) {
  .tf-hero-grid {
    grid-template-columns: 1fr;
  }

  .tf-header-grid {
    grid-template-columns: auto auto;
  }

  .tf-search {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 10px;
  }
}
