/* ========== 利川市博勤传媒有限公司 商城样式 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --red: #e1251b;
  --red-dark: #c8161d;
  --orange: #ff6f06;
  --ink: #1a1a1a;
  --gray: #666;
  --gray-light: #999;
  --line: #e8e8e8;
  --bg: #f4f5f7;
  --blue: #1a5cff;
}
html { font-size: 16px; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
.container { width: 1200px; max-width: 96%; margin: 0 auto; }

/* ---------- 顶部条 ---------- */
.topbar { background: #2b2b2b; color: #ccc; font-size: 13px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 36px; }
.topbar a:hover { color: #fff; }
.topbar .tb-links a { margin-left: 18px; }

/* ---------- 头部 ---------- */
.site-header { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.06); position: sticky; top: 0; z-index: 100; }
.header-main { display: flex; align-items: center; gap: 30px; padding: 16px 0; }
.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo-mark {
  width: 48px; height: 48px; border-radius: 10px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  color: #fff; font-size: 22px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(225,37,27,.3);
}
.logo-text b { font-size: 20px; letter-spacing: 1px; display: block; line-height: 1.2; }
.logo-text span { font-size: 12px; color: var(--gray-light); letter-spacing: 2px; }
.search-box { flex: 1; display: flex; max-width: 520px; }
.search-box input {
  flex: 1; height: 42px; border: 2px solid var(--red); border-right: none;
  border-radius: 21px 0 0 21px; padding: 0 18px; font-size: 14px; outline: none;
}
.search-box button {
  width: 100px; height: 42px; border: none; border-radius: 0 21px 21px 0;
  background: linear-gradient(90deg, var(--red), var(--orange));
  color: #fff; font-size: 15px; font-weight: 600;
}
.header-cart {
  flex-shrink: 0; display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 21px; padding: 9px 18px;
  font-size: 14px; position: relative; transition: all .2s;
}
.header-cart:hover { border-color: var(--red); color: var(--red); }
.cart-badge {
  position: absolute; top: -8px; right: -6px; min-width: 20px; height: 20px;
  background: var(--red); color: #fff; border-radius: 10px;
  font-size: 12px; display: flex; align-items: center; justify-content: center; padding: 0 5px;
}

/* ---------- 导航 ---------- */
.main-nav { border-top: 1px solid var(--line); }
.main-nav .container { display: flex; }
.main-nav a {
  padding: 13px 26px; font-size: 15px; font-weight: 500; position: relative;
}
.main-nav a:hover { color: var(--red); }
.main-nav a.active { color: var(--red); font-weight: 700; }
.main-nav a.active::after {
  content: ""; position: absolute; left: 26px; right: 26px; bottom: 0;
  height: 3px; border-radius: 2px; background: var(--red);
}

/* ---------- 首页横幅 ---------- */
.hero { margin: 20px 0; }
.hero-inner {
  border-radius: 14px; overflow: hidden; position: relative; height: 380px;
}
.hero-inner img { width: 100%; height: 100%; object-fit: cover; }
.hero-mask {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.62) 0%, rgba(0,0,0,.15) 60%, transparent);
  display: flex; flex-direction: column; justify-content: center; padding-left: 60px; color: #fff;
}
.hero-mask h1 { font-size: 40px; letter-spacing: 2px; margin-bottom: 12px; }
.hero-mask p { font-size: 17px; opacity: .9; margin-bottom: 26px; max-width: 520px; }
.hero-btns { display: flex; gap: 14px; }
.btn {
  display: inline-block; padding: 12px 34px; border-radius: 24px; font-size: 15px;
  font-weight: 600; border: none; transition: all .2s; text-align: center;
}
.btn-primary { background: linear-gradient(90deg, var(--red), var(--orange)); color: #fff; box-shadow: 0 6px 16px rgba(225,37,27,.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(225,37,27,.45); }
.btn-ghost { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.6); backdrop-filter: blur(4px); }
.btn-ghost:hover { background: rgba(255,255,255,.28); }

/* ---------- 分类入口 ---------- */
.cat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 26px 0; }
.cat-card {
  background: #fff; border-radius: 12px; padding: 26px 22px; display: flex;
  align-items: center; gap: 16px; transition: all .25s; border: 1px solid transparent;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0,0,0,.08); border-color: #ffd9d6; }
