/*!
 * 中食月太官网 · 响应式与显示修复层
 * 用法：在 main.css 之后引入（不要修改 main.css 原有规则）
 * 覆盖范围：首页轮播、顶部信息条、主导航、手机端菜单、内页大图、文章正文、产品列表、分页、联系我们、页脚
 * 断点：>=1200 桌面 / 992-1199 小桌面 / 768-991 平板 / <768 手机
 */

/* ========== 1. 基础 ========== */
html {
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
  font-size: 14px;
  color: #333;
}

img {
  max-width: 100%;
}

a {
  -webkit-tap-highlight-color: transparent;
}

/* 统一内容宽度 */
.header .topline,
.header .navcontent,
.details-content,
.case-content .imgtext-flow,
.service-contact-box {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* ========== 2. 顶部信息条 ========== */
.header_box {
  border-bottom: 1px solid #e8ebf2;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .05);
}

.header .topline {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 84px;
  padding: 12px 24px;
  background: url(../images/topbanner.png) no-repeat right 170px center;
  background-size: auto 88%;
}

.header h1.logo {
  margin: 0 auto 0 0;
  padding: 0;
  line-height: 0;
  flex: 0 0 auto;
}

.header h1.logo img {
  height: 52px;
  width: auto;
  max-width: none;
}

.topinfo {
  float: none;
  flex: 0 0 auto;
  font-size: 13px;
  color: #666;
  white-space: nowrap;
}

.topinfo a {
  color: #666;
}

.topinfo a:hover {
  color: #c11920;
}

/* 手机端汉堡按钮（桌面隐藏） */
.app-header-menuicon {
  display: none;
  position: static;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0 8px 0 0;
  border: 0;
  background: transparent;
  color: #333;
  line-height: 44px;
  text-align: center;
  cursor: pointer;
}

.app-header-menuicon i {
  font-size: 24px;
}

/* ========== 3. 主导航（桌面居中） ========== */
.header .nav {
  background: #c11920;
}

.header .navcontent {
  padding: 0;
}

.header .navcontent > .layui-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0;
  background: transparent;
  border-radius: 0;
  font-size: 0;
}

.header .nav .layui-nav-item {
  margin: 0;
  line-height: 1;
}

.header .nav .layui-nav-item > a {
  display: block;
  padding: 13px 26px;
  font-size: 15px;
  line-height: 1.25;
  color: #fff;
}

.header .nav .layui-nav-item > a:hover,
.header .nav .layui-nav-item.layui-this > a {
  background: rgba(0, 0, 0, .12);
}

.header .layui-nav-item span {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, .62);
  text-transform: uppercase;
}

.header .layui-nav-child {
  min-width: 150px;
  border: 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
}

.header .layui-nav-child dd a {
  display: block;
  padding: 0 18px;
  font-size: 14px;
  line-height: 40px;
  color: #333;
  white-space: nowrap;
}

.header .layui-nav-child dd a:hover {
  background: #f6f6f6;
  color: #c11920;
}

/* 手机端菜单（默认隐藏） */
.header-down-nav {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 999;
  max-height: 70vh;
  overflow-y: auto;
  background: #c11920;
  box-shadow: 0 12px 24px rgba(0, 0, 0, .22);
}

.header-down-nav.down-nav {
  display: block;
}

.header-down-nav .layui-nav {
  display: block;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.header-down-nav .layui-nav-item {
  display: block;
  margin: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  line-height: 1.4;
  text-align: left;
}

.header-down-nav .layui-nav-item > a {
  display: block;
  padding: 13px 20px;
  font-size: 16px;
  color: #fff;
}

.header-down-nav .layui-nav-item span {
  display: inline;
  margin-left: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, .6);
}

.header-down-nav .layui-nav-child {
  display: none;
  position: static;
  padding: 2px 0 6px;
  background: rgba(0, 0, 0, .15);
}

.header-down-nav .layui-nav-child.layui-show {
  display: block;
}

