/* 陈建后莒 商城 - 主样式（SmallRig 风格 1:1 还原：深色头部/红色主按钮/白底商品区） */
:root {
  --c-dark: #1d1d1f;
  --c-dark2: #2a2a2e;
  --c-red: #e61e28;
  --c-red-dark: #c9161f;
  --c-text: #333;
  --c-text2: #666;
  --c-text3: #999;
  --c-line: #e8e8e8;
  --c-bg: #f5f5f7;
  --radius: 10px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--c-text);
  background: #fff;
  font-size: 14px;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ---------- 头部 ---------- */
.site-header {
  background: var(--c-dark);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.logo img { height: 30px; width: auto; }
.main-nav { display: flex; gap: 6px; flex: 1; }
.nav-item {
  color: rgba(255,255,255,.88);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 15px;
  letter-spacing: .5px;
  transition: background .25s, color .25s;
  position: relative;
}
.nav-item:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-item.active { color: #fff; font-weight: 600; }
.nav-item.active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 2px;
  background: var(--c-red);
  border-radius: 2px;
}
.header-right { display: flex; align-items: center; gap: 14px; }
.search-box {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.12);
  border-radius: 18px;
  padding: 4px 6px 4px 14px;
  border: 1px solid rgba(255,255,255,.16);
  transition: border .25s;
}
.search-box:focus-within { border-color: rgba(255,255,255,.5); }
.search-input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  width: 130px;
  font-size: 13px;
}
.search-input::placeholder { color: rgba(255,255,255,.5); }
.search-btn {
  background: transparent;
  border: none;
  color: rgba(255,255,255,.8);
  display: flex;
  padding: 4px;
}
.search-btn:hover { color: #fff; }
.hdr-icon {
  color: rgba(255,255,255,.85);
  display: flex;
  position: relative;
  padding: 4px;
  transition: color .2s;
}
.hdr-icon:hover { color: #fff; }
.cart-badge {
  position: absolute;
  top: -4px; right: -6px;
  background: var(--c-red);
  color: #fff;
  font-size: 10px;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.store-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--c-red);
  color: #fff;
  padding: 7px 16px;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 500;
  transition: background .25s, transform .2s;
}
.store-btn:hover { background: var(--c-red-dark); transform: translateY(-1px); }

/* ---------- 分类子导航 ---------- */
.subnav {
  background: #fff;
  border-bottom: 1px solid var(--c-line);
  position: sticky;
  top: 64px;
  z-index: 90;
}
.subnav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.subnav-inner::-webkit-scrollbar { display: none; }
.subnav-item {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--c-text2);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.subnav-item:hover { color: var(--c-red); border-color: var(--c-red); }

/* ---------- 轮播 ---------- */
.hero { position: relative; overflow: hidden; background: var(--c-dark); }
.hero-slides { position: relative; height: 480px; }
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity .8s ease, transform 6s linear;
  pointer-events: none;
}
.hero-slide.active { opacity: 1; transform: scale(1); pointer-events: auto; z-index: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-copy {
  position: absolute;
  left: max(24px, calc(50% - 616px));
  bottom: 72px;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0,0,0,.55);
  max-width: 560px;
}
.hero-copy h2 { font-size: 40px; font-weight: 700; letter-spacing: 1px; margin-bottom: 12px; }
.hero-copy p { font-size: 17px; opacity: .95; margin-bottom: 22px; }
.hero-btn {
  display: inline-block;
  background: var(--c-red);
  color: #fff;
  padding: 11px 34px;
  border-radius: 24px;
  font-size: 15px;
  transition: background .25s, transform .2s;
}
.hero-btn:hover { background: var(--c-red-dark); transform: translateY(-2px); }
.hero-dots {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 10px;
  z-index: 5;
}
.dot {
  width: 28px; height: 4px;
  background: rgba(255,255,255,.4);
  border-radius: 2px;
  cursor: pointer;
  transition: background .3s, width .3s;
}
.dot.active { background: #fff; width: 40px; }
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.32);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  z-index: 6;
  opacity: 0;
  transition: opacity .3s, background .25s;
  display: flex; align-items: center; justify-content: center;
}
.hero:hover .hero-arrow { opacity: 1; }
.hero-arrow:hover { background: rgba(0,0,0,.55); }
.hero-arrow.prev { left: 28px; }
.hero-arrow.next { right: 28px; }

