/* =========================================================
   甄团 · 团购精选平台  —  共享设计系统
   配色 / 组件 / 布局 / 响应式
   ========================================================= */

:root {
  --brand: #FF4D2E;
  --brand-2: #FF8A3D;
  --brand-deep: #E63A1E;
  --accent: #FF2D6F;
  --ink: #1F1D2B;
  --ink-2: #6B6B7B;
  --ink-3: #9A9AA8;
  --line: #EDEDF2;
  --bg: #F6F7FB;
  --card: #FFFFFF;
  --gold: #FFC53D;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 30px rgba(31, 29, 43, .08);
  --shadow-sm: 0 4px 16px rgba(31, 29, 43, .06);
  --shadow-hover: 0 14px 40px rgba(255, 77, 46, .18);
  --maxw: 1200px;
  /* 场景主题色，子页面可覆盖 */
  --scene: #FF4D2E;
  --scene-2: #FF8A3D;
  --scene-soft: #FFF1EC;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* 通用按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 999px;
  transition: transform .15s ease, box-shadow .2s ease, opacity .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 20px rgba(255, 77, 46, .28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(255, 77, 46, .38); }
.btn-ghost {
  color: var(--brand-deep);
  background: #fff;
  border: 1.5px solid rgba(255, 77, 46, .35);
}
.btn-ghost:hover { background: var(--scene-soft); }
.btn-block { width: 100%; }

/* ============ 顶栏 ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 68px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: 1px;
}
.logo .mark {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  display: grid; place-items: center;
  font-size: 22px;
  box-shadow: 0 6px 16px rgba(255, 77, 46, .35);
}
.logo .name { background: linear-gradient(135deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.search {
  flex: 1;
  max-width: 540px;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 4px 4px 4px 18px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(255, 77, 46, .12); }
.search input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 15px; color: var(--ink);
}
.search .btn { padding: 9px 20px; }

.nav { display: flex; gap: 4px; }
.nav a {
  padding: 8px 14px; border-radius: 10px; font-size: 15px; color: var(--ink-2); font-weight: 500;
  transition: color .15s ease, background .15s ease;
}
.nav a:hover, .nav a.active { color: var(--brand-deep); background: var(--scene-soft); }

.actions { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  position: relative;
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center; font-size: 20px;
  background: #fff; border: 1px solid var(--line); cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.icon-btn:hover { background: var(--scene-soft); transform: translateY(-1px); }
.icon-btn .badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--brand); color: #fff; font-size: 11px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 999px; display: grid; place-items: center; padding: 0 4px;
}
.menu-toggle { display: none; }

/* ============ 区块标题 ============ */
.section { padding: 46px 0; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px;
}
.section-head .title { display: flex; align-items: center; gap: 12px; }
.section-head h2 { font-size: 26px; margin: 0; font-weight: 800; letter-spacing: .5px; }
.section-head .bar { width: 6px; height: 26px; border-radius: 6px; background: linear-gradient(180deg, var(--brand), var(--brand-2)); }
.section-head .sub { color: var(--ink-3); font-size: 14px; margin-left: 4px; }
.section-head .more { color: var(--ink-2); font-size: 14px; display: flex; align-items: center; gap: 4px; }
.section-head .more:hover { color: var(--brand-deep); }

/* ============ Hero ============ */
.hero {
  margin-top: 22px;
  border-radius: 24px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(255,255,255,.25), transparent 55%),
    linear-gradient(120deg, var(--brand-deep), var(--brand) 45%, var(--brand-2));
  color: #fff;
  padding: 54px 48px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -60px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.22), transparent 70%);
}
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.18); padding: 6px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; margin-bottom: 18px;
}
.hero h1 { font-size: 44px; line-height: 1.2; margin: 0 0 14px; font-weight: 800; letter-spacing: 1px; }
.hero h1 .hl { color: #FFE08A; }
.hero p { font-size: 17px; opacity: .92; margin: 0 0 26px; max-width: 520px; }
.hero .cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .cta .btn-light { background: #fff; color: var(--brand-deep); }
.hero .cta .btn-light:hover { transform: translateY(-2px); }
.hero .cta .btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.6); }
.hero .cta .btn-outline:hover { background: rgba(255,255,255,.14); }
.hero .stats { display: flex; gap: 30px; margin-top: 34px; }
.hero .stats .s b { font-size: 26px; font-weight: 800; display: block; }
.hero .stats .s span { font-size: 13px; opacity: .85; }

