/* 休闲食品模板 — 对齐 p487，与工业/设备/SEO 明显区分 */
:root {
  --snack-red: #f05a28;
  --snack-red-dark: #d9481a;
  --snack-title: #3a2f2a;
  --snack-text: #666;
  --snack-muted: #999;
  --snack-line: #eee;
  --snack-gray: #f7f3ef;
}

body.tpl-snack {
  background: #fffaf6;
  color: var(--snack-text);
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  line-height: 1.75;
}
body.tpl-snack .snack-wrap { overflow-x: hidden; }
body.tpl-snack .auto-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
body.tpl-snack a { transition: .2s; }
body.tpl-snack .empty-tip, body.tpl-snack .loading { padding: 40px; text-align: center; color: #999; }

body.tpl-snack #page-hero { display: none !important; }

/* —— 顶栏图2：左品牌 / 中导航方块高亮 / 右红圆搜索 —— */
body.tpl-snack .snack-header {
  background: #fff;
  border-bottom: 1px solid #f0e8e2;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 12px rgba(240,90,40,.06);
}
body.tpl-snack .snack-header-inner {
  min-height: 84px;
  display: flex;
  align-items: center;
  gap: 16px;
}
body.tpl-snack .logo-box {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  color: var(--snack-red);
  max-width: 260px;
}
body.tpl-snack .site-logo {
  height: 52px; width: 52px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(240,90,40,.25);
}
body.tpl-snack .logo-text { display: flex; flex-direction: column; line-height: 1.25; }
body.tpl-snack .logo-text strong { font-size: 22px; color: var(--snack-red); letter-spacing: 1px; }
body.tpl-snack .logo-text small { font-size: 11px; color: #c48a72; font-weight: 500; margin-top: 2px; }
body.tpl-snack .snack-nav-toggle {
  display: none; margin-left: auto; border: 0; background: var(--snack-red); color: #fff;
  width: 40px; height: 40px; font-size: 18px; cursor: pointer;
}
body.tpl-snack .site-nav {
  flex: 1; display: flex; justify-content: center; align-items: center; gap: 2px; flex-wrap: wrap;
}
body.tpl-snack .site-nav a {
  padding: 10px 16px; color: #333; font-size: 15px; font-weight: 600;
}
body.tpl-snack .site-nav a:hover { color: var(--snack-red); }
body.tpl-snack .site-nav a.active {
  background: var(--snack-red); color: #fff !important;
}
body.tpl-snack .snack-search-btn {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--snack-red); color: #fff !important; font-size: 18px; font-weight: 700;
}
body.tpl-snack .snack-search-btn:hover { background: var(--snack-red-dark); transform: scale(1.05); }

body.tpl-snack .banner-section { min-height: 460px; background: #f3d9d4; overflow: hidden; }
body.tpl-snack .banner-section img,
body.tpl-snack .banner-section .banner-slide {
  width: 100%; min-height: 460px; object-fit: cover; display: block;
}

/* 模块背景图 + 浅色遮罩 */
body.tpl-snack .snack-sec-bg {
  position: relative; background: var(--snack-gray) center/cover no-repeat; background-attachment: scroll;
}
body.tpl-snack .snack-sec-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,250,246,.92), rgba(255,250,246,.86));
  pointer-events: none;
}
body.tpl-snack .snack-sec-inner { position: relative; z-index: 1; }

body.tpl-snack .snack-sec-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 32px; flex-wrap: wrap;
}
body.tpl-snack .snack-sec-title {
  margin: 0; font-size: 32px; color: var(--snack-title); font-weight: 700; position: relative; padding-bottom: 12px;
}
body.tpl-snack .snack-sec-title::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 42px; height: 4px; background: var(--snack-red);
}
body.tpl-snack .snack-page-title { margin-bottom: 28px; }
body.tpl-snack .snack-sec-desc { margin: 0; color: var(--snack-muted); flex: 1; text-align: right; }
body.tpl-snack .snack-pill-btn {
  display: inline-block; padding: 10px 22px; background: var(--snack-red); color: #fff !important;
  border-radius: 999px; font-size: 14px; font-weight: 600;
}
body.tpl-snack .snack-pill-btn:hover { background: var(--snack-red-dark); }

