/* =========================================
   SAVEHUB — DESIGN SYSTEM 2026
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Colors */
  --primary:     #6366f1;
  --primary-dark:#4f46e5;
  --primary-pale:#eef2ff;
  --accent:      #f59e0b;
  --accent-pale: #fef3c7;
  --success:     #10b981;
  --success-pale:#d1fae5;
  --ink:         #0f172a;
  --muted:       #64748b;
  --border:      #e2e8f0;
  --cream:       #f8fafc;
  --white:       #ffffff;

  /* Typography */
  --font-body:   'Inter', sans-serif;
  --font-display:'Plus Jakarta Sans', sans-serif;

  /* Spacing */
  --radius:      14px;
  --radius-sm:   8px;
  --shadow:      0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--ink); background: var(--cream); line-height: 1.6; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }
img { max-width: 100%; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ===== HEADER ===== */
.site-header {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 16px;
  height: 64px;
}
.site-logo {
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none; flex-shrink: 0;
  display: flex; align-items: center; gap: 8px;
}
.logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; -webkit-text-fill-color: initial;
}

/* Header search */
.header-search {
  flex: 1; max-width: 400px; position: relative;
}
.header-search input {
  width: 100%; padding: 9px 16px 9px 40px;
  border: 1.5px solid var(--border); border-radius: 50px;
  font-size: 0.88rem; font-family: var(--font-body);
  background: var(--cream); transition: all 0.2s;
}
.header-search input:focus {
  outline: none; border-color: var(--primary);
  background: white; box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.header-search::before {
  content: '🔍'; position: absolute;
  left: 14px; top: 50%; transform: translateY(-50%);
  font-size: 0.85rem;
}

/* Header nav */
.header-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.header-nav a {
  padding: 7px 14px; border-radius: 8px;
  font-size: 0.88rem; font-weight: 500; color: var(--muted);
  transition: all 0.2s;
}
.header-nav a:hover { background: var(--primary-pale); color: var(--primary); }

.lang-btns { display: flex; gap: 4px; margin-left: 8px; }
.lang-btn {
  padding: 5px 12px; border-radius: 20px;
  border: 1.5px solid var(--border);
  background: white; font-size: 0.8rem; font-weight: 600;
  cursor: pointer; color: var(--muted);
  font-family: var(--font-body); transition: all 0.2s;
}
.lang-btn.active {
  background: var(--primary); color: white; border-color: var(--primary);
}

.hamburger {
  display: none; background: none; border: none;
  cursor: pointer; padding: 8px; flex-direction: column; gap: 5px;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--ink); border-radius: 2px; transition: all 0.3s;
}

/* Mobile nav */
.mobile-nav {
  display: none; position: fixed;
  inset: 64px 0 0 0; background: white;
  flex-direction: column; padding: 20px 24px;
  gap: 8px; z-index: 99;
  border-top: 1px solid var(--border);
  overflow-y: auto;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: 12px 16px; border-radius: 10px;
  font-size: 1rem; font-weight: 500; color: var(--ink);
  transition: all 0.2s;
}
.mobile-nav a:hover { background: var(--primary-pale); color: var(--primary); }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4f46e5 100%);
  padding: 72px 24px 80px;
  text-align: center; position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { max-width: 680px; margin: 0 auto; position: relative; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  padding: 6px 16px; border-radius: 50px;
  font-size: 0.82rem; color: rgba(255,255,255,0.9);
  font-weight: 500; margin-bottom: 24px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800; color: white; line-height: 1.1;
  margin-bottom: 16px;
}
.hero h1 span { color: var(--accent); }
.hero p {
  font-size: 1.1rem; color: rgba(255,255,255,0.8);
  max-width: 500px; margin: 0 auto 32px;
}

