/* ===== 武汉知雪素帧科技有限公司 - 网站样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #2b6cb0;
  --primary-dark: #2c5282;
  --accent: #4299e1;
  --bg: #edf2f7;
  --bg-soft: #f7fafc;
  --card: #ffffff;
  --text: #1a202c;
  --text-soft: #4a5568;
  --text-light: #a0aec0;
  --border: #e2e8f0;
  --shadow: 0 2px 12px rgba(26, 32, 44, 0.06);
  --radius: 6px;
}

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

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

.container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== 顶部栏 ===== */
.top-bar {
  background: #1a202c;
  color: #a0aec0;
  font-size: 12px;
  padding: 8px 0;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-bar .top-links a {
  margin-left: 18px;
  color: #a0aec0;
  transition: color .2s;
}
.top-bar .top-links a:hover { color: var(--accent); }

/* ===== 头部 ===== */
.header {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  gap: 30px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo .logo-icon {
  width: 44px; height: 44px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}
.logo .logo-text h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
}
.logo .logo-text p {
  font-size: 10px;
  color: var(--text-light);
  letter-spacing: 2px;
}
.search-box {
  flex: 1;
  max-width: 540px;
  display: flex;
  border: 2px solid var(--primary);
  border-radius: 4px;
  overflow: hidden;
}
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 14px;
  font-size: 14px;
  background: #fff;
}
.search-box button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0 28px;
  font-size: 14px;
  cursor: pointer;
  transition: background .2s;
}
.search-box button:hover { background: var(--primary-dark); }
.cart-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  transition: all .2s;
}
.cart-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ===== 导航 ===== */
.nav {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 0;
}
.nav .all-cat {
  background: var(--primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: 4px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav .all-cat:hover { background: var(--primary-dark); }
.nav-links { display: flex; gap: 24px; }
.nav-links a {
  color: var(--text);
  font-size: 14px;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: all .2s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ===== 主体布局 ===== */
.main-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  margin-top: 20px;
}
.sidebar {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  height: fit-content;
}
.sidebar h3 {
  padding: 14px 16px;
  font-size: 14px;
  color: #fff;
  background: var(--primary);
}
.sidebar .cat-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background .2s;
}
.sidebar .cat-item:last-child { border-bottom: none; }
.sidebar .cat-item:hover { background: var(--bg); color: var(--primary); }
.sidebar .cat-item .cat-icon { font-size: 18px; }
.sidebar .cat-item .cat-info strong { font-size: 13px; font-weight: 600; }
.sidebar .cat-item .cat-info small { display: block; font-size: 11px; color: var(--text-light); }

/* ===== Banner ===== */
.banner {
  grid-column: 2;
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow);
}
.banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 50px;
}
.banner-text { color: #fff; max-width: 420px; }
.banner-text .sub { font-size: 13px; letter-spacing: 4px; color: var(--accent); margin-bottom: 14px; }
.banner-text h2 { font-size: 44px; line-height: 1.2; font-weight: 800; margin-bottom: 16px; }
.banner-text h2 span { color: var(--accent); }
.banner-text p { font-size: 16px; color: #cbd5e0; margin-bottom: 24px; }
.banner-text .btn-cta {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 12px 30px;
  border-radius: 4px;
  font-weight: 600;
  transition: background .2s;
}
.banner-text .btn-cta:hover { background: var(--primary-dark); }
.banner-img { flex-shrink: 0; }
.banner-img img { width: 260px; height: 260px; object-fit: cover; border-radius: 8px; }

/* ===== 服务保障 ===== */
.features {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 20px;
}
.feature {
  padding: 20px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.feature:last-child { border-right: none; }
.feature .feat-icon { font-size: 26px; margin-bottom: 6px; }
.feature strong { display: block; font-size: 14px; margin-bottom: 2px; }
.feature small { color: var(--text-light); font-size: 12px; }

/* ===== 区块标题 ===== */
.section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 40px 0 20px;
}
.section-title .title-left .eyebrow {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--text-light);
}
.section-title .title-left h3 {
  font-size: 22px;
  font-weight: 700;
  margin-top: 4px;
}
.section-title .title-left .sub { color: var(--text-soft); font-size: 13px; }
.section-title .more { color: var(--primary); font-size: 13px; }
.section-title .more:hover { text-decoration: underline; }

/* ===== 分类快捷入口 ===== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.cat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px 14px;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(31,29,26,.1); }
.cat-card .cc-icon {
  width: 70px; height: 70px;
  margin: 0 auto 12px;
  background: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
}
.cat-card strong { display: block; font-size: 14px; }
.cat-card small { color: var(--text-light); font-size: 11px; }

/* ===== 产品筛选 ===== */
.product-filter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-tabs a {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  background: transparent;
  color: var(--text-soft);
  transition: all .2s;
}
.filter-tabs a.active, .filter-tabs a:hover {
  background: var(--primary);
  color: #fff;
}
.sort-by {
  font-size: 13px;
  color: var(--text-soft);
}
.sort-by select {
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: 4px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
}

/* ===== 产品网格 ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.product-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
  position: relative;
}
.product-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(31,29,26,.1); }
.product-card .p-img {
  position: relative;
  background: var(--bg-soft);
  aspect-ratio: 1;
  overflow: hidden;
}
.product-card .p-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.product-card:hover .p-img img { transform: scale(1.05); }
.product-card .p-tag {
  position: absolute;
  top: 8px; left: 8px;
  background: rgba(216, 87, 42, 0.92);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 3px;
}
.product-card .p-info { padding: 12px 14px 14px; }
.product-card .p-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-card .p-spec {
  font-size: 11px;
  color: var(--text-light);
  margin-bottom: 8px;
}
.product-card .p-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.product-card .p-price { color: var(--primary); }
.product-card .p-price .now { font-size: 18px; font-weight: 700; }
.product-card .p-price .old {
  font-size: 11px;
  color: var(--text-light);
  text-decoration: line-through;
  margin-left: 6px;
}
.product-card .p-cart {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s;
  color: var(--primary);
}
.product-card .p-cart:hover { background: var(--primary); color: #fff; }

/* ===== 帮助问答 ===== */
.help-section {
  background: #fff;
  border-radius: var(--radius);
  padding: 30px;
  margin: 40px 0;
  box-shadow: var(--shadow);
}
.help-wrap {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 30px;
  align-items: center;
}
.help-left .eyebrow { font-size: 11px; letter-spacing: 3px; color: var(--text-light); }
.help-left h3 { font-size: 22px; margin: 6px 0 8px; }
.help-left p { color: var(--text-soft); font-size: 13px; }
.help-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.help-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .2s;
}
.help-item:hover { background: #e2e8f0; }
.help-item .hi-num {
  font-size: 12px;
  color: var(--text-light);
  flex-shrink: 0;
}
.help-item strong { font-size: 14px; flex: 1; }
.help-item .hi-plus { font-size: 18px; color: var(--text-light); }

/* ===== 页脚 ===== */
.footer {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 40px 0 20px;
  margin-top: 40px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 30px;
  padding-bottom: 30px;
}
.footer .f-brand h4 { font-size: 18px; margin-bottom: 6px; }
.footer .f-brand p { font-size: 11px; color: var(--text-light); letter-spacing: 2px; }
.footer .f-brand .f-desc { font-size: 12px; color: var(--text-soft); margin-top: 12px; line-height: 1.7; }
.footer .f-col h5 { font-size: 14px; margin-bottom: 14px; }
.footer .f-col a {
  display: block;
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 8px;
  transition: color .2s;
}
.footer .f-col a:hover { color: var(--primary); }
.footer .f-slogan { text-align: right; }
.footer .f-slogan h4 { font-size: 18px; font-weight: 700; }
.footer .f-slogan p { font-size: 10px; letter-spacing: 2px; color: var(--text-light); margin-top: 4px; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  text-align: center;
  color: var(--text-light);
  font-size: 12px;
}

/* ===== 产品详情页 ===== */
.breadcrumb {
  padding: 16px 0;
  font-size: 13px;
  color: var(--text-soft);
}
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 8px; color: var(--text-light); }

