/* ==========================================================================
   hawkgu 商城 · 视觉升级版
   蓝金配色（鹰）· 圆角卡片 · 轻盈阴影
   ========================================================================== */
:root {
  --primary: #2f6bff;
  --primary-2: #1f4fd8;
  --primary-soft: #eaf1ff;
  --ink: #14213d;
  --text: #26304a;
  --muted: #7b879d;
  --border: #e6eaf2;
  --border-2: #d8e0ee;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --gold: #f5b301;
  --red: #e0432d;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(20, 33, 61, .04), 0 4px 14px rgba(20, 33, 61, .05);
  --shadow-md: 0 10px 30px rgba(20, 33, 61, .10);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 320px at 50% -120px, rgba(47, 107, 255, .10), transparent 70%),
    var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select { font-family: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }

/* ===== 顶栏 ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }

.brand { display: flex; align-items: center; gap: 10px; }
.logo-img {
  width: 38px; height: 38px; border-radius: 10px;
  box-shadow: 0 4px 12px rgba(47, 107, 255, .28);
}
.brand-text {
  display: flex; flex-direction: column; line-height: 1.1;
  font-size: 19px; font-weight: 800; color: var(--ink); letter-spacing: .2px;
}
.brand-text small {
  font-size: 10px; font-weight: 500; color: var(--muted);
  letter-spacing: 3px; margin-top: 3px;
}

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav > a, .tools-trigger {
  position: relative;
  font-size: 15px; color: var(--text); background: none; border: none;
  cursor: pointer; padding: 8px 0; transition: color .15s;
}
.site-nav > a:hover, .tools-trigger:hover { color: var(--primary); }
.site-nav > a.active { color: var(--primary); font-weight: 600; }
.site-nav > a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; border-radius: 2px; background: var(--primary);
}

.tools-menu { position: relative; }
.tools-trigger i { font-style: normal; font-size: 11px; color: var(--muted); }
.tools-list {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  min-width: 200px; background: #fff; border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-md);
  padding: 6px; display: none; z-index: 60;
}
.tools-menu:hover .tools-list { display: block; }
.tools-list a {
  display: block; padding: 9px 12px; font-size: 14px; color: var(--text);
  border-radius: 8px;
}
.tools-list a:hover { background: var(--primary-soft); color: var(--primary); }

/* ===== 店铺公告 ===== */
.notice-card {
  position: relative;
  margin-top: 22px; padding: 20px 24px 20px 27px;
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.notice-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--primary), #7a5cff);
}
.notice-card h3 {
  display: flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 10px;
}
.notice-card h3::before {
  content: "📢"; font-size: 15px;
}
.rich-output p { margin: 7px 0; font-size: 15px; line-height: 2; color: #2b3650; }
.rich-output strong { font-weight: 700; color: var(--ink); }
.rich-output a { color: var(--primary); }

/* ===== 分类胶囊 ===== */
.catalog-layout { margin: 26px 0 46px; }
.horizontal-category-panel {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.category-pills { display: flex; gap: 10px; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; }
.category-pill {
  padding: 7px 15px; font-size: 14px; color: #4a5674;
  background: #fff; border: 1px solid var(--border-2); border-radius: 999px;
  cursor: pointer; white-space: nowrap; transition: .16s; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis;
}
.category-pill:hover { border-color: var(--primary); color: var(--primary); }
.category-pill.active {
  border-color: transparent; color: #fff; font-weight: 600;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 4px 12px rgba(47, 107, 255, .30);
}
.catalog-search { margin-left: auto; }
.catalog-search input {
  width: 210px; padding: 8px 14px; font-size: 14px; color: var(--text);
  border: 1px solid var(--border-2); border-radius: 999px; outline: none;
  background: #fff; transition: .15s;
}
.catalog-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

/* ===== 分类卡片 + 表格 ===== */
.category-card {
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px; overflow: hidden;
}
.category-title {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 18px;
  background: linear-gradient(180deg, #f8faff, #ffffff);
  border-bottom: 1px solid var(--border);
}
.category-title h2 {
  position: relative;
  font-size: 16px; font-weight: 700; color: var(--ink); line-height: 1.45;
  padding-left: 12px;
}
.category-title h2::before {
  content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 3px;
  border-radius: 3px; background: linear-gradient(180deg, var(--primary), #7a5cff);
}
.category-title span {
  font-size: 12px; color: var(--primary); background: var(--primary-soft);
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}

.product-table { width: 100%; }
.product-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 110px 80px 76px;
  align-items: center; gap: 12px;
  padding: 12px 18px; border-bottom: 1px solid #f1f4f9;
  font-size: 14px; color: var(--text); transition: background .12s;
}
.product-row:nth-child(even) { background: #fbfcfe; }
.product-row:hover { background: #f4f8ff; }
.product-row:last-child { border-bottom: none; }
.product-row.table-head {
  font-size: 12px; color: var(--muted); background: #f3f6fb;
  border-bottom: 1px solid var(--border); letter-spacing: .4px;
}
.product-row.table-head:hover { background: #f3f6fb; }
.product-name { line-height: 1.65; color: #26304a; word-break: break-word; }
.product-row strong { font-weight: 700; color: var(--ink); white-space: nowrap; }
.product-row b { font-weight: 500; color: #5a6785; }

.buy-link {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px 14px; border-radius: 999px;
  border: 1px solid #cfe0ff; color: var(--primary);
  font-size: 13px; cursor: pointer; white-space: nowrap;
  transition: .15s; justify-self: center;
}
.buy-link:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.buy-link.sold-out, .product-row.sold-out .buy-link {
  border-color: var(--border); color: #a7b0c2; background: #f6f8fb;
  cursor: not-allowed;
}
.product-row.sold-out .product-name { color: #a7b0c2; }

.view-more {
  display: block; width: 100%; border: none; border-top: 1px solid var(--border);
  background: #f6f8fc; color: var(--primary); font-size: 13px; letter-spacing: 1px;
  padding: 11px; cursor: pointer; font-weight: 600;
}
.view-more:hover { background: #eef3ff; }

.empty-tip { padding: 70px 20px; text-align: center; color: var(--muted); font-size: 15px; }

/* ===== 页脚 ===== */
.site-footer {
  margin-top: 30px;
  background: linear-gradient(180deg, #12203a, #0b1526);
  color: #c7d2e6;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; padding: 34px 0 22px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand .logo-img { width: 40px; height: 40px; border-radius: 11px; }
.footer-brand span { display: flex; flex-direction: column; line-height: 1.2; }
.footer-brand b { font-size: 18px; color: #fff; letter-spacing: .3px; }
.footer-brand small { font-size: 11px; color: #8ea0bd; letter-spacing: 1px; margin-top: 3px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { font-size: 14px; color: #b6c3da; }
.footer-links a:hover { color: #fff; }
.footer-copy {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 14px 0 18px; font-size: 12px; color: #7f8fa9;
}

/* ===== 回到顶部 ===== */
.float-top {
  position: fixed; right: 22px; bottom: 88px; z-index: 60;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border); background: #fff; color: var(--primary);
  font-size: 18px; cursor: pointer; box-shadow: var(--shadow-md);
  display: none; place-items: center; transition: .15s;
}
.float-top.show { display: grid; }
.float-top:hover { background: var(--primary-soft); }

/* ===== 浮动客服 ===== */
.float-kf {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center; font-size: 22px;
  background: linear-gradient(135deg, #2f6bff, #1f4fd8);
  color: #fff; box-shadow: 0 10px 24px rgba(47, 107, 255, .40);
  transition: transform .15s;
}
.float-kf:hover { transform: translateY(-3px) scale(1.04); }

/* ===== 公告弹窗 ===== */
.dialog-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(11, 21, 38, .55); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 20px;
}
.dialog-box {
  width: min(620px, 94vw); background: #fff; border-radius: 16px;
  overflow: hidden; box-shadow: 0 24px 60px rgba(11, 21, 38, .35);
  display: flex; flex-direction: column; max-height: 88vh;
}
.dialog-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  font-size: 17px; font-weight: 700; color: var(--ink);
}
.dialog-close { border: none; background: none; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; }
.dialog-close:hover { color: var(--ink); }
.dialog-body { padding: 18px 22px; overflow-y: auto; }
.dialog-body p { font-size: 15px; line-height: 2; margin: 8px 0; color: #2b3650; }
.dialog-footer { padding: 14px 22px; border-top: 1px solid var(--border); text-align: right; }
.dialog-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff; border: none; border-radius: 999px;
  padding: 10px 30px; font-size: 14px; cursor: pointer;
  box-shadow: 0 6px 16px rgba(47, 107, 255, .30);
}
.dialog-btn:hover { filter: brightness(1.06); }

/* ===== 商品详情弹窗 ===== */
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(11, 21, 38, .55); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 20px;
}
.modal {
  background: #fff; border-radius: 16px; width: min(660px, 94vw);
  max-height: 88vh; overflow-y: auto; position: relative;
  box-shadow: 0 24px 60px rgba(11, 21, 38, .35);
}
.modal-close {
  position: absolute; top: 12px; right: 14px; z-index: 2;
  width: 32px; height: 32px; border: none; border-radius: 8px;
  background: #f1f4f9; font-size: 20px; color: var(--muted); cursor: pointer;
}
.modal-close:hover { color: var(--ink); }
.modal-body { padding: 26px; }
.detail-title { font-size: 19px; font-weight: 700; line-height: 1.5; margin-bottom: 8px; color: var(--ink); padding-right: 30px; }
.detail-cat { font-size: 12px; color: var(--primary); background: var(--primary-soft); padding: 2px 10px; border-radius: 999px; }
.detail-desc { color: #4a5674; font-size: 14px; line-height: 1.95; margin: 16px 0; white-space: pre-line; }
.detail-rows { border-top: 1px solid var(--border); padding-top: 14px; display: grid; gap: 10px; margin-bottom: 18px; }
.detail-row { display: flex; justify-content: space-between; font-size: 14px; }
.detail-row .k { color: var(--muted); }
.detail-row .v { font-weight: 600; }
.detail-price { color: var(--red); font-size: 22px; font-weight: 800; }
.buy-box { border-top: 1px solid var(--border); padding-top: 16px; }
.qty-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.qty-row label { font-size: 14px; color: var(--muted); }
.qty-ctrl { display: flex; align-items: center; border: 1px solid var(--border-2); border-radius: 10px; overflow: hidden; }
.qty-ctrl button { width: 34px; height: 34px; border: none; background: #f5f7fb; font-size: 16px; cursor: pointer; }
.qty-ctrl button:hover { background: var(--primary-soft); color: var(--primary); }
.qty-ctrl input {
  width: 50px; height: 34px; border: none; border-inline: 1px solid var(--border-2);
  text-align: center; font-size: 14px; outline: none;
}
.buy-total { font-size: 14px; color: var(--muted); }
.buy-total strong { color: var(--red); font-size: 18px; }
.buy-actions { display: flex; gap: 12px; }
.buy-btn {
  flex: 1; background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff; border: none; border-radius: 10px; padding: 12px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  box-shadow: 0 6px 16px rgba(47, 107, 255, .28);
}
.buy-btn:hover { filter: brightness(1.06); }
.buy-btn:disabled { background: var(--border-2); box-shadow: none; cursor: not-allowed; }

/* ===== 响应式 ===== */
@media (max-width: 860px) {
  .header-inner { height: auto; padding: 10px 0; flex-wrap: wrap; gap: 8px; }
  .site-nav { gap: 16px; flex-wrap: wrap; width: 100%; }
  .site-nav > a, .tools-trigger { font-size: 14px; }
  .catalog-search { width: 100%; margin-left: 0; }
  .catalog-search input { width: 100%; }
  .product-row { grid-template-columns: minmax(0, 1fr) 78px 56px 62px; gap: 8px; padding: 10px 12px; font-size: 13px; }
  .product-row.table-head { font-size: 11px; }
  .category-title h2 { font-size: 15px; }
  .rich-output p { font-size: 14px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
