/* ============================================================
 * 前台自定义样式（工业深蓝 #0F4C81 / 行动橙 #F28C28 主题）
 * 色彩体系与 PRD 6.1 一致；组件加 hw- 前缀（ARCHITECTURE 8.1）
 * ============================================================ */
:root {
  --hw-primary: #0F4C81;
  --hw-primary-dark: #0B3050;
  --hw-accent: #F28C28;
  --hw-bg: #F5F7FA;
  --hw-text: #333333;
  --hw-muted: #6B7280;
  --hw-border: #E5E7EB;
  --hw-success: #2FA84F;
  --hw-danger: #D93025;
}

* { -webkit-tap-highlight-color: transparent; }

html, body {
  overflow-x: hidden; /* P0-19：三机型无横向滚动兜底 */
}

body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--hw-text);
  background-color: #ffffff;
  font-size: 15px;
  line-height: 1.6;
}

a { text-decoration: none; }

.text-primary-hw { color: var(--hw-primary) !important; }
.text-accent-hw { color: var(--hw-accent) !important; }
.text-muted-hw { color: var(--hw-muted) !important; }
.bg-hw { background-color: var(--hw-bg) !important; }

/* ---------- 按钮 ---------- */
.hw-btn-accent {
  background-color: var(--hw-accent);
  border-color: var(--hw-accent);
  color: #fff;
  font-weight: 500;
  min-height: 44px; /* 触控目标 ≥44px */
  padding-left: 1rem;
  padding-right: 1rem;
}
.hw-btn-accent:hover, .hw-btn-accent:focus {
  background-color: #d97a1a;
  border-color: #d97a1a;
  color: #fff;
}
.hw-btn-primary {
  background-color: var(--hw-primary);
  border-color: var(--hw-primary);
  color: #fff;
  min-height: 44px;
}
.hw-btn-primary:hover, .hw-btn-primary:focus {
  background-color: var(--hw-primary-dark);
  border-color: var(--hw-primary-dark);
  color: #fff;
}
.btn { border-radius: 4px; }

/* ---------- 顶部导航 ---------- */
.hw-header { box-shadow: 0 2px 8px rgba(11, 48, 80, 0.12); }
.hw-navbar {
  background-color: var(--hw-primary);
  z-index: 1035;
}
.hw-navbar .nav-link {
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  min-height: 44px;
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
}
.hw-navbar .nav-link:hover,
.hw-navbar .nav-link.active {
  color: #fff;
  border-bottom-color: var(--hw-accent);
}
.hw-navbar .navbar-brand { color: #fff; }
.hw-navbar .navbar-toggler { border-color: rgba(255, 255, 255, 0.4); }

/* ---------- 首页 Banner ---------- */
.hw-banner {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  background-color: var(--hw-primary-dark);
  overflow: hidden;
}
.hw-banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hw-banner-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11, 48, 80, 0.92) 0%, rgba(15, 76, 129, 0.72) 45%, rgba(15, 76, 129, 0.25) 100%);
}
.hw-banner-content {
  position: relative;
  z-index: 2;
  padding: 4rem 0;
}
.hw-banner-slogan {
  color: #fff;
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  font-weight: 700;
  line-height: 1.25;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.hw-banner-desc {
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(0.95rem, 1.8vw, 1.2rem);
  max-width: 640px;
}
.hw-banner-indicators {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 0.5rem;
}
.hw-banner-indicators button {
  width: 28px;
  height: 4px;
  border: none;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.45);
  padding: 0;
}
.hw-banner-indicators button.active { background: var(--hw-accent); }

/* ---------- 区块标题 ---------- */
.hw-section-title {
  position: relative;
  padding-left: 0.85rem;
  font-weight: 700;
  color: var(--hw-primary);
}
.hw-section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 5px;
  border-radius: 2px;
  background: var(--hw-accent);
}

/* ---------- 企业优势卡片 ---------- */
.hw-advantage-card {
  border: 1px solid var(--hw-border);
  border-radius: 6px;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
}
.hw-advantage-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(15, 76, 129, 0.12);
}
.hw-advantage-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 76, 129, 0.08);
  color: var(--hw-primary);
  font-size: 1.5rem;
}