/* —— 首页：食品图分类卡 —— */
body.tpl-snack .snack-brand { padding: 72px 0 48px; }
body.tpl-snack .snack-cat-cards {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
body.tpl-snack a.snack-cat-card {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  min-height: 240px; padding: 24px 16px; overflow: hidden;
  background: #e8ddd4 center/cover no-repeat; color: #fff; text-align: center;
}
body.tpl-snack a.snack-cat-card .snack-cat-mask {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(40,20,10,.72));
  transition: .25s;
}
body.tpl-snack a.snack-cat-card strong,
body.tpl-snack a.snack-cat-card em { position: relative; z-index: 1; }
body.tpl-snack a.snack-cat-card strong { font-size: 20px; font-weight: 800; letter-spacing: 1px; }
body.tpl-snack a.snack-cat-card em {
  display: block; margin-top: 10px; font-style: normal; font-size: 13px; color: rgba(255,255,255,.9);
}
body.tpl-snack a.snack-cat-card:hover .snack-cat-mask {
  background: linear-gradient(180deg, rgba(240,90,40,.25), rgba(240,90,40,.88));
}
body.tpl-snack a.snack-cat-card:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(240,90,40,.22); }

/* —— 首页/列表新闻卡：图 + 推荐角标 + 日期 + 标题（对齐 p487） —— */
body.tpl-snack .snack-news-home { padding: 56px 0 88px; }
body.tpl-snack .snack-news-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 24px;
}
body.tpl-snack .snack-news-page { margin-top: 8px; }
body.tpl-snack a.snack-news-card {
  display: flex; flex-direction: column; color: inherit; background: #fff;
  border: 1px solid #eee; overflow: hidden;
}
body.tpl-snack a.snack-news-card:hover {
  border-color: var(--snack-red); box-shadow: 0 10px 24px rgba(240,90,40,.1);
}
body.tpl-snack .snack-news-card .cover {
  position: relative; height: 200px; background: #f0ebe6 center/cover no-repeat; overflow: hidden;
}
body.tpl-snack .snack-news-card .cover img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
body.tpl-snack .snack-news-card .rec {
  position: absolute; top: 0; right: 12px; z-index: 1;
  padding: 8px 6px; writing-mode: vertical-rl; letter-spacing: 2px;
  background: var(--snack-red); color: #fff; font-size: 12px; font-weight: 700; line-height: 1.2;
}
body.tpl-snack .snack-news-card .meta { padding: 16px 14px 20px; }
body.tpl-snack .snack-news-card time {
  display: block; margin-bottom: 8px; color: #bbb; font-size: 13px;
}
body.tpl-snack .snack-news-card h3 {
  margin: 0; font-size: 15px; color: #444; font-weight: 600; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em;
}
body.tpl-snack a.snack-news-card:hover h3 { color: var(--snack-red); }

/* 分页：首页 / 页码 / 尾页 */
body.tpl-snack .list-pagination,
body.tpl-snack .snack-pager {
  grid-column: 1 / -1;
  display: flex; justify-content: center; align-items: center; gap: 8px;
  margin-top: 36px; flex-wrap: wrap;
}
body.tpl-snack .list-pagination .page-btn {
  min-width: 40px; height: 36px; padding: 0 12px; border: 1px solid #ddd;
  background: #fff; color: #666; font-size: 14px; cursor: pointer;
}
body.tpl-snack .list-pagination .page-btn:hover:not(:disabled),
body.tpl-snack .list-pagination .page-btn.is-active {
  background: var(--snack-red); border-color: var(--snack-red); color: #fff;
}
body.tpl-snack .list-pagination .page-btn:disabled { opacity: .45; cursor: default; }
body.tpl-snack .list-pagination .page-frac {
  padding: 0 8px; color: #999; font-size: 13px;
}

/* —— 内页次级导航（图3） —— */
body.tpl-snack .snack-subnav {
  background: #fff; border-bottom: 1px solid #eee;
}
body.tpl-snack .snack-subnav-inner {
  display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 0;
  min-height: 56px;
}
body.tpl-snack .snack-subnav a {
  padding: 12px 28px; color: #333; font-size: 15px; font-weight: 600;
}
body.tpl-snack .snack-subnav a:hover { color: var(--snack-red); }
body.tpl-snack .snack-subnav a.active {
  background: var(--snack-red); color: #fff !important;
}

