/* ============================================================
   齐鲁农超 · 电商风设计系统（常规电商配色）
   品牌绿 + 红色价格 + 橙色购买按钮 + 白卡片 + 柔和阴影。
   保留全部页面原有 HTML 结构，仅通过样式调整视觉。
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap');

:root {
  /* —— 品牌主色：清新农业绿 —— */
  --primary:      #16a34a;
  --primary-deep: #15803d;
  --primary-2:    #22c55e;
  --primary-light:#e8f7ee;
  --green-deep:   #15803d;

  /* —— 电商强调色 —— */
  --price:    #e4393c;   /* 京东红：价格 / 促销 */
  --price-2:  #ff4d4f;
  --accent:   #ff6a00;   /* 橙色：购买 / 立即抢 */
  --accent-2: #ff8c1a;
  --gold:     #ffb400;   /* 标签金 */

  /* —— 背景与表面 —— */
  --bg:        #f5f5f5;
  --surface:   #ffffff;
  --surface-2: #fafafa;
  --border:    #ededed;
  --border-strong: #e2e2e2;

  /* —— 文字 —— */
  --text-main:  #222222;
  --text-light: #666666;
  --text-muted: #999999;

  /* —— 区块配色 —— */
  --topbar-bg:   #fafafa;
  --topbar-text: #888888;
  --nav-bg:      linear-gradient(90deg, #16a34a, #22c55e);
  --nav-text:    #ffffff;
  --brand-bg:    linear-gradient(135deg, #16a34a, #15803d);
  --footer-bg:   #2b2b2b;
  --footer-text: #bbbbbb;
  --footer-title:#ffffff;

  /* —— 阴影 / 圆角 —— */
  --shadow-sm: 0 1px 4px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

* { margin:0; padding:0; box-sizing:border-box; }
a { text-decoration:none; color:inherit; }
ul { list-style:none; }

.container { width:1280px; margin:0 auto; }

/* ======================== 顶部栏 ======================== */
.top-bar {
  background:var(--topbar-bg); height:36px; line-height:36px;
  font-size:12px; color:var(--topbar-text);
  border-bottom:1px solid var(--border);
}
.top-bar-inner { display:flex; justify-content:space-between; align-items:center; }
.top-bar-right { display:flex; gap:0; list-style:none; margin:0; padding:0; }
.top-bar-right li { padding:0 14px; cursor:pointer; transition:color .2s; position:relative; }
.top-bar-right li::after {
  content:''; position:absolute; right:0; top:50%; transform:translateY(-50%);
  width:1px; height:14px; background:var(--border-strong);
}
.top-bar-right li:last-child::after { display:none; }
.top-bar-right li:hover { color:var(--primary); }
.top-bar-right a { color:inherit; }
.top-bar-right a:hover { color:var(--primary); }

/* ======================== 导航头 ======================== */
.header {
  background:var(--surface);
  box-shadow:var(--shadow-sm);
  border-bottom:1px solid var(--border);
  position:sticky; top:0; z-index:100; transition:box-shadow .3s;
}
.header.scrolled { box-shadow:var(--shadow-md); }
.header-inner { display:flex; align-items:center; height:84px; gap:40px; }
.logo { flex-shrink:0; }
.logo img { height:52px; width:auto; }

.search-wrap { flex:1; max-width:620px; position:relative; }
.search-wrap::before {
  content:''; position:absolute; left:18px; top:50%; transform:translateY(-50%);
  width:18px; height:18px;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") center/contain no-repeat;
}
.search-input {
  width:100%; height:46px;
  border:2px solid var(--primary);
  border-radius:23px; padding:0 120px 0 48px; font-size:15px; outline:none;
  background:var(--surface); color:var(--text-main); transition:box-shadow .2s;
}
.search-input:focus { box-shadow:0 0 0 3px rgba(22,163,74,.15); }
.search-input::placeholder { color:var(--text-muted); }
.search-btn {
  position:absolute; right:4px; top:4px; bottom:4px; width:104px;
  background:linear-gradient(90deg, var(--primary), var(--primary-deep));
  color:#fff; border:none; border-radius:20px;
  font-size:15px; font-weight:700; cursor:pointer; transition:all .2s;
}
.search-btn:hover { background:linear-gradient(90deg, var(--primary-2), var(--primary)); }

.header-actions { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.header-action {
  display:flex; align-items:center; gap:6px; padding:8px 16px;
  border-radius:var(--radius-sm); font-size:14px; color:var(--text-main);
  cursor:pointer; transition:all .2s; position:relative;
}
.header-action:hover { background:var(--primary-light); color:var(--primary-deep); }
.header-action .badge {
  position:absolute; top:0; right:6px; min-width:18px; height:18px;
  background:var(--price); color:#fff; border-radius:9px; font-size:11px; font-weight:800;
  display:flex; align-items:center; justify-content:center; line-height:1;
}
.header-action i { font-size:18px; color:var(--primary); }

/* ======================== 主导航 ======================== */
.main-nav { background:var(--nav-bg); height:50px; position:relative; z-index:99; }
.main-nav-inner { display:flex; align-items:center; height:50px; gap:4px; }
.nav-all {
  background:var(--primary-deep); color:#fff; font-weight:800; font-size:15px;
  padding:0 20px; height:50px; display:flex; align-items:center; gap:8px;
  border-radius:var(--radius-sm) var(--radius-sm) 0 0; cursor:pointer; flex-shrink:0;
}
.nav-item {
  padding:0 20px; height:50px; display:flex; align-items:center;
  color:var(--nav-text); font-size:15px; font-weight:500; cursor:pointer;
  position:relative; transition:background .2s; white-space:nowrap;
}
.nav-item::after {
  content:''; position:absolute; bottom:0; left:50%; transform:translateX(-50%);
  width:0; height:3px; border-radius:3px 3px 0 0;
  background:#fff; transition:width .25s;
}
.nav-item:hover, .nav-item.active { background:rgba(0,0,0,.12); }
.nav-item:hover::after, .nav-item.active::after { width:60%; }
.nav-ai-btn {
  background:#fff; color:var(--primary-deep) !important; font-weight:800; padding:0 18px; height:34px;
  border-radius:17px; display:flex; align-items:center; gap:6px; font-size:14px;
  margin-left:auto; transition:all .2s; white-space:nowrap;
}
.nav-ai-btn:hover { background:var(--price); color:#fff !important; }
.nav-ai-btn i { color:var(--primary-deep); }
.nav-ai-btn:hover i { color:#fff; }

/* ======================== 面包屑 ======================== */
.breadcrumb { background:transparent; padding:14px 0; }
.breadcrumb-inner { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--text-light); }
.breadcrumb a { color:var(--text-light); transition:color .2s; }
.breadcrumb a:hover { color:var(--primary); }
.breadcrumb span { color:var(--text-muted); }
.breadcrumb .current { color:var(--text-main); font-weight:600; }

/* ======================== 轮播区域 ======================== */
.hero-section { padding:20px 0 28px; }
.hero-grid { display:grid; grid-template-columns:1fr 340px; gap:16px; height:420px; }

.banner-wrap {
  border-radius:var(--radius-lg); overflow:hidden; position:relative;
  box-shadow:var(--shadow-md); background:var(--surface);
}
.banner-slides { width:100%; height:100%; position:relative; }
.banner-slide { position:absolute; inset:0; opacity:0; transition:opacity .8s ease; }
.banner-slide.active { opacity:1; }
.banner-slide img { width:100%; height:100%; object-fit:cover; display:block; }
.banner-overlay {
  position:absolute; bottom:0; left:0; right:0; height:40%;
  background:linear-gradient(transparent, rgba(0,0,0,0.45)); pointer-events:none;
}
.banner-dots { position:absolute; bottom:18px; left:50%; transform:translateX(-50%); display:flex; gap:8px; z-index:3; }
.banner-dot { width:8px; height:8px; border-radius:50%; background:rgba(255,255,255,0.5); cursor:pointer; transition:all .3s; }
.banner-dot.active { width:22px; border-radius:4px; background:#fff; }
.banner-arrow {
  position:absolute; top:50%; transform:translateY(-50%); z-index:3;
  width:40px; height:40px; background:rgba(0,0,0,0.3);
  border:none; border-radius:50%; color:#fff; font-size:16px;
  cursor:pointer; display:flex; align-items:center; justify-content:center; transition:all .2s; opacity:0;
}
.banner-wrap:hover .banner-arrow { opacity:1; }
.banner-arrow:hover { background:var(--primary); }

/* 公告（白卡片） */
.notice-panel {
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg);
  box-shadow:var(--shadow-sm); display:flex; flex-direction:column; overflow:hidden;
}
.notice-header { padding:16px 20px 12px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; }
.notice-title { display:flex; align-items:center; gap:8px; font-size:16px; font-weight:800; color:var(--text-main); }
.notice-title i { color:var(--primary); }
.notice-more { font-size:12px; color:var(--text-muted); transition:color .2s; }
.notice-more:hover { color:var(--primary); }
.notice-list { flex:1; overflow:hidden; }
.notice-item { display:flex; gap:12px; padding:12px 20px; border-bottom:1px solid var(--border); transition:background .2s; cursor:pointer; }
.notice-item:last-child { border-bottom:none; }
.notice-item:hover { background:var(--surface-2); }
.notice-thumb { width:60px; height:60px; border-radius:var(--radius-sm); overflow:hidden; flex-shrink:0; background:var(--surface-2); border:1px solid var(--border); }
.notice-thumb img { width:100%; height:100%; object-fit:cover; }
.notice-body { flex:1; min-width:0; }
.notice-name { font-size:13px; line-height:1.5; color:var(--text-main); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; margin-bottom:6px; }
.notice-time { font-size:11px; color:var(--text-muted); }

/* ======================== 秒杀 + 品牌 ======================== */
.promo-section { margin-top:16px; display:grid; grid-template-columns:880px 380px; gap:16px; height:280px; }

.seckill-panel {
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg);
  box-shadow:var(--shadow-sm); padding:18px 24px; display:flex; flex-direction:column;
}
.seckill-head { display:flex; align-items:center; gap:12px; margin-bottom:14px; }
.seckill-icon {
  width:40px; height:40px; border-radius:10px;
  background:linear-gradient(135deg, var(--price), var(--price-2));
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-size:18px;
}
.seckill-title { font-size:22px; font-weight:900; color:var(--price); letter-spacing:.5px; }
.seckill-sub { font-size:12px; color:var(--text-muted); margin-left:auto; }
.seckill-timer { display:flex; gap:4px; align-items:center; }
.seckill-timer span {
  background:var(--price); color:#fff; font-weight:800; font-size:16px;
  padding:3px 7px; border-radius:6px; min-width:32px; text-align:center;
}
.seckill-timer em { font-style:normal; color:var(--price); font-weight:800; font-size:18px; }
.seckill-scroll { flex:1; overflow:hidden; position:relative; }
.seckill-track { display:flex; gap:12px; transition:transform .5s ease; height:100%; }
.seckill-card {
  width:158px; flex-shrink:0; display:flex; flex-direction:column; align-items:center; justify-content:center;
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius-md); padding:12px; cursor:pointer; transition:all .2s;
}
.seckill-card:hover { border-color:var(--price); transform:translateY(-4px); box-shadow:var(--shadow-md); }
.seckill-card img { width:80px; height:80px; object-fit:contain; margin-bottom:8px; }
.seckill-card .pname { font-size:12px; color:var(--text-main); text-align:center; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; line-height:1.4; margin-bottom:6px; }
.seckill-price { color:var(--price); font-weight:800; font-size:16px; }
.seckill-price .old { text-decoration:line-through; color:var(--text-muted); font-size:11px; font-weight:400; margin-left:4px; }
.seckill-nav {
  position:absolute; top:50%; transform:translateY(-50%); z-index:2;
  width:32px; height:32px; background:var(--surface); border:1px solid var(--border); border-radius:50%;
  display:flex; align-items:center; justify-content:center; cursor:pointer; transition:all .2s; font-size:12px; color:var(--primary);
}
.seckill-nav:hover { background:var(--primary); color:#fff; }
.seckill-nav.prev { left:4px; }
.seckill-nav.next { right:4px; }

/* 品牌 */
.brand-panel {
  background:var(--brand-bg); border-radius:var(--radius-lg); padding:18px;
  display:flex; flex-direction:column; box-shadow:var(--shadow-sm); overflow:hidden; position:relative;
}
.brand-head { display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.brand-icon {
  width:34px; height:34px; border-radius:10px; background:rgba(255,255,255,.18);
  display:flex; align-items:center; justify-content:center; color:#fff; font-size:16px;
}
.brand-title { font-size:20px; font-weight:900; color:#fff; letter-spacing:.5px; }
.brand-slide-wrap { flex:1; position:relative; overflow:hidden; border-radius:var(--radius-md); min-height:0; }
.brand-slide-track { display:flex; height:100%; transition:transform .5s ease; }
.brand-img { width:100%; height:100%; min-width:100%; object-fit:cover; border-radius:var(--radius-md); display:block; }
.brand-slide-wrap a { display:block; width:100%; height:100%; min-width:100%; flex-shrink:0; }
.brand-dots { display:flex; justify-content:center; gap:6px; margin-top:10px; }
.brand-dot { width:6px; height:6px; border-radius:50%; background:rgba(255,255,255,0.4); cursor:pointer; transition:all .3s; }
.brand-dot.active { width:20px; border-radius:4px; background:#fff; }

/* ======================== 商品区块标题 ======================== */
.section-title { display:flex; align-items:center; gap:12px; margin:32px 0 18px; }
.section-title h2 { font-size:24px; font-weight:900; color:var(--text-main); position:relative; padding-left:14px; }
.section-title h2::before {
  content:''; position:absolute; left:0; top:50%; transform:translateY(-50%);
  width:5px; height:24px; border-radius:3px; background:var(--primary);
}
.section-title .line { flex:1; height:1px; background:var(--border-strong); }
.section-title .tag {
  background:var(--primary-light); color:var(--primary-deep); font-size:12px; padding:5px 14px;
  border-radius:20px; font-weight:700;
}

/* ======================== 商品卡片（白卡 + 柔和阴影） ======================== */
.goods-grid { display:grid; grid-template-columns:repeat(5, 1fr); gap:16px; }
.goods-card {
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md); overflow:hidden;
  box-shadow:var(--shadow-sm); transition:all .25s ease; cursor:pointer; position:relative;
}
.goods-card:hover { transform:translateY(-6px); box-shadow:var(--shadow-lg); border-color:var(--primary-light); }
.goods-img { width:100%; height:200px; overflow:hidden; position:relative; background:var(--surface-2); }
.goods-img img { width:100%; height:100%; object-fit:cover; transition:transform .4s; }
.goods-card:hover .goods-img img { transform:scale(1.06); }
.goods-tag {
  position:absolute; top:10px; left:10px;
  background:var(--gold); color:#fff; font-size:11px; font-weight:800; padding:3px 8px; border-radius:6px;
}
.goods-body { padding:14px; }
.goods-title { font-size:14px; line-height:1.5; color:var(--text-main); margin-bottom:8px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:42px; }
.goods-origin { font-size:12px; color:var(--text-muted); margin-bottom:10px; display:flex; align-items:center; gap:4px; }
.goods-origin i { font-size:10px; color:var(--primary); }
.goods-bottom { display:flex; align-items:baseline; justify-content:space-between; }
.goods-price { font-size:22px; font-weight:800; color:var(--price); }
.goods-price sup { font-size:13px; top:-6px; }
.goods-btn {
  background:linear-gradient(90deg, var(--accent), var(--accent-2)); color:#fff; border:none; padding:7px 16px; border-radius:18px;
  font-size:13px; font-weight:700; cursor:pointer; transition:all .2s;
}
.goods-btn:hover { filter:brightness(1.06); transform:translateY(-1px); }

/* ======================== 底部 ======================== */
.footer { background:var(--footer-bg); margin-top:56px; color:var(--footer-text); font-size:13px; }
.footer-top { padding:40px 0; border-bottom:1px solid #3a3a3a; }
.footer-grid { display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:40px; }
.footer-brand { display:flex; align-items:center; gap:12px; margin-bottom:16px; }
.footer-brand img { height:40px; }
.footer-brand span { font-size:22px; font-weight:900; color:var(--footer-title); letter-spacing:1px; }
.footer-desc { line-height:1.8; font-size:13px; }
.footer-col h4 { color:var(--footer-title); font-size:15px; margin-bottom:14px; font-weight:700; position:relative; padding-left:12px; }
.footer-col h4::before { content:''; position:absolute; left:0; top:50%; transform:translateY(-50%); width:4px; height:14px; border-radius:2px; background:var(--primary); }
.footer-col li { margin-bottom:10px; cursor:pointer; transition:color .2s; }
.footer-col li:hover { color:var(--primary-2); }
.footer-bottom { padding:20px 0; text-align:center; font-size:12px; }
.footer-bottom a { color:#888; transition:color .2s; }
.footer-bottom a:hover { color:var(--primary-2); }

/* ======================== 加载动画 ======================== */
.loading-wrap { text-align:center; padding:40px; color:var(--text-muted); font-size:14px; }
.loading-dots { display:flex; gap:6px; justify-content:center; margin-bottom:12px; }
.loading-dots span {
  width:8px; height:8px; border-radius:50%; background:var(--primary);
  animation:bounce 1.4s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay:0.2s; }
.loading-dots span:nth-child(3) { animation-delay:0.4s; }
@keyframes bounce { 0%,80%,100% { transform:scale(0.6); opacity:0.4; } 40% { transform:scale(1); opacity:1; } }

/* ======================== 淡入动画 ======================== */
@keyframes fadeInUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
.fade-in { animation:fadeInUp 0.6s ease both; }
.fade-in:nth-child(2) { animation-delay:0.1s; }
.fade-in:nth-child(3) { animation-delay:0.2s; }
.fade-in:nth-child(4) { animation-delay:0.3s; }
.fade-in:nth-child(5) { animation-delay:0.4s; }

/* ======================== 滚动条美化 ======================== */
::-webkit-scrollbar { width:8px; height:8px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:#ccc; border-radius:4px; }
::-webkit-scrollbar-thumb:hover { background:var(--primary); }

/* ======================== 搜索建议 ======================== */
.search-suggestions {
  position:absolute; top:calc(100% + 6px); left:0; right:0;
  background:var(--surface); border-radius:var(--radius-md); box-shadow:var(--shadow-lg);
  border:1px solid var(--border); overflow:hidden; z-index:50; display:none;
}
.search-suggestions.show { display:block; }
.search-suggestions li { padding:10px 16px; cursor:pointer; font-size:14px; transition:background .2s; display:flex; align-items:center; gap:8px; }
.search-suggestions li:hover { background:var(--surface-2); }

/* ======================== 响应式 ======================== */
@media (max-width:1320px) { .container { width:96%; } .promo-section { grid-template-columns:1fr 360px; } }
@media (max-width:900px) {
  .hero-grid { grid-template-columns:1fr; height:auto; }
  .banner-wrap { height:240px; }
  .notice-panel { height:260px; }
  .promo-section { grid-template-columns:1fr; height:auto; }
  .goods-grid { grid-template-columns:repeat(2,1fr); }
  .header-inner { gap:16px; }
  .header-actions .header-action span { display:none; }
}
