/* ============================================================
   PakPackages — Design System
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #EFF6FF;
  --primary-mid: #BFDBFE;
  --success: #059669;
  --success-light: #ECFDF5;
  --warning: #D97706;
  --warning-light: #FFFBEB;
  --danger: #DC2626;
  --danger-light: #FEF2F2;
  --purple: #7C3AED;
  --purple-light: #F5F3FF;

  --text: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --text-inv: #FFFFFF;

  --bg: #F8FAFC;
  --card: #FFFFFF;
  --card-hover: #FAFBFF;
  --border: #E2E8F0;
  --border-light: #F1F5F9;

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:    0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.03);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.03);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Network brand colors */
  --jazz: #E0182C;
  --telenor: #0066B3;
  --ufone: #F7941D;
  --zong: #6F2C91;
  --ptcl: #00833E;

  --header-h: 64px;
  --transition: 0.18s ease;
}

/* Dark Mode */
[data-theme="dark"] {
  --text: #F1F5F9;
  --text-muted: #94A3B8;
  --text-light: #64748B;
  --bg: #0B1121;
  --card: #131D30;
  --card-hover: #1A2540;
  --border: #1E2D45;
  --border-light: #162035;
  --primary-light: #1E2D4A;
  --primary-mid: #1E3A6E;
  --success-light: #0D2318;
  --warning-light: #2A1F09;
  --danger-light: #2A0E0E;
  --purple-light: #1E1535;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.4);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.5);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; }
ul, ol { list-style: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

/* ── Typography ── */
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; line-height: 1.2; }
h2 { font-size: clamp(1.25rem, 3vw, 1.75rem); font-weight: 700; line-height: 1.3; }
h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.4; }
h4 { font-size: 1rem; font-weight: 600; }
p { color: var(--text-muted); }

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 20px; }

.page-layout { display: grid; gap: 28px; }
@media (min-width: 1024px) {
  .page-layout { grid-template-columns: 1fr 300px; }
  .page-layout .main-col { min-width: 0; }
  .page-layout .sidebar-col { position: sticky; top: calc(var(--header-h) + 20px); height: fit-content; }
}

/* ── Header ── */
.header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: background var(--transition);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
}
.logo-icon svg { color: #fff; }
.logo-text { font-size: 1.125rem; font-weight: 700; color: var(--text); }
.logo-text span { color: var(--primary); }

.header-search {
  flex: 1; max-width: 420px;
  position: relative;
}
.header-search input {
  width: 100%;
  padding: 0 14px 0 40px;
  height: 40px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg);
  color: var(--text);
  font-size: 0.875rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.header-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); outline: none; }
.header-search input::placeholder { color: var(--text-light); }
.header-search .search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--text-light); pointer-events: none;
}

.header-nav {
  display: flex; align-items: center; gap: 4px;
  margin-left: auto;
}
.header-nav a {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
}
.header-nav a:hover, .header-nav a.active { color: var(--primary); background: var(--primary-light); }

.btn-icon {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}
.btn-icon:hover { color: var(--primary); background: var(--primary-light); }
.btn-icon svg { width: 20px; height: 20px; }

.menu-toggle { display: none; }
@media (max-width: 768px) {
  .header-nav { display: none; }
  .header-search { display: none; }
  .menu-toggle { display: grid; }
}

