/* ═══════════════════════════════════
   NG360 — Landing Page Premium UI
   ═══════════════════════════════════ */

:root {
  --gold: #C8A832;
  --gold-light: #E0C850;
  --gold-dark: #8A6D18;
  --navy: #0A1E4A;
  --navy-dark: #060F2A;
  --navy-light: #1A3A6A;
  --blue: #1A6FC8;
  --blue-light: #3B8FEA;
  --blue-dark: #0D4F9A;
  --bg: #FFFFFF;
  --bg-card: #F8FAFE;
  --bg-section: #F0F4FA;
  --border: rgba(10, 40, 100, 0.12);
  --border-strong: rgba(10, 40, 100, 0.2);
  --text: #0A1E4A;
  --text-muted: #4A6A9A;
  --text-light: #7A9AC0;
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  --shadow-sm: 0 1px 3px rgba(10,40,100,0.06);
  --shadow: 0 4px 16px rgba(10,40,100,0.08);
  --shadow-lg: 0 12px 40px rgba(10,40,100,0.12);
  --shadow-xl: 0 20px 60px rgba(10,40,100,0.16);
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ═══════╗ UTILITIES ═══════ */
.hidden { display: none !important; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
  text-decoration: none; border: none; white-space: nowrap;
  position: relative; overflow: hidden;
}
.btn::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(255,255,255,0.1); opacity: 0; transition: opacity 0.3s;
}
.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--navy), var(--blue-dark));
  color: #fff; box-shadow: 0 4px 16px rgba(10, 58, 138, 0.3);
}
.btn-primary:hover {
  box-shadow: 0 8px 24px rgba(10, 58, 138, 0.45);
  transform: translateY(-2px);
}
.btn-secondary {
  background: transparent; color: var(--navy);
  border: 1.5px solid var(--border-strong);
}
.btn-secondary:hover { border-color: var(--blue); color: var(--blue); background: rgba(26,111,200,0.04); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-xs { padding: 5px 10px; font-size: 11px; border-radius: 8px; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.3px;
}
.badge-ok { background: #D1FAE5; color: #065F46; }
.badge-warn { background: #FEF3C7; color: #92400E; }
.badge-err { background: #FEE2E2; color: #991B1B; }
.badge-blue { background: #DBEAFE; color: #1E40AF; }
.badge-gold { background: #FEF9E7; color: #92400E; border: 1px solid rgba(200,168,50,0.3); }

/* ═══════╗ TOPBAR ═══════ */
#topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 32px; height: 68px; gap: 16px;
  transition: box-shadow 0.3s;
}
#topbar.scrolled { box-shadow: var(--shadow); }

.topbar-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; margin-right: auto; flex-shrink: 0;
}
.brand-name {
  font-family: 'Syne', sans-serif; font-size: 17px; font-weight: 800;
  color: var(--text); letter-spacing: -0.3px;
}
.brand-gold { color: var(--gold); }
.brand-tagline {
  font-size: 8px; color: var(--text-light); letter-spacing: 2px;
  text-transform: uppercase; font-weight: 600;
}
.topnav { display: flex; gap: 8px; align-items: center; }
.topnav .btn { font-size: 13px; }
.topnav-user {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-muted); padding: 6px 10px;
  background: var(--bg-card); border-radius: 8px;
  border: 1px solid var(--border);
}

/* ═══════╗ SECTION TABS ═══════ */
.section-tabs {
  display: flex; gap: 4px;
  background: var(--bg); padding: 6px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 68px; z-index: 100;
  backdrop-filter: blur(12px);
  justify-content: center;
}
.stab {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; color: var(--text-muted);
  background: transparent; border: none; cursor: pointer;
  transition: all var(--transition); text-decoration: none;
}
.stab:hover { color: var(--text); background: var(--bg-section); }
.stab.on {
  background: var(--navy); color: #fff; font-weight: 600;
  box-shadow: var(--shadow);
}
.stab-icon { font-size: 16px; }

/* ═══════╗ HERO ═══════ */
#hero {
  position: relative; min-height: 90vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 120px 32px 80px;
  overflow: hidden;
  background: 
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(26, 111, 200, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 85% 80%, rgba(200, 168, 50, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, #F8FBFE 0%, #FFFFFF 100%);
}
#hero::before {
  content: ''; position: absolute; inset: 0; opacity: 0.03;
  background-image: 
    linear-gradient(rgba(58, 143, 200, 0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58, 143, 200, 0.4) 1px, transparent 1px);
  background-size: 64px 64px;
}
/* Floating orbs */
.hero-orb {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.15;
  animation: float 8s ease-in-out infinite;
}
.hero-orb-1 { width: 300px; height: 300px; background: var(--blue); top: 10%; left: -5%; animation-delay: 0s; }
.hero-orb-2 { width: 200px; height: 200px; background: var(--gold); bottom: 20%; right: -3%; animation-delay: -4s; }
.hero-orb-3 { width: 150px; height: 150px; background: var(--navy); top: 60%; left: 60%; animation-delay: -2s; }
@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.05); }
}