.header-down-nav .layui-nav-child dd a {
  display: block;
  padding: 10px 20px 10px 36px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, .92);
  background: transparent;
}

/* ========== 4. 首页轮播（padding-top 撑高，不依赖 aspect-ratio，杜绝塌陷） ========== */
.content {
  overflow: hidden;
}

.hero-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #eef0f3;
}

.hero-track {
  display: flex;
  width: 100%;
  transition: transform .55s cubic-bezier(.4, 0, .2, 1);
  will-change: transform;
}

.hero-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  padding-top: 31.25%;
  overflow: hidden;
}

/* 图片加载失败 / 后台无图时的底层兜底：品牌渐变 + 标题 */
.hero-fallback {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #c11920;
  background: linear-gradient(120deg, #8f1218 0%, #c11920 55%, #d8463f 100%);
  color: #fff;
}

.hero-fallback span {
  padding: 0 24px;
  font-size: 26px;
  line-height: 1.4;
  letter-spacing: 2px;
  text-align: center;
}

.hero-slide .hero-img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center center;
  border: 0;
  z-index: 1;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 42px;
  height: 62px;
  margin-top: -31px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, .28);
  color: #fff;
  font-size: 22px;
  line-height: 62px;
  text-align: center;
  cursor: pointer;
  opacity: .45;
  transition: opacity .25s, background .25s;
  z-index: 3;
}

.hero-slider:hover .hero-arrow {
  opacity: 1;
}

.hero-arrow:hover {
  background: rgba(193, 25, 32, .85);
}

.hero-arrow.prev {
  left: 0;
}

.hero-arrow.next {
  right: 0;
}

.hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  z-index: 3;
  text-align: center;
}

.hero-dots span {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin: 0 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .12);
  cursor: pointer;
  transition: background .25s, transform .25s;
}

.hero-dots span.on {
  background: #c11920;
  transform: scale(1.25);
}