.cat-icon {
  width: 56px; height: 56px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.cat-icon svg { width: 30px; height: 30px; }
.cat-card h3 { font-size: 17px; margin-bottom: 4px; }
.cat-card p { font-size: 13px; color: var(--gray-light); }

/* ---------- 楼层标题 ---------- */
.floor-title { display: flex; align-items: baseline; gap: 14px; margin: 34px 0 18px; }
.floor-title h2 { font-size: 24px; }
.floor-title span { color: var(--gray-light); font-size: 14px; }
.floor-title .more { margin-left: auto; font-size: 14px; color: var(--gray); }
.floor-title .more:hover { color: var(--red); }

/* ---------- 商品卡片 ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 30px; }
.product-card {
  background: #fff; border-radius: 12px; overflow: hidden; transition: all .25s;
  border: 1px solid transparent; display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 12px 26px rgba(0,0,0,.1); }
.product-card .p-img { aspect-ratio: 1/1; overflow: hidden; background: #eee; }
.product-card .p-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.product-card:hover .p-img img { transform: scale(1.06); }
.p-info { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.p-name { font-size: 15px; font-weight: 600; line-height: 1.4; height: 42px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.p-desc { font-size: 12px; color: var(--gray-light); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-bottom { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; }
.price { color: var(--red); font-weight: 800; font-size: 20px; }
.price::first-letter { font-size: 13px; }
.price s { color: var(--gray-light); font-size: 12px; font-weight: 400; margin-left: 6px; }
.p-sales { font-size: 12px; color: var(--gray-light); }
.add-cart-btn {
  border: none; background: linear-gradient(90deg, var(--red), var(--orange)); color: #fff;
  border-radius: 16px; padding: 7px 16px; font-size: 13px; font-weight: 600; transition: all .2s;
}
.add-cart-btn:hover { opacity: .88; }

/* ---------- 列表页 ---------- */
.page-head { background: #fff; border-radius: 12px; padding: 18px 22px; margin: 20px 0; }
.crumb { font-size: 13px; color: var(--gray-light); margin-bottom: 14px; }
.crumb a:hover { color: var(--red); }
.filter-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 0; }
.filter-row .label { color: var(--gray); font-size: 14px; margin-right: 6px; }
.filter-tag {
  padding: 6px 16px; border-radius: 16px; font-size: 13px; background: #f4f5f7;
  border: 1px solid transparent; transition: all .15s;
}
.filter-tag:hover { color: var(--red); }
.filter-tag.on { background: #fff0ef; color: var(--red); border-color: var(--red); font-weight: 600; }
.list-meta { margin: 4px 0 16px; color: var(--gray-light); font-size: 13px; }
.empty-box { background: #fff; border-radius: 12px; padding: 80px 0; text-align: center; color: var(--gray-light); }
.empty-box p { margin: 14px 0 20px; font-size: 15px; }

/* ---------- 详情页 ---------- */
.detail-wrap { background: #fff; border-radius: 12px; padding: 30px; margin: 20px 0; display: grid; grid-template-columns: 460px 1fr; gap: 40px; }
.detail-img { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 1/1; }
.detail-img img { width: 100%; height: 100%; object-fit: cover; }
.d-info h1 { font-size: 24px; line-height: 1.4; margin-bottom: 8px; }
.d-sub { color: var(--gray-light); font-size: 14px; margin-bottom: 18px; }
.d-price-box { background: #fff5f4; border-radius: 10px; padding: 18px 22px; margin-bottom: 18px; }
.d-price-box .price { font-size: 32px; }
.d-meta { display: flex; gap: 30px; font-size: 13px; color: var(--gray); margin-bottom: 20px; }
.d-meta b { color: var(--ink); }
.d-attrs { margin-bottom: 22px; }
.d-attrs li { list-style: none; font-size: 14px; color: var(--gray); padding: 4px 0 4px 18px; position: relative; }
.d-attrs li::before { content: ""; position: absolute; left: 0; top: 12px; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.qty-row { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.qty-ctrl { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.qty-ctrl button { width: 38px; height: 40px; border: none; background: #f7f7f7; font-size: 18px; }
.qty-ctrl button:hover { background: #eee; }
.qty-ctrl input { width: 60px; height: 40px; border: none; text-align: center; font-size: 15px; outline: none; }
.d-btns { display: flex; gap: 14px; }
.d-btns .btn { padding: 14px 40px; font-size: 16px; border-radius: 10px; }
.btn-cart { background: #fff; color: var(--red); border: 2px solid var(--red); }
.btn-cart:hover { background: #fff0ef; }
.detail-section { background: #fff; border-radius: 12px; padding: 30px; margin-bottom: 24px; }
.detail-section h2 { font-size: 19px; padding-left: 12px; border-left: 4px solid var(--red); margin-bottom: 18px; }
.detail-section p { color: var(--gray); font-size: 14px; margin-bottom: 10px; }
.detail-section img { border-radius: 10px; margin-top: 14px; }

/* ---------- 购物车 ---------- */
.cart-table { background: #fff; border-radius: 12px; padding: 10px 24px 24px; margin: 20px 0; }
.cart-row { display: grid; grid-template-columns: 100px 1fr 140px 150px 100px 80px; align-items: center; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cart-row.head { color: var(--gray-light); font-size: 13px; padding: 12px 0; }
.cart-row img { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.cart-name { font-size: 15px; font-weight: 600; }
.cart-name:hover { color: var(--red); }
.cart-cat { font-size: 12px; color: var(--gray-light); margin-top: 4px; }
.cart-row .qty-ctrl { transform: scale(.88); transform-origin: left; }
.row-total { color: var(--red); font-weight: 700; font-size: 16px; }
.link-del { color: var(--gray-light); font-size: 13px; }
.link-del:hover { color: var(--red); }
.cart-bar {
  background: #fff; border-radius: 12px; padding: 18px 24px; margin-bottom: 30px;
  display: flex; align-items: center; gap: 20px; position: sticky; bottom: 14px;
  box-shadow: 0 -4px 20px rgba(0,0,0,.06);
}
.cart-bar .sum { margin-left: auto; font-size: 14px; color: var(--gray); }
.cart-bar .sum b { color: var(--red); font-size: 26px; font-weight: 800; margin: 0 4px; }

/* ---------- 结算页 ---------- */
.checkout-grid { display: grid; grid-template-columns: 1fr 380px; gap: 20px; margin: 20px 0 30px; align-items: start; }
.panel { background: #fff; border-radius: 12px; padding: 26px; }
.panel h3 { font-size: 17px; margin-bottom: 18px; padding-left: 11px; border-left: 4px solid var(--red); }
.form-item { margin-bottom: 16px; }
.form-item label { display: block; font-size: 14px; color: var(--gray); margin-bottom: 6px; }
.form-item label i { color: var(--red); font-style: normal; }
.form-item input, .form-item textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 11px 14px;
  font-size: 14px; outline: none; font-family: inherit; transition: border .15s;
}
.form-item input:focus, .form-item textarea:focus { border-color: var(--red); }
.form-item textarea { resize: vertical; min-height: 70px; }
.form-err { color: var(--red); font-size: 13px; margin-top: 6px; display: none; }
.pay-methods { display: grid; gap: 12px; }
.pay-method {
  display: flex; align-items: center; gap: 14px; border: 2px solid var(--line);
  border-radius: 10px; padding: 14px 18px; cursor: pointer; transition: all .15s;
}
.pay-method:hover { border-color: #ffb3ae; }
.pay-method.on { border-color: var(--red); background: #fffafa; }
.pm-icon { width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pm-icon svg { width: 24px; height: 24px; }
.pay-method b { font-size: 15px; display: block; }
.pay-method span { font-size: 12px; color: var(--gray-light); }
.mini-items { max-height: 300px; overflow: auto; margin-bottom: 14px; }
.mini-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.mini-item img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; }
.mini-item .mi-name { font-size: 13px; font-weight: 600; line-height: 1.35; }
.mini-item .mi-sub { font-size: 12px; color: var(--gray-light); margin-top: 3px; }
.mini-item .mi-price { margin-left: auto; font-size: 13px; color: var(--red); font-weight: 700; white-space: nowrap; }
.sum-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--gray); padding: 7px 0; }
.sum-row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-size: 15px; color: var(--ink); }
.sum-row.total b { color: var(--red); font-size: 26px; font-weight: 800; }
.btn-block { width: 100%; margin-top: 18px; padding: 15px; font-size: 17px; border-radius: 10px; }

/* ---------- 收银台 ---------- */
.pay-wrap { max-width: 760px; margin: 30px auto 40px; }
.pay-card { background: #fff; border-radius: 14px; padding: 36px; text-align: center; }
.pay-card .amount { font-size: 15px; color: var(--gray); margin: 6px 0 22px; }
.pay-card .amount b { color: var(--red); font-size: 38px; font-weight: 800; }
.qr-box {
  width: 240px; height: 240px; margin: 0 auto; border: 1px solid var(--line);
  border-radius: 12px; padding: 12px; position: relative; background: #fff;
}
.qr-box canvas { width: 100%; height: 100%; image-rendering: pixelated; }
.qr-tip { margin-top: 16px; font-size: 14px; color: var(--gray); }
.qr-tip b { font-weight: 600; }
.countdown { color: var(--orange); font-weight: 700; }
.pay-actions { display: flex; gap: 14px; justify-content: center; margin-top: 26px; }
.pay-actions .btn { padding: 12px 34px; border-radius: 10px; }
.btn-plain { background: #f4f5f7; color: var(--gray); }
.btn-plain:hover { background: #e9eaec; }
.pay-status-ok { padding: 20px 0 6px; }
.ok-icon {
  width: 78px; height: 78px; border-radius: 50%; margin: 0 auto 18px;
  background: linear-gradient(135deg, #22c55e, #4ade80); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.bank-info { text-align: left; background: #f8f9fb; border-radius: 10px; padding: 20px 24px; margin-top: 8px; }
.bank-info p { font-size: 14px; color: var(--gray); padding: 5px 0; }
.bank-info b { color: var(--ink); }

/* ---------- 订单页 ---------- */
.order-card { background: #fff; border-radius: 12px; margin-bottom: 18px; overflow: hidden; }
.order-head { display: flex; align-items: center; gap: 20px; background: #fafafa; padding: 12px 22px; font-size: 13px; color: var(--gray); border-bottom: 1px solid var(--line); }
.order-head .oid { font-weight: 700; color: var(--ink); }
.order-status { margin-left: auto; font-weight: 700; font-size: 14px; }
.st-pending { color: var(--orange); }
.st-paid { color: #16a34a; }
.order-body { padding: 6px 22px; }
.order-foot { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-top: 1px solid var(--line); }
.order-foot .o-total { font-size: 14px; color: var(--gray); }
.order-foot .o-total b { color: var(--red); font-size: 20px; }
.order-foot .ops { margin-left: auto; display: flex; gap: 10px; }
.btn-sm { padding: 8px 20px; border-radius: 8px; font-size: 13px; border: none; font-weight: 600; }
.btn-sm.primary { background: linear-gradient(90deg, var(--red), var(--orange)); color: #fff; }
.btn-sm.plain { background: #f4f5f7; color: var(--gray); }

/* ---------- 关于我们 ---------- */
.about-hero { border-radius: 14px; overflow: hidden; height: 300px; position: relative; margin: 20px 0; }
.about-hero img { width: 100%; height: 100%; object-fit: cover; }
.about-hero .mask { position: absolute; inset: 0; background: rgba(0,0,0,.45); display: flex; flex-direction: column; justify-content: center; align-items: center; color: #fff; }
.about-hero h1 { font-size: 34px; letter-spacing: 3px; }
.about-hero p { margin-top: 8px; opacity: .9; letter-spacing: 1px; }
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 24px; }
.info-card { background: #fff; border-radius: 12px; padding: 26px; }
.info-card h3 { font-size: 17px; margin-bottom: 14px; padding-left: 11px; border-left: 4px solid var(--red); }
.info-card p { font-size: 14px; color: var(--gray); padding: 6px 0; }
.info-card p b { color: var(--ink); font-weight: 600; }
.scope-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.scope-tag { background: #fff0ef; color: var(--red); border-radius: 16px; padding: 6px 16px; font-size: 13px; font-weight: 600; }

/* ---------- 页脚 ---------- */
.site-footer { background: #23262b; color: #9aa0a8; margin-top: 50px; }
.footer-main { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 30px; padding: 44px 0 30px; }
.footer-main h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.footer-main p, .footer-main a { font-size: 13px; line-height: 2; display: block; }
.footer-main a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: #fff; font-size: 18px; font-weight: 700; }
.footer-bottom { border-top: 1px solid #363a40; padding: 18px 0; text-align: center; font-size: 13px; }
.footer-bottom a { display: inline; }
.footer-bottom a:hover { color: #fff; }
.footer-bottom span { margin: 0 8px; }

/* ---------- 提示条 ---------- */
.toast {
  position: fixed; top: 90px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.78); color: #fff; padding: 12px 28px; border-radius: 24px;
  font-size: 14px; z-index: 9999; opacity: 0; transition: opacity .25s; pointer-events: none;
}
.toast.show { opacity: 1; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .header-main { flex-wrap: wrap; gap: 12px; }
  .search-box { order: 3; max-width: 100%; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-cards { grid-template-columns: repeat(2, 1fr); }
  .detail-wrap { grid-template-columns: 1fr; }
  .checkout-grid { grid-template-columns: 1fr; }
  .cart-row { grid-template-columns: 80px 1fr 110px; grid-auto-rows: auto; }
  .cart-row.head { display: none; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .hero-mask h1 { font-size: 26px; }
  .hero-inner { height: 260px; }
}