/* Mobile Nav Drawer */
.mobile-nav {
  display: none;
  position: fixed; inset: 0; z-index: 200;
}
.mobile-nav.open { display: block; }
.mobile-nav-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}
.mobile-nav-drawer {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(300px, 85vw);
  background: var(--card);
  padding: 24px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  box-shadow: var(--shadow-lg);
}
.mobile-nav.open .mobile-nav-drawer { transform: translateX(0); }
.mobile-nav-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.mobile-nav-links { display: flex; flex-direction: column; gap: 4px; }
.mobile-nav-links a {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  display: flex; align-items: center; gap: 10px;
  transition: background var(--transition), color var(--transition);
}
.mobile-nav-links a:hover { background: var(--primary-light); color: var(--primary); }
.mobile-nav-links .nav-section {
  font-size: 0.75rem; font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 12px 14px 4px;
}
.mobile-search { margin-bottom: 20px; position: relative; }
.mobile-search input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
}
.mobile-search .search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--text-light);
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 50%, #3B82F6 100%);
  padding: 56px 0 64px;
  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.04'%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 { position: relative; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  color: #fff;
  font-size: 0.8125rem; font-weight: 500;
  margin-bottom: 20px;
  backdrop-filter: blur(4px);
}
.hero h1 { color: #fff; margin-bottom: 16px; }
.hero h1 span { color: #93C5FD; }
.hero-sub { color: rgba(255,255,255,0.75); font-size: 1.0625rem; margin-bottom: 32px; max-width: 540px; margin-left: auto; margin-right: auto; }

.search-box {
  max-width: 580px; margin: 0 auto 28px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  display: flex;
  overflow: hidden;
}
.search-box input {
  flex: 1; padding: 16px 20px;
  border: none; font-size: 1rem;
  color: var(--text); background: transparent;
}
.search-box input:focus { outline: none; }
.search-box input::placeholder { color: var(--text-light); }
.search-box .search-btn {
  padding: 12px 24px;
  margin: 6px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  font-size: 0.9375rem; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  transition: background var(--transition);
  white-space: nowrap;
}
.search-box .search-btn:hover { background: var(--primary-dark); }
.search-box .search-btn svg { width: 18px; height: 18px; }

.hero-stats {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 24px;
}
.hero-stat { color: rgba(255,255,255,0.85); font-size: 0.875rem; display: flex; align-items: center; gap: 6px; }
.hero-stat strong { color: #fff; font-size: 1rem; }
.hero-stat-dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,0.4); }

/* Search Autocomplete */
.search-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  max-height: 320px; overflow-y: auto;
  z-index: 50;
  display: none;
}
.search-dropdown.open { display: block; }
.search-result-item {
  padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
  cursor: pointer;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border-light);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--primary-light); }
.search-result-item .sri-info { flex: 1; min-width: 0; }
.search-result-item .sri-name { font-size: 0.875rem; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-item .sri-meta { font-size: 0.75rem; color: var(--text-muted); }
.search-result-item .sri-price { font-family: 'JetBrains Mono', monospace; font-size: 0.8125rem; font-weight: 600; color: var(--success); white-space: nowrap; }
.search-result-empty { padding: 20px; text-align: center; font-size: 0.875rem; color: var(--text-muted); }
.search-wrapper-hero { max-width: 580px; margin: 0 auto 28px; position: relative; }
.search-wrapper-hero .search-dropdown { left: 0; right: 0; top: calc(100% + 6px); }

/* ── Network Pills ── */
.network-strip {
  display: flex; gap: 10px; flex-wrap: wrap;
  padding: 20px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.network-strip::-webkit-scrollbar { display: none; }

.network-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 18px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.875rem; font-weight: 500;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--transition);
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}
.network-pill:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); box-shadow: var(--shadow-sm); text-decoration: none; }
.network-pill.active { color: #fff; border-color: transparent; box-shadow: var(--shadow-sm); }
.network-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ── Section Headers ── */
.section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 20px; gap: 16px;
}
.section-header h2 { margin-bottom: 4px; }
.section-header p { font-size: 0.875rem; }
.section-header .view-all {
  font-size: 0.875rem; font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  display: flex; align-items: center; gap: 4px;
}
.section-header .view-all:hover { text-decoration: underline; }
.section-header .view-all svg { width: 16px; height: 16px; }
section { margin-bottom: 48px; }

