/* ===== 玖曜电动车 · 门户风样式 ===== */
:root { --blue: #1256c4; --blue-d: #0d3f93; --orange: #ff6a00; --bg: #f5f7fb; --ink: #1f2733; --mut: #7a8699; }
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--ink); }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }

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

/* 顶部导航 */
.topbar { background: #fff; box-shadow: 0 2px 10px rgba(18,86,196,.08); position: sticky; top: 0; z-index: 100; }
.topbar-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { font-size: 24px; font-weight: 800; color: var(--blue); white-space: nowrap; }
.logo small { font-size: 12px; color: var(--mut); font-weight: 400; margin-left: 6px; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { padding: 8px 12px; border-radius: 8px; font-size: 15px; color: var(--ink); }
.nav-links a:hover, .nav-links a.on { background: #eaf1fd; color: var(--blue); }
.search-box { flex: 1; display: flex; max-width: 380px; margin-left: auto; }
.search-box input { flex: 1; border: 2px solid var(--blue); border-right: none; border-radius: 20px 0 0 20px; padding: 8px 16px; outline: none; font-size: 14px; }
.search-box button { border: none; background: var(--blue); color: #fff; padding: 0 20px; border-radius: 0 20px 20px 0; font-size: 14px; }
.top-actions { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.cart-entry { position: relative; font-size: 15px; color: var(--ink); }
.cart-badge { position: absolute; top: -8px; left: 14px; background: var(--orange); color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 6px; }
.user-entry { font-size: 14px; color: var(--mut); }
.user-entry a { color: var(--blue); margin: 0 4px; }

/* Hero 轮播 */
.hero { background: linear-gradient(135deg, #0d3f93, #1256c4 55%, #2f7de1); padding: 40px 0 56px; }
.hero-slider { position: relative; border-radius: 16px; overflow: hidden; height: 340px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.hero-slider img { width: 100%; height: 100%; object-fit: cover; }
.hero-dots { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; }
.hero-dots span { display: inline-block; width: 26px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.45); margin: 0 4px; cursor: pointer; }
.hero-dots span.on { background: #fff; }

/* 统计条（仿门户数字） */
.stats-band { margin-top: -36px; position: relative; z-index: 2; }
.stats-card { background: #fff; border-radius: 16px; box-shadow: 0 8px 30px rgba(18,86,196,.12); display: flex; padding: 26px 0; }
.stat-item { flex: 1; text-align: center; }
.stat-num { font-size: 36px; font-weight: 800; color: var(--blue); }
.stat-label { color: var(--mut); margin-top: 4px; font-size: 14px; }

/* 区块标题 */
.section { padding: 48px 0 8px; }
.sec-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 22px; }
.sec-title { font-size: 26px; font-weight: 800; }
.sec-sub { color: var(--mut); font-size: 14px; }

/* 专区矩阵卡（仿系统矩阵） */
.zone-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.zone-card { background: #fff; border-radius: 14px; padding: 0 0 22px; cursor: pointer; transition: .2s; border: 1px solid #e8edf5; position: relative; overflow: hidden; }
.zone-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(18,86,196,.15); border-color: var(--blue); }
.zone-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.zone-name { font-size: 19px; font-weight: 700; margin: 14px 20px 6px; }
.zone-desc { color: var(--mut); font-size: 13px; line-height: 1.6; min-height: 42px; margin: 0 20px; }
.zone-tag { position: absolute; top: 20px; right: -40px; width: 130px; padding: 4px 0; background: var(--orange); color: #fff; font-size: 12px; text-align: center; transform: rotate(38deg); z-index: 2; }
.zone-go { color: var(--blue); font-size: 14px; margin: 12px 20px 0; display: inline-block; }

/* 商品卡片 */
.prod-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.prod-card { background: #fff; border-radius: 14px; overflow: hidden; cursor: pointer; transition: .2s; border: 1px solid #e8edf5; position: relative; }
.prod-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(18,86,196,.15); }
.prod-card img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #fff; }
.prod-body { padding: 12px 14px 16px; }
.prod-name { font-size: 15px; font-weight: 600; height: 42px; overflow: hidden; }
.prod-price { color: var(--orange); font-size: 20px; font-weight: 800; margin-top: 8px; }
.prod-price s { color: var(--mut); font-size: 13px; font-weight: 400; margin-left: 8px; }
.prod-meta { color: var(--mut); font-size: 12px; margin-top: 4px; }
.prod-tags { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.prod-tags i { font-style: normal; font-size: 11px; color: var(--blue); background: #eaf1fd; border-radius: 4px; padding: 1px 6px; }
.badge-hot { position: absolute; top: 10px; left: 10px; background: var(--orange); color: #fff; font-size: 12px; border-radius: 4px; padding: 2px 8px; z-index: 2; }
.badge-new { position: absolute; top: 10px; left: 10px; background: #00a870; color: #fff; font-size: 12px; border-radius: 4px; padding: 2px 8px; z-index: 2; }

/* 页脚 */
.foot { margin-top: 60px; background: #101b2d; color: #aab6c8; padding: 40px 0 24px; }
.foot-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.foot h4 { color: #fff; margin-bottom: 12px; }
.foot a { display: block; font-size: 13px; margin: 6px 0; color: #aab6c8; }
.foot a:hover { color: #fff; }
.foot-copy { text-align: center; margin-top: 30px; font-size: 12px; color: #5f6c80; border-top: 1px solid #1e2c42; padding-top: 18px; }

/* 列表页 */
.list-wrap { display: flex; gap: 20px; padding-top: 24px; }
.side { width: 210px; flex-shrink: 0; background: #fff; border-radius: 12px; padding: 14px; align-self: flex-start; }
.side h3 { font-size: 15px; padding: 8px 10px; color: var(--blue); }
.side a { display: block; padding: 8px 10px; border-radius: 8px; font-size: 14px; color: var(--ink); }
.side a:hover, .side a.on { background: #eaf1fd; color: var(--blue); }
.list-main { flex: 1; }
.sort-bar { background: #fff; border-radius: 12px; padding: 10px 16px; margin-bottom: 16px; display: flex; gap: 18px; font-size: 14px; }
.sort-bar a.on { color: var(--orange); font-weight: 700; }

/* 详情页 */
.pd-wrap { background: #fff; border-radius: 14px; padding: 24px; margin-top: 24px; display: flex; gap: 30px; }
.pd-gallery { width: 460px; flex-shrink: 0; }
.pd-main-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; border: 1px solid #eef1f6; }
.pd-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.pd-thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.pd-thumbs img.on { border-color: var(--blue); }
.pd-info { flex: 1; }
.pd-name { font-size: 24px; font-weight: 800; }
.pd-tags { margin: 10px 0; }
.pd-price-row { background: #fff5ee; border-radius: 10px; padding: 16px; margin: 14px 0; }
.pd-price { color: var(--orange); font-size: 32px; font-weight: 800; }
.pd-price s { color: var(--mut); font-size: 15px; font-weight: 400; margin-left: 10px; }
.pd-kv { display: flex; font-size: 14px; margin: 8px 0; }
.pd-kv b { width: 76px; color: var(--mut); font-weight: 400; }
.pd-qty { display: flex; align-items: center; gap: 10px; margin: 16px 0; }
.pd-qty button { width: 30px; height: 30px; border: 1px solid #dde3ec; background: #fff; border-radius: 6px; font-size: 16px; }
.pd-qty input { width: 52px; height: 30px; text-align: center; border: 1px solid #dde3ec; border-radius: 6px; }
.pd-actions { display: flex; gap: 14px; margin-top: 18px; }
.btn { border: none; border-radius: 22px; padding: 12px 34px; font-size: 16px; }
.btn-buy { background: var(--orange); color: #fff; }
.btn-cart { background: var(--blue); color: #fff; }
.btn-ghost { background: #fff; border: 1px solid var(--blue); color: var(--blue); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.pd-video-sec { margin-top: 24px; }
.pd-video-sec video { width: 100%; border-radius: 12px; background: #000; }
.panel { background: #fff; border-radius: 14px; padding: 24px; margin-top: 20px; }
.panel h3 { margin-bottom: 16px; border-left: 4px solid var(--blue); padding-left: 10px; }
.param-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.param-table td { border: 1px solid #eef1f6; padding: 10px 14px; }
.param-table td:first-child { width: 160px; background: #f7f9fc; color: var(--mut); }
.pd-desc-text { color: #444; line-height: 1.9; font-size: 15px; }

/* 购物车 / 结算 / 订单 */
.cart-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
.cart-table th { background: #f7f9fc; padding: 12px; font-size: 14px; color: var(--mut); text-align: left; }
.cart-table td { padding: 12px; border-top: 1px solid #f0f3f8; font-size: 14px; vertical-align: middle; }
.cart-table img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.qty-ctl { display: inline-flex; align-items: center; gap: 6px; }
.qty-ctl button { width: 26px; height: 26px; border: 1px solid #dde3ec; background: #fff; border-radius: 5px; }
.qty-ctl span { min-width: 30px; text-align: center; }
.cart-foot { display: flex; justify-content: flex-end; align-items: center; gap: 20px; margin-top: 16px; background: #fff; border-radius: 12px; padding: 16px 24px; }
.total-price { color: var(--orange); font-size: 26px; font-weight: 800; }
.empty-tip { text-align: center; padding: 80px 0; color: var(--mut); background: #fff; border-radius: 12px; margin-top: 24px; }
.addr-item { border: 2px solid #e8edf5; border-radius: 10px; padding: 12px 16px; margin-bottom: 10px; cursor: pointer; font-size: 14px; }
.addr-item.on { border-color: var(--orange); background: #fff8f3; }
.addr-form { background: #f7f9fc; border-radius: 10px; padding: 16px; margin-top: 12px; }
.addr-form input { display: block; width: 100%; margin-bottom: 10px; padding: 9px 12px; border: 1px solid #dde3ec; border-radius: 8px; font-size: 14px; }
.order-card { background: #fff; border-radius: 12px; padding: 18px 20px; margin-bottom: 14px; }
.order-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--mut); border-bottom: 1px solid #f0f3f8; padding-bottom: 10px; }
.order-status { font-weight: 700; color: var(--orange); }
.order-items { display: flex; gap: 12px; padding: 12px 0; flex-wrap: wrap; }
.order-item { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.order-item img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; }
.order-foot { display: flex; justify-content: flex-end; align-items: center; gap: 14px; border-top: 1px solid #f0f3f8; padding-top: 12px; }
.btn-sm { border: none; border-radius: 16px; padding: 7px 18px; font-size: 13px; }
.tabs { display: flex; gap: 8px; margin: 20px 0; flex-wrap: wrap; }
.tabs a { background: #fff; border-radius: 20px; padding: 8px 20px; font-size: 14px; border: 1px solid #e8edf5; }
.tabs a.on { background: var(--blue); color: #fff; border-color: var(--blue); }

/* 登录 */
.login-box { max-width: 400px; margin: 60px auto; background: #fff; border-radius: 16px; padding: 36px; box-shadow: 0 10px 40px rgba(18,86,196,.12); }
.login-box h2 { text-align: center; margin-bottom: 8px; color: var(--blue); }
.login-tip { text-align: center; color: var(--mut); font-size: 13px; margin-bottom: 22px; }
.login-box input { display: block; width: 100%; margin-bottom: 14px; padding: 11px 14px; border: 1px solid #dde3ec; border-radius: 10px; font-size: 15px; }
.login-box .btn { width: 100%; border-radius: 10px; }
.login-switch { text-align: center; margin-top: 14px; font-size: 14px; color: var(--mut); }
.login-switch a { color: var(--blue); }
.login-err { color: #e5484d; font-size: 13px; margin: -6px 0 10px; }

/* 提示条 */
.toast { position: fixed; top: 84px; left: 50%; transform: translateX(-50%); background: rgba(16,27,45,.92); color: #fff; padding: 10px 24px; border-radius: 24px; font-size: 14px; z-index: 999; }
.page-title { font-size: 20px; font-weight: 800; margin: 24px 0 16px; }

@media (max-width: 900px) {
  .zone-grid, .prod-grid { grid-template-columns: repeat(2, 1fr); }
  .pd-wrap { flex-direction: column; }
  .pd-gallery { width: 100%; }
  .nav-links { display: none; }
}

/* 自定义图文模块（页面装修） */
.rich-mod { background: #fff; border-radius: 14px; overflow: hidden; display: flex; border: 1px solid #e8edf5; }
.rich-mod img { width: 46%; object-fit: cover; min-height: 220px; }
.rich-body { padding: 34px 36px; flex: 1; }
.rich-body h3 { font-size: 24px; margin-bottom: 12px; }
.rich-body p { color: #7a8699; line-height: 1.9; margin-bottom: 20px; }
@media (max-width: 900px) { .rich-mod { flex-direction: column; } .rich-mod img { width: 100%; } }

/* 面包屑导航（详情页） */
.crumb-bar { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #7a8699; margin: 20px 0 0; }
.crumb-bar a { color: #1256c4; }
.crumb-bar b { color: #1f2733; font-weight: 600; }
.crumb-back { background: #fff; border: 1px solid #dde3ec; border-radius: 16px; padding: 5px 16px; color: #1256c4 !important; margin-right: 8px; }
.crumb-back:hover { border-color: #1256c4; }

/* 顶栏 Logo 兜底：品牌名再长也不挤导航 */
.logo { max-width: 320px; overflow: hidden; }
.logo small { white-space: nowrap; }

/* 顶栏宽度重平衡：搜索收窄、间隙收紧、导航链接不换行 */
.topbar-inner { gap: 16px; }
.search-box { max-width: 300px; }
.nav-links a { white-space: nowrap; }

/* 顶栏右侧：购物车按钮 + 用户下拉菜单 */
.cart-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; background: #eaf1fd; color: #1256c4; border-radius: 20px; padding: 7px 16px; font-size: 14px; }
.cart-btn:hover { background: #d8e6fb; }
.cart-ico { font-size: 15px; }
.cart-btn .cart-badge { position: static; margin-left: 2px; }
.user-menu { position: relative; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #dde3ec; border-radius: 22px; padding: 4px 12px 4px 4px; font-size: 14px; color: #1f2733; }
.user-chip:hover { border-color: #1256c4; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #1256c4, #2f7de1); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.uname { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caret { color: #7a8699; font-size: 12px; }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid #e8edf5; border-radius: 12px; box-shadow: 0 10px 30px rgba(16,27,45,.14); min-width: 150px; padding: 6px; z-index: 200; }
.dropdown a { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px; font-size: 14px; color: #1f2733; white-space: nowrap; }
.dropdown a:hover { background: #f2f6fd; color: #1256c4; }
.dropdown a.danger { color: #e5484d; }
.dropdown a.danger:hover { background: #fef0f0; color: #e5484d; }
