/* ── ThemeVault – Storefront Styles ── */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=Outfit:wght@300;400;500;600&display=swap');

:root {
  --bg:        #07070e;
  --bg2:       #0f0f1c;
  --bg3:       #161628;
  --accent:    #e8ff47;
  --accent2:   #a8ff78;
  --purple:    #7c3aed;
  --muted:     #4a4a6a;
  --text:      #e0e0f0;
  --text2:     #9090b0;
  --border:    rgba(255,255,255,0.08);
  --card-bg:   #0f0f1c;
  --radius:    12px;
  --radius-lg: 20px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--muted); border-radius: 3px; }

/* ── Nav ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7,7,14,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 5%;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  max-width: 1280px;
  margin: 0 auto;
}
.logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo span { color: var(--text); }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  color: var(--text2);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--bg3); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.cart-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 500;
  transition: all .2s;
  position: relative;
}
.cart-btn:hover { background: var(--bg2); border-color: var(--accent); color: var(--accent); }
.cart-badge {
  background: var(--accent);
  color: var(--bg);
  font-size: .7rem;
  font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-family: 'Outfit', sans-serif;
  font-weight: 600; font-size: .9rem;
  cursor: pointer; border: none; text-decoration: none;
  transition: all .2s;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover { background: #f0ff60; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(232,255,71,.25); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: rgba(232,255,71,.05); }
.btn-ghost { background: var(--bg3); color: var(--text); }
.btn-ghost:hover { background: var(--bg2); }
.btn-sm { padding: 8px 16px; font-size: .82rem; }
.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-danger { background: #ef4444; color: white; }
.btn-danger:hover { background: #dc2626; }

/* ── Hero ── */
.hero {
  min-height: 80vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 80px 5%;
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(124,58,237,.25) 0%, transparent 70%),
              radial-gradient(ellipse 40% 40% at 80% 80%, rgba(232,255,71,.08) 0%, transparent 50%);
  pointer-events: none;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 720px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(232,255,71,.12);
  border: 1px solid rgba(232,255,71,.25);
  color: var(--accent);
  font-size: .8rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  padding: 6px 16px; border-radius: 999px; margin-bottom: 28px;
}
.hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 20px;
}
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p { font-size: 1.1rem; color: var(--text2); margin-bottom: 36px; max-width: 480px; margin-inline: auto; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 32px; justify-content: center;
  margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--border);
}
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-family:'Syne',sans-serif; font-size:1.8rem; font-weight:800; color:var(--accent); }
.hero-stat span { font-size:.8rem; color:var(--text2); text-transform:uppercase; letter-spacing:.05em; }

/* ── Section ── */
.section { padding: 80px 5%; max-width: 1280px; margin: 0 auto; }
.section-header { display:flex; align-items:flex-end; justify-content:space-between; margin-bottom:40px; }
.section-header h2 { font-family:'Syne',sans-serif; font-size:1.8rem; font-weight:800; letter-spacing:-1px; }
.section-header p { color:var(--text2); font-size:.9rem; margin-top:4px; }

/* ── Category pills ── */
.cats { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:32px; }
.cat-pill {
  padding:7px 16px; border-radius:999px; font-size:.85rem; font-weight:500;
  border:1px solid var(--border); color:var(--text2); text-decoration:none;
  transition:all .2s; white-space:nowrap;
}
.cat-pill:hover, .cat-pill.active { border-color:var(--accent); color:var(--accent); background:rgba(232,255,71,.07); }

/* ── Theme Grid ── */
.themes-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:24px; }

