/* ==========================================================================
   zhongdamall.com — Global stylesheet
   Guangzhou Zhongda Textile & Garment Market · B2B wholesale enquiry site
   Zero-dependency. Mobile first.
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  --brand-900: #0b3330;
  --brand-800: #114742;
  --brand-700: #14524f;
  --brand-600: #1c6a63;
  --brand-300: #7fb3ac;
  --brand-100: #e3efed;
  --accent-600: #b07a24;
  --accent-500: #c8963e;
  --accent-100: #f8efdd;

  --ink-900: #16211f;
  --ink-700: #33413f;
  --ink-500: #5c6b69;
  --ink-300: #8d9a98;
  --line: #e2e6e5;
  --line-strong: #ced5d4;

  --bg: #ffffff;
  --bg-soft: #f7f6f3;
  --bg-tint: #f2f7f6;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(16, 34, 32, .06), 0 2px 6px rgba(16, 34, 32, .05);
  --shadow: 0 6px 18px rgba(16, 34, 32, .08), 0 2px 6px rgba(16, 34, 32, .05);
  --shadow-lg: 0 18px 48px rgba(11, 51, 48, .16);

  --container: 1180px;
  --header-h: 68px;

  --font-latin: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-arabic: "Segoe UI", "Noto Naskh Arabic", "Traditional Arabic", "Geeza Pro", Tahoma, sans-serif;
  --font-devanagari: "Segoe UI", "Noto Sans Devanagari", "Nirmala UI", Mangal, sans-serif;
}

html[lang="ar"] { font-family: var(--font-arabic); }
html[lang="hi"] { font-family: var(--font-devanagari); }

/* ---------- 2. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-900);
  font-family: var(--font-latin);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--brand-700); text-decoration: none; }
a:hover { color: var(--brand-600); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.15rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-inline-start: 1.2em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent-500); outline-offset: 2px; }

/* ---------- 3. Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-inline: 20px; }
.section { padding: 72px 0; }
.section--soft { background: var(--bg-soft); }
.section--tint { background: var(--bg-tint); }
.section-head { max-width: 720px; margin: 0 auto 40px; text-align: center; }
.section-head p { color: var(--ink-500); margin: 0; }
.eyebrow {
  display: inline-block; margin-bottom: 10px; color: var(--accent-600);
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border: 1px solid transparent; border-radius: 999px;
  font-weight: 600; font-size: .95rem; cursor: pointer; text-align: center;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent-500); color: #24170a; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-600); color: #fff; }
.btn-dark { background: var(--brand-700); color: #fff; }
.btn-dark:hover { background: var(--brand-600); color: #fff; }
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.btn-outline { background: transparent; border-color: var(--line-strong); color: var(--brand-800); }
.btn-outline:hover { border-color: var(--brand-600); background: var(--brand-100); }
.btn-sm { padding: 9px 16px; font-size: .85rem; }
.btn-block { width: 100%; }

/* ---------- 5. Header ---------- */
.site-header { position: sticky; top: 0; z-index: 60; background: #fff; border-bottom: 1px solid var(--line); }
.topbar { background: var(--brand-900); color: #cfe3e0; font-size: .8rem; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 38px; }
.topbar-tagline { display: flex; align-items: center; gap: 8px; }
.topbar-tagline .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-500); }
.topbar-right { display: flex; align-items: center; gap: 14px; }

.lang-switch { display: inline-flex; align-items: center; gap: 2px; background: rgba(255, 255, 255, .08); border-radius: 999px; padding: 2px; }
.lang-link { padding: 4px 11px; border-radius: 999px; color: #cfe3e0; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.lang-link:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.lang-link.is-active { background: var(--accent-500); color: #24170a; }
.lang-switch--menu { background: var(--bg-soft); }

.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink-900); }
.brand img { width: 38px; height: 38px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 800; font-size: 1.06rem; letter-spacing: -.02em; }
.brand-sub { font-size: .72rem; color: var(--ink-500); letter-spacing: .04em; text-transform: uppercase; }