/* ---------- 商品卡片 ---------- */
.hw-product-card {
  border: 1px solid var(--hw-border);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.hw-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(15, 76, 129, 0.14);
}
.hw-product-img-wrap {
  position: relative;
  aspect-ratio: 1 / 1; /* 正方形主图 */
  background: var(--hw-bg);
  overflow: hidden;
}
.hw-product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.hw-product-card:hover .hw-product-img-wrap img { transform: scale(1.04); }
.hw-sales-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: var(--hw-accent);
  color: #fff;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-weight: 500;
}
.hw-product-name {
  font-weight: 600;
  color: var(--hw-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.9em;
}
.hw-product-intro {
  color: var(--hw-muted);
  font-size: 0.85rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hw-price-range {
  color: var(--hw-accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---------- 商品中心筛选 ---------- */
.hw-filter-card {
  border: 1px solid var(--hw-border);
  border-radius: 6px;
  background: #fff;
}
.hw-cat-group-title {
  font-weight: 700;
  color: var(--hw-primary);
  font-size: 0.95rem;
}
.hw-cat-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  min-height: 40px;
}
.hw-cat-check:hover { background: var(--hw-bg); }
.hw-cat-check input { accent-color: var(--hw-primary); width: 1.05rem; height: 1.05rem; }
.hw-cat-check.checked { background: rgba(15, 76, 129, 0.08); color: var(--hw-primary); font-weight: 500; }
.hw-sort-btn {
  border: 1px solid var(--hw-border);
  background: #fff;
  color: var(--hw-muted);
  border-radius: 4px;
  padding: 0.35rem 0.75rem;
  font-size: 0.875rem;
  min-height: 40px;
}
.hw-sort-btn.active {
  border-color: var(--hw-primary);
  color: var(--hw-primary);
  font-weight: 600;
  background: rgba(15, 76, 129, 0.06);
}
.hw-empty-state {
  border: 1px dashed var(--hw-border);
  border-radius: 6px;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--hw-muted);
}

/* ---------- 商品详情 ---------- */
.hw-detail-gallery { position: relative; }
.hw-detail-main-img {
  aspect-ratio: 3 / 2;
  background: var(--hw-bg);
  border: 1px solid var(--hw-border);
  border-radius: 6px;
  overflow: hidden;
  touch-action: pan-y;
}
.hw-detail-main-img img { width: 100%; height: 100%; object-fit: contain; }
.hw-gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(11, 48, 80, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.hw-gallery-arrow.prev { left: 0.75rem; }
.hw-gallery-arrow.next { right: 0.75rem; }
.hw-gallery-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.hw-gallery-dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: #cbd5e1;
}
.hw-gallery-dots button.active { background: var(--hw-accent); transform: scale(1.25); }
.hw-thumb-strip { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.25rem; }
.hw-thumb-strip img {
  width: 76px;
  height: 56px;
  object-fit: cover;
  border: 2px solid var(--hw-border);
  border-radius: 4px;
  cursor: pointer;
  flex: none;
}
.hw-thumb-strip img.active { border-color: var(--hw-accent); }
.hw-params-table td:first-child {
  width: 38%;
  color: var(--hw-muted);
  font-weight: 500;
}
.hw-detail-info-card {
  border: 1px solid var(--hw-border);
  border-radius: 6px;
  background: #fff;
}
@media (min-width: 992px) {
  .hw-detail-sticky { position: sticky; top: 84px; }
}

/* ---------- 公司信息页 ---------- */
.hw-page-hero {
  background: linear-gradient(120deg, var(--hw-primary-dark), var(--hw-primary));
  color: #fff;
  padding: 2.25rem 0;
}
.hw-breadcrumb { --bs-breadcrumb-divider-color: rgba(255, 255, 255, 0.6); }
.hw-breadcrumb a { color: rgba(255, 255, 255, 0.85); }
.hw-breadcrumb .active { color: #fff; }
.hw-data-card {
  border: 1px solid var(--hw-border);
  border-radius: 6px;
  background: #fff;
  padding: 1.25rem;
  height: 100%;
}
.hw-data-value { font-weight: 700; color: var(--hw-primary); font-size: 1.05rem; }
.hw-img-card {
  border: 1px solid var(--hw-border);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  cursor: zoom-in;
  position: relative;
}
.hw-img-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.hw-img-card:hover img { transform: scale(1.03); }
.hw-shot-label {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
}
.hw-contact-bar {
  background: var(--hw-bg);
  border: 1px solid var(--hw-border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
}

/* ---------- 留言表单 ---------- */
.hw-form-card {
  border: 1px solid var(--hw-border);
  border-radius: 8px;
  background: #fff;
  max-width: 560px;
  margin: 0 auto;
}
.hw-captcha-img {
  border: 1px solid var(--hw-border);
  border-radius: 4px;
  height: 44px;
  cursor: pointer;
  background: #fff;
}
.hw-captcha-refresh {
  min-width: 44px;
  min-height: 44px;
}
.form-control, .form-select { border-radius: 4px; }
.form-control:focus, .form-select:focus {
  border-color: var(--hw-primary);
  box-shadow: 0 0 0 0.2rem rgba(15, 76, 129, 0.15);
}
.hw-required::after { content: " *"; color: var(--hw-danger); }
.hw-field-error { color: var(--hw-danger); font-size: 0.8rem; margin-top: 0.2rem; display: none; }
.hw-field-error.show { display: block; }

/* ---------- 成功页 ---------- */
.hw-success-icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: rgba(47, 168, 79, 0.12);
  color: var(--hw-success);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.75rem;
}

/* ---------- CTA 横条 ---------- */
.hw-cta-bar {
  background: linear-gradient(90deg, var(--hw-primary), #1668a8);
  color: #fff;
  border-radius: 6px;
  padding: 1.5rem 2rem;
}

/* ---------- 页脚 ---------- */
.hw-footer { background: var(--hw-primary-dark); color: rgba(255, 255, 255, 0.75); }
.hw-footer-text { color: rgba(255, 255, 255, 0.72); font-size: 0.9rem; }
.hw-footer-link { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.hw-footer-link:hover { color: var(--hw-accent); }
.hw-footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); }

/* ---------- 悬浮联系我们 ---------- */
.hw-floating {
  position: fixed;
  right: 1rem;
  bottom: 1.25rem;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
}
.hw-floating-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--hw-accent);
  color: #fff;
  font-size: 1.5rem;
  box-shadow: 0 6px 18px rgba(242, 140, 40, 0.45);
  animation: hw-breathe 2.4s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hw-floating-toggle:active { transform: scale(0.94); }
@keyframes hw-breathe {
  0%, 100% { box-shadow: 0 6px 18px rgba(242, 140, 40, 0.45); }
  50% { box-shadow: 0 6px 26px rgba(242, 140, 40, 0.75); }
}
.hw-floating-actions { display: flex; flex-direction: column; gap: 0.6rem; }
.hw-floating-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  color: var(--hw-primary);
  border: 1px solid var(--hw-border);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-weight: 500;
  font-size: 0.9rem;
  box-shadow: 0 4px 14px rgba(11, 48, 80, 0.14);
  min-height: 44px;
}
.hw-floating-action:hover { color: var(--hw-accent); border-color: var(--hw-accent); }
.hw-floating-phone { color: var(--hw-success); }
.hw-floating-phone:hover { color: var(--hw-success); border-color: var(--hw-success); }

/* ---------- 灯箱 ---------- */
.hw-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.hw-lightbox.show { display: flex; }
.hw-lightbox img {
  max-width: 100%;
  max-height: 92vh;
  border-radius: 4px;
  background: #fff;
}
.hw-lightbox-close, .hw-lightbox-nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.14);
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hw-lightbox-close { top: 1rem; right: 1rem; }
.hw-lightbox-nav.prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.hw-lightbox-nav.next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* ---------- Toast ---------- */
.hw-toast-wrap {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(92vw, 420px);
}
.hw-toast {
  border-radius: 6px;
  padding: 0.7rem 1rem;
  color: #fff;
  font-size: 0.9rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  animation: hw-toast-in 0.2s ease;
}
.hw-toast.success { background: var(--hw-success); }
.hw-toast.error { background: var(--hw-danger); }
.hw-toast.info { background: var(--hw-primary); }
@keyframes hw-toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 隐私声明页 ---------- */
.hw-privacy-body { font-size: 16px; line-height: 1.8; }
.hw-privacy-body h2 { color: var(--hw-primary); font-size: 1.25rem; margin-top: 1.75rem; }
.hw-privacy-body a { color: var(--hw-primary); text-decoration: underline; }

/* ---------- 移动端微调 ---------- */
@media (max-width: 767.98px) {
  .hw-banner { min-height: 52vh; }
  .hw-floating { right: 0.75rem; bottom: 0.75rem; }
  .hw-floating-toggle { width: 52px; height: 52px; }
  .hw-detail-main-img { aspect-ratio: 4 / 3; }
}
