/* ========= 兴锐德官网 主题样式（移植自小程序视觉体系） ========= */
:root{
  --brand:#ff6a00; --brand-2:#ff8a3c; --price:#ff4d2d;
  --bg:#f5f6f8; --card:#fff; --text:#222; --muted:#999; --line:#eee;
  --radius:14px; --shadow:0 2px 14px rgba(0,0,0,.06); --shadow-lg:0 8px 30px rgba(0,0,0,.10);
  --maxw:1200px; --header-h:64px;
}
*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  background:var(--bg);color:var(--text);font-size:15px;line-height:1.6;-webkit-font-smoothing:antialiased;}
a{color:inherit;text-decoration:none;}
img{max-width:100%;display:block;height:auto;}
.container{max-width:var(--maxw);margin:0 auto;padding:0 16px;}
.min-w0{min-width:0;}
.ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.ellipsis-2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}

/* ---------- 按钮 ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:none;cursor:pointer;
  padding:10px 22px;border-radius:999px;font-size:15px;font-weight:600;transition:.2s;line-height:1;}
.btn-primary{background:linear-gradient(135deg,var(--brand-2),var(--brand));color:#fff;box-shadow:0 6px 16px rgba(255,106,0,.30);}
.btn-primary:hover{filter:brightness(1.05);transform:translateY(-1px);}
.btn-outline{background:#fff;color:var(--brand);border:1.5px solid var(--brand);}
.btn-outline:hover{background:rgba(255,106,0,.06);}
.btn-block{width:100%;}
.btn-sm{padding:7px 16px;font-size:13px;}

/* ---------- 顶部导航 ---------- */
.site-header{position:sticky;top:0;z-index:50;background:#fff;box-shadow:0 1px 0 var(--line);}
.site-header .bar{height:var(--header-h);display:flex;align-items:center;gap:16px;}
.logo{display:flex;align-items:center;gap:10px;font-weight:800;font-size:19px;color:var(--brand);white-space:nowrap;}
.logo .mark{width:34px;height:34px;border-radius:9px;background:linear-gradient(135deg,var(--brand-2),var(--brand));
  color:#fff;display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:900;}
.logo .sub{font-size:11px;color:var(--muted);font-weight:500;line-height:1;}
.nav{display:flex;gap:4px;margin-left:10px;}
.nav a{padding:8px 14px;border-radius:8px;font-weight:600;color:#444;transition:.15s;}
.nav a:hover,.nav a.active{color:var(--brand);background:rgba(255,106,0,.08);}
.search{margin-left:auto;display:flex;align-items:center;background:var(--bg);border-radius:999px;padding:6px 6px 6px 14px;}
.search input{border:none;background:transparent;outline:none;width:180px;font-size:14px;}
.search button{border:none;background:linear-gradient(135deg,var(--brand-2),var(--brand));color:#fff;border-radius:999px;padding:7px 14px;cursor:pointer;font-weight:600;}
.header-actions{display:flex;align-items:center;gap:10px;}
.header-actions .admin-link{font-size:13px;color:#888;}
.header-actions .hi{color:#666;font-size:13px;}
.btn-login{padding:6px 12px;border-radius:8px;font-size:13px;color:var(--brand);border:1.5px solid var(--brand);}
.btn-login.primary{background:linear-gradient(135deg,var(--brand-2),var(--brand));color:#fff;border:none;}
.auth-card{max-width:440px;margin:30px auto;}
.profile-info .info-row{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px dashed #eee;font-size:14px;}
.profile-info .info-row:last-child{border-bottom:none;}
.profile-info .lbl{color:#888;flex-shrink:0;margin-right:16px;}
.hamburger{display:none;margin-left:auto;border:none;background:transparent;font-size:24px;cursor:pointer;color:#444;}

/* ---------- 区块标题 ---------- */
.section{padding:34px 0;}
.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;}
.section-title{display:flex;align-items:center;gap:10px;font-size:20px;font-weight:800;}
.section-title::before{content:"";width:5px;height:20px;border-radius:3px;background:linear-gradient(var(--brand-2),var(--brand));}
.more{color:var(--brand);font-size:14px;font-weight:600;}

/* ---------- 轮播 hero ---------- */
.hero{margin-top:14px;}
.hero-swiper{position:relative;border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);}
.hero-track{display:flex;transition:transform .5s ease;scroll-snap-type:x mandatory;overflow-x:auto;scrollbar-width:none;}
.hero-track::-webkit-scrollbar{display:none;}
.hero-slide{min-width:100%;scroll-snap-align:center;height:340px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#fff;text-align:center;padding:0 24px;}
.hero-title{font-size:30px;font-weight:800;letter-spacing:1px;}
.hero-sub{margin-top:10px;opacity:.92;font-size:15px;}
.hero-dots{position:absolute;bottom:14px;left:0;right:0;display:flex;gap:8px;justify-content:center;}
.hero-dots span{width:9px;height:9px;border-radius:50%;background:rgba(255,255,255,.55);cursor:pointer;transition:.2s;}
.hero-dots span.on{background:#fff;width:22px;border-radius:5px;}
.hero-arrow{position:absolute;top:50%;transform:translateY(-50%);width:40px;height:40px;border-radius:50%;
  background:rgba(0,0,0,.28);color:#fff;border:none;font-size:20px;cursor:pointer;display:flex;align-items:center;justify-content:center;}
.hero-arrow.prev{left:12px;} .hero-arrow.next{right:12px;}

/* ---------- 分类九宫格 ---------- */
.cat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;}
.cat-card{background:var(--card);border-radius:var(--radius);padding:18px 12px;display:flex;flex-direction:column;align-items:center;gap:8px;box-shadow:var(--shadow);transition:.2s;}
.cat-card:hover{transform:translateY(-3px);box-shadow:var(--shadow-lg);}
.cat-card .ico{width:54px;height:54px;border-radius:14px;background:linear-gradient(135deg,#fff3e8,#ffe6d2);display:flex;align-items:center;justify-content:center;font-size:26px;}
.cat-card .name{font-weight:700;}

/* ---------- 商品网格 ---------- */
.product-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;}
.product-card{background:var(--card);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);transition:.2s;display:flex;flex-direction:column;}
.product-card:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg);}
.product-card .thumb{aspect-ratio:1/1;overflow:hidden;background:#fafafa;}
.product-card .thumb img{width:100%;height:100%;object-fit:cover;transition:.3s;}
.product-card:hover .thumb img{transform:scale(1.05);}
.product-card .body{padding:12px 13px 14px;display:flex;flex-direction:column;gap:6px;}
.product-card .name{font-weight:700;font-size:15px;}
.product-card .model{font-size:12px;color:var(--muted);}
.product-card .priceline{display:flex;align-items:baseline;gap:8px;margin-top:2px;}
.product-card .price{color:var(--price);font-weight:800;font-size:18px;}
.product-card .price::before{content:"¥";font-size:12px;margin-right:1px;}
.product-card .price-inquiry{font-size:16px;letter-spacing:1px;}
.product-card .price-inquiry::before{content:none;}
.product-card .origin{color:var(--muted);text-decoration:line-through;font-size:12px;}
.product-card .sales{font-size:12px;color:var(--muted);}

/* ---------- 关于/联系 ---------- */
.page-hero{background:linear-gradient(135deg,var(--brand-2),var(--brand));color:#fff;padding:54px 0;text-align:center;}
.page-hero h1{margin:0 0 8px;font-size:30px;}
.page-hero p{margin:0;opacity:.92;}
.panel{background:var(--card);border-radius:var(--radius);padding:26px;box-shadow:var(--shadow);margin-top:18px;}
.panel h2{margin:0 0 14px;font-size:20px;display:flex;align-items:center;gap:8px;}
.panel h2::before{content:"";width:5px;height:18px;border-radius:3px;background:linear-gradient(var(--brand-2),var(--brand));}
.cred-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;}
.cred{background:var(--bg);border-radius:12px;padding:18px;text-align:center;}
.cred .badge{font-size:30px;}
.cred .t{font-weight:700;margin-top:6px;}
.contact-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:20px;}
.contact-info{display:flex;flex-direction:column;gap:14px;}
.contact-item{display:flex;gap:12px;align-items:flex-start;padding:14px;background:var(--bg);border-radius:12px;}
.contact-item .ico{font-size:22px;}
.contact-item .k{font-weight:700;}
.contact-item .v{color:#555;}
.form-row{display:flex;flex-direction:column;gap:6px;margin-bottom:14px;}
.form-row label{font-weight:600;font-size:14px;}
.form-row input,.form-row textarea{ border:1.5px solid var(--line);border-radius:10px;padding:10px 12px;font-size:14px;font-family:inherit;outline:none;transition:.15s;background:#fff;}
.form-row input:focus,.form-row textarea:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(255,106,0,.12);}
.form-alert{margin-top:10px;padding:10px 14px;border-radius:10px;font-size:14px;display:none;}
.form-alert.ok{display:block;background:#eafaf1;color:#1a9e54;}
.form-alert.err{display:block;background:#fdecec;color:#d23b3b;}

/* ---------- 面包屑 ---------- */
.breadcrumb{font-size:13px;color:var(--muted);padding:14px 0;display:flex;gap:8px;flex-wrap:wrap;}
.breadcrumb a:hover{color:var(--brand);}

/* ---------- 详情页 ---------- */
.detail{display:grid;grid-template-columns:1fr 1fr;gap:30px;margin-top:10px;}
.gallery .main-img{border-radius:var(--radius);overflow:hidden;background:#fafafa;aspect-ratio:1/1;}
.gallery .main-img img{width:100%;height:100%;object-fit:cover;}
.thumbs{display:flex;gap:10px;margin-top:12px;flex-wrap:wrap;}
.thumbs img{width:72px;height:72px;object-fit:cover;border-radius:10px;border:2px solid transparent;cursor:pointer;}
.thumbs img.on{border-color:var(--brand);}
.detail-info h1{font-size:24px;margin:0 0 6px;}
.detail-info .model{color:var(--muted);margin-bottom:14px;}
.detail-info .price-big{color:var(--price);font-weight:800;font-size:30px;margin-bottom:4px;}
.detail-info .price-big::before{content:"¥";font-size:18px;}
.detail-info .price-inquiry{font-size:26px;letter-spacing:2px;}
.detail-info .price-inquiry::before{content:none;}
.detail-info .origin-big{color:var(--muted);text-decoration:line-through;margin-left:10px;}
.spec-table{width:100%;border-collapse:collapse;margin:16px 0;}
.spec-table td{padding:9px 12px;border-bottom:1px solid var(--line);font-size:14px;}
.spec-table td:first-child{color:var(--muted);width:110px;}
.detail-actions{display:flex;gap:12px;margin-top:18px;flex-wrap:wrap;}
.related{margin-top:36px;}

/* ---------- 页脚 ---------- */
.site-footer{background:#222;color:#bbb;margin-top:46px;padding:38px 0 22px;}
.site-footer .cols{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:30px;}
.site-footer h4{color:#fff;margin:0 0 12px;font-size:16px;}
.site-footer a{color:#bbb;display:block;margin-bottom:8px;}
.site-footer a:hover{color:var(--brand-2);}
.site-footer .slogan{font-size:18px;color:#fff;font-weight:800;margin-bottom:8px;}
.site-footer .copyright{border-top:1px solid #333;margin-top:26px;padding-top:16px;font-size:13px;color:#888;text-align:center;}
.back-top{position:fixed;right:18px;bottom:22px;width:44px;height:44px;border-radius:50%;background:var(--brand);color:#fff;border:none;font-size:20px;cursor:pointer;box-shadow:var(--shadow-lg);opacity:0;pointer-events:none;transition:.2s;z-index:40;}
.back-top.show{opacity:1;pointer-events:auto;}

/* ---------- 响应式 ---------- */
@media (max-width:1024px){
  .product-grid{grid-template-columns:repeat(3,1fr);}
  .cat-grid{grid-template-columns:repeat(3,1fr);}
  .cred-grid{grid-template-columns:repeat(3,1fr);}
}
@media (max-width:768px){
  :root{--header-h:56px;}
  .nav,.search{display:none;}
  .hamburger{display:block;}
  .header-actions{display:none;}
  .mobile-nav{display:none;flex-direction:column;padding:8px 16px 14px;background:#fff;border-top:1px solid var(--line);}
  .mobile-nav.open{display:flex;}
  .mobile-nav a{padding:11px 6px;border-bottom:1px solid var(--line);font-weight:600;}
  .mobile-search{display:flex;padding:10px 16px;background:#fff;gap:8px;}
  .mobile-search input{flex:1;border:1.5px solid var(--line);border-radius:999px;padding:9px 14px;outline:none;}
  .mobile-search button{border:none;background:var(--brand);color:#fff;border-radius:999px;padding:0 18px;}
  .hero-slide{height:170px;}
  .hero-title{font-size:22px;}
  .product-grid{grid-template-columns:repeat(2,1fr);gap:11px;}
  .cat-grid{grid-template-columns:repeat(3,1fr);gap:10px;}
  .cred-grid{grid-template-columns:repeat(2,1fr);}
  .detail{grid-template-columns:1fr;gap:18px;}
  .contact-grid{grid-template-columns:1fr;}
  .site-footer .cols{grid-template-columns:1fr;gap:20px;}
  .section{padding:24px 0;}
  .section-title{font-size:18px;}
}
@media (min-width:769px){ .mobile-nav,.mobile-search{display:none!important;} }