.product-detail {
  background: #fff;
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 40px;
}
.pd-img {
  background: var(--bg-soft);
  border-radius: var(--radius);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.pd-img img { width: 100%; height: 100%; object-fit: cover; }
.pd-info .pd-name { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.pd-info .pd-spec { color: var(--text-soft); margin-bottom: 16px; }
.pd-info .pd-price-box {
  background: var(--bg);
  padding: 18px 20px;
  border-radius: var(--radius);
  margin-bottom: 24px;
}
.pd-price-box .label { color: var(--text-soft); font-size: 13px; }
.pd-price-box .pd-price { color: var(--primary); font-size: 32px; font-weight: 700; margin-top: 4px; }
.pd-price-box .pd-old { color: var(--text-light); text-decoration: line-through; font-size: 14px; margin-left: 10px; }

/* ===== 订单表单 ===== */
.order-form {
  background: #fff;
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  margin-top: 20px;
}
.order-form h3 {
  font-size: 18px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.form-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}
.form-row label {
  text-align: right;
  color: var(--text-soft);
  font-size: 14px;
}
.form-row label .req { color: var(--primary); }
.form-row input, .form-row textarea, .form-row select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
  font-family: inherit;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  border-color: var(--primary);
}
.form-row textarea { resize: vertical; min-height: 70px; }
.qty-box { display: flex; align-items: center; gap: 0; width: fit-content; }
.qty-box button {
  width: 36px; height: 40px;
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  font-size: 16px;
}
.qty-box input {
  width: 60px; height: 40px;
  text-align: center;
  border: 1px solid var(--border);
  border-left: none;
  border-right: none;
  padding: 0;
}
.price-display {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
}
.order-total {
  background: var(--bg);
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.order-total .total-label { color: var(--text-soft); }
.order-total .total-amount { color: var(--primary); font-size: 26px; font-weight: 700; }

.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 14px 60px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
  margin-top: 20px;
}
.btn-primary:hover { background: var(--primary-dark); }

/* ===== 登录弹窗 ===== */
.modal-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff;
  border-radius: 8px;
  width: 400px;
  max-width: 92%;
  overflow: hidden;
  animation: pop .25s ease;
}
@keyframes pop {
  from { transform: scale(.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h4 { font-size: 17px; }
.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text-light);
  cursor: pointer;
  line-height: 1;
}
.modal-body { padding: 24px; }
.modal-body .form-row { grid-template-columns: 80px 1fr; margin-bottom: 16px; }
.modal-body .form-row label { font-size: 13px; }
.modal-body .form-row input { padding: 9px 12px; }
.modal-footer {
  padding: 0 24px 24px;
  display: flex;
  gap: 10px;
}
.modal-footer button {
  flex: 1;
  padding: 11px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: #fff;
  transition: all .2s;
}
.modal-footer .btn-submit {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.modal-footer .btn-submit:hover { background: var(--primary-dark); }
.modal-footer .btn-cancel:hover { border-color: var(--primary); color: var(--primary); }

/* ===== 成功提示 ===== */
.toast {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  background: #2e7d32;
  color: #fff;
  padding: 16px 32px;
  border-radius: 6px;
  font-size: 15px;
  z-index: 2000;
  box-shadow: 0 6px 24px rgba(0,0,0,.2);
  display: none;
}
.toast.show { display: block; animation: fadein .3s; }
@keyframes fadein { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .main-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .banner { grid-column: 1; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .header-main { flex-wrap: wrap; }
  .search-box { order: 3; flex-basis: 100%; }
  .product-detail { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .help-wrap { grid-template-columns: 1fr; }
  .help-list { grid-template-columns: 1fr; }
}