.nav-menu { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav-menu a { display: block; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--ink-700); font-size: .92rem; font-weight: 500; }
.nav-menu a:hover { background: var(--bg-soft); color: var(--brand-700); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle {
  display: none; width: 42px; height: 42px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); background: #fff; cursor: pointer; padding: 10px;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink-700); border-radius: 2px; }
.nav-toggle span + span { margin-top: 5px; }

@media (max-width: 980px) {
  .nav-menu { position: fixed; inset: calc(var(--header-h) + 38px) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 20px 18px; box-shadow: var(--shadow);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s ease, transform .2s ease, visibility .2s; }
  .nav-menu.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav-menu a { padding: 12px 6px; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 1rem; }
  .nav-toggle { display: block; }
  .nav-actions .btn-primary { display: none; }
  .topbar-inner { flex-wrap: wrap; justify-content: center; padding-block: 6px; }
}

/* ---------- 6. Hero ---------- */
.hero { position: relative; overflow: hidden; color: #fff; background: linear-gradient(135deg, var(--brand-900), var(--brand-700) 55%, var(--brand-600)); }
.hero::after {
  content: ""; position: absolute; inset: 0; opacity: .35; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .16) 1px, transparent 0);
  background-size: 26px 26px;
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.35fr .95fr; gap: 48px; align-items: center; padding: 76px 0 68px; }
.hero h1 { color: #fff; margin-bottom: 18px; }
.hero h1 em { font-style: normal; color: var(--accent-500); }
.hero-lead { color: #d5e6e4; font-size: 1.06rem; max-width: 60ch; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 24px 0 30px; padding: 0; list-style: none; }
.hero-points li { display: flex; align-items: center; gap: 8px; color: #e8f2f1; font-size: .92rem; }
.hero-points li::before { content: ""; width: 16px; height: 16px; flex: 0 0 16px; border-radius: 50%; background: var(--accent-500); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 18px; font-size: .82rem; color: #b6d0cd; }

.hero-card { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .18); border-radius: var(--radius-lg); padding: 26px; backdrop-filter: blur(2px); }
.hero-card h2 { font-size: 1.05rem; color: #fff; margin-bottom: 16px; }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 0; padding: 0; }
.hero-stats div { border-top: 1px solid rgba(255, 255, 255, .2); padding-top: 12px; }
.hero-stats dt { font-size: 1.5rem; font-weight: 800; color: var(--accent-500); }
.hero-stats dd { margin: 2px 0 0; font-size: .84rem; color: #cfe3e0; }
.hero-card-foot { margin: 18px 0 0; font-size: .8rem; color: #b6d0cd; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 34px; padding: 52px 0 48px; }
}

/* ---------- 7. Feature / why grid ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 22px; }
.feature-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.feature-card .icon { width: 44px; height: 44px; margin-bottom: 14px; }
.feature-card h3 { margin-bottom: 8px; }
.feature-card p { margin: 0; color: var(--ink-500); font-size: .94rem; }

/* ---------- 8. Categories ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
.cat-card {
  display: flex; flex-direction: column; gap: 12px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; text-align: start; cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.cat-card:hover { border-color: var(--brand-300); box-shadow: var(--shadow); transform: translateY(-2px); }
.cat-card img { width: 100%; height: 118px; object-fit: cover; border-radius: var(--radius-sm); background: var(--bg-soft); }
.cat-card h3 { margin: 0; font-size: 1rem; }
.cat-card p { margin: 0; font-size: .84rem; color: var(--ink-500); }
.cat-card .cat-cta { font-size: .82rem; font-weight: 700; color: var(--brand-700); }

/* ---------- 9. Merchant stalls ---------- */
.chip-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 26px; }
.chip {
  padding: 7px 15px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff;
  font-size: .84rem; font-weight: 600; color: var(--ink-700); cursor: pointer;
}
.chip:hover { border-color: var(--brand-300); color: var(--brand-700); }
.chip.is-active { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }

.stall-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)); gap: 22px; }
.stall-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.stall-card__media { position: relative; }
.stall-card__media img { width: 100%; height: 180px; object-fit: cover; background: var(--bg-soft); }
.stall-no {
  position: absolute; inset-block-start: 12px; inset-inline-start: 12px;
  background: rgba(11, 51, 48, .88); color: #fff; padding: 4px 10px; border-radius: 999px;
  font-size: .76rem; font-weight: 700; letter-spacing: .03em;
}
.stall-card__body { display: flex; flex-direction: column; flex: 1; padding: 20px; }
.stall-card__body h3 { margin: 0 0 6px; font-size: 1.06rem; }
.stall-card__meta { font-size: .8rem; color: var(--ink-300); margin-bottom: 10px; }
.stall-card__summary { font-size: .9rem; color: var(--ink-500); flex: 1; }
.badge-verified {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px;
  background: var(--brand-100); color: var(--brand-800); font-size: .72rem; font-weight: 700;
}
.badge-soft { display: inline-flex; padding: 3px 9px; border-radius: 999px; background: var(--bg-soft); color: var(--ink-500); font-size: .72rem; font-weight: 600; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.stall-card__actions { display: flex; gap: 10px; margin-top: 16px; }
.stalls-footnote { margin: 26px 0 0; text-align: center; font-size: .84rem; color: var(--ink-300); }
.no-result { grid-column: 1 / -1; text-align: center; color: var(--ink-500); padding: 26px; }

/* ---------- 10. Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 90; display: none; }
.modal.is-open { display: block; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(9, 26, 24, .55); }
.modal__panel {
  position: relative; z-index: 1; width: min(920px, calc(100% - 32px)); max-height: calc(100vh - 64px);
  margin: 32px auto; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden;
}
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.modal__head h3 { margin: 0 0 4px; }
.modal__head p { margin: 0; font-size: .84rem; color: var(--ink-500); }
.modal__close { border: 1px solid var(--line-strong); background: #fff; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; line-height: 1; }
.modal__body { padding: 22px 24px 26px; overflow-y: auto; }
.modal__gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.modal__gallery img { width: 100%; height: 130px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg-soft); }
.product-row { display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.product-row img { width: 84px; height: 84px; object-fit: cover; border-radius: var(--radius-sm); background: var(--bg-soft); }
.product-row h4 { margin: 0 0 4px; font-size: .98rem; }
.product-row p { margin: 0 0 6px; font-size: .86rem; color: var(--ink-500); }
.product-spec { font-size: .8rem; color: var(--ink-500); margin: 0 0 8px; }
.modal__foot { padding: 18px 24px; border-top: 1px solid var(--line); background: var(--bg-soft); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.modal__foot p { margin: 0; font-size: .84rem; color: var(--ink-500); }

/* ---------- 11. How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.step { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 22px; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin-bottom: 14px; border-radius: 50%;
  background: var(--brand-700); color: #fff; font-weight: 800; font-size: .92rem;
}
.step h3 { font-size: 1rem; margin-bottom: 6px; }
.step p { margin: 0; font-size: .9rem; color: var(--ink-500); }
.step small { display: block; margin-top: 10px; font-size: .78rem; color: var(--accent-600); font-weight: 700; }

/* ---------- 12. Trade terms (MOQ / lead time) ---------- */
.trade-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-bottom: 30px; }
.trade-card { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--accent-500); border-radius: var(--radius); padding: 22px; }
html[dir="rtl"] .trade-card { border-left: 1px solid var(--line); border-right: 4px solid var(--accent-500); }
.trade-card h3 { font-size: 1rem; }
.trade-card p { margin: 0; font-size: .9rem; color: var(--ink-500); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table.terms { width: 100%; border-collapse: collapse; min-width: 560px; }
table.terms caption { text-align: start; padding: 14px 18px; font-weight: 700; }
table.terms th, table.terms td { padding: 12px 18px; border-top: 1px solid var(--line); font-size: .89rem; text-align: start; }
table.terms th { background: var(--bg-soft); font-weight: 700; color: var(--ink-700); }

/* ---------- 13. FAQ ---------- */
.faq-list { max-width: 860px; margin: 0 auto; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 10px; overflow: hidden; }
.faq-item summary { padding: 16px 20px; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 14px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--brand-600); font-weight: 800; }
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-a { padding: 0 20px 18px; color: var(--ink-500); font-size: .93rem; }