/* —— 关于我们：标题居中 + 左文右图（p487，视频改为配图） —— */
body.tpl-snack .snack-about-page {
  padding: 56px 0 80px; background: #fff;
}
body.tpl-snack .snack-about-title {
  margin: 0 0 40px; text-align: center; font-size: 32px; color: var(--snack-title); font-weight: 700;
  position: relative; padding-bottom: 16px;
}
body.tpl-snack .snack-about-title::after {
  content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 48px; height: 4px; background: var(--snack-red);
}
body.tpl-snack .snack-about-lead {
  margin: 0 0 28px; text-align: center; color: var(--snack-muted); font-size: 15px;
}
body.tpl-snack .snack-about-grid {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: stretch;
}
body.tpl-snack .snack-about-subtitle {
  margin: 0 0 16px; font-size: 22px; color: var(--snack-title); font-weight: 700;
}
body.tpl-snack .snack-about-body {
  color: #666; font-size: 14px; line-height: 2;
  padding-left: 16px; border-left: 3px solid var(--snack-red);
  max-height: none;
}
body.tpl-snack .snack-about-body p { margin: 0 0 1em; }
body.tpl-snack .snack-about-media {
  min-height: 360px; background: #eee center/cover no-repeat; border-radius: 2px;
}

/* —— 联系我们：白卡浮层 + 左信息右图（p487） —— */
body.tpl-snack .snack-contact-page {
  position: relative; margin-top: -80px; padding: 0 0 70px; z-index: 2;
}
body.tpl-snack .snack-contact-card {
  background: #fff; border-radius: 8px; box-shadow: 0 12px 40px rgba(0,0,0,.08);
  padding: 36px 40px 40px; margin-bottom: 48px;
}
body.tpl-snack .snack-contact-hd {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 18px; margin-bottom: 8px; border-bottom: 1px solid #eee;
}
body.tpl-snack .snack-contact-hd h2 {
  margin: 0; font-size: 28px; color: var(--snack-title); font-weight: 700;
}
body.tpl-snack .snack-ico-phone {
  width: 28px; height: 28px; display: inline-block;
  background: center/contain no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23999'%3E%3Cpath d='M6.6 10.8c1.4 2.8 3.8 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1.1-.2 1.2.4 2.5.6 3.8.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.6 21 3 13.4 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.6.6 3.8.1.4 0 .8-.3 1.1L6.6 10.8z'/%3E%3C/svg%3E");
}
body.tpl-snack .snack-contact-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; padding-top: 12px;
}
body.tpl-snack .snack-contact-list {
  list-style: none; margin: 0; padding: 0;
}
body.tpl-snack .snack-contact-list li {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 18px 0; border-bottom: 1px solid #f0f0f0; font-size: 15px;
}
body.tpl-snack .snack-contact-list li:last-child { border-bottom: 0; }
body.tpl-snack .snack-contact-list label { color: #888; }
body.tpl-snack .snack-contact-list strong { color: var(--snack-title); font-size: 18px; }
body.tpl-snack .snack-ci {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
  background: var(--snack-red) center/18px no-repeat;
}
body.tpl-snack .snack-ci-tel {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M6.6 10.8c1.4 2.8 3.8 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1.1-.2 1.2.4 2.5.6 3.8.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.6 21 3 13.4 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.6.6 3.8.1.4 0 .8-.3 1.1L6.6 10.8z'/%3E%3C/svg%3E");
}
body.tpl-snack .snack-ci-mail {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E");
}
body.tpl-snack .snack-ci-map {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M12 2C8.1 2 5 5.1 5 9c0 5.2 7 13 7 13s7-7.8 7-13c0-3.9-3.1-7-7-7zm0 9.5c-1.4 0-2.5-1.1-2.5-2.5S10.6 6.5 12 6.5s2.5 1.1 2.5 2.5S13.4 11.5 12 11.5z'/%3E%3C/svg%3E");
}
body.tpl-snack .snack-contact-photo {
  min-height: 260px; background: #eee center/cover no-repeat; border-radius: 4px;
}
body.tpl-snack .snack-contact-form-wrap {
  background: #fff; padding: 36px 40px 48px; border: 1px solid #f0f0f0;
}
body.tpl-snack .snack-contact-form-wrap .snack-about-title { margin-bottom: 28px; }
body.tpl-snack .snack-contact-form-wrap .cf-tip,
body.tpl-snack .snack-contact-form-wrap .snack-submit { margin-left: 84px; }

/* 兼容旧 class */
body.tpl-snack .snack-about-banner { padding: 70px 0; background: var(--snack-gray); }
body.tpl-snack .snack-about-banner-inner {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center;
}
body.tpl-snack .snack-about-text { color: #666; font-size: 14px; line-height: 1.95; }

/* —— 产品交错行 —— */
body.tpl-snack .page-main { padding: 48px 0 70px; }
body.tpl-snack .snack-product-rows { display: flex; flex-direction: column; gap: 28px; }
body.tpl-snack a.snack-product-row {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 0; align-items: stretch;
  background: #fff; overflow: hidden; color: inherit; border: 1px solid var(--snack-line);
}
body.tpl-snack a.snack-product-row.is-reverse { direction: rtl; }
body.tpl-snack a.snack-product-row.is-reverse > * { direction: ltr; }
body.tpl-snack .snack-pr-cover { min-height: 240px; background: #f3d9d4; }
body.tpl-snack .snack-pr-cover img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 240px; }
body.tpl-snack .snack-pr-body { padding: 32px 28px; display: flex; flex-direction: column; justify-content: center; }
body.tpl-snack .snack-pr-body h3 { margin: 0 0 12px; font-size: 22px; color: var(--snack-title); }
body.tpl-snack .snack-pr-body p {
  margin: 0 0 18px; color: #777; font-size: 14px; line-height: 1.8;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
body.tpl-snack .snack-pr-body em { font-style: normal; color: var(--snack-red); font-weight: 700; }
body.tpl-snack a.snack-product-row:hover { border-color: var(--snack-red); }

/* —— 新闻列表页：推荐条 —— */
body.tpl-snack .snack-news-list { display: flex; flex-direction: column; gap: 0; }
body.tpl-snack a.snack-news-row {
  display: flex; align-items: center; gap: 18px; padding: 18px 8px;
  border-bottom: 1px solid #eee; color: inherit;
}
body.tpl-snack a.snack-news-row:hover h3 { color: var(--snack-red); }
body.tpl-snack a.snack-news-row .tag {
  flex-shrink: 0; padding: 4px 10px; background: var(--snack-red); color: #fff;
  font-size: 12px; font-weight: 700;
}
body.tpl-snack a.snack-news-row .date {
  flex-shrink: 0; width: 110px; color: var(--snack-title); font-weight: 700; font-size: 15px;
}
body.tpl-snack a.snack-news-row h3 {
  margin: 0; flex: 1; font-size: 16px; font-weight: 500; color: #444;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* —— 留言表单 —— */
body.tpl-snack .snack-board .cf-row {
  display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: start; margin-bottom: 16px;
}
body.tpl-snack .snack-board label {
  padding-top: 10px; font-size: 14px; color: #555;
}
body.tpl-snack .snack-board label i { color: var(--snack-red); font-style: normal; margin-right: 2px; }
body.tpl-snack .snack-board input,
body.tpl-snack .snack-board textarea {
  width: 100%; box-sizing: border-box; border: 1px solid #ddd; padding: 10px 12px;
  font-family: inherit; font-size: 14px; background: #fafafa;
}
body.tpl-snack .snack-board input:focus,
body.tpl-snack .snack-board textarea:focus { outline: none; border-color: var(--snack-red); background: #fff; }
body.tpl-snack .cf-tip { min-height: 20px; color: #c00; font-size: 13px; margin: 0 0 10px 84px; }
body.tpl-snack .snack-submit {
  margin-left: 84px; border: 0; cursor: pointer;
  padding: 12px 36px; background: var(--snack-red); color: #fff; font-size: 15px; font-weight: 700;
  letter-spacing: 2px;
}
body.tpl-snack .snack-submit:hover { background: var(--snack-red-dark); }

body.tpl-snack .detail-box { padding: 8px 0 40px; }
body.tpl-snack .detail-title { font-size: 28px; color: var(--snack-title); }
body.tpl-snack .detail-meta { color: #999; margin: 10px 0 24px; }
body.tpl-snack .detail-content { line-height: 1.9; }
body.tpl-snack .detail-cover { max-width: 100%; height: auto; }
body.tpl-snack .list-pager { display: flex; justify-content: center; gap: 8px; margin-top: 28px; flex-wrap: wrap; }
body.tpl-snack .list-pager a,
body.tpl-snack .list-pager span {
  display: inline-block; min-width: 36px; height: 36px; line-height: 34px; text-align: center;
  border: 1px solid #ddd; background: #fff; color: #666; padding: 0 10px; box-sizing: border-box;
}
body.tpl-snack .list-pager a:hover,
body.tpl-snack .list-pager .is-active { background: var(--snack-red); border-color: var(--snack-red); color: #fff; }

/* —— 页脚：仅导航 + 联系（去掉店铺/二维码） —— */
body.tpl-snack .snack-footer { background: #2b2b2b; color: rgba(255,255,255,.7); padding-top: 48px; }
body.tpl-snack .snack-footer-top {
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; padding-bottom: 36px;
}
body.tpl-snack .snack-footer-nav {
  display: flex; flex-wrap: wrap; gap: 8px 4px; max-width: 640px;
}
body.tpl-snack .snack-footer-nav a {
  display: inline-block; margin: 0 14px 12px 0; color: rgba(255,255,255,.65); font-size: 14px;
}
body.tpl-snack .snack-footer-nav a:hover,
body.tpl-snack .snack-footer-nav a:first-child { color: #c47a5a; }
body.tpl-snack .snack-footer-contact h4 { margin: 0 0 6px; color: #fff; font-size: 13px; }
body.tpl-snack .snack-footer-contact p { margin: 0 0 12px; font-size: 13px; word-break: break-all; }
body.tpl-snack .snack-footer-copy {
  border-top: 1px solid rgba(255,255,255,.08); padding: 16px 20px; text-align: center;
  font-size: 12px; color: rgba(255,255,255,.4);
}
body.tpl-snack .snack-footer-copy a { color: rgba(255,255,255,.4); }

body.tpl-snack .snack-page-title { margin-bottom: 12px; }

@media (max-width: 960px) {
  body.tpl-snack .snack-nav-toggle { display: block; }
  body.tpl-snack .snack-search-btn { display: none; }
  body.tpl-snack .site-nav {
    display: none; width: 100%; order: 3; flex-direction: column; padding-bottom: 12px;
  }
  body.tpl-snack .site-nav.is-open { display: flex; }
  body.tpl-snack .site-nav a.active { width: 100%; text-align: center; }
  body.tpl-snack .snack-subnav-inner { justify-content: flex-start; overflow-x: auto; }
  body.tpl-snack .snack-subnav a { padding: 12px 18px; white-space: nowrap; }
  body.tpl-snack .snack-cat-cards,
  body.tpl-snack .snack-news-grid { grid-template-columns: 1fr 1fr; }
  body.tpl-snack .snack-about-grid,
  body.tpl-snack .snack-contact-grid,
  body.tpl-snack .snack-footer-top,
  body.tpl-snack a.snack-product-row,
  body.tpl-snack a.snack-product-row.is-reverse { grid-template-columns: 1fr; direction: ltr; }
  body.tpl-snack .snack-contact-page { margin-top: -40px; }
  body.tpl-snack .snack-contact-card,
  body.tpl-snack .snack-contact-form-wrap { padding: 24px 18px; }
  body.tpl-snack .snack-board .cf-row { grid-template-columns: 1fr; }
  body.tpl-snack .cf-tip,
  body.tpl-snack .snack-submit,
  body.tpl-snack .snack-contact-form-wrap .cf-tip,
  body.tpl-snack .snack-contact-form-wrap .snack-submit { margin-left: 0; }
  body.tpl-snack .banner-section,
  body.tpl-snack .banner-section img,
  body.tpl-snack .banner-section .banner-slide { min-height: 220px; }
}
@media (max-width: 640px) {
  body.tpl-snack .snack-cat-cards,
  body.tpl-snack .snack-news-grid { grid-template-columns: 1fr; }
  body.tpl-snack .snack-sec-title { font-size: 26px; }
  body.tpl-snack a.snack-news-row { flex-wrap: wrap; }
  body.tpl-snack a.snack-news-row h3 { white-space: normal; }
}