.theme-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .25s, border-color .25s, box-shadow .25s;
  text-decoration: none;
  display: flex; flex-direction: column;
}
.theme-card:hover {
  transform: translateY(-4px);
  border-color: rgba(232,255,71,.25);
  box-shadow: 0 16px 48px rgba(0,0,0,.4);
}
.theme-thumb {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg3);
  position: relative;
}
.theme-thumb img { width:100%; height:100%; object-fit:cover; transition:transform .4s; }
.theme-card:hover .theme-thumb img { transform:scale(1.04); }
.theme-thumb-overlay {
  position:absolute; inset:0;
  background:rgba(7,7,14,.8);
  display:flex; align-items:center; justify-content:center; gap:12px;
  opacity:0; transition:opacity .2s;
}
.theme-card:hover .theme-thumb-overlay { opacity:1; }
.theme-badge {
  position:absolute; top:12px; left:12px;
  background:var(--accent); color:var(--bg);
  font-size:.7rem; font-weight:700; text-transform:uppercase; letter-spacing:.05em;
  padding:3px 10px; border-radius:999px;
}
.theme-body { padding:20px; flex:1; display:flex; flex-direction:column; gap:8px; }
.theme-cat { font-size:.75rem; color:var(--purple); font-weight:600; text-transform:uppercase; letter-spacing:.05em; }
.theme-name { font-family:'Syne',sans-serif; font-size:1.05rem; font-weight:700; color:var(--text); }
.theme-desc { font-size:.85rem; color:var(--text2); flex:1; line-height:1.5; }
.theme-footer { display:flex; align-items:center; justify-content:space-between; margin-top:12px; }
.theme-price { font-family:'Syne',sans-serif; font-size:1.2rem; font-weight:800; color:var(--accent); }
.theme-meta { display:flex; gap:12px; font-size:.75rem; color:var(--text2); }
.theme-meta span { display:flex; align-items:center; gap:4px; }

/* ── Search ── */
.search-bar {
  display:flex; gap:12px; margin-bottom:32px;
}
.search-bar input {
  flex:1; background:var(--bg3); border:1px solid var(--border);
  color:var(--text); padding:12px 18px; border-radius:var(--radius);
  font-family:'Outfit',sans-serif; font-size:.9rem; outline:none;
  transition:border-color .2s;
}
.search-bar input:focus { border-color:var(--accent); }
.search-bar input::placeholder { color:var(--muted); }
.sort-select {
  background:var(--bg3); border:1px solid var(--border); color:var(--text);
  padding:12px 14px; border-radius:var(--radius); font-family:'Outfit',sans-serif;
  font-size:.85rem; cursor:pointer; outline:none;
}

/* ── Single theme page ── */
.theme-single { max-width:1100px; margin:0 auto; padding:48px 5%; }
.theme-single-grid { display:grid; grid-template-columns:1fr 340px; gap:40px; align-items:start; }
.theme-preview { border-radius:var(--radius-lg); overflow:hidden; border:1px solid var(--border); }
.theme-preview img { width:100%; display:block; }
.theme-sidebar { position:sticky; top:88px; }
.theme-sidebar-card {
  background:var(--bg2); border:1px solid var(--border); border-radius:var(--radius-lg); padding:28px;
}
.theme-price-big { font-family:'Syne',sans-serif; font-size:2.2rem; font-weight:800; color:var(--accent); margin-bottom:20px; }
.feature-list { list-style:none; display:flex; flex-direction:column; gap:10px; margin:20px 0; }
.feature-list li { display:flex; gap:10px; font-size:.88rem; color:var(--text2); }
.feature-list li::before { content:'✓'; color:var(--accent); font-weight:700; flex-shrink:0; }
.theme-breadcrumb { display:flex; align-items:center; gap:8px; font-size:.85rem; color:var(--text2); margin-bottom:24px; }
.theme-breadcrumb a { color:var(--text2); text-decoration:none; }
.theme-breadcrumb a:hover { color:var(--accent); }
.theme-breadcrumb span { color:var(--muted); }

