/*
Theme Name: Sitehix Marketplace
Theme URI: https://sitehix.local
Author: Sitehix
Author URI: https://sitehix.local
Description: Premium digital asset marketplace theme for websites, SaaS, stores, newsletters, domains, and creator assets.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: sitehix
*/

:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --ink: #111827;
  --muted: #5b6472;
  --line: #dce3ec;
  --primary: #2454d6;
  --primary-2: #163b9c;
  --green: #12805c;
  --amber: #b45309;
  --dark: #101828;
  --dark-2: #182230;
  --shadow: 0 18px 55px rgba(16, 24, 40, .1);
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
.wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0;
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--green));
  border-radius: 7px;
  font-weight: 900;
}
.menu { display: flex; align-items: center; gap: 22px; color: var(--muted); font-weight: 650; }
.menu a:hover { color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-weight: 750;
  cursor: pointer;
  transition: .18s ease;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 10px 24px rgba(36,84,214,.22); }
.btn-primary:hover { background: var(--primary-2); transform: translateY(-1px); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.sitehix-message-nav-link {
  position: relative;
  gap: 8px;
}
.sitehix-message-badge {
  position: absolute;
  top: -9px;
  right: -9px;
  min-width: 22px;
  height: 22px;
  display: none;
  place-items: center;
  padding: 0 6px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(239, 68, 68, .25);
}
.sitehix-message-badge.is-visible { display: grid; }
.hero {
  color: #fff;
  background:
    linear-gradient(90deg, rgba(16,24,40,.94), rgba(16,24,40,.78), rgba(16,24,40,.38)),
    url("assets/marketplace-hero.svg") center/cover no-repeat;
}
.hero-inner {
  min-height: 620px;
  display: grid;
  align-items: center;
  padding: 80px 0 110px;
}
.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  color: #dbeafe;
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(255,255,255,.08);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 750;
  font-size: 13px;
}
.hero h1 {
  max-width: 760px;
  margin: 22px 0 18px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: .96;
  letter-spacing: 0;
}
.hero p { max-width: 650px; margin: 0 0 30px; color: #e6edf7; font-size: 20px; }
.hero-search {
  display: grid;
  grid-template-columns: 1.5fr 1fr auto;
  gap: 10px;
  width: min(860px, 100%);
  padding: 10px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--radius);
}
.hero-search input,
.hero-search select {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
.stats-band {
  margin-top: -54px;
  position: relative;
  z-index: 5;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.stat {
  background: #fff;
  padding: 26px;
}
.stat strong { display: block; font-size: 30px; line-height: 1; }
.stat span { color: var(--muted); font-weight: 650; }
.section { padding: 82px 0; }
.section.alt { background: #fff; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.section-head h2 { margin: 0; font-size: clamp(30px, 4vw, 46px); line-height: 1.06; letter-spacing: 0; }
.section-head p { margin: 8px 0 0; color: var(--muted); max-width: 570px; }
.asset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.asset-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(16,24,40,.05);
  transition: .18s ease;
}
.asset-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.asset-media {
  min-height: 172px;
  background:
    linear-gradient(135deg, rgba(36,84,214,.86), rgba(18,128,92,.78)),
    url("assets/marketplace-hero.svg") center/cover no-repeat;
  display: flex;
  align-items: end;
  padding: 16px;
  color: #fff;
}
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #e8f7f0;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}
.badge.dark { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.24); }
.asset-body { padding: 18px; }
.asset-body h3 { margin: 0 0 10px; font-size: 21px; line-height: 1.2; }
.asset-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0;
}
.metric {
  padding: 10px;
  background: var(--surface-2);
  border-radius: 6px;
}
.metric span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.metric strong { display: block; margin-top: 2px; font-size: 16px; }
.asset-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.price { font-size: 24px; font-weight: 900; color: var(--primary); }
.category-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.category-tile {
  min-height: 122px;
  padding: 18px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
}
.category-tile strong { display: block; font-size: 18px; margin-bottom: 8px; }
.category-tile span { color: var(--muted); font-size: 14px; }
.trust {
  background: var(--dark);
  color: #fff;
}
.trust-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 34px;
  align-items: center;
}
.trust h2 { margin: 0 0 16px; font-size: clamp(32px, 4vw, 52px); line-height: 1.06; }
.trust p { color: #cbd5e1; }
.check-list { display: grid; gap: 12px; margin-top: 24px; }
.check {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  font-weight: 750;
}
.check::before {
  content: "✓";
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
}
.deal-panel {
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 24px 70px rgba(0,0,0,.25);
}
.deal-step {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.deal-step:last-child { border-bottom: 0; }
.step-num {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--primary);
  font-weight: 900;
  border-radius: 7px;
}
.deal-step strong { display: block; }
.deal-step span { color: var(--muted); }
.cta {
  background: linear-gradient(135deg, var(--primary), #0f766e);
  color: #fff;
  padding: 70px 0;
}
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.cta h2 { margin: 0 0 8px; font-size: clamp(30px, 4vw, 46px); line-height: 1.08; }
.cta p { margin: 0; color: #e0f2fe; }
.site-footer {
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 34px 0;
  color: var(--muted);
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.archive-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
}
.filter-box {
  position: sticky;
  top: 92px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  height: fit-content;
}
.filter-box label { display: block; margin: 14px 0 6px; color: var(--muted); font-weight: 750; font-size: 13px; }
.filter-box input, .filter-box select, .form-control {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  font: inherit;
  background: #fff;
}
.single-hero {
  background: var(--dark);
  color: #fff;
  padding: 64px 0;
}
.single-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}
.content-panel, .sidebar-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.sidebar-panel { position: sticky; top: 92px; }
.submit-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.submit-form .full { grid-column: 1 / -1; }
textarea.form-control { min-height: 130px; padding-top: 10px; }
.mobile-toggle { display: none; }
.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.auth-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 8px 30px rgba(16,24,40,.05);
}
.auth-panel h2 { margin: 0 0 8px; font-size: 28px; }
.auth-panel p { margin: 0 0 18px; color: var(--muted); }
.auth-panel label {
  display: block;
  margin: 14px 0 6px;
  color: var(--muted);
  font-weight: 750;
  font-size: 13px;
}
.auth-panel .btn { width: 100%; margin-top: 18px; }
.account-notice {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid #bbf7d0;
  background: #ecfdf3;
  color: #166534;
  border-radius: var(--radius);
  font-weight: 750;
}
.account-notice.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}
.account-shell {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 22px;
}
.account-sidebar {
  background: var(--dark);
  color: #fff;
  border-radius: var(--radius);
  padding: 24px;
  height: fit-content;
  text-align: center;
}
.account-sidebar p { color: #cbd5e1; overflow-wrap: anywhere; }
.account-sidebar .btn { width: 100%; margin-top: 18px; }
.account-avatar {
  position: relative;
  overflow: hidden;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--green));
  font-size: 30px;
  font-weight: 900;
}
.account-avatar span {
  position: relative;
  z-index: 1;
}
.account-avatar img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  background: #fff;
}
.account-avatar-form { margin-top: 14px; }
.account-photo-picker {
  width: 100%;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 7px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.account-photo-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.account-main { min-width: 0; }
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.dashboard-tile {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.dashboard-tile span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}
.dashboard-tile strong {
  display: block;
  margin-top: 5px;
  font-size: 20px;
  overflow-wrap: anywhere;
}
.check-list.light .check {
  color: var(--ink);
  background: var(--surface-2);
  border-color: var(--line);
}
.manager-table-wrap {
  width: 100%;
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.manager-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}
.manager-table th,
.manager-table td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.manager-table th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0;
}
.manager-table td span { color: var(--muted); font-size: 13px; }
.manager-table select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 0 8px;
}
.manager-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.manager-actions .btn { min-height: 38px; padding: 0 12px; }
.section-head.compact { margin-bottom: 18px; }
.section-head.compact h2 { font-size: 30px; }
.seller-wizard {
  margin-top: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.wizard-progress {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}
.wizard-step {
  min-height: 64px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  border-radius: 7px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.wizard-step span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--primary);
}
.wizard-step.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.wizard-panel { display: none; }
.wizard-panel.is-active { display: block; }
.wizard-panel h3 { margin: 0 0 6px; font-size: 26px; }
.wizard-panel p { margin: 0 0 18px; color: var(--muted); }
.wizard-fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}
.wizard-fields label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.wizard-fields .form-control { margin-top: 6px; }
.wizard-fields .full { grid-column: 1 / -1; }
.wizard-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.wizard-prev:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.wizard-submit { display: none; }
.review-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.review-box div {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.review-box strong,
.review-box span { display: block; }
.review-box span { color: var(--muted); margin-top: 5px; }
.seller-assets-panel { margin-top: 18px; }
.seller-asset-list { display: grid; gap: 10px; }
.seller-asset-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.seller-asset-row strong,
.seller-asset-row span { display: block; }
.seller-asset-row span {
  color: var(--muted);
  overflow-wrap: anywhere;
}
@media (max-width: 920px) {
  .menu, .nav-actions .btn-ghost { display: none; }
  .mobile-toggle { display: inline-flex; }
  .hero-search, .stats-grid, .trust-grid, .cta-inner, .single-grid, .archive-layout, .auth-grid, .account-shell { grid-template-columns: 1fr; }
  .asset-grid { grid-template-columns: repeat(2, 1fr); }
  .category-strip { grid-template-columns: repeat(3, 1fr); }
  .filter-box, .sidebar-panel { position: static; }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .wizard-progress { grid-template-columns: repeat(3, 1fr); }
  .review-box { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { width: min(100% - 24px, 1180px); }
  .hero-inner { min-height: 560px; padding: 56px 0 88px; }
  .asset-grid, .category-strip, .submit-form { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .section-head { display: block; }
  .asset-meta { grid-template-columns: 1fr; }
  .footer-inner { display: block; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .wizard-progress,
  .wizard-fields,
  .seller-asset-row { grid-template-columns: 1fr; }
  .wizard-actions { justify-content: stretch; flex-direction: column; }
  .wizard-actions .btn { width: 100%; }
}
