:root {
  --brand-color: #0a6cff;
  --text-color: #222;
  --muted-text: #666;
  --bg: #fff;
  --bg-alt: #f8fafc;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text-color);
  background: var(--bg);
}

.header {
  position: sticky; top: 0; z-index: 10;
  background: #fff; border-bottom: 1px solid #eee;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; color: var(--brand-color); }
.brand img { height: 36px; width: auto; object-fit: contain; }
.nav a { color: #333; text-decoration: none; margin-left: 16px; }
.nav a:hover { color: var(--brand-color); }

.hero {
  background: linear-gradient(180deg, var(--bg-alt), #fff);
  padding: 56px 0;
}
.hero h1 { font-size: 40px; margin: 0 0 10px; }
.hero p { color: var(--muted-text); font-size: 16px; margin: 0; }

.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }

.card {
  border: 1px solid #eee; border-radius: 12px; overflow: hidden; background: #fff;
  transition: box-shadow .2s ease; text-decoration: none; color: inherit;
}
.card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.card img { width: 100%; height: 180px; object-fit: cover; background: #fafafa; }
.card .content { padding: 12px; }
.price { color: var(--brand-color); font-weight: 700; }

.section { padding: 36px 0; }
.section h2 { margin: 0 0 16px; }

.footer { background: #0f172a; color: #cbd5e1; padding: 24px 0; margin-top: 40px; }
.footer a { color: #93c5fd; text-decoration: none; }


/* ===== Black-Red Theme Overrides ===== */
:root {
  --brand-color: #e10600;        /* 主红 */
  --brand-color-600: #cc0500;
  --brand-color-700: #b10400;
  --text-color: #111;
  --text-inv: #fff;
  --muted-text: #6b7280;
  --bg: #ffffff;
  --bg-alt: #f6f7fb;
  --bg-dark: #0b0d10;
  --border: #e5e7eb;
}

/* Header - Dark style */
.header {
  background: linear-gradient(180deg, #111 0%, #151515 100%);
  border-bottom: 1px solid #222;
}
.nav a {
  color: #cbd5e1;
  position: relative;
  transition: color .2s ease;
}
.nav a:hover { color: #fff; }
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--brand-color);
  transition: width .25s ease;
}
.nav a:hover::after { width: 100%; }

/* Banner */
.banner {
  position: relative;
  overflow: hidden;
  background: radial-gradient(1200px 600px at 10% -10%, rgba(225,6,0,.25), rgba(225,6,0,0)) ,
              linear-gradient(180deg, #0e1113, #121417);
  color: var(--text-inv);
  padding: 72px 0 64px;
  border-bottom: 1px solid #1f2937;
}
.banner .container { position: relative; z-index: 1; }
.banner h1 {
  font-size: 44px; line-height: 1.1; margin: 0 0 12px; letter-spacing: .2px;
}
.banner p {
  color: #c9d1d9; margin: 0 0 20px; font-size: 16px;
}
.banner-cta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
/* 基础按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 18px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all .2s ease;
}
/* 统一四个按钮的视觉样式：白色描边+文字，透明背景；悬停渐变填充 */
.btn,
.btn-primary,
.btn-ghost {
  background: transparent !important;
  color: #fff !important;
  border-color: #fff !important;
  box-shadow: 0 10px 24px rgba(0,0,0,.14), inset 0 1px 0 rgba(255,255,255,.06);
}
.btn:hover,
.btn-primary:hover,
.btn-ghost:hover {
  background: linear-gradient(135deg, var(--brand-color, #0d6efd) 0%, var(--brand-color-600, #0a58d1) 100%) !important;
  color: #fff !important;
  border-color: transparent !important;
  transform: translateY(-1px);
  box-shadow: 0 14px 36px rgba(0,0,0,.22);
}
.btn:focus-visible,
.btn-primary:focus-visible,
.btn-ghost:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
/* 次按钮保持不变 */
.btn-ghost {
  color: #e5e7eb; border-color: #30363d; background: rgba(255,255,255,.03);
}
.btn-ghost:hover { background: rgba(255,255,255,.06); color: #fff; }

/* Sections */
.section { padding: 48px 0; }
.section-title {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 16px;
}
.section-title h2 { margin: 0; font-size: 24px; }
.section-sub { color: var(--muted-text); }

/* Split layout */
.split {
  display: grid; gap: 28px; grid-template-columns: 1.1fr 1fr; align-items: center;
}
@media (max-width: 960px) { .split { grid-template-columns: 1fr; } }
.split .visual {
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #0f1115;
  min-height: 280px; display: grid; place-items: center;
}
.split .visual img { width: 100%; height: 100%; object-fit: cover; }

/* Cards */
.card {
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #fff;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.08); }
.card .content { padding: 14px; }
.card .meta { color: var(--muted-text); font-size: 13px; margin-top: 6px; }

/* Product media */
.product-media { width: 100%; height: 220px; object-fit: cover; background: #0f1115; }

/* Feature badges */
.badges { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
@media (max-width: 960px) { .badges { grid-template-columns: repeat(2,1fr); } }
.badge {
  border: 1px solid var(--border); border-radius: 12px; padding: 14px;
  background: linear-gradient(180deg, #fff, #fafafa);
  display: flex; gap: 12px; align-items: center;
}
.badge .dot {
  width: 12px; height: 12px; border-radius: 50%; background: var(--brand-color);
  box-shadow: 0 0 0 4px rgba(225,6,0,.12);
}

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(10px); }
.reveal.reveal-in { opacity: 1; transform: translateY(0); transition: all .6s cubic-bezier(.2,.8,.2,1); }

/* Footer - Dark */
.footer {
  background: #0b0d10; color: #9aa4ae; border-top: 1px solid #1f2937;
}
.footer a { color: #e5e7eb; }


/* Banner 左右分栏 */
.banner .banner-split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 24px;
  align-items: center;
}
.banner .banner-copy h1 { margin: 0 0 10px; }
.banner .banner-copy .banner-cta { margin-top: 12px; display: flex; gap: 10px; }

/* 轮播区域：确保图片等比缩放、完整展示 */
.slider {
  position: relative;
  width: 100%;
  height: auto;                 /* 自适应高度 */
  background: #111;
  border-radius: 0;
  border: none;
  overflow: hidden;
}
.slider .slides {
  display: flex;
  height: auto;                 /* 跟随内容高度 */
  transition: transform .5s ease;
}
.slider .slide {
  min-width: 100%;
  height: auto;                 /* 跟随内容高度 */
  display: grid;
  place-items: center;
  background: #000;
}
.slider .slide img {
  width: 100%;
  height: auto;                 /* 按比例自适应，不裁切 */
  object-fit: contain;
  object-position: center;
}

/* 左右切换按钮 */
.slider .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  color: #fff;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(2px);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 22px;
  transition: background .2s ease, transform .2s ease;
}
.slider .nav:hover { background: rgba(0,0,0,0.55); transform: translateY(-50%) scale(1.04); }
.slider .prev { left: 10px; }
.slider .next { right: 10px; }

/* 小屏改为上下堆叠 */
@media (max-width: 900px) {
  .banner .banner-split { grid-template-columns: 1fr; }
  .slider { height: auto; }     /* 移除小屏固定高度 */
}

/* 让 Banner 的文字与轮播上下分布 */
.banner { padding-top: 28px; }
.banner .banner-cta { margin-top: 12px; display: flex; gap: 10px; }

/* 全宽容器（脱离 container，铺满屏幕宽度） */
.banner-wide {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: 14px;
}

/* 轮播：完整展示图片（不裁切），容器自适应高度 —— 去掉固定高度 */
.slider {
  position: relative;
  width: 100%;
  height: auto;                 /* 原先 clamp(...) 改为 auto */
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}
.slider .slides {
  display: flex;
  height: auto;                 /* 原先 100% 改为 auto，跟随图片高度 */
  transition: transform .5s ease;
}
.slider .slide {
  min-width: 100%;
  height: auto;                 /* 原先 100% 改为 auto */
  display: grid;
  place-items: center;
  background: #000;
}
/* 将 .banner-wide 的覆盖挪到顶层，修正原先的无效嵌套 */
.banner-wide .slider {
  border-radius: 0 !important;
  border: none !important;
  height: auto;                 /* 明确不限制高度 */
  background: #000;
}
.banner-wide .slide img {
  object-fit: contain;
  object-position: center;
}

/* 左右切换按钮 */
.slider .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%;
  border: none; color: #fff;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(2px);
  cursor: pointer; display: grid; place-items: center;
  font-size: 22px; transition: background .2s ease, transform .2s ease;
}
.slider .nav:hover { background: rgba(0,0,0,0.55); transform: translateY(-50%) scale(1.04); }
.slider .prev { left: 10px; }
.slider .next { right: 10px; }

@media (max-width: 900px) {
  .slider { height: auto; }     /* 移除小屏固定高度 */
}

/* 新增：系列栅格的卡片风格（对齐参照截图的红底卡片） */
.series-grid .card {
  background: linear-gradient(180deg, #fff, #fafafa);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.series-grid .card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.08); }
.series-grid .card .thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: #0f1115;
}
.series-grid .card .title {
  padding: 12px 14px;
  font-weight: 600;
}
.series-grid .card .title small {
  display: block;
  color: var(--muted-text);
  font-weight: 500;
}

/* 美化“关于我们”区块底部按钮：更圆更大，品牌色描边与悬停 */
.about-section .banner-cta .btn {
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 15px;
}
.about-section .banner-cta .btn-primary {
  box-shadow: 0 12px 28px rgba(0,0,0,.24), 0 6px 14px rgba(0,0,0,.14);
  transform: translateZ(0);
}
.about-section .banner-cta .btn-primary:hover {
  transform: translateY(-1px);
}
.about-section .banner-cta .btn-ghost {
  color: var(--brand-color);
  border-color: var(--brand-color);
  background: transparent;
}
.about-section .banner-cta .btn-ghost:hover {
  background: var(--brand-color);
  color: #fff;
}
/* === 追加：统一首页 4 个按钮外观（放在文件末尾，优先级更高） === */
:root {
  --accent-color: #ef4444; /* 默认态新颜色（翡翠绿）。需要更换时只改这里即可 */
}
.banner .banner-cta .btn,
.banner .banner-cta .btn-primary,
.banner .banner-cta .btn-ghost,
.about-section .banner-cta .btn,
.about-section .banner-cta .btn-primary,
.about-section .banner-cta .btn-ghost {
  background: transparent !important;
  color: var(--accent-color) !important;             /* 默认态文字使用新颜色 */
  border: 1px solid var(--accent-color) !important;  /* 默认态描边使用新颜色 */
  border-radius: 999px !important;
  box-shadow: 0 10px 24px rgba(0,0,0,.14), inset 0 1px 0 rgba(255,255,255,.06) !important;
}

.banner .banner-cta .btn:hover,
.banner .banner-cta .btn-primary:hover,
.banner .banner-cta .btn-ghost:hover,
.about-section .banner-cta .btn:hover,
.about-section .banner-cta .btn-primary:hover,
.about-section .banner-cta .btn-ghost:hover {
  /* 悬停态保持不变：仍使用品牌渐变 */
  background: linear-gradient(135deg, var(--brand-color, #0a6cff) 0%, var(--brand-color-600, #0a58d1) 100%) !important;
  color: #fff !important;
  border-color: transparent !important;
  transform: translateY(-1px);
  box-shadow: 0 14px 36px rgba(0,0,0,.22) !important;
}

.banner .banner-cta .btn:focus-visible,
.banner .banner-cta .btn-primary:focus-visible,
.banner .banner-cta .btn-ghost:focus-visible,
.about-section .banner-cta .btn:focus-visible,
.about-section .banner-cta .btn-primary:focus-visible,
.about-section .banner-cta .btn-ghost:focus-visible {
  outline: 2px solid var(--accent-color) !important; /* 焦点可视与默认态一致 */
  outline-offset: 2px !important;
}

/* ===== Products page — Grand layout ===== */
.container-wide { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

.products-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 960px) { .products-layout { grid-template-columns: 1fr; } }

/* 左侧系列列表更大气 */
.series-sidebar {
  position: sticky; top: 84px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 10px 28px rgba(0,0,0,.06);
}
.series-title { font-weight: 800; margin: 4px 8px 10px; font-size: 16px; }
.series-nav { display: flex; flex-direction: column; gap: 8px; }
.series-item {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  border-radius: 12px;
  color: #111; text-decoration: none;
  border: 1px solid transparent;
  transition: all .2s ease;
  font-size: 15px;
}
.series-item .name { font-weight: 600; }
.series-item .count {
  min-width: 28px; height: 28px; border-radius: 999px;
  display: grid; place-items: center;
  font-size: 12px; color: #555; background: #f3f4f6; padding: 0 8px;
}
.series-item:hover { background: #f8fafc; border-color: var(--border); }
.series-item.active {
  background: linear-gradient(180deg, #fff, #fafafa);
  border-color: var(--border);
  box-shadow: 0 8px 24px rgba(0,0,0,.07);
}
.series-item.active::after {
  content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 3px;
  background: var(--brand-color); border-radius: 3px;
}

/* 右侧工具条与网格（更宽、更密致） */
.product-toolbar {
  display: flex; gap: 12px; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px; color: var(--muted-text);
}
.result-info { font-weight: 600; color: #374151; }

.product-grid { display: grid; gap: 20px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1200px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 960px)  { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .product-grid { grid-template-columns: 1fr; } }

/* 卡片更有气势：更大媒体区、轻微悬停动画、信息区更规整 */
.product-grid .product-media {
  height: 260px;
  transition: transform .25s ease;
  background: #0f1115;
  object-fit: cover;
}
.product-grid .card:hover .product-media { transform: scale(1.02); }

.product-grid .product-title {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.35;
  margin-top: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 42px;   /* 统一高度避免跳动 */
}
.series-chip {
  display: inline-block;
  color: var(--muted-text);
  font-size: 12px;
  margin-bottom: 2px;
}
.pagination { display: flex; gap: 10px; align-items: center; margin-top: 16px; }
.page-link { color: var(--brand-color); text-decoration: none; }
.page-link:hover { text-decoration: underline; }
.page-info { color: var(--muted-text); }