.hero-eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 3px;
  text-transform: uppercase; color: var(--blue);
  margin-bottom: 24px; animation: fadeUp 0.8s ease both;
}
.hero-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(40px, 5.5vw, 68px); font-weight: 800;
  line-height: 1.08; margin-bottom: 20px;
  letter-spacing: -1.5px; color: var(--navy);
  animation: fadeUp 0.8s ease 0.15s both;
  max-width: 800px;
}
.hero-title em {
  color: var(--blue); font-style: normal;
  background: linear-gradient(135deg, var(--blue), var(--navy-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 18px; color: var(--text-muted);
  max-width: 580px; line-height: 1.7; margin-bottom: 36px;
  animation: fadeUp 0.8s ease 0.3s both;
}
.hero-search {
  display: flex; max-width: 560px; width: 100%;
  background: #fff; border: 2px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: fadeUp 0.8s ease 0.45s both;
  transition: box-shadow 0.3s, border-color 0.3s;
}
.hero-search:focus-within {
  border-color: var(--blue); box-shadow: 0 0 0 4px rgba(26, 111, 200, 0.15), var(--shadow-lg);
}
.hero-search input {
  flex: 1; background: transparent; border: none; outline: none;
  padding: 16px 24px; font-size: 16px; color: var(--text);
  font-family: 'DM Sans', sans-serif;
}
.hero-search input::placeholder { color: var(--text-light); }
.hero-search button {
  background: linear-gradient(135deg, var(--navy), var(--blue-dark));
  border: none; padding: 16px 28px; color: #fff;
  font-weight: 700; font-size: 15px; cursor: pointer;
  font-family: 'DM Sans', sans-serif; transition: all 0.2s;
}
.hero-search button:hover {
  background: linear-gradient(135deg, var(--navy-light), var(--blue));
}
.hero-cta {
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
  margin-top: 24px; animation: fadeUp 0.8s ease 0.6s both;
}
.hero-stats {
  display: flex; gap: 48px; margin-top: 60px;
  flex-wrap: wrap; justify-content: center;
  animation: fadeUp 0.8s ease 0.75s both;
}
.hero-stat {
  text-align: center;
}
.hero-stat-num {
  font-family: 'Syne', sans-serif; font-size: 36px; font-weight: 700;
  color: var(--navy); display: block; line-height: 1;
}
.hero-stat-lbl {
  font-size: 12px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1.5px; margin-top: 6px;
  font-weight: 500;
}
.hero-stat-icon { font-size: 20px; margin-bottom: 4px; display: block; }
.hero-flags {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  margin-top: 36px; opacity: 0.7;
  animation: fadeUp 0.8s ease 0.9s both;
}
.hero-flags span {
  font-size: 22px; cursor: default;
  transition: transform 0.2s;
}
.hero-flags span:hover { transform: scale(1.4); opacity: 1; }

/* ═══════╗ SECTIONS ═══════ */
.section-wrap {
  max-width: 1200px; margin: 0 auto; padding: 64px 32px 48px;
}
.section-label {
  font-size: 11px; font-weight: 600; letter-spacing: 3px;
  text-transform: uppercase; color: var(--blue);
  margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.section-label::before {
  content: ''; width: 24px; height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--blue));
  border-radius: 1px;
}
.section-title {
  font-family: 'Syne', sans-serif; font-size: 32px; font-weight: 800;
  margin-bottom: 36px; letter-spacing: -0.5px; color: var(--navy);
}

/* ═══════╗ FILTER BAR ═══════ */
.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px;
  align-items: center; padding: 12px 16px;
  background: var(--bg-card); border-radius: var(--radius);
  border: 1px solid var(--border);
}
.filter-select, .filter-input {
  background: #fff; border: 1.5px solid var(--border);
  border-radius: 8px; padding: 9px 14px; color: var(--text);
  font-family: 'DM Sans', sans-serif; font-size: 13px; outline: none;
  transition: border-color 0.2s;
}
.filter-select:focus, .filter-input:focus { border-color: var(--blue); }
.filter-input::placeholder { color: var(--text-light); }
.filter-count {
  color: var(--text-muted); font-size: 13px; margin-left: auto;
  font-weight: 500;
}