/* ── Cart ── */
.cart-page { max-width:800px; margin:0 auto; padding:48px 5%; }
.cart-table { width:100%; border-collapse:collapse; }
.cart-table th { text-align:left; font-size:.78rem; text-transform:uppercase; letter-spacing:.06em; color:var(--text2); padding:12px 16px; border-bottom:1px solid var(--border); }
.cart-table td { padding:16px; border-bottom:1px solid var(--border); vertical-align:middle; }
.cart-item-thumb { width:64px; height:40px; border-radius:6px; object-fit:cover; }
.cart-item-name { font-weight:600; font-size:.95rem; }
.cart-total-row { display:flex; justify-content:space-between; align-items:center; padding:20px 0; border-top:1px solid var(--border); font-size:1.1rem; }
.cart-total-row strong { font-family:'Syne',sans-serif; font-size:1.5rem; color:var(--accent); }
.remove-btn { background:none; border:none; color:var(--muted); cursor:pointer; font-size:1.1rem; transition:color .2s; }
.remove-btn:hover { color:#f87171; }

/* ── Checkout ── */
.checkout-page { max-width:600px; margin:0 auto; padding:48px 5%; }
.form-group { margin-bottom:20px; }
.form-group label { display:block; font-size:.85rem; font-weight:600; color:var(--text2); margin-bottom:8px; text-transform:uppercase; letter-spacing:.04em; }
.form-control {
  width:100%; background:var(--bg3); border:1px solid var(--border);
  color:var(--text); padding:12px 16px; border-radius:var(--radius);
  font-family:'Outfit',sans-serif; font-size:.95rem; outline:none; transition:border-color .2s;
}
.form-control:focus { border-color:var(--accent); }
.order-summary-box { background:var(--bg2); border:1px solid var(--border); border-radius:var(--radius-lg); padding:24px; margin-bottom:28px; }
.order-summary-box h3 { font-family:'Syne',sans-serif; font-size:1rem; margin-bottom:16px; }
.summary-line { display:flex; justify-content:space-between; padding:8px 0; border-bottom:1px solid var(--border); font-size:.88rem; }
.summary-line:last-child { border:none; font-weight:700; font-size:1rem; }
#paypal-button-container { margin-top:16px; }

/* ── Success / Cancel ── */
.result-page { text-align:center; padding:100px 5%; max-width:560px; margin:0 auto; }
.result-icon { font-size:4rem; margin-bottom:24px; }
.result-page h1 { font-family:'Syne',sans-serif; font-size:2rem; font-weight:800; margin-bottom:12px; }
.result-page p { color:var(--text2); margin-bottom:32px; }
.download-list { text-align:left; background:var(--bg2); border:1px solid var(--border); border-radius:var(--radius-lg); padding:24px; margin-bottom:28px; }
.download-list h3 { font-size:.85rem; text-transform:uppercase; letter-spacing:.06em; color:var(--text2); margin-bottom:16px; }
.download-item { display:flex; align-items:center; justify-content:space-between; padding:12px 0; border-bottom:1px solid var(--border); }
.download-item:last-child { border:none; }
.download-item-name { font-weight:600; }

/* ── Footer ── */
.footer { border-top:1px solid var(--border); padding:40px 5%; text-align:center; color:var(--text2); font-size:.85rem; }
.footer a { color:var(--text2); text-decoration:none; }
.footer a:hover { color:var(--accent); }

/* ── Flash messages ── */
.flash { padding:14px 20px; border-radius:var(--radius); margin-bottom:20px; font-size:.9rem; }
.flash-success { background:rgba(74,222,128,.1); border:1px solid rgba(74,222,128,.3); color:#4ade80; }
.flash-error   { background:rgba(248,113,113,.1); border:1px solid rgba(248,113,113,.3); color:#f87171; }
.flash-info    { background:rgba(232,255,71,.1);  border:1px solid rgba(232,255,71,.3);  color:var(--accent); }

/* ── Skeleton placeholders ── */
.skeleton { background:var(--bg3); border-radius:8px; animation:pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

/* ── Responsive ── */
@media(max-width:900px) {
  .theme-single-grid { grid-template-columns:1fr; }
  .theme-sidebar { position:static; }
  .hero-stats { gap:20px; }
}
@media(max-width:640px) {
  .nav-links { display:none; }
  .hero h1 { font-size:2rem; letter-spacing:-1px; }
  .themes-grid { grid-template-columns:1fr; }
  .section-header { flex-direction:column; align-items:flex-start; gap:8px; }
}

/* ── Animations ── */
.fade-in { animation: fadeIn .5s ease forwards; }
@keyframes fadeIn { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:none} }
.stagger > * { opacity:0; animation:fadeIn .5s ease forwards; }
.stagger > *:nth-child(1){animation-delay:.05s}
.stagger > *:nth-child(2){animation-delay:.1s}
.stagger > *:nth-child(3){animation-delay:.15s}
.stagger > *:nth-child(4){animation-delay:.2s}
.stagger > *:nth-child(5){animation-delay:.25s}
.stagger > *:nth-child(6){animation-delay:.3s}
