/* R56 供应商产品目录 v1 */
:root {
  --primary: #1E40AF; --accent: #3B82F6; --bg: #EFF6FF; --bg-light: #DBEAFE;
  --card: #FFF; --text: #1E3A8A; --text-muted: #475569; --border: #BFDBFE;
  --shadow: 0 4px 24px rgba(30,58,138,.08);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif; background: var(--bg); color: var(--text); line-height: 1.65; padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
html.has-mobile-bar body { padding-bottom: calc(8.75rem + env(safe-area-inset-bottom)); }
img { max-width: 100%; display: block; }
button, a { font: inherit; }
a { color: inherit; text-decoration: none; }

.persona-bar { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; padding: .55rem 1rem; background: var(--card); border-bottom: 1px solid var(--border); }
.persona-btn { padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); cursor: pointer; font-size: .82rem; color: var(--text-muted); }
.persona-btn.active { border-color: var(--primary); color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); font-weight: 700; }

.top-nav { position: sticky; top: 0; z-index: 200; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(10px); transition: .25s; }
body[data-appearance='dark'] .top-nav { background: rgba(15,23,42,.92); }
.top-nav.is-scrolled { border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
.top-nav__row { display: flex; align-items: center; gap: .75rem; padding: .55rem 1rem; }
.top-nav__brand { font-weight: 800; color: var(--primary); font-size: .9rem; }
.top-nav__menu { margin-left: auto; border: 1px solid var(--border); background: var(--card); border-radius: 6px; padding: .35rem .55rem; cursor: pointer; }
.top-nav__links { display: none; width: 100%; flex-direction: column; gap: .2rem; padding: 0 1rem 1rem; }
.top-nav__links.is-open { display: flex; }
.top-nav__links a { color: var(--text-muted); padding: .45rem .65rem; border-radius: 6px; font-size: .82rem; }
.top-nav__cta { color: var(--primary) !important; font-weight: 700; }
.top-nav__share { border: 1px dashed var(--border) !important; font-size: .78rem !important; }
@media (min-width: 768px) {
  .top-nav__menu { display: none; }
  .top-nav__links { display: flex !important; flex-direction: row; width: auto; margin-left: auto; padding: 0; }
}

.theme-panel { position: fixed; right: 10px; top: 50%; transform: translateY(-50%); z-index: 180; display: flex; flex-direction: column; gap: 6px; padding: 8px; background: var(--card); border-radius: 10px; border: 1px solid var(--border); box-shadow: var(--shadow); max-height: min(55vh, 280px); overflow-y: auto; }
.theme-appearance-btn, .theme-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15); cursor: pointer; padding: 0; }
.theme-appearance-btn { background: var(--card); font-size: .72rem; line-height: 22px; text-align: center; }
.theme-dot.active { outline: 2px solid var(--text); }

.mobile-bar { position: fixed; left: 0; right: 0; bottom: calc(4.25rem + env(safe-area-inset-bottom)); z-index: 840; display: flex; background: var(--card); border-top: 1px solid var(--border); }
.mobile-bar__btn { flex: 1; padding: .55rem .2rem; border: none; background: none; font-size: .66rem; color: var(--text-muted); text-align: center; cursor: pointer; text-decoration: none; }
@media (min-width: 768px) { .mobile-bar { display: none; } html.has-mobile-bar body { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); } }