/* ---------- 区块 ---------- */
.section { padding: 56px 0 24px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; }
.sec-head h2 { font-size: 28px; font-weight: 700; color: var(--c-dark); }
.sec-more { color: var(--c-text3); font-size: 14px; transition: color .2s; }
.sec-more:hover { color: var(--c-red); }

/* ---------- 商品卡 ---------- */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.prod-card {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s, box-shadow .3s, border-color .3s;
  display: flex;
  flex-direction: column;
}
.prod-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 34px rgba(0,0,0,.1);
  border-color: transparent;
}
.prod-img {
  aspect-ratio: 1;
  background: #f7f7f8;
  overflow: hidden;
}
.prod-img img {
  width: 100%; height: 100%;
  object-fit: contain;
  transition: transform .45s ease;
}
.prod-card:hover .prod-img img { transform: scale(1.06); }
.prod-info { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.prod-info h3 {
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
}
.prod-price { color: var(--c-red); font-size: 18px; font-weight: 700; }

/* ---------- 服务区 ---------- */
.svc-band { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-bottom: 48px; }
.svc-card {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  color: #fff;
}
.svc-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; transition: transform .5s; }
.svc-card:hover img { transform: scale(1.05); }
.svc-card h3, .svc-card p, .svc-card a { position: relative; z-index: 1; }
.svc-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.65));
  z-index: 0;
}
.svc-card h3 { font-size: 22px; margin-bottom: 6px; }
.svc-card p { opacity: .92; margin-bottom: 14px; }
.svc-card a {
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.7);
  align-self: flex-start;
  padding-bottom: 2px;
  transition: border-color .2s;
}
.svc-card a:hover { border-color: #fff; }

/* ---------- 关于横幅 ---------- */
.about-band { padding-bottom: 56px; }
.about-band-inner {
  background: var(--c-dark);
  border-radius: 14px;
  color: #fff;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  padding: 44px 48px;
  align-items: center;
}
.about-band-copy h2 { font-size: 26px; margin-bottom: 14px; }
.about-band-copy p { color: rgba(255,255,255,.82); margin-bottom: 20px; line-height: 1.9; }
.btn-line {
  display: inline-block;
  border: 1px solid rgba(255,255,255,.6);
  color: #fff;
  padding: 9px 26px;
  border-radius: 22px;
  font-size: 14px;
  transition: background .25s, border-color .25s;
}
.btn-line:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.about-band-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.fact { text-align: center; }
.fact strong { display: block; font-size: 30px; font-weight: 700; color: #fff; }
.fact span { color: rgba(255,255,255,.6); font-size: 13px; }

/* ---------- 列表页 ---------- */
.list-banner { position: relative; height: 300px; overflow: hidden; }
.list-banner img { width: 100%; height: 100%; object-fit: cover; }
.list-banner-copy {
  position: absolute;
  left: max(24px, calc(50% - 616px));
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  text-shadow: 0 2px 14px rgba(0,0,0,.5);
  max-width: 620px;
}
.list-banner-copy h1 { font-size: 34px; margin-bottom: 8px; }
.list-banner-copy p { font-size: 15px; opacity: .95; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.crumbs { padding: 18px 0; color: var(--c-text3); font-size: 13px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.crumbs a:hover { color: var(--c-red); }
.crumbs em { font-style: normal; color: var(--c-text); }
.list-page .prod-grid { padding-bottom: 60px; }

/* ---------- 详情页 ---------- */
.pd-layout { display: grid; grid-template-columns: 560px 1fr; gap: 44px; padding-bottom: 60px; }
.pd-main-img {
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
  background: #f7f7f8;
}
.pd-main-img img { width: 100%; height: 100%; object-fit: contain; }
.pd-thumbs { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; margin-top: 12px; }
.thumb {
  aspect-ratio: 1;
  border: 1.5px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: #f7f7f8;
  transition: border-color .2s;
}
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb.active, .thumb:hover { border-color: var(--c-red); }
.pd-title { font-size: 24px; font-weight: 600; color: var(--c-dark); line-height: 1.45; }
.pd-sub { color: var(--c-red); margin: 10px 0 16px; font-size: 14px; }
.pd-price {
  background: linear-gradient(90deg, #fff5f5, #fff);
  border-radius: 8px;
  padding: 16px 18px;
  font-size: 28px;
  font-weight: 700;
  color: var(--c-red);
  margin-bottom: 20px;
}
.pd-price-note { font-size: 12px; color: var(--c-text3); font-weight: 400; margin-left: 12px; }
.pd-meta { border-top: 1px dashed var(--c-line); padding-top: 16px; margin-bottom: 18px; }
.pd-meta p { display: flex; padding: 4px 0; color: var(--c-text2); }
.pd-meta p span { width: 80px; color: var(--c-text3); flex-shrink: 0; }
.pd-meta a { color: var(--c-red); }
.pd-feats { list-style: none; margin-bottom: 24px; }
.pd-feats li { padding: 3px 0; color: var(--c-text2); position: relative; padding-left: 18px; }
.pd-feats li::before {
  content: "";
  position: absolute; left: 0; top: 12px;
  width: 6px; height: 6px;
  background: var(--c-red);
  border-radius: 50%;
}
.pd-actions { display: flex; gap: 14px; margin-bottom: 22px; }
.btn-primary {
  background: var(--c-red);
  color: #fff;
  border: none;
  padding: 12px 40px;
  border-radius: 26px;
  font-size: 15px;
  font-weight: 500;
  transition: background .25s, transform .2s, box-shadow .25s;
}
.btn-primary:hover { background: var(--c-red-dark); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(230,30,40,.3); }
.btn-primary.full { width: 100%; }
.pd-service { border-top: 1px solid var(--c-line); padding-top: 14px; color: var(--c-text3); font-size: 13px; }
.pd-service p { padding: 2px 0; }

/* ---------- 页面 hero ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--c-dark) 0%, #3a3a40 100%);
  color: #fff;
  padding: 64px 0;
}
.page-hero h1 { font-size: 34px; margin-bottom: 8px; }
.page-hero p { color: rgba(255,255,255,.72); font-size: 15px; }

/* ---------- 关于页 ---------- */
.about-page { padding-bottom: 60px; }
.about-sec { padding: 32px 0; border-bottom: 1px solid var(--c-line); }
.about-sec:last-child { border-bottom: none; }
.about-sec h2 { font-size: 22px; margin-bottom: 16px; color: var(--c-dark); }
.about-sec p { color: var(--c-text2); line-height: 1.9; margin-bottom: 10px; }
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.fact-card {
  background: var(--c-bg);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  transition: transform .25s;
}
.fact-card:hover { transform: translateY(-4px); }
.fact-card strong { display: block; font-size: 20px; color: var(--c-dark); margin-bottom: 6px; }
.fact-card span { color: var(--c-text3); font-size: 13px; }
.info-table { width: 100%; border-collapse: collapse; }
.info-table th, .info-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--c-line);
  vertical-align: top;
}
.info-table th { width: 160px; color: var(--c-text3); font-weight: 400; white-space: nowrap; }
.info-table td { color: var(--c-text); }

/* ---------- FAQ ---------- */
.faq-item { border: 1px solid var(--c-line); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.faq-item h3 {
  padding: 15px 20px;
  font-size: 15px;
  cursor: pointer;
  background: #fafafa;
  position: relative;
}
.faq-item h3::after { content: "＋"; position: absolute; right: 18px; color: var(--c-text3); }
.faq-item.open h3::after { content: "－"; }
.faq-item p { padding: 14px 20px; display: none; color: var(--c-text2); }
.faq-item.open p { display: block; }

/* ---------- 登录注册 ---------- */
.auth-wrap { padding: 64px 24px 90px; display: flex; justify-content: center; background: var(--c-bg); }
.auth-card {
  width: 420px;
  background: #fff;
  border-radius: 14px;
  padding: 40px 42px;
  box-shadow: 0 10px 40px rgba(0,0,0,.08);
}
.auth-card h2 { font-size: 24px; color: var(--c-dark); }
.auth-sub { color: var(--c-text3); margin: 8px 0 26px; font-size: 13px; }
.auth-sub a, .auth-link { color: var(--c-red); }
.auth-form label { display: block; margin-bottom: 16px; color: var(--c-text2); font-size: 13px; }
.auth-form input[type="text"], .auth-form input[type="password"], .auth-form input[type="tel"] {
  width: 100%;
  margin-top: 6px;
  padding: 11px 14px;
  border: 1px solid var(--c-line);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}
.auth-form input:focus { border-color: var(--c-red); }
.auth-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.chk { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--c-text3); }
.chk input { accent-color: var(--c-red); }
.auth-alt { margin-top: 26px; text-align: center; }
.auth-alt > span { color: var(--c-text3); font-size: 12px; }
.auth-alt div { display: flex; gap: 12px; justify-content: center; margin-top: 12px; }
.alt-btn {
  border: 1px solid var(--c-line);
  background: #fff;
  border-radius: 18px;
  padding: 7px 26px;
  font-size: 13px;
  transition: border-color .2s, color .2s;
}
.alt-btn:hover { border-color: var(--c-red); color: var(--c-red); }
.code-row { display: flex; gap: 10px; margin-top: 6px; }
.code-row input { flex: 1; margin-top: 0; }
.code-row .btn-line { color: var(--c-red); border-color: var(--c-red); padding: 8px 14px; white-space: nowrap; }
.code-row .btn-line:hover { background: #fff5f5; }

/* ---------- 购物车 ---------- */
.cart-page { padding: 40px 24px 90px; }
.cart-page h1 { font-size: 26px; margin-bottom: 24px; color: var(--c-dark); }
.cart-list { display: flex; flex-direction: column; gap: 14px; }
.cart-item {
  display: grid;
  grid-template-columns: 90px 1fr 130px 90px;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 14px 18px;
}
.cart-item img { width: 90px; height: 90px; object-fit: contain; background: #f7f7f8; border-radius: 8px; }
.cart-item h3 { font-size: 14px; font-weight: 500; }
.cart-item .ci-sku { color: var(--c-text3); font-size: 12px; margin-top: 4px; }
.ci-price { color: var(--c-red); font-size: 16px; font-weight: 700; }
.ci-remove { border: 1px solid var(--c-line); background: #fff; border-radius: 16px; padding: 6px 16px; font-size: 12px; color: var(--c-text3); }
.ci-remove:hover { border-color: var(--c-red); color: var(--c-red); }
.cart-empty { text-align: center; padding: 90px 0; color: var(--c-text3); }
.cart-empty p { font-size: 16px; margin-bottom: 22px; }
.cart-foot {
  margin-top: 26px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 24px;
}
.cart-total { font-size: 15px; color: var(--c-text2); }
.cart-total strong { color: var(--c-red); font-size: 24px; margin-left: 6px; }

/* ---------- 分类入口 ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; padding-bottom: 60px; }
.cat-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  transition: transform .3s, box-shadow .3s;
}
.cat-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(0,0,0,.14); }
.cat-card img { width: 100%; height: 100%; object-fit: cover; }
.cat-card-info {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.68));
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px 24px;
}
.cat-card-info h3 { font-size: 22px; margin-bottom: 4px; }
.cat-card-info span { opacity: .88; font-size: 13px; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--c-dark); color: rgba(255,255,255,.72); margin-top: 40px; }
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 52px 24px 36px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-logo { height: 28px; width: auto; margin-bottom: 16px; }
.footer-slogan { line-height: 1.8; margin-bottom: 18px; font-size: 13px; }
.footer-contact p { font-size: 13px; line-height: 2; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 16px; font-weight: 600; }
.footer-col a { display: block; padding: 5px 0; font-size: 13px; color: rgba(255,255,255,.62); transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 18px 24px 22px;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,.45);
}
.footer-bottom p { padding: 3px 0; }
.footer-bottom a:hover { color: #fff; }

/* ---------- 动效 ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .prod-grid { grid-template-columns: repeat(3, 1fr); }
  .pd-layout { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .about-band-inner { grid-template-columns: 1fr; }
  .search-box { display: none; }
  .main-nav { display: none; }
  .hero-slides { height: 380px; }
  .hero-copy h2 { font-size: 30px; }
}
@media (max-width: 720px) {
  .prod-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .svc-band { grid-template-columns: 1fr; }
  .facts-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .hero-slides { height: 300px; }
  .hero-copy h2 { font-size: 24px; }
  .hero-copy p { font-size: 14px; }
}