/* ═══════╗ CATEGORY PILLS ═══════ */
.cat-pills {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  margin-bottom: 28px;
}
.cat-pill {
  padding: 7px 16px; border-radius: 20px; font-size: 13px; font-weight: 500;
  cursor: pointer; border: 1.5px solid var(--border); color: var(--text-muted);
  background: transparent; transition: all var(--transition); white-space: nowrap;
}
.cat-pill:hover { border-color: var(--blue); color: var(--blue); }
.cat-pill.active {
  background: var(--navy); color: #fff; border-color: var(--navy);
  box-shadow: var(--shadow);
}

/* ═══════╗ CARDS GRID ═══════ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* Classified card */
.card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: all var(--transition); cursor: pointer;
  display: flex; flex-direction: column;
}
.card:hover {
  border-color: rgba(26, 111, 200, 0.3);
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}
.card-img {
  position: relative; height: 200px; overflow: hidden;
  background: linear-gradient(135deg, var(--bg-section), var(--bg-card));
  flex-shrink: 0;
}
.card-img-placeholder {
  width: 100%; height: 100%; display: flex;
  align-items: center; justify-content: center; font-size: 56px;
}
.card-img-badges {
  position: absolute; top: 12px; left: 12px; right: 12px;
  display: flex; justify-content: space-between; align-items: flex-start;
}
.card-category {
  background: rgba(10, 30, 74, 0.85);
  backdrop-filter: blur(8px); border-radius: 20px;
  padding: 5px 14px; font-size: 11px; font-weight: 600;
  color: #fff; border: 1px solid rgba(255,255,255,0.2);
}
.card-price {
  background: linear-gradient(135deg, var(--navy), var(--blue-dark));
  border-radius: 20px; padding: 5px 14px;
  font-size: 12px; font-weight: 700; color: #fff;
}
.card-price.free { background: var(--success); }
.card-body {
  padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px;
}
.card-title {
  font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 700;
  letter-spacing: -0.2px; line-height: 1.35; color: var(--navy);
}
.card-desc {
  font-size: 13px; color: var(--text-muted); line-height: 1.55; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px;
  color: var(--text-light); align-items: center;
}
.card-cond {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 10px; font-weight: 600;
}
.card-cond-new { background: #D1FAE5; color: #065F46; }
.card-cond-used { background: #FEF3C7; color: #92400E; }
.card-cond-service { background: #DBEAFE; color: #1E40AF; }
.card-footer {
  padding: 12px 16px 16px; display: flex; gap: 8px;
  align-items: center; border-top: 1px solid var(--border);
}
.card-seller {
  font-size: 12px; color: var(--text-muted); flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Trade card */
.trade-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: all var(--transition); cursor: pointer;
  display: flex; flex-direction: column;
}
.trade-card:hover {
  border-color: rgba(200, 168, 50, 0.3);
  transform: translateY(-5px); box-shadow: var(--shadow-xl);
}
.trade-img {
  position: relative; height: 180px; overflow: hidden;
  background: linear-gradient(135deg, rgba(10,40,100,0.05), rgba(200,168,50,0.05));
  flex-shrink: 0;
}
.trade-img-ph {
  width: 100%; height: 100%; display: flex;
  align-items: center; justify-content: center; font-size: 48px;
}
.trade-badge {
  position: absolute; top: 12px; left: 12px;
  padding: 5px 16px; border-radius: 20px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
}
.trade-badge-export { background: rgba(10, 58, 138, 0.9); color: #fff; }
.trade-badge-import { background: rgba(109, 40, 217, 0.9); color: #fff; }
.trade-badge-both { background: rgba(80, 20, 140, 0.9); color: #fff; }
.trade-cert {
  position: absolute; top: 12px; right: 12px;
  background: rgba(255,255,255,0.95); border-radius: 20px;
  padding: 4px 12px; font-size: 10px; color: var(--success);
  border: 1px solid rgba(16,185,129,0.3); font-weight: 600;
}
.trade-body {
  padding: 18px; flex: 1; display: flex; flex-direction: column; gap: 8px;
}
.trade-company {
  font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 800;
  letter-spacing: -0.3px; color: var(--navy);
}
.trade-tagline {
  font-size: 13px; color: var(--text-muted); line-height: 1.5; flex: 1;
}
.trade-sectors { display: flex; gap: 6px; flex-wrap: wrap; }
.trade-sector {
  padding: 3px 10px; border-radius: 10px; font-size: 10px; font-weight: 600;
  background: rgba(10, 58, 138, 0.06); color: var(--navy);
  border: 1px solid rgba(10, 40, 100, 0.15);
}
.trade-footer {
  padding: 12px 18px; border-top: 1px solid var(--border);
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.trade-country {
  font-size: 12px; color: var(--text-muted); flex: 1;
}

/* ═══════╗ PUBLISH CTA ═══════ */
.publish-cta {
  background: linear-gradient(135deg, var(--bg-section), #E8F0FE);
  border-top: 1px solid var(--border);
  padding: 56px 32px; text-align: center;
}
.publish-cta-label {
  font-size: 11px; font-weight: 600; letter-spacing: 3px;
  text-transform: uppercase; color: var(--blue);
  margin-bottom: 12px;
}
.publish-cta-title {
  font-family: 'Syne', sans-serif; font-size: 26px; font-weight: 800;
  margin-bottom: 24px; color: var(--navy); letter-spacing: -0.5px;
}
.publish-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 32px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--navy), var(--blue-dark));
  color: #fff; font-family: 'DM Sans', sans-serif;
  font-size: 15px; font-weight: 600; text-decoration: none;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(10, 58, 138, 0.25);
}
.publish-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(10, 58, 138, 0.4);
}

/* ═══════╗ FOOTER ═══════ */
.site-footer {
  padding: 36px 32px; border-top: 1px solid var(--border);
  text-align: center; color: var(--text-light); font-size: 13px;
  background: var(--bg-card);
}
.site-footer a { color: var(--blue); text-decoration: none; font-weight: 500; }

/* ═══════╗ AUTH PAGES ═══════ */
.auth-page {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center; padding: 32px;
  background: linear-gradient(135deg, var(--bg-section), #E8F4FF);
}
.auth-card {
  background: #fff; border-radius: var(--radius-xl);
  padding: 44px 40px; width: 100%; max-width: 440px;
  box-shadow: var(--shadow-xl); border: 1px solid var(--border);
}
.auth-logo { text-align: center; margin-bottom: 20px; }
.auth-card h2 {
  font-family: 'Syne', sans-serif; font-size: 24px; font-weight: 800;
  color: var(--navy); text-align: center; margin-bottom: 6px;
}
.auth-sub {
  color: var(--text-muted); font-size: 14px; text-align: center;
  margin-bottom: 28px;
}
.auth-form .fg { margin-bottom: 16px; }
.auth-form label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-muted); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.auth-form input {
  width: 100%; padding: 12px 16px; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-size: 14px; outline: none;
  font-family: 'DM Sans', sans-serif; transition: border-color 0.2s;
  background: var(--bg-card);
}
.auth-form input:focus { border-color: var(--blue); background: #fff; }
.auth-footer {
  text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-muted);
}
.auth-footer a { color: var(--blue); font-weight: 600; text-decoration: none; }
.auth-errors { margin-bottom: 12px; }
.auth-err { color: var(--danger); font-size: 12px; text-align: center; }

.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ═══════╗ TOAST ═══════ */
#toasts {
  position: fixed; bottom: 24px; right: 24px; z-index: 2000;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 20px;
  font-size: 14px; min-width: 280px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease;
}
.toast.ok { border-left: 3px solid var(--success); }
.toast.err { border-left: 3px solid var(--danger); }

/* ═══════╗ LOGO/TEXT ═══════ */
.logo-text {
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 15px;
  letter-spacing: -0.2px;
}
.logo-light { color: var(--navy); }
.logo-gold { color: var(--gold); }
.logo-sub {
  font-size: 7.5px; color: var(--text-light); letter-spacing: 1.8px;
  text-transform: uppercase; font-weight: 500;
}

/* ═══════╗ ANIMATIONS ═══════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
  from { transform: translateX(80px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
.reveal { animation: fadeUp 0.7s ease both; }
.reveal-d1 { animation-delay: 0.1s; }
.reveal-d2 { animation-delay: 0.2s; }
.reveal-d3 { animation-delay: 0.3s; }
.reveal-d4 { animation-delay: 0.4s; }

/* ═══════╗ RESPONSIVE ═══════ */
@media (max-width: 768px) {
  #topbar { padding: 0 16px; height: 60px; }
  .brand-tagline { display: none; }
  #hero { min-height: 80vh; padding: 100px 16px 60px; }
  .hero-title { font-size: 32px; }
  .hero-subtitle { font-size: 16px; }
  .hero-stats { gap: 28px; }
  .hero-stat-num { font-size: 28px; }
  .section-tabs { overflow-x: auto; justify-content: flex-start; padding: 6px 8px; }
  .stab { padding: 8px 14px; font-size: 12px; white-space: nowrap; }
  .section-wrap { padding: 48px 16px; }
  .section-title { font-size: 26px; }
  .cards-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
  .frow { grid-template-columns: 1fr; }
  .auth-card { padding: 32px 24px; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-count { margin-left: 0; }
}
@media (max-width: 480px) {
  .hero-title { font-size: 28px; }
  .hero-cta { flex-direction: column; align-items: center; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .cards-grid { grid-template-columns: 1fr; }
  .topnav .btn span { display: none; }
}