/* Hero search */
.hero-search {
  display: flex; gap: 0; max-width: 560px; margin: 0 auto 40px;
  background: white; border-radius: 14px; padding: 6px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.hero-search input {
  flex: 1; padding: 12px 16px; border: none;
  font-size: 1rem; font-family: var(--font-body);
  background: transparent; color: var(--ink);
}
.hero-search input:focus { outline: none; }
.hero-search button {
  padding: 12px 24px; background: var(--primary);
  color: white; border: none; border-radius: 10px;
  font-family: var(--font-display); font-size: 0.95rem;
  font-weight: 700; cursor: pointer; transition: all 0.2s;
  white-space: nowrap;
}
.hero-search button:hover { background: var(--primary-dark); }

/* Hero stats */
.hero-stats {
  display: flex; justify-content: center; gap: 32px; flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat .num {
  font-family: var(--font-display); font-size: 1.8rem;
  font-weight: 800; color: white;
}
.hero-stat .lbl { font-size: 0.8rem; color: rgba(255,255,255,0.6); }

/* ===== CATEGORIES ===== */
.categories-section { padding: 64px 0; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-eyebrow {
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--primary); margin-bottom: 8px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800; color: var(--ink); margin-bottom: 8px;
}
.section-sub { color: var(--muted); font-size: 1rem; }

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.category-card {
  background: white; border-radius: var(--radius);
  padding: 24px 16px; text-align: center;
  border: 1.5px solid var(--border);
  cursor: pointer; transition: all 0.2s;
  text-decoration: none; color: var(--ink);
  display: block;
}
.category-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.category-icon { font-size: 2rem; margin-bottom: 10px; }
.category-name {
  font-weight: 700; font-size: 0.9rem; margin-bottom: 4px;
}
.category-count { font-size: 0.78rem; color: var(--muted); }

/* ===== PROMO CARDS ===== */
.promos-section { padding: 64px 0; background: white; }
.promos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px; margin-top: 40px;
}
.promo-card {
  background: white; border-radius: var(--radius);
  border: 1.5px solid var(--border);
  overflow: hidden; transition: all 0.2s;
  box-shadow: var(--shadow);
}
.promo-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.promo-card-header {
  padding: 20px; display: flex;
  align-items: center; gap: 14px;
  border-bottom: 1px solid var(--border);
}
.promo-logo {
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; flex-shrink: 0;
  background: var(--cream);
}
.promo-info h3 { font-weight: 700; font-size: 1rem; margin-bottom: 2px; }
.promo-info p { font-size: 0.8rem; color: var(--muted); }
.promo-rating { margin-left: auto; text-align: right; }
.promo-stars { color: var(--accent); font-size: 0.85rem; }
.promo-reviews { font-size: 0.75rem; color: var(--muted); }

.promo-card-body { padding: 16px 20px; }
.promo-deal {
  background: linear-gradient(135deg, var(--primary-pale), #f0f9ff);
  border-radius: 10px; padding: 14px 16px;
  margin-bottom: 12px;
}
.promo-deal-title {
  font-weight: 700; font-size: 0.95rem;
  color: var(--primary); margin-bottom: 4px;
}
.promo-deal-desc { font-size: 0.82rem; color: var(--muted); }

.promo-code-wrap {
  display: flex; gap: 8px; align-items: center;
}
.promo-code {
  flex: 1; background: var(--cream);
  border: 2px dashed var(--border); border-radius: 8px;
  padding: 10px 14px; font-family: monospace;
  font-size: 0.95rem; font-weight: 700;
  color: var(--ink); letter-spacing: 0.05em;
  text-align: center;
}
.btn-copy {
  padding: 10px 16px; background: var(--primary);
  color: white; border: none; border-radius: 8px;
  font-family: var(--font-body); font-size: 0.85rem;
  font-weight: 600; cursor: pointer; transition: all 0.2s;
  white-space: nowrap;
}
.btn-copy:hover { background: var(--primary-dark); }
.btn-copy.copied { background: var(--success); }

.promo-card-footer {
  padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--border);
}
.promo-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 50px;
  font-size: 0.72rem; font-weight: 700;
}
.badge-verified { background: var(--success-pale); color: #065f46; }
.badge-hot { background: #fee2e2; color: #991b1b; }
.badge-new { background: var(--primary-pale); color: var(--primary-dark); }
.btn-visit {
  padding: 7px 16px; background: var(--ink);
  color: white; border-radius: 8px;
  font-size: 0.82rem; font-weight: 600;
  transition: all 0.2s; text-decoration: none;
  display: inline-block;
}
.btn-visit:hover { background: var(--primary); }

/* ===== FEATURED ===== */
.featured-section { padding: 64px 0; }
.featured-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 20px; margin-top: 40px;
}
.featured-card {
  border-radius: var(--radius); padding: 28px;
  display: flex; align-items: center; gap: 20px;
  text-decoration: none; transition: all 0.2s;
  border: 1.5px solid transparent;
}
.featured-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--border); }
.featured-card.vpn { background: linear-gradient(135deg, #1e1b4b, #4f46e5); color: white; }
.featured-card.software { background: linear-gradient(135deg, #064e3b, #10b981); color: white; }
.featured-card.courses { background: linear-gradient(135deg, #7c2d12, #f59e0b); color: white; }
.featured-card.shopping { background: linear-gradient(135deg, #1e3a5f, #3b82f6); color: white; }
.featured-icon { font-size: 3rem; flex-shrink: 0; }
.featured-info h3 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 800; margin-bottom: 4px; }
.featured-info p { font-size: 0.85rem; opacity: 0.8; margin-bottom: 8px; }
.featured-info span { font-size: 0.8rem; font-weight: 700; opacity: 0.9; }

/* ===== FOOTER ===== */
.site-footer { background: #0f172a; color: rgba(255,255,255,0.6); padding: 56px 0 24px; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 24px;
}
.footer-brand .site-logo { margin-bottom: 12px; display: inline-flex; }
.footer-brand p { font-size: 0.85rem; max-width: 260px; line-height: 1.7; }
.footer-col h4 {
  color: white; font-weight: 700; font-size: 0.9rem;
  margin-bottom: 16px;
}
.footer-col a {
  display: block; color: rgba(255,255,255,0.55);
  font-size: 0.85rem; margin-bottom: 10px;
  transition: color 0.2s;
}
.footer-col a:hover { color: white; }
.footer-bottom {
  text-align: center; font-size: 0.8rem;
}

/* ===== SEARCH RESULTS ===== */
.search-page { padding: 48px 0 80px; }
.search-results { margin-top: 32px; }
.no-results { text-align: center; padding: 48px; color: var(--muted); }

/* ===== MISC ===== */
#scrollTop {
  display: none; position: fixed; bottom: 28px; right: 24px;
  z-index: 999; width: 44px; height: 44px;
  background: var(--primary); color: white;
  border-radius: 50%; border: none; cursor: pointer;
  font-size: 1.2rem; box-shadow: var(--shadow-lg);
  align-items: center; justify-content: center;
}
#readProgress {
  position: fixed; top: 0; left: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  width: 0%; z-index: 9999; transition: width 0.1s;
}

/* ===== RESPONSIVE ===== */
@media(max-width:768px) {
  .header-search { display: none; }
  .header-nav { display: none; }
  .hamburger { display: flex; }
  .hero { padding: 48px 20px 56px; }
  .hero-stats { gap: 20px; }
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .promos-grid { grid-template-columns: 1fr; }
  .featured-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1/-1; }
}
@media(max-width:480px) {
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-search { flex-direction: column; }
  .hero-search button { border-radius: 10px; }
  .footer-grid { grid-template-columns: 1fr; }
}
