/* Longda Trading — site styles (dark theme, single file, responsive, no external deps) */

:root {
  color-scheme: dark;
  --navy: #0b1220;
  --navy-2: #101a2e;
  --orange: #ff8c2e;
  --orange-d: #e5650a;
  --gold: #ffb066;
  --bg: #0a0e17;
  --card: #141b2b;
  --card-2: #0d1424;
  --text: #e6e9ef;
  --muted: #9aa4b5;
  --line: #232c40;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 4px 14px rgba(0, 0, 0, .3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
::selection { background: var(--orange); color: #0a0e17; }

/* ---------- Topbar ---------- */
.topbar { background: var(--navy); color: #8f9bb0; font-size: 13px; border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; justify-content: space-between; padding: 6px 16px; }
.topbar a:hover { color: #fff; }

/* ---------- Header ---------- */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; padding: 14px 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; color: #fff; white-space: nowrap; }
.logo-mark { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; background: linear-gradient(135deg, var(--orange), #ffb066); color: #0a0e17; border-radius: 8px; font-size: 18px; font-weight: 800; }
.search-box { flex: 1; display: flex; max-width: 560px; border: 2px solid var(--orange); border-radius: 8px; overflow: hidden; }
.search-box input { flex: 1; border: 0; outline: none; padding: 9px 14px; font-size: 14px; background: var(--card-2); color: var(--text); }
.search-box input::placeholder { color: var(--muted); }
.search-box button { border: 0; background: var(--orange); color: #0a0e17; font-weight: 700; padding: 0 22px; cursor: pointer; }
.search-box button:hover { background: #ff9d4d; }
.header-cta { margin-left: auto; }

.btn { display: inline-block; padding: 10px 20px; border-radius: 8px; font-weight: 700; font-size: 14px; text-align: center; cursor: pointer; transition: .15s; }
.btn-primary { background: var(--orange); color: #0a0e17; }
.btn-primary:hover { background: #ff9d4d; }
.btn-outline { border: 1.5px solid #3b465c; color: var(--text); }
.btn-outline:hover { border-color: var(--orange); color: var(--gold); background: rgba(255, 140, 46, .08); }
.btn-block { display: block; width: 100%; }

.cat-nav { background: var(--navy-2); border-bottom: 1px solid var(--line); }
.cat-nav-inner { display: flex; gap: 4px; overflow-x: auto; padding: 0 16px; }
.cat-nav a { color: #aab6cc; font-size: 14px; padding: 10px 14px; white-space: nowrap; border-radius: 6px 6px 0 0; }
.cat-nav a:hover, .cat-all { background: rgba(255, 255, 255, .08); color: #fff; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(120deg, #0b1220 0%, #131f38 55%, #1b2a4a 100%); color: #fff; padding: 72px 0; border-bottom: 1px solid var(--line); }
.hero h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.25; max-width: 720px; }
.hero p { margin: 16px 0 28px; font-size: 17px; color: #aab6cc; max-width: 640px; }
.hero .btn + .btn { margin-left: 12px; }
.btn-ghost { border: 1.5px solid rgba(255, 255, 255, .5); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-head { text-align: center; margin-bottom: 32px; }
.section-head h2 { font-size: 28px; color: #fff; }
.section-head p { color: var(--muted); margin-top: 6px; }

/* Category cards */
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.cat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 12px; text-align: center; font-weight: 600; font-size: 14px; color: var(--text); transition: .15s; }
.cat-card:hover { transform: translateY(-3px); border-color: rgba(255, 140, 46, .45); box-shadow: 0 6px 20px rgba(0, 0, 0, .5); }
.cat-icon { font-size: 30px; display: block; margin-bottom: 8px; }
.cat-card small { display: block; color: var(--muted); font-weight: 400; margin-top: 4px; }

/* Product cards */
.p-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.p-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: .15s; }
.p-card:hover { transform: translateY(-3px); border-color: rgba(255, 140, 46, .45); box-shadow: 0 8px 24px rgba(0, 0, 0, .55); }
.p-thumb { height: 160px; background: linear-gradient(135deg, #1a2440, #0b1220); display: flex; align-items: center; justify-content: center; }
.p-thumb span { font-size: 52px; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .5)); }
.p-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.p-badge { align-self: flex-start; background: rgba(255, 140, 46, .15); color: var(--gold); font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 99px; }
.p-name { font-size: 15px; line-height: 1.4; color: var(--text); }
.p-desc { font-size: 13px; color: var(--muted); flex: 1; }
.p-meta { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.p-moq { color: var(--muted); }
.p-price { color: var(--gold); font-weight: 800; }
.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 40px 0; }
.empty a { color: var(--gold); }

/* Trust / Why us */
.trust { background: var(--navy); color: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.trust-item b { font-size: 34px; display: block; color: var(--gold); }
.trust-item span { color: #aab6cc; font-size: 14px; }

/* CTA band */
.cta-band { background: linear-gradient(120deg, var(--orange-d) 0%, var(--orange) 100%); color: #0a0e17; text-align: center; padding: 44px 0; }
.cta-band h2 { font-size: 26px; margin-bottom: 8px; }
.cta-band p { color: rgba(10, 14, 23, .8); }
.cta-band .btn { background: #0a0e17; color: var(--gold); margin-top: 14px; }
.cta-band .btn:hover { background: #141b2b; }

/* ---------- Products page ---------- */
.page-head { background: var(--card); border-bottom: 1px solid var(--line); padding: 28px 0; }
.page-head h1 { color: #fff; font-size: 26px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { border: 1px solid var(--line); background: var(--card-2); border-radius: 99px; padding: 6px 16px; font-size: 13px; color: var(--muted); }
.chip:hover { border-color: var(--orange); color: var(--gold); }
.chip-active { background: var(--orange); border-color: var(--orange); color: #0a0e17; font-weight: 700; }

/* ---------- About page ---------- */
.prose { max-width: 820px; margin: 0 auto; }
.prose h2 { color: #fff; margin: 28px 0 10px; font-size: 22px; }
.prose p, .prose li { color: #c3cbd9; margin-bottom: 10px; }
.prose ul { padding-left: 20px; }
.cert-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 16px; }
.cert-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; padding: 18px 10px; font-weight: 700; color: var(--text); font-size: 14px; }

/* ---------- Contact page ---------- */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: start; }
.form-card, .contact-side { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: #cbd5e1; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 14px; font-family: inherit; outline: none; background: var(--card-2); color: var(--text); }
.field input::placeholder, .field textarea::placeholder { color: #67748c; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--orange); }
.field option { background: var(--card); color: var(--text); }
.err { color: #f87171; font-size: 12px; min-height: 16px; display: block; }
.success { background: rgba(16, 185, 129, .12); border: 1px solid #065f46; color: #34d399; padding: 10px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 14px; }
.contact-side h3 { color: #fff; margin-bottom: 10px; }
.contact-side p, .contact-side a { font-size: 14px; color: #c3cbd9; display: block; margin-bottom: 8px; }
.contact-side a:hover { color: var(--gold); }
.wa-btn { display: inline-flex; align-items: center; gap: 8px; background: #25d366; color: #0a0e17 !important; padding: 10px 18px; border-radius: 8px; font-weight: 700; margin-top: 6px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #aab6cc; margin-top: 60px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; padding: 44px 16px 30px; }
.footer-grid h4 { color: #fff; margin-bottom: 12px; font-size: 15px; }
.footer-grid a { display: block; font-size: 13px; padding: 3px 0; }
.footer-grid a:hover { color: var(--gold); }
.footer-grid p { font-size: 13px; }
.soc-link { color: #aab6cc; }
.soc-link:hover { color: var(--gold); }
.legal-name { font-size: 12px; opacity: .75; margin-top: 6px; }
  .footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 14px 16px; text-align: center; font-size: 12px; }
.sample-note { opacity: .6; margin-left: 12px; }

.wa-float { position: fixed; right: 22px; bottom: 22px; width: 56px; height: 56px; background: #25d366; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); transition: .15s; z-index: 50; }
.wa-float:hover { transform: scale(1.08); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .p-grid { grid-template-columns: repeat(3, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; }
  .search-box { order: 3; flex-basis: 100%; max-width: none; }
  .header-cta { margin-left: auto; }
  .p-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding: 48px 0; }
  .hero .btn + .btn { margin-left: 0; margin-top: 10px; }
  .topbar-inner span:first-child { display: none; }
}

/* ---------- Order modal & payment ---------- */
.p-actions { display: flex; flex-direction: column; gap: 8px; }
.modal-mask {
  position: fixed; inset: 0; background: rgba(2, 5, 12, .7);
  display: none; align-items: center; justify-content: center; z-index: 1000; padding: 16px;
}
.modal-mask.show { display: flex; }
.modal-card {
  background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 24px;
  width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; position: relative;
}
.modal-card h3 { margin: 0 0 4px; font-size: 20px; color: #fff; }
.modal-card h4 { margin: 0 0 8px; font-size: 16px; color: #fff; }
.modal-sub { font-size: 13px; color: var(--muted); margin: 4px 0 12px; }
.modal-close {
  position: absolute; top: 10px; right: 14px; border: none; background: none;
  font-size: 26px; cursor: pointer; color: var(--muted); line-height: 1;
}
.modal-card .field { margin-bottom: 12px; text-align: left; }
.modal-card .field label { display: block; font-size: 13px; margin-bottom: 4px; color: #cbd5e1; }
.modal-card .field input, .modal-card .field textarea, .modal-card .field select {
  width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; box-sizing: border-box; background: var(--card-2); color: var(--text);
}
.modal-card .field input::placeholder, .modal-card .field textarea::placeholder { color: #67748c; }
.modal-card .field option { background: var(--card); color: var(--text); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }
.msg { font-size: 13px; color: #34d399; min-height: 18px; }
.msg.err { color: #f87171; }
.pay-opts { display: flex; flex-direction: column; gap: 6px; }
.pay-opt { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: var(--card-2); }
.pay-opt:hover { border-color: rgba(255, 140, 46, .45); }
.pay-opt input { width: auto; accent-color: var(--orange); }
.pay-none { font-size: 14px; color: #cbd5e1; }
.order-no { font-size: 15px; margin: 8px 0; }
.order-no strong { color: var(--gold); }
.pay-box { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 14px; background: var(--card-2); }
.tt-table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--card); border-radius: 8px; overflow: hidden; }
.tt-table td { border: 1px solid var(--line); padding: 7px 9px; }
.tt-table td:first-child { color: var(--muted); width: 38%; background: var(--navy-2); }
.pay-ok { color: #34d399; font-weight: 600; }
[dir="rtl"] .modal-card { text-align: right; }

/* ---------- WeChat QR modal ---------- */
.qr-card { text-align: center; }
.qr-img {
  width: 260px; height: 260px; max-width: 80%;
  object-fit: contain; background: #fff;
  border-radius: 10px; padding: 8px; display: block; margin: 10px auto;
}
.qr-id { font-size: 14px; color: #cbd5e1; }
[dir="rtl"] .qr-card { text-align: center; }

/* ---------- WeChat QR modal ---------- */
.qr-card { text-align: center; }
.qr-img {
  width: 260px; height: 260px; max-width: 80%;
  object-fit: contain; background: #fff;
  border-radius: 10px; padding: 8px; display: block; margin: 10px auto;
}
.qr-id { font-size: 14px; color: #cbd5e1; }