/* ── Category Cards ── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}
.category-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  text-decoration: none;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  transition: all var(--transition);
  box-shadow: var(--shadow-xs);
}
.category-card:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.category-card .cat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  display: grid; place-items: center;
  font-size: 1.375rem;
  background: var(--primary-light);
}
.category-card:hover .cat-icon { background: rgba(37,99,235,0.15); }
.category-card .cat-name { font-size: 0.8125rem; font-weight: 600; color: var(--text); }
.category-card:hover .cat-name { color: var(--primary); }
.category-card .cat-count { font-size: 0.75rem; color: var(--text-muted); }

/* ── Package Cards Grid ── */
.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
@media (max-width: 640px) { .packages-grid { grid-template-columns: 1fr; } }

/* ── Package Card ── */
.pkg-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: var(--shadow-xs);
  display: flex; flex-direction: column;
  position: relative;
}
.pkg-card:hover {
  border-color: rgba(37,99,235,0.35);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.pkg-card-accent { height: 4px; flex-shrink: 0; }
.pkg-card-body { padding-top: 25px; padding-bottom: 16px;padding-left: 16px;padding-right: 16px; flex: 1; display: flex; flex-direction: column; gap: 12px; }

.pkg-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.pkg-card-title { font-size: 0.9375rem; font-weight: 600; color: var(--text); line-height: 1.35; }
.pkg-network-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.6875rem; font-weight: 700;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
}

.pkg-specs {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.pkg-spec {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.75rem; color: var(--text-muted);
  white-space: nowrap;
}
.pkg-spec span { font-size: 0.875rem; }

.pkg-card-footer {
  margin-top: auto;
  padding: 12px 16px;
  background: var(--border-light);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.pkg-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--success);
  line-height: 1;
}
.pkg-validity { font-size: 0.75rem; color: var(--text-muted); margin-top: 3px; }
.pkg-code-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  background: var(--primary-light);
  border: 1.5px solid var(--primary-mid);
  border-radius: var(--radius-sm);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem; font-weight: 600;
  color: var(--primary);
  transition: all var(--transition);
  white-space: nowrap;
}
.pkg-code-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.pkg-code-btn svg { width: 14px; height: 14px; }

