:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #7c3aed;
  --primary-2: #2563eb;
  --success: #16a34a;
  --danger: #dc2626;
  --shadow: 0 18px 45px rgba(15, 23, 42, .08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--bg); }
a { color: inherit; text-decoration: none; }
code { background: rgba(124,58,237,.08); padding: 2px 6px; border-radius: 8px; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.site-header { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(18px); background: rgba(255,255,255,.82); border-bottom: 1px solid rgba(229,231,235,.8); }
.header-grid { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-logo { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: white; font-weight: 900; background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: 0 10px 22px rgba(124,58,237,.25); }
.brand strong { display: block; font-size: 18px; }
.brand small { display: block; color: var(--muted); margin-top: 3px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-link { padding: 10px 14px; border-radius: 999px; color: #374151; }
.nav-link:hover { background: #f3f4f6; }
.nav-admin { border: 1px solid var(--line); background: white; }
.hero { padding: 58px 0 28px; }
.hero-grid { display: grid; grid-template-columns: 1.45fr .75fr; gap: 28px; align-items: stretch; }
.eyebrow { margin: 0 0 10px; color: var(--primary); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; }
h1 { margin: 0; font-size: clamp(34px, 5vw, 62px); line-height: 1.05; letter-spacing: -0.04em; }
h2 { margin: 0; font-size: 26px; }
.hero-text { color: var(--muted); font-size: 18px; line-height: 1.8; max-width: 720px; }
.hero-search { margin-top: 24px; display: flex; gap: 12px; max-width: 680px; }
input, textarea { width: 100%; border: 1px solid var(--line); background: white; color: var(--text); border-radius: 16px; padding: 14px 16px; outline: none; font: inherit; }
input:focus, textarea:focus { border-color: rgba(124,58,237,.7); box-shadow: 0 0 0 4px rgba(124,58,237,.12); }
.btn { border: 0; border-radius: 16px; padding: 13px 18px; font-weight: 800; cursor: pointer; white-space: nowrap; font: inherit; }
.btn-primary { color: white; background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: 0 12px 24px rgba(37,99,235,.18); }
.btn-ghost { color: #374151; background: #f3f4f6; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.hero-card, .panel, .dialog { background: rgba(255,255,255,.92); border: 1px solid rgba(229,231,235,.85); box-shadow: var(--shadow); border-radius: 28px; }
.hero-card { padding: 28px; display: flex; flex-direction: column; justify-content: center; }
.status-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 8px rgba(22,163,74,.1); margin-bottom: 16px; }
.hero-card p { color: var(--muted); margin: 10px 0 0; }
.panel { padding: 28px; margin: 28px auto; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.tab { border: 1px solid var(--line); background: white; color: #374151; padding: 10px 14px; border-radius: 999px; cursor: pointer; }
.tab.active { color: white; background: var(--text); border-color: var(--text); }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.product-card { display: flex; flex-direction: column; min-height: 260px; padding: 20px; border: 1px solid var(--line); background: white; border-radius: 24px; transition: transform .18s ease, box-shadow .18s ease; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(15,23,42,.08); }
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.badge { font-size: 12px; padding: 5px 9px; border-radius: 999px; background: #f3f4f6; color: #4b5563; }
.badge.stock { background: rgba(22,163,74,.1); color: var(--success); }
.badge.empty-stock { background: rgba(220,38,38,.1); color: var(--danger); }
.product-card h3 { margin: 0 0 10px; font-size: 20px; }
.product-desc { color: var(--muted); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 76px; }
.price-row { margin-top: auto; display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.price { font-size: 24px; font-weight: 900; color: var(--primary); }
.price small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; margin-top: 2px; }
.empty { text-align: center; color: var(--muted); padding: 50px 10px; border: 1px dashed var(--line); border-radius: 22px; }
.query-form { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.result-card { margin-top: 16px; border: 1px solid var(--line); border-radius: 20px; padding: 18px; background: #fafafa; line-height: 1.8; }
.dialog { width: min(720px, calc(100% - 28px)); padding: 0; border: 0; }
.dialog::backdrop { background: rgba(15,23,42,.48); backdrop-filter: blur(4px); }
.dialog-close-form { margin: 0; }
.dialog-close { position: absolute; right: 16px; top: 14px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #f3f4f6; cursor: pointer; font-size: 24px; }
.dialog-content { padding: 30px; }
.detail-title { padding-right: 45px; }
.detail-desc { color: var(--muted); line-height: 1.8; white-space: pre-wrap; }
.order-form { display: grid; gap: 12px; margin-top: 20px; }
.form-row { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: center; }
.notice { padding: 12px 14px; border-radius: 16px; background: rgba(124,58,237,.08); color: #4c1d95; line-height: 1.7; }
.error { color: var(--danger); }
.success { color: var(--success); }
.cards-output { padding: 12px; border-radius: 14px; background: #111827; color: #f9fafb; white-space: pre-wrap; overflow: auto; }
.site-footer { color: var(--muted); padding: 36px 0 50px; text-align: center; }
@media (max-width: 900px) {
  .hero-grid, .product-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 34px; }
}
@media (max-width: 640px) {
  .header-grid, .section-title, .hero-search, .query-form { align-items: stretch; flex-direction: column; display: flex; }
  .header-actions { width: 100%; justify-content: space-between; }
  .panel { padding: 18px; border-radius: 22px; }
  .form-row { grid-template-columns: 1fr; }
}

.pay-box { margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: #f8fafc; color: #111827; line-height: 1.8; }
.pay-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.pay-info { margin-top: 10px; }
.pay-info span { display: block; font-size: 13px; font-weight: 800; color: #4b5563; margin-bottom: 6px; }


/* 20260815: ?????? + ?????????/?????????? */
[hidden] { display: none !important; }
.announcement-wrap { padding: 42px 0 18px; }
.announcement-box {
  min-height: 230px;
  padding: 34px 36px;
  border-radius: 28px;
  border: 1px solid rgba(229,231,235,.88);
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow);
}
.announcement-title { font-size: clamp(32px, 4.5vw, 54px); }
.announcement-content {
  margin-top: 18px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
  white-space: pre-wrap;
}
#products-panel { scroll-margin-top: 92px; }
.product-grid { display: block; }
.category-section { scroll-margin-top: 96px; margin-top: 26px; }
.category-section:first-child { margin-top: 8px; }
.category-heading { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.category-heading::after { content: ''; height: 1px; flex: 1; background: linear-gradient(90deg, rgba(124,58,237,.18), rgba(229,231,235,.72)); }
.category-heading h3 { margin: 0; font-size: 18px; font-weight: 900; }
.category-heading span { color: var(--muted); font-size: 13px; font-weight: 700; }
.product-list { display: grid; gap: 8px; }
.product-row {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 66px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.product-row:hover { background: #fffaf7; border-color: rgba(124,58,237,.18); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(15,23,42,.05); }
.product-row.is-disabled { opacity: .58; cursor: not-allowed; }
.product-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 8px 18px rgba(124,58,237,.18);
}
.product-row-main h4 { margin: 0; font-size: 15px; font-weight: 700; color: var(--text); }
.product-row-main p { margin: 6px 0 0; color: var(--muted); line-height: 1.5; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 720px; }
.product-row-side { display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 8px; text-align: right; }
.product-row-side small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.row-stock { color: var(--muted); font-size: 13px; font-weight: 800; }
.row-stock.empty { color: var(--danger); }
.row-price { color: var(--primary); font-size: 18px; }
.product-page { margin-top: 34px; }
.page-loading { padding: 40px; text-align: center; color: var(--muted); }
.back-link { display: inline-flex; align-items: center; margin-bottom: 18px; color: #374151; font-weight: 800; }
.back-link:hover { color: var(--primary); }
.product-detail-page { display: grid; grid-template-columns: 1fr minmax(340px, 460px); gap: 22px; align-items: start; }
.detail-main-card, .order-page-form { border: 1px solid var(--line); border-radius: 24px; background: white; padding: 24px; }
.detail-title-page { font-size: clamp(28px, 4vw, 42px); margin: 8px 0 14px; }
.order-page-form { box-shadow: 0 16px 38px rgba(15,23,42,.06); }
.payment-select { padding: 14px; border: 1px solid rgba(124,58,237,.12); border-radius: 18px; background: #fffdfb; }
.payment-title { display: flex; align-items: center; gap: 8px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); color: #3f3f46; }
.payment-icon { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #8b5e4a; color: white; font-size: 12px; }
.payment-method {
  margin-top: 12px;
  min-width: 165px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 14px;
  padding: 13px 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: default;
  color: #6b7280;
  font: inherit;
}
.payment-method.active { border-color: rgba(16,185,129,.22); background: #ffffff; box-shadow: 0 8px 18px rgba(16,185,129,.06); }
.usdt-icon { width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; color: white; background: #10b981; font-weight: 900; }
.payment-method strong { color: #6b7280; }
.submit-order { width: 100%; border-radius: 14px; }
.query-panel { margin-top: 34px; }
.error-page { padding: 30px; }
@media (max-width: 900px) {
  .product-detail-page { grid-template-columns: 1fr; }
  .product-row { grid-template-columns: 48px 1fr; }
  .product-row-side { grid-column: 2; justify-content: start; text-align: left; }
}
@media (max-width: 640px) {
  .announcement-box { padding: 24px 20px; border-radius: 22px; }
  .product-row { gap: 12px; padding: 12px; }
  .product-row-main p { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}

/* 20260815: U閺€顖欑帛缂佹挻鐏夐弨閫涜礋鐏炲懍鑵戠亸蹇撹剨缁?*/
.pay-dialog { width: min(620px, calc(100% - 28px)); }
.pay-dialog .dialog-content { padding: 26px; }
.pay-dialog-title { margin: 0 48px 14px 0; font-size: 22px; }
.pay-box-modal { margin-top: 0; text-align: center; }
.pay-box-modal .notice { text-align: left; }
.pay-box-modal .pay-actions { justify-content: center; }
.pay-box-modal .pay-info { text-align: left; }
/* 20260815 notice panel same size as product panel */
.announcement-box { min-height: auto; padding: 28px; }
.announcement-title { font-size: 26px; line-height: 1.2; letter-spacing: 0; }
.announcement-content { margin-top: 14px; font-size: 15px; line-height: 1.8; }
/* 20260815 pay qr modal + telegram floating button */
.pay-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.pay-summary div { padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-align: left; }
.pay-summary span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; margin-bottom: 3px; }
.pay-summary strong { color: var(--text); font-size: 15px; word-break: break-all; }
.pay-countdown-value { color: var(--primary) !important; font-size: 18px !important; }
.payment-qr-wrap { display: flex; justify-content: center; margin: 16px 0 12px; }
.payment-qr { width: 210px; height: 210px; border-radius: 18px; border: 1px solid var(--line); background: white; padding: 10px; box-shadow: 0 12px 28px rgba(15,23,42,.08); }
.pay-box-modal .pay-actions { display: none; }
.tg-float { position: fixed; right: 28px; bottom: 28px; z-index: 40; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; color: white; background: linear-gradient(135deg,#38bdf8,#0284c7); box-shadow: 0 14px 30px rgba(2,132,199,.35); transition: transform .18s ease, box-shadow .18s ease; }
.tg-float:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(2,132,199,.42); }
.tg-float svg { width: 30px; height: 30px; }
@media (max-width: 640px) { .pay-summary { grid-template-columns: 1fr; } .payment-qr { width: 190px; height: 190px; } .tg-float { right: 18px; bottom: 18px; width: 54px; height: 54px; } }