/* ============ 品类快捷入口 ============ */
.cat-entry {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 22px;
}
.cat-card {
  background: var(--card); border-radius: var(--radius); padding: 22px 16px; text-align: center;
  box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease; border: 1px solid var(--line);
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.cat-card .ic {
  width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 12px; display: grid; place-items: center;
  font-size: 30px; background: var(--scene-soft);
}
.cat-card .name { font-weight: 700; font-size: 16px; }
.cat-card .desc { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* ============ 限时秒杀 ============ */
.flash {
  background: linear-gradient(120deg, #2B1830, #3A1E2E);
  border-radius: 24px; padding: 26px 28px; color: #fff;
  margin-top: 8px;
}
.flash-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.flash-head .l { display: flex; align-items: center; gap: 12px; }
.flash-head .l h3 { margin: 0; font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.flash-head .l .tag { background: var(--gold); color: #5a3b00; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.flash-head .timer { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.flash-head .timer .t {
  background: #fff; color: #2B1830; font-weight: 800; font-size: 16px;
  min-width: 34px; padding: 5px 8px; border-radius: 8px; text-align: center;
}
.flash-head .timer .colon { font-weight: 800; }
.flash-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.flash-item {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 14px;
  transition: transform .2s ease, background .2s ease;
}
.flash-item:hover { transform: translateY(-4px); background: rgba(255,255,255,.12); }
.flash-item .thumb { border-radius: 12px; height: 120px; display: grid; place-items: center; font-size: 46px; margin-bottom: 10px; }
.flash-item .nm { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flash-item .pr { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; }
.flash-item .pr .now { color: #FFD36B; font-size: 20px; font-weight: 800; }
.flash-item .pr .old { color: rgba(255,255,255,.5); font-size: 13px; text-decoration: line-through; }

/* ============ 商品网格 / 卡片 ============ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.product-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid var(--line);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.product-card .thumb {
  position: relative; height: 188px; display: grid; place-items: center; font-size: 70px;
}
.product-card .thumb .ribbon {
  position: absolute; top: 12px; left: 12px;
  background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff;
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
}
.product-card .thumb .fav {
  position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,.9); display: grid; place-items: center; cursor: pointer; font-size: 15px;
  border: none;
}
.product-card .body { padding: 14px 14px 16px; display: flex; flex-direction: column; flex: 1; }
.product-card .ttl { font-size: 15px; font-weight: 600; line-height: 1.4; height: 42px; overflow: hidden; }
.product-card .tags { display: flex; gap: 6px; margin: 8px 0; flex-wrap: wrap; }
.product-card .tag {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px;
  background: var(--scene-soft); color: var(--brand-deep);
}
.product-card .tag.gold { background: #FFF6DD; color: #B57900; }
.product-card .price-row { display: flex; align-items: baseline; gap: 10px; margin-top: auto; }
.product-card .price { color: var(--brand-deep); font-weight: 800; font-size: 22px; }
.product-card .price small { font-size: 13px; font-weight: 700; }
.product-card .old { color: var(--ink-3); font-size: 13px; text-decoration: line-through; }
.product-card .meta { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.product-card .sold { font-size: 12px; color: var(--ink-2); }
.product-card .progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.product-card .progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 999px; }

/* 缩略图渐变背景 */
.g1 { background: linear-gradient(135deg,#FFE0EC,#FFC2D6); }
.g2 { background: linear-gradient(135deg,#FFE9D6,#FFD0A8); }
.g3 { background: linear-gradient(135deg,#DCEBFF,#B9D6FF); }
.g4 { background: linear-gradient(135deg,#DFF5E1,#BDECC4); }
.g5 { background: linear-gradient(135deg,#EDE0FF,#D6BFFF); }
.g6 { background: linear-gradient(135deg,#D6F5F2,#AEEBE6); }
.g7 { background: linear-gradient(135deg,#FFE0E6,#FFB3C1); }
.g8 { background: linear-gradient(135deg,#FFF1CC,#FFE08A); }

/* ============ 场景馆网格 ============ */
.scene-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.scene-card {
  position: relative; border-radius: 20px; overflow: hidden; color: #fff; min-height: 180px;
  padding: 24px; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
}
.scene-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.scene-card .emoji { font-size: 52px; }
.scene-card h3 { margin: 10px 0 4px; font-size: 22px; font-weight: 800; }
.scene-card p { margin: 0; font-size: 13px; opacity: .9; }
.scene-card .go {
  align-self: flex-start; margin-top: 14px; background: rgba(255,255,255,.95); color: #2B1830;
  font-size: 13px; font-weight: 700; padding: 7px 16px; border-radius: 999px;
}
.scene-beauty { background: linear-gradient(135deg,#FF6FA5,#FF3D7F); }
.scene-appliance { background: linear-gradient(135deg,#3DA5FF,#2D6BFF); }
.scene-specialty { background: linear-gradient(135deg,#43C98B,#1FA86A); }
.scene-clothing { background: linear-gradient(135deg,#9B6BFF,#6A3DFF); }
.scene-home { background: linear-gradient(135deg,#1FCBB8,#0E9C9C); }

/* ============ 服务保障 ============ */
.benefits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.benefit {
  background: var(--card); border-radius: var(--radius); padding: 22px; text-align: center;
  box-shadow: var(--shadow-sm); border: 1px solid var(--line);
}
.benefit .ic { font-size: 34px; }
.benefit .t { font-weight: 700; margin-top: 8px; }
.benefit .d { font-size: 13px; color: var(--ink-3); margin-top: 2px; }

/* ============ 子页面：面包屑 / 场景导航 ============ */
.breadcrumb { padding: 18px 0 0; font-size: 13px; color: var(--ink-3); }
.breadcrumb a:hover { color: var(--brand-deep); }
.breadcrumb .sep { margin: 0 8px; }

.scene-hero {
  margin-top: 16px; border-radius: 22px; padding: 40px 42px; color: #fff;
  background: linear-gradient(120deg, var(--scene), var(--scene-2));
  position: relative; overflow: hidden; box-shadow: var(--shadow);
}
.scene-hero::after {
  content: ""; position: absolute; right: -40px; bottom: -60px;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.2), transparent 70%);
}
.scene-hero .emoji { font-size: 56px; }
.scene-hero h1 { margin: 10px 0 6px; font-size: 34px; font-weight: 800; letter-spacing: 1px; }
.scene-hero p { margin: 0; font-size: 15px; opacity: .92; max-width: 560px; }
.scene-hero .pills { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.scene-hero .pill { background: rgba(255,255,255,.18); padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; }

.scene-nav {
  display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap;
}
.scene-nav a {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 16px; font-size: 14px; font-weight: 600; color: var(--ink-2);
  transition: all .15s ease;
}
.scene-nav a:hover { border-color: var(--brand); color: var(--brand-deep); }
.scene-nav a.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent; }

/* 筛选栏 */
.filter-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 16px; margin-top: 22px; flex-wrap: wrap;
  position: sticky; top: 80px; z-index: 20;
}
.filter-bar .sort { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-bar .sort button {
  border: none; background: transparent; cursor: pointer; font-size: 14px; font-weight: 600;
  color: var(--ink-2); padding: 8px 14px; border-radius: 999px; transition: all .15s ease;
}
.filter-bar .sort button:hover { color: var(--brand-deep); }
.filter-bar .sort button.active { background: var(--scene-soft); color: var(--brand-deep); }
.filter-bar .right { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-3); }

.subcats { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.subcats button {
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  font-size: 13px; color: var(--ink-2); padding: 7px 14px; border-radius: 999px; transition: all .15s ease;
}
.subcats button:hover, .subcats button.active { border-color: var(--brand); color: var(--brand-deep); background: var(--scene-soft); }

/* ============ 页脚 ============ */
.site-footer { background: #1F1D2B; color: #C9C9D6; margin-top: 56px; padding: 46px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 28px; }
.footer-grid .brand .logo { color: #fff; margin-bottom: 14px; }
.footer-grid .brand p { font-size: 13px; color: #9A9AA8; max-width: 260px; }
.footer-col h4 { color: #fff; font-size: 15px; margin: 0 0 14px; }
.footer-col a { display: block; font-size: 13px; color: #9A9AA8; padding: 5px 0; transition: color .15s ease; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); margin-top: 34px; padding-top: 20px;
  display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: #7A7A8C; flex-wrap: wrap; gap: 10px;
}
.footer-bottom .links { display: flex; gap: 16px; }

/* ============ Toast ============ */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px);
  background: #1F1D2B; color: #fff; padding: 12px 22px; border-radius: 999px; font-size: 14px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,.3); opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 999;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .flash-grid { grid-template-columns: repeat(3, 1fr); }
  .cat-entry { grid-template-columns: repeat(3, 1fr); }
  .scene-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-grid .brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .nav, .actions .text-link { display: none; }
  .menu-toggle { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 20px; }
  .header-inner { gap: 12px; }
  .hero { padding: 36px 24px; }
  .hero h1 { font-size: 32px; }
  .hero .stats { flex-wrap: wrap; gap: 18px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .flash-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-entry { grid-template-columns: repeat(2, 1fr); }
  .scene-grid { grid-template-columns: 1fr; }
  .benefits { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section-head h2 { font-size: 22px; }
  .filter-bar { position: static; }
}
@media (max-width: 460px) {
  .product-grid { grid-template-columns: 1fr; }
  .cat-entry { grid-template-columns: repeat(2, 1fr); }
}