/* Compare checkbox on card */
.compare-check {
  position: absolute; top: 10px; left: 10px;
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: var(--card);
  cursor: pointer;
  display: grid; place-items: center;
  transition: all var(--transition);
  z-index: 2;
}
.compare-check.checked { background: var(--primary); border-color: var(--primary); }
.compare-check svg { width: 12px; height: 12px; color: #fff; display: none; }
.compare-check.checked svg { display: block; }

/* Popular / New badges */
.pkg-badge {
  position: absolute; top: 16px; right: 16px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.6875rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.pkg-badge.popular { background: var(--warning-light); color: var(--warning); border: 1px solid #FDE68A; }

/* ── Filters ── */
.filters-bar {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: flex-end;
  box-shadow: var(--shadow-xs);
}
.filter-group { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 140px; }
.filter-group label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.filter-group select {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 0.875rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
  transition: border-color var(--transition);
}
.filter-group select:focus { border-color: var(--primary); outline: none; }
.filter-btn {
  padding: 9px 18px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
  transition: background var(--transition);
  height: fit-content;
  align-self: flex-end;
}
.filter-btn:hover { background: var(--primary-dark); }
.filter-btn svg { width: 16px; height: 16px; }
.filter-results-count { font-size: 0.875rem; color: var(--text-muted); align-self: center; flex-shrink: 0; margin-left: auto; }

/* ── Tabs ── */
.tabs {
  display: flex; gap: 2px;
  background: var(--border-light);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
  display: flex; align-items: center; gap: 6px;
}
.tab-btn:hover { color: var(--text); background: var(--card); }
.tab-btn.active { background: var(--card); color: var(--primary); font-weight: 600; box-shadow: var(--shadow-xs); }
.tab-btn .tab-count {
  font-size: 0.7rem;
  padding: 1px 6px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
}
.tab-btn.active .tab-count { background: var(--primary); color: #fff; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem; font-weight: 600;
  transition: all var(--transition);
  cursor: pointer; border: 1.5px solid transparent;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-ghost { background: var(--bg); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--card); border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 7px 14px; font-size: 0.8125rem; }
.btn-lg { padding: 13px 28px; font-size: 1rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Package Detail ── */
.pkg-detail-hero {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.pkg-detail-accent { height: 6px; }
.pkg-detail-body { padding: 24px; }
.pkg-detail-meta {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.pkg-detail-title {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 700; margin-bottom: 8px;
}
.pkg-detail-desc { font-size: 0.9375rem; color: var(--text-muted); line-height: 1.65; }
.pkg-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.pkg-detail-stat {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-align: center;
}
.pkg-detail-stat .stat-label {
  font-size: 0.75rem; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.pkg-detail-stat .stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.125rem; font-weight: 700;
  color: var(--text);
}
.pkg-detail-stat.highlight .stat-value { color: var(--success); }
.pkg-detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.code-display {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
}
.code-display code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.125rem; font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.05em;
}

/* ── Info Cards ── */
.info-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-xs);
}
.info-card-title {
  font-size: 0.9375rem; font-weight: 700;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.info-card-title svg { width: 18px; height: 18px; color: var(--primary); }

/* Specs table */
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table tr { border-bottom: 1px solid var(--border-light); }
.spec-table tr:last-child { border-bottom: none; }
.spec-table td { padding: 10px 12px; font-size: 0.875rem; }
.spec-table td:first-child { color: var(--text-muted); font-weight: 500; width: 45%; }
.spec-table td:last-child { font-weight: 600; color: var(--text); }
.spec-table td.highlight { color: var(--success); }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 600;
  white-space: nowrap;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-purple { background: var(--purple-light); color: var(--purple); }
.badge-neutral { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }

/* ── Network Hero Banner ── */
.network-hero {
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.network-hero::before {
  content: '';
  position: absolute; top: -30%; right: -5%;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.network-hero::after {
  content: '';
  position: absolute; bottom: -40%; right: 10%;
  width: 150px; height: 150px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}
.network-hero-monogram {
  width: 64px; height: 64px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.3);
  display: grid; place-items: center;
  font-size: 1.375rem; font-weight: 800;
  color: #fff; flex-shrink: 0;
  backdrop-filter: blur(4px);
}
.network-hero h1 { color: #fff; margin-bottom: 6px; font-size: 1.75rem; }
.network-hero p { color: rgba(255,255,255,0.75); font-size: 0.9375rem; }

/* ── Compare Bar ── */
.compare-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--primary-dark);
  color: #fff;
  padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  z-index: 90;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}
.compare-bar.visible { transform: translateY(0); }
.compare-bar-items { display: flex; gap: 8px; flex-wrap: wrap; }
.compare-bar-item {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 0.8125rem;
  display: flex; align-items: center; gap: 6px;
}
.compare-bar-item .remove-compare {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: grid; place-items: center;
  cursor: pointer;
  font-size: 0.625rem;
  line-height: 1;
  color: #fff;
}
.compare-bar p { font-size: 0.875rem; opacity: 0.75; }

/* ── Compare Table ── */
.compare-table-wrap { overflow-x: auto; }
.compare-table {
  width: 100%; border-collapse: collapse;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.compare-table thead th {
  padding: 16px;
  text-align: center;
  font-size: 0.875rem; font-weight: 600;
  background: var(--bg);
  border-bottom: 1.5px solid var(--border);
}
.compare-table thead th:first-child { text-align: left; color: var(--text-muted); font-size: 0.8125rem; }
.compare-table td { padding: 13px 16px; border-bottom: 1px solid var(--border-light); font-size: 0.875rem; text-align: center; }
.compare-table td:first-child { text-align: left; font-weight: 600; color: var(--text-muted); background: var(--bg); }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table .best-val { color: var(--success); font-weight: 700; }
.compare-table .na { color: var(--text-light); font-style: italic; }
.compare-table .pkg-col-header { display: flex; flex-direction: column; align-items: center; gap: 6px; }

/* ── FAQ ── */
.faq-item {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
  background: var(--card);
}
.faq-question {
  width: 100%; padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  text-align: left; font-size: 0.9375rem; font-weight: 600; color: var(--text);
  transition: background var(--transition);
}
.faq-question:hover { background: var(--primary-light); color: var(--primary); }
.faq-question.open { color: var(--primary); background: var(--primary-light); }
.faq-question svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform 0.2s; }
.faq-question.open svg { transform: rotate(180deg); }
.faq-answer { padding: 0 20px 16px; font-size: 0.9rem; color: var(--text-muted); display: none; line-height: 1.7; }
.faq-answer.open { display: block; }

/* ── Toast ── */
.toast-container {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 999; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.toast {
  background: var(--text);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.875rem; font-weight: 500;
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 8px;
  animation: toastIn 0.25s ease, toastOut 0.3s ease 1.8s forwards;
  white-space: nowrap;
}
.toast.success { background: #065F46; }
.toast svg { width: 16px; height: 16px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }

/* ── Skeleton Loading ── */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--border-light) 25%, var(--border) 50%, var(--border-light) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
.skeleton-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 0;
  box-shadow: var(--shadow-xs);
}
.skeleton-card-inner { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.skel-accent { height: 4px; }
.skel-line { height: 14px; }
.skel-line.w-3\/4 { width: 75%; }
.skel-line.w-1\/2 { width: 50%; }
.skel-line.w-1\/3 { width: 33%; }
.skel-footer { height: 52px; background: var(--border-light); margin-top: 8px; border-top: 1px solid var(--border); }

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--card);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
}
.empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { margin-bottom: 8px; }
.empty-state p { max-width: 360px; margin: 0 auto 20px; }

/* ── Pagination ── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 32px; }
.page-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 500;
  color: var(--text-muted);
  background: var(--card);
  transition: all var(--transition);
  cursor: pointer;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-btn svg { width: 16px; height: 16px; }

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb svg { width: 14px; height: 14px; color: var(--text-light); }

/* ── Ad Zones ── */
.ad-zone {
  background: var(--border-light);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.75rem;
  text-align: center;
  overflow: hidden;
  margin-bottom: 24px;
  min-height: 90px;
  padding: 8px;
}

.ad-zone-label {
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 4px;
  pointer-events: none;
}

.ad-leaderboard {
  width: 100%;
  min-height: 90px;
}

.ad-square {
  width: 100%;
  min-height: 250px;
}

.ad-in-content {
  width: 100%;
  min-height: 250px;
  margin: 28px 0;
}

/* Ensure ad scripts don't break layout */
.ad-zone ins,
.ad-zone div,
.ad-zone iframe {
  max-width: 100%;
}

/* ── Page Sections ── */
.page-wrap { padding: 28px 0 60px; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.875rem; font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  margin-bottom: 20px;
}
.back-link:hover { text-decoration: underline; }
.back-link svg { width: 16px; height: 16px; }

/* ── Sidebar ── */
.sidebar-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-xs);
}
.sidebar-card h4 { margin-bottom: 14px; display: flex; align-items: center; gap: 6px; font-size: 0.9375rem; }
.sidebar-card h4 svg { width: 16px; height: 16px; color: var(--primary); }
.sidebar-link-list { display: flex; flex-direction: column; gap: 2px; }
.sidebar-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.sidebar-link:hover { background: var(--primary-light); color: var(--primary); text-decoration: none; }
.sidebar-link .sll-count {
  font-size: 0.75rem;
  padding: 2px 7px;
  background: var(--bg);
  border-radius: var(--radius-full);
  color: var(--text-muted);
}
.sidebar-link .sll-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ── Footer ── */
.footer {
  background: #0F172A;
  color: rgba(255,255,255,0.7);
  padding: 52px 0 0;
  margin-top: 60px;
}
[data-theme="dark"] .footer { background: #070D1B; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p { margin-top: 12px; font-size: 0.875rem; line-height: 1.6; max-width: 280px; }
.footer-logo { display: flex; align-items: center; gap: 10px; }
.footer-logo-icon { width: 36px; height: 36px; background: var(--primary); border-radius: var(--radius-sm); display: grid; place-items: center; }
.footer-logo-text { font-size: 1.125rem; font-weight: 700; color: #fff; }
.footer-logo-text span { color: #93C5FD; }
.footer-col h5 { font-size: 0.8125rem; font-weight: 700; color: rgba(255,255,255,0.9); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 14px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { color: rgba(255,255,255,0.6); font-size: 0.875rem; text-decoration: none; transition: color var(--transition); }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom {
  padding: 20px 0;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.8125rem; gap: 12px; flex-wrap: wrap;
}
.footer-bottom-links { display: flex; gap: 16px; }
.footer-bottom-links a { color: rgba(255,255,255,0.5); text-decoration: none; }
.footer-bottom-links a:hover { color: #fff; }
.footer-disclaimer {
  background: rgba(255,255,255,0.04);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 12px 0;
  font-size: 0.775rem;
  color: rgba(255,255,255,0.35);
  text-align: center;
}

/* ── Cookie Banner ── */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #1E293B;
  color: rgba(255,255,255,0.85);
  padding: 16px 20px;
  z-index: 95;
  display: none;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}
.cookie-banner.show { display: block; }
.cookie-banner-inner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; max-width: 1200px; margin: 0 auto; }
.cookie-banner-inner p { font-size: 0.875rem; flex: 1; min-width: 200px; }
.cookie-banner-inner a { color: #93C5FD; }
.cookie-btns { display: flex; gap: 8px; }
.cookie-accept {
  padding: 8px 18px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 600;
  cursor: pointer;
  border: none;
}
.cookie-decline { padding: 8px 18px; font-size: 0.875rem; color: rgba(255,255,255,0.6); cursor: pointer; border: none; background: none; }

/* ── Utilities ── */
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.flex { display: flex; } .flex-wrap { flex-wrap: wrap; } .items-center { align-items: center; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Hide redundant header search on homepage */
.hide-header-search .header-search { display: none !important; }

/* ── Universal Icon Styling ───────────────────────────────────────────── */
.icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  color: currentColor;
  stroke: currentColor;
  fill: none;
}

/* Footer logo icon */
.footer-logo-icon svg {
  width: 20px;
  height: 20px;
  color: #fff;
  stroke: #fff;
}

/* Header logo icon */
.logo-icon svg {
  width: 20px;
  height: 20px;
  color: #fff;
}

/* Nav & button icons */
.btn-icon svg,
.header-nav a svg,
.mobile-nav-links a svg {
  width: 18px;
  height: 18px;
  color: currentColor;
}

/* Sitemap section title icons */
.sitemap-section-title svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
  flex-shrink: 0;
}

/* Sitemap link icons (emoji fallback) */
.sitemap-link .icon-emoji {
  font-size: 1.1rem;
  margin-right: 6px;
  line-height: 1;
}

/* Ensure SVGs inherit color in dark mode */
[data-theme="dark"] .footer-logo-icon svg,
[data-theme="dark"] .logo-icon svg {
  color: #fff;
  stroke: #fff;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .hero { padding: 36px 0 44px; }
  .search-box .search-btn span { display: none; }
  .pkg-card-footer { flex-direction: column; align-items: flex-start; }
  .filters-bar { flex-direction: column; }
  .network-hero { flex-direction: column; align-items: flex-start; }
  .pkg-detail-grid { grid-template-columns: 1fr 1fr; }
}

/* Scroll padding for anchor nav */
html { scroll-padding-top: calc(var(--header-h) + 16px); }

/* ── Animations ── */
.fade-in { animation: fadeIn 0.35s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