.contact-footer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 850; padding: .45rem .75rem calc(.45rem + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--border); }
.contact-footer__btns { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; max-width: 420px; margin: 0 auto; }
.contact-footer__cta, .contact-footer__btn { padding: .4rem .85rem; border-radius: 999px; font-size: .74rem; font-weight: 600; }
.contact-footer__cta { background: var(--primary); color: #fff; border: 1px solid var(--primary); }
body[data-appearance='dark'] .contact-footer__cta { color: #0F172A; }
.contact-footer__btn { background: var(--card); border: 1px solid var(--border); cursor: pointer; }
.contact-footer__brand { text-align: center; font-size: .62rem; color: var(--text-muted); margin-top: .35rem; }

.glass-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.section { padding: 2.5rem 1.25rem; max-width: 960px; margin: 0 auto; }
.section__title { font-size: 1.35rem; font-weight: 800; color: var(--primary); text-align: center; margin-bottom: .35rem; }
.section__sub { text-align: center; font-size: .82rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.empty { text-align: center; color: var(--text-muted); padding: 2rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: .65rem 1.25rem; border-radius: 999px; font-weight: 600; font-size: .88rem; border: none; cursor: pointer; }
.btn-primary { background: var(--primary); color: #fff; }
body[data-appearance='dark'] .btn-primary { color: #0F172A; }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline-light { background: transparent; border: 2px solid rgba(255,255,255,.8); color: #fff; }
.btn-block { display: block; width: 100%; margin-top: .5rem; text-align: center; }

.hero { position: relative; min-height: 340px; display: flex; align-items: flex-end; max-width: none; padding: 0; }
.hero__bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.88), rgba(0,0,0,.4)); }
.hero__content { position: relative; z-index: 1; color: #fff; padding: 2rem 1.25rem; max-width: 960px; margin: 0 auto; width: 100%; text-align: center; }
.hero__brand { font-size: .78rem; opacity: .85; letter-spacing: .08em; }
.hero__title { font-size: 1.55rem; font-weight: 800; margin: .35rem 0; }
.hero__sub { font-size: .9rem; opacity: .9; margin-bottom: .75rem; }
.hero__certs { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: center; margin-bottom: 1rem; }
.hero__cert { font-size: .65rem; padding: .2rem .5rem; border-radius: 4px; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25); }
.hero__btns { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }

.dashboard-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem; }
@media (min-width: 640px) { .dashboard-grid { grid-template-columns: repeat(4, 1fr); } }
.dashboard-card { padding: 1rem; text-align: center; }
.dashboard-card__icon { font-size: 1.5rem; }
.dashboard-card__val { font-size: 1.35rem; font-weight: 800; color: var(--primary); margin: .25rem 0; }
.dashboard-card__lbl { font-size: .72rem; color: var(--text-muted); }

.filter-bar { margin-bottom: 1rem; }
.filter-bar__label { font-size: .75rem; color: var(--text-muted); margin-bottom: .5rem; text-align: center; }
.filter-row { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-bottom: .5rem; }
.filter-tab, .filter-chip, .filter-budget { padding: .4rem .7rem; border-radius: 999px; border: 1px solid var(--border); background: var(--card); font-size: .72rem; cursor: pointer; white-space: nowrap; }
.filter-tab.active, .filter-chip.active, .filter-budget.active { border-color: var(--primary); color: var(--primary); font-weight: 700; background: var(--bg-light); }
.filter-tab em, .filter-chip em, .filter-budget em { font-style: normal; opacity: .6; margin-left: .1rem; }
.filter-tools { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: .5rem; }
.filter-search { flex: 1; min-width: 180px; max-width: 320px; padding: .5rem .75rem; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); }