/* ========== 5. 内页大图（固定高度，兼容所有手机浏览器） ========== */
.service-content .service-big-img {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 320px;
  min-height: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.service-content .service-img-text {
  width: 100%;
  max-width: 1200px;
  padding: 0 40px;
  text-align: right;
}

.service-content .service-img-text h3 {
  padding: 0;
  font-size: 30px;
  line-height: 1.4;
  color: #fff;
}

.service-content .service-img-text h3 > div {
  margin-top: 6px;
}

/* 关于页大图（左侧文字） */
.about-content .about-big-img {
  display: flex;
  align-items: center;
  height: 400px;
  background-size: cover;
  background-position: center center;
  color: #fff;
}

.about-content .about-big-img .text_box {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.about-content .about-big-img .text {
  display: block;
  max-width: 620px;
  margin: 0;
}

.about-content .about-big-img .text h3 {
  font-size: 36px;
  padding-bottom: 15px;
  border-bottom: 2px solid rgba(255, 255, 255, .45);
}

.about-content .about-big-img .text p {
  padding-top: 20px;
  font-size: 16px;
  line-height: 1.85;
}

/* ========== 6. 文章正文 ========== */
.details-content {
  padding: 0 24px;
}

.details-content .title {
  padding: 14px 0;
  margin-bottom: 8px;
  border-bottom: 1px solid #e6e6e6;
  text-align: left;
}

.details-content .title h3 {
  height: auto;
  padding: 0;
  font-size: 14px;
  line-height: 24px;
  color: #999;
  text-align: left;
  font-weight: normal;
}

.details-content .title h3 a {
  color: #999;
}

.details-content .img-box {
  padding-bottom: 40px;
}

.details-content .img-box img {
  margin: 12px auto;
  max-width: 100%;
  height: auto;
}

.details-content .body {
  padding: 8px 0 30px;
  font-size: 16px;
  line-height: 1.9;
  color: #444;
  word-wrap: break-word;
  overflow-wrap: break-word;
  overflow-x: auto;
}

.details-content .body p {
  margin-bottom: 10px;
  text-indent: 2em;
}

.details-content .body img {
  display: block;
  max-width: 100% !important;
  height: auto !important;
  margin: 12px auto;
  text-indent: 0;
}

.details-content .body table {
  max-width: 100% !important;
  border-collapse: collapse;
}

.details-content .body iframe,
.details-content .body video,
.details-content .body embed {
  max-width: 100%;
}

/* ========== 7. 产品列表 ========== */
.case-content .imgtext-flow {
  padding: 0 16px;
  margin: 26px auto 40px;
}

.case-content .imgtext-flow .item {
  margin-bottom: 26px;
  padding: 0 6px;
}

.case-content .imgtext-flow .item img {
  display: block;
  width: 100%;
  height: 250px;
  object-fit: cover;
  border: 1px solid #e6e6e6;
  background: #fafafa;
}

.case-content .imgtext-flow .item-text {
  height: auto;
  min-height: 42px;
  padding: 8px 4px 0;
}

.case-content .imgtext-flow .item h3 {
  font-size: 15px;
  line-height: 22px;
  padding: 0;
  margin: 0;
  text-align: center;
}

.case-content .imgtext-flow .item h3 a {
  color: #333;
}

.case-content .imgtext-flow .item h3 a:hover {
  color: #c11920;
}

/* ========== 8. 分页 ========== */
.pagelist {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 6px 0 30px;
  margin: 0;
  list-style: none;
}

.pagelist li {
  display: block;
  height: auto;
  padding: 0;
  margin: 0;
  font-size: 14px;
}

.pagelist li a,
.pagelist li strong,
.pagelist li span {
  display: inline-block;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  background: #fff;
  color: #666;
  font-size: 14px;
  line-height: 32px;
  text-align: center;
  font-weight: normal;
}

.pagelist li a:hover {
  border-color: #c11920;
  color: #c11920;
}

.pagelist li.thisclass strong,
.pagelist .thisclass {
  border-color: #c11920;
  background: #c11920;
  color: #fff;
  font-weight: normal;
}

/* ========== 9. 联系我们 ========== */
.service-contact {
  margin-bottom: 40px;
}

.service-contact-box {
  padding: 24px 16px 0;
}

.service-contact-box .map-img {
  height: 370px;
  background-color: #f2f2f2;
  background-size: cover;
  border: 1px solid #eee;
}

.service-contact-box .cantact-info {
  height: auto;
  padding: 26px 30px;
  font-size: 15px;
  line-height: 1.9;
}

.service-contact-box .cantact-info h3 {
  font-size: 26px;
  padding-bottom: 18px;
  text-align: left;
}

.service-contact-box .cantact-info .item {
  font-size: 16px;
  line-height: 1.9;
}

/* ========== 10. 页脚 ========== */
.footer {
  padding: 24px 20px 18px;
  margin-top: 30px;
}

.footer .line {
  display: none;
}

.footer p.copyright {
  padding: 4px 0;
  font-size: 14px;
  line-height: 26px;
  color: rgba(255, 255, 255, .88);
}

.footer p.copyright a {
  color: #fff;
}

.footer .icon_box i {
  font-size: 24px;
}

/* ========== 11. 首页内容块（如启用） ========== */
.content .prod-show,
.content .prod-descr,
.content .Partner {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.content .Partner {
  height: auto;
  min-height: 320px;
  padding: 40px 20px;
}

.content .prod-descr .item {
  padding-bottom: 40px;
  margin-bottom: 40px;
}

.content .prod-descr .item .bot-img-box {
  position: static;
  margin-top: 20px;
}

/* ===== 12. 平板（<=1199） ===== */
@media (max-width: 1199px) {
  .header .nav .layui-nav-item > a {
    padding: 12px 18px;
    font-size: 14px;
  }

  .service-content .service-img-text h3 {
    font-size: 26px;
  }

  .about-content .about-big-img .text h3 {
    font-size: 30px;
  }
}

/* ===== 13. 手机 / 竖屏平板（<=900：切换为移动导航） ===== */
@media (max-width: 900px) {
  /* 顶部 */
  .header .topline {
    min-height: 58px;
    padding: 8px 14px;
    background-image: none;
  }

  .header h1.logo img {
    height: 36px;
  }

  .topinfo {
    font-size: 12px;
  }

  .app-header-menuicon {
    display: block;
  }

  /* 桌面导航隐藏，改用下拉面板 */
  .header .nav {
    display: none !important;
  }

  .header {
    position: relative;
  }

  /* 首页轮播：手机上改为更高的裁切比例，避免整图缩得过小 */
  .hero-slide {
    padding-top: 56.25%;
  }

  .hero-fallback span {
    font-size: 17px;
    letter-spacing: 1px;
  }

  /* 每张图文字位置不同：分别偏移裁切焦点 */
  .hero-slide:nth-child(1) .hero-img {
    object-position: 50% 50%;
  }

  .hero-slide:nth-child(2) .hero-img {
    object-position: 34% 50%;
  }

  .hero-slide:nth-child(3) .hero-img {
    object-position: 68% 50%;
  }

  .hero-slide:nth-child(4) .hero-img {
    object-position: 24% 50%;
  }

  .hero-arrow {
    width: 32px;
    height: 48px;
    margin-top: -24px;
    font-size: 18px;
    line-height: 48px;
    opacity: .55;
  }

  .hero-dots {
    bottom: 8px;
  }

  /* 内页大图 */
  .service-content .service-big-img {
    height: 170px;
  }

  .service-content .service-img-text {
    padding: 0 18px;
    text-align: center;
  }

  .service-content .service-img-text h3 {
    font-size: 20px;
    line-height: 1.35;
  }

  .about-content .about-big-img {
    height: auto;
    min-height: 200px;
    padding: 28px 0;
  }

  .about-content .about-big-img .text_box {
    padding: 0 20px;
  }

  .about-content .about-big-img .text h3 {
    font-size: 22px;
    padding-bottom: 10px;
  }

  .about-content .about-big-img .text p {
    font-size: 14px;
    line-height: 1.8;
    padding-top: 12px;
  }

  /* 正文 */
  .details-content {
    padding: 0 16px;
  }

  .details-content .body {
    font-size: 15px;
    line-height: 1.9;
  }

  .details-content .body p {
    text-indent: 1.6em;
  }

  /* 产品列表：手机两列 */
  .case-content .imgtext-flow {
    padding: 0 10px;
    margin: 18px auto 30px;
  }

  .case-content .imgtext-flow .item {
    margin-bottom: 18px;
    padding: 0 4px;
  }

  .case-content .imgtext-flow .item img {
    height: 150px;
  }

  .case-content .imgtext-flow .item h3 {
    font-size: 13px;
    line-height: 19px;
  }

  .item-list-box > .layui-col-xs12 {
    float: left;
    width: 50%;
  }

  /* 联系我们 */
  .service-contact-box {
    padding: 16px 12px 0;
  }

  .service-contact-box .map-img {
    height: 200px;
    margin-bottom: 16px;
  }

  .service-contact-box .cantact-info {
    padding: 18px 16px;
  }

  .service-contact-box .cantact-info h3 {
    font-size: 22px;
    padding-bottom: 12px;
    text-align: center;
  }

  .service-contact-box .cantact-info .item {
    font-size: 14px;
    line-height: 1.9;
  }

  /* 页脚 */
  .footer {
    padding: 18px 14px 14px;
    margin-top: 20px;
  }

  .footer p.copyright {
    font-size: 12px;
    line-height: 22px;
  }
}

/* ===== 14. 小屏手机（<=480） ===== */
@media (max-width: 480px) {
  .header .topline {
    min-height: 52px;
  }

  .header h1.logo img {
    height: 30px;
  }

  .topinfo {
    font-size: 11px;
  }

  .hero-fallback span {
    font-size: 15px;
  }

  .service-content .service-img-text h3 {
    font-size: 18px;
  }

  .details-content .body {
    font-size: 14.5px;
  }
}
