/* ============ Mingsai Wholesale Deals — styles ============ */
:root {
  --brand: #c8102e;        /* strong sale red */
  --brand-dark: #a00d26;
  --accent: #ff6b00;       /* orange CTA */
  --ink: #16181d;
  --ink-2: #4a4f5a;
  --ink-3: #8a90a0;
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-alt: #0f1420;       /* dark sections */
  --line: #e6e8ee;
  --card: #ffffff;
  --shadow: 0 10px 30px rgba(20, 24, 40, .08);
  --radius: 16px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(200, 16, 46, .45); outline-offset: 2px; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 999px;
  font-weight: 700; font-size: 15px; border: 2px solid transparent;
  cursor: pointer; transition: all .18s ease; white-space: nowrap;
}
.btn-lg { padding: 14px 30px; font-size: 16px; }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(255, 107, 0, .35); }
.btn-accent:hover { background: #e85f00; transform: translateY(-1px); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-outline:hover { background: rgba(255,255,255,.12); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }

/* ===== Topbar ===== */
.topbar { background: var(--brand); color: #fff; font-size: 13px; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; min-height: 34px; gap: 12px; }
.topbar-contacts { display: flex; gap: 18px; }
.topbar a { opacity: .95; }
.topbar a:hover { opacity: 1; text-decoration: underline; }

/* ===== Nav ===== */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; }
.logo-badge {
  width: 40px; height: 40px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff; font-weight: 900; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 17px; letter-spacing: .5px; }
.brand-text small { font-size: 9.5px; color: var(--ink-3); letter-spacing: 1.4px; font-weight: 700; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { padding: 8px 13px; border-radius: 8px; font-weight: 600; font-size: 14.5px; color: var(--ink-2); }
.nav-links a:hover { color: var(--brand); background: var(--bg-soft); }
.nav-links a.active { color: var(--brand); }
.nav-cta { margin-left: 6px; }
.nav-burger { display: none; background: none; border: 0; font-size: 24px; cursor: pointer; padding: 4px 8px; }

/* ===== Hero ===== */
.hero { background: radial-gradient(1000px 500px at 85% -10%, rgba(255,107,0,.16), transparent 60%), linear-gradient(135deg, #10151f, #1b2334 60%, #10151f); color: #fff; padding: 72px 0 84px; }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 44px; align-items: center; }
.hero-flag { display: inline-block; background: rgba(255,107,0,.16); color: #ffb37a; border: 1px solid rgba(255,107,0,.45); padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 800; letter-spacing: .8px; margin-bottom: 18px; }
.hero h1 { font-size: 46px; line-height: 1.12; font-weight: 900; letter-spacing: -.5px; margin-bottom: 16px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-text p { color: #b9c2d4; font-size: 17px; max-width: 520px; margin-bottom: 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 13.5px; color: #aeb8cc; font-weight: 600; }

.hero-deal-card { background: #fff; color: var(--ink); border-radius: 20px; padding: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.45); position: relative; }
.deal-ribbon { position: absolute; top: -14px; left: 18px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: 1px; padding: 7px 16px; border-radius: 999px; box-shadow: 0 6px 16px rgba(200,16,46,.4); }
.deal-img { height: 240px; border-radius: 14px; background: linear-gradient(135deg, #f2f4f8, #e4e8f0); display: flex; align-items: center; justify-content: center; font-size: 90px; margin-bottom: 14px; overflow: hidden; }
.deal-img img { width: 100%; height: 100%; object-fit: cover; }
.deal-cat { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 2px; }
.deal-info h3 { font-size: 20px; margin-bottom: 10px; }
.deal-price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.deal-price .old { color: var(--ink-3); text-decoration: line-through; font-size: 14px; }
.deal-price .now { font-size: 28px; font-weight: 900; color: var(--brand); }
.deal-price .off { background: #ffe3e8; color: var(--brand); font-size: 12.5px; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.deal-moq { font-size: 13px; color: var(--ink-3); margin-bottom: 14px; }

/* ===== Sections ===== */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-soft); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head h2 { font-size: 30px; font-weight: 900; letter-spacing: -.4px; }
.section-head p { color: var(--ink-3); margin-top: 4px; font-size: 14.5px; }
.section-note { font-size: 13px; color: var(--ink-3); }
.section-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* ===== Sort select ===== */
.deals-tools { display: flex; align-items: center; gap: 8px; }
.sort-label { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.sort-select {
  border: 1.5px solid var(--line); border-radius: 999px; background: #fff;
  padding: 7px 12px; font-size: 13px; font-weight: 600; color: var(--ink-2);
  font-family: inherit; cursor: pointer; transition: border-color .15s;
}
.sort-select:hover, .sort-select:focus { border-color: var(--brand); outline: none; }

/* ===== Category chips ===== */
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip {
  padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line);
  background: #fff; font-weight: 700; font-size: 13.5px; cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ===== Product grid ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: all .2s ease; position: relative;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-img { aspect-ratio: 1/1; background: linear-gradient(135deg, #f2f4f8, #e6eaf2); display: flex; align-items: center; justify-content: center; font-size: 72px; position: relative; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.badge-feat {
  position: absolute; top: 10px; left: 10px; background: var(--ink); color: #ffd54a;
  font-size: 12px; font-weight: 900; padding: 4px 11px; border-radius: 999px; z-index: 2;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-cat { font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); }
.card-name { font-weight: 700; font-size: 15px; line-height: 1.35; min-height: 41px; }
.card-price { display: flex; align-items: baseline; gap: 8px; }
.card-price .old { color: var(--ink-3); text-decoration: line-through; font-size: 13px; }
.card-price .now { font-size: 21px; font-weight: 900; color: var(--brand); }
.card-price .cur { font-size: 11px; font-weight: 700; color: var(--ink-3); }
.card-meta { font-size: 12.5px; color: var(--ink-3); }
.card-meta b { color: var(--ink-2); }
.meta-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.meta-chip {
  font-size: 11px; font-weight: 700; color: var(--ink-2);
  background: var(--bg-soft); border: 1px solid var(--line);
  padding: 2px 8px; border-radius: 999px;
}
.meta-chip span { color: var(--ink-3); font-weight: 600; }
.card-cta { margin-top: auto; padding-top: 10px; display: flex; gap: 8px; }
.card-cta .btn { flex: 1; justify-content: center; }
.grid-empty { text-align: center; color: var(--ink-3); padding: 40px 0; font-size: 15px; }

/* ===== Categories cards ===== */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.cat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 18px; text-align: center; transition: all .2s; cursor: pointer;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent); }
.cat-card .ico { font-size: 40px; margin-bottom: 8px; }
.cat-card h3 { font-size: 16px; margin-bottom: 2px; }
.cat-card p { font-size: 12.5px; color: var(--ink-3); }

/* ===== Why ===== */
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.why-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 22px; }
.why-item .ico { font-size: 34px; margin-bottom: 10px; }
.why-item h3 { font-size: 17px; margin-bottom: 6px; }
.why-item p { color: var(--ink-3); font-size: 14px; }

/* ===== Steps ===== */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 20px; position: relative; }
.step b { display: flex; width: 34px; height: 34px; align-items: center; justify-content: center; background: var(--brand); color: #fff; border-radius: 50%; font-size: 16px; margin-bottom: 12px; }
.step h3 { font-size: 16px; margin-bottom: 6px; }
.step p { color: var(--ink-3); font-size: 13.5px; }

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 34px; }
.contact-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; }
.contact-item .ico { font-size: 30px; }
.contact-item h3 { font-size: 15px; margin: 8px 0 4px; }
.contact-item p { font-size: 14px; color: var(--ink-2); }
.contact-item a { color: var(--brand); font-weight: 700; }
.contact-item a:hover { text-decoration: underline; }
.wechat-id-row { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.wechat-id-row #contactWechat { font-weight: 700; color: var(--ink); }
.btn-copy {
  border: 1.5px solid var(--line); background: var(--bg-soft); color: var(--ink-2);
  font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; cursor: pointer;
  transition: all .15s; font-family: inherit;
}
.btn-copy:hover { border-color: var(--brand); color: var(--brand); }
.btn-copy.done { background: #16a34a; border-color: #16a34a; color: #fff; }
.wechat-qr-row { margin-top: 10px; }
.wechat-qr-row img {
  width: 96px; height: 96px; object-fit: cover; margin: 0 auto 6px;
  border-radius: 10px; border: 1px solid var(--line); cursor: zoom-in;
  transition: transform .15s ease;
}
.wechat-qr-row img:hover { transform: scale(1.06); box-shadow: var(--shadow); }
.wechat-qr-hint { display: block; font-size: 12px; color: var(--ink-3); }
.contact-cta { text-align: center; }
.contact-cta p { margin-top: 12px; color: var(--ink-3); font-size: 14px; }

/* ===== WeChat QR lightbox ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(10, 12, 18, .82);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.lightbox-box { position: relative; background: #fff; border-radius: 18px; padding: 26px; text-align: center; max-width: min(420px, 92vw); }
.lightbox-box img { width: 260px; height: 260px; object-fit: cover; border-radius: 12px; display: block; margin: 0 auto; }
.lightbox-close {
  position: absolute; top: 10px; right: 12px; border: 0; background: none;
  font-size: 20px; cursor: pointer; color: var(--ink-3); padding: 4px 8px; line-height: 1;
}
.lightbox-close:hover { color: var(--brand); }
.lightbox-hint { margin-top: 14px; font-size: 14px; color: var(--ink-2); }

/* ===== Videos ===== */
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.video-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: all .2s ease;
}
.video-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.video-card video { width: 100%; aspect-ratio: 16/9; background: #000; display: block; }
.video-card-body { padding: 14px 16px 16px; }
.video-card-body h3 { font-size: 15px; font-weight: 700; line-height: 1.35; }
.video-card-body p { font-size: 13px; color: var(--ink-3); margin-top: 4px; }

/* ===== Footer ===== */
.footer { background: var(--bg-alt); color: #aeb8cc; padding: 40px 0 30px; }
.footer-inner { display: flex; flex-direction: column; gap: 18px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand b { color: #fff; font-size: 15px; display: block; }
.footer-brand small { font-size: 12px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: 12.5px; border-top: 1px solid rgba(255,255,255,.1); padding-top: 16px; }

/* ===== Floating actions (WhatsApp / back to top) ===== */
.float-actions { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.float-btn {
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28); transition: transform .18s ease;
}
.float-btn:hover { transform: translateY(-2px) scale(1.05); }
.float-btn svg { width: 26px; height: 26px; fill: currentColor; }
.float-wa { background: #25d366; color: #fff; }
.float-top { background: var(--ink); color: #fff; }
.float-label {
  position: absolute; right: 62px; top: 50%; transform: translateY(-50%);
  background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 700;
  padding: 6px 12px; border-radius: 999px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .15s;
}
.float-wa:hover .float-label { opacity: 1; }
@media (max-width: 640px) {
  .float-actions { right: 12px; bottom: 12px; }
  .float-label { display: none; }
}

/* ===== Language switch ===== */
.nav-right { display: flex; align-items: center; gap: 10px; }
.lang-switch {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg-soft); border: 1.5px solid var(--line);
  border-radius: 999px; padding: 6px 13px;
  font-weight: 700; font-size: 13px; cursor: pointer; color: var(--ink-3);
  font-family: inherit; transition: border-color .15s;
}
.lang-switch .sep { color: var(--line); }
.lang-switch span.on { color: var(--brand); }
.lang-switch:hover { border-color: var(--brand); }
@media (max-width: 900px) {
  .nav-right .nav-cta { display: none; }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .nav-links { display: none; }
  .nav-burger { display: block; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 10px 20px 16px; gap: 2px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .12);
  }
  .nav.open .nav-links a { padding: 11px 14px; }
  .topbar-contacts { display: none; }
  .topbar-inner { justify-content: center; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