/* ---------- 14. Inquiry form ---------- */
.inquiry-wrap { display: grid; grid-template-columns: .85fr 1.15fr; gap: 40px; align-items: start; }
.inquiry-info h2 { margin-bottom: 14px; }
.inquiry-info p { color: var(--ink-500); }
.inquiry-checks { list-style: none; margin: 22px 0 0; padding: 0; }
.inquiry-checks li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; font-size: .93rem; color: var(--ink-700); }
.inquiry-checks li::before { content: "✓"; color: var(--brand-600); font-weight: 800; }
.inquiry-alert { margin-top: 22px; padding: 14px 16px; border-radius: var(--radius); background: var(--accent-100); color: #6b4a13; font-size: .85rem; }

.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 28px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: .85rem; font-weight: 600; color: var(--ink-700); }
.field .req { color: #c0392b; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; font-size: .93rem; transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand-600); box-shadow: 0 0 0 3px var(--brand-100); outline: none; }
.field textarea { min-height: 96px; resize: vertical; }
.field .hint { font-size: .76rem; color: var(--ink-300); }
.phone-row { display: grid; grid-template-columns: minmax(120px, .8fr) 1.2fr; gap: 10px; }
.form-footer { margin-top: 20px; }
.form-status { margin-top: 14px; font-size: .88rem; }
.form-status.is-error { color: #b3261e; }
.form-status.is-success { color: var(--brand-700); font-weight: 600; }
.hp-field { position: absolute; top: 0; left: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); opacity: 0; pointer-events: none; }

@media (max-width: 900px) {
  .inquiry-wrap { grid-template-columns: 1fr; gap: 28px; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ---------- 15. Footer ---------- */
.site-footer { background: var(--brand-900); color: #b9cfcd; padding: 52px 0 26px; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 32px; }
.site-footer h3 { color: #fff; font-size: .95rem; margin-bottom: 12px; }
.site-footer a { color: #cfe3e0; }
.site-footer a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.footer-brand img { width: 40px; height: 40px; }
.footer-brand strong { color: #fff; font-size: 1.05rem; }
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li { margin-bottom: 9px; }
.footer-bottom { margin-top: 34px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .14); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: .8rem; color: #8fadaa; }
.footer-bottom p { margin: 0; }
.footer-langs { display: flex; gap: 12px; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 54px 0; }
}

/* ---------- 16. Toast ---------- */
.toast {
  position: fixed; inset-block-end: 24px; inset-inline-end: 24px; z-index: 120;
  max-width: 340px; padding: 14px 18px; border-radius: var(--radius);
  background: var(--brand-900); color: #fff; box-shadow: var(--shadow-lg);
  font-size: .88rem; opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- 17. RTL adjustments ---------- */
html[dir="rtl"] .hero-points li::before { order: 1; }
html[dir="rtl"] .step::before { font-family: var(--font-latin); }
html[dir="rtl"] .brand-sub,
html[dir="rtl"] .eyebrow { letter-spacing: 0; }
html[dir="rtl"] table.terms th,
html[dir="rtl"] table.terms td { text-align: right; }
html[dir="rtl"] .modal__panel { direction: rtl; }
html[dir="rtl"] .toast { inset-inline-end: auto; inset-inline-start: 24px; }