.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; } }
.product-card { border-radius: 12px; overflow: hidden; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(30,58,138,.12); }
.product-card__img { position: relative; }
.product-card__img img { width: 100%; height: 140px; object-fit: cover; }
.product-card__hot { position: absolute; top: 8px; left: 8px; font-size: .62rem; font-weight: 700; padding: .15rem .45rem; border-radius: 4px; background: #EF4444; color: #fff; }
.product-card__body { padding: .75rem; }
.product-card__cat { font-size: .62rem; color: var(--text-muted); margin-bottom: .2rem; }
.product-card__body h3 { font-size: .82rem; font-weight: 800; line-height: 1.35; margin-bottom: .35rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card__meta { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .35rem; }
.product-tag { font-size: .62rem; font-weight: 700; padding: .12rem .4rem; border-radius: 4px; background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); }
.product-tag--moq { background: var(--bg-light); color: var(--text-muted); font-weight: 600; }
.product-card__price { font-size: .78rem; font-weight: 800; color: var(--primary); }
.product-card__lead { font-size: .65rem; color: var(--text-muted); margin-top: .2rem; }

.certs-section { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-bottom: 1rem; }
.cert-badge { padding: .45rem .85rem; border-radius: 8px; border: 1px solid var(--border); background: var(--card); font-size: .75rem; font-weight: 700; color: var(--primary); }
.factory-swiper { border-radius: 12px; overflow: hidden; margin-bottom: 1rem; }
.factory-swiper img { width: 100%; height: 200px; object-fit: cover; }
@media (min-width: 768px) { .factory-swiper img { height: 280px; } }

.testimonial-swiper { padding-bottom: 2rem !important; }
.testimonial-card { padding: 1.25rem; margin: 0 .25rem; min-height: 160px; }
.testimonial-card p { font-size: .9rem; line-height: 1.65; margin-bottom: .75rem; }
.testimonial-card footer { font-size: .78rem; color: var(--text-muted); }
.swiper-pagination-bullet-active { background: var(--primary) !important; }

.inquiry-card { padding: 1.5rem; text-align: center; max-width: 420px; margin: 0 auto; }
.sheet { position: fixed; inset: 0; z-index: 900; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.sheet__panel { position: absolute; left: 0; right: 0; bottom: 0; background: var(--card); border-radius: 16px 16px 0 0; padding: 1.25rem; max-height: 85vh; overflow-y: auto; }
.sheet__panel h3 { text-align: center; margin-bottom: 1rem; }
.modal { position: fixed; inset: 0; z-index: 910; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.modal__box { position: relative; max-width: 360px; width: 100%; padding: 1.25rem; max-height: 90vh; overflow-y: auto; }
.modal__box h3 { text-align: center; margin-bottom: 1rem; color: var(--primary); }
.modal__box label { display: block; font-size: .78rem; color: var(--text-muted); margin-bottom: .75rem; }
.modal__box input, .modal__box select, .modal__box textarea { display: block; width: 100%; margin-top: .25rem; padding: .5rem .65rem; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: .88rem; }

/* Detail page */
.detail-page { padding-top: .5rem; }
.detail-hero img { width: 100%; max-height: 360px; object-fit: cover; border-radius: 0 0 12px 12px; }
.detail-body { padding: 1.25rem; max-width: 720px; margin: 0 auto; }
.detail-body h1 { font-size: 1.25rem; font-weight: 800; color: var(--primary); margin-bottom: .5rem; }
.detail-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1rem; }
.detail-summary { font-size: .88rem; color: var(--text-muted); margin-bottom: 1.25rem; line-height: 1.7; }
.spec-table { width: 100%; border-collapse: collapse; margin-bottom: 1.25rem; font-size: .82rem; }
.spec-table th, .spec-table td { padding: .55rem .65rem; border: 1px solid var(--border); text-align: left; }
.spec-table th { background: var(--bg-light); color: var(--text-muted); font-weight: 600; width: 35%; }
.tier-table { width: 100%; border-collapse: collapse; margin-bottom: 1.25rem; font-size: .82rem; }
.tier-table th { background: var(--primary); color: #fff; padding: .55rem; }
body[data-appearance='dark'] .tier-table th { color: #0F172A; }
.tier-table td { padding: .55rem; border: 1px solid var(--border); text-align: center; }
.tier-table tr:nth-child(even) td { background: var(--bg-light); }
.detail-gallery { display: flex; gap: .5rem; overflow-x: auto; margin-bottom: 1.25rem; padding-bottom: .25rem; }
.detail-gallery img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; border: 2px solid transparent; cursor: pointer; flex-shrink: 0; }
.detail-gallery img.active { border-color: var(--primary); }
.detail-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0; }
.detail-back { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; color: var(--text-muted); margin-bottom: 1rem; padding: 0 1.25rem; }

.share-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; }
.share-card { max-width: 360px; width: 100%; padding: 1.5rem; text-align: center; }
.share-card__stats { display: flex; justify-content: space-around; margin: 1rem 0; font-size: .78rem; color: var(--text-muted); }
.share-card__stats strong { display: block; font-size: 1.25rem; color: var(--primary); }
