/* ============================================================
   福州二手车 - 移动端响应式适配 (m.css)
   断点 768px，覆盖所有前台页面
   通过 footer.shtml 引入，加载顺序晚于各页内联样式，层叠生效
   ============================================================ */
@media (max-width:768px){

  /* ---------- 全局 ---------- */
  .container{padding:0 14px;}
  body{font-size:14px;}
  img{max-width:100%;}

  /* ---------- 顶栏 ---------- */
  .topbar{padding:6px 0;font-size:12px;}
  .topbar span:last-child{display:none;}

  /* ---------- 头部导航（汉堡菜单） ---------- */
  .header{overflow-x:auto;-webkit-overflow-scrolling:touch;}
  .header::-webkit-scrollbar{display:none;}
  .header .container{height:56px;gap:4px;min-width:max-content;}
  .logo{font-size:17px;margin-right:4px;white-space:nowrap;}
  .logo span{font-size:17px;}
  .city-btn{margin-right:0;padding:5px 6px;font-size:13px;gap:3px;}
  .city-btn span:first-child{display:none;}
  .city-btn span:last-child{font-size:10px;}
  .desktop-only{display:none !important;}
  .header .btn{padding:6px 10px;font-size:13px;white-space:nowrap;max-width:92px;overflow:hidden;text-overflow:ellipsis;flex-shrink:1;}
  .menu-btn{display:flex;align-items:center;justify-content:center;width:34px;height:34px;font-size:20px;color:#1f2937;cursor:pointer;border-radius:6px;-webkit-tap-highlight-color:transparent;flex-shrink:0;}
  .menu-btn:active{background:#f3f4f6;}

  .nav{position:fixed;top:0;right:-260px;width:260px;height:100vh;height:100dvh;background:#fff;flex-direction:column;gap:0;padding-top:66px;transition:right .25s ease;box-shadow:-6px 0 24px rgba(0,0,0,.18);z-index:300;display:flex;}
  .nav.open{right:0;}
  .nav a{display:block;padding:16px 24px;font-size:15px;border-bottom:1px solid #f3f4f6;white-space:nowrap;}
  .nav a:hover,.nav a.active{color:#f59e0b;border-bottom-color:#f3f4f6;background:#fffbeb;}
  .nav-mask{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:299;display:none;}
  .nav-mask.show{display:block;}

  /* ---------- 城市选择弹窗（全屏化） ---------- */
  .city-panel{top:0;left:0;transform:none;width:100vw;max-width:100vw;height:100vh;height:100dvh;border-radius:0;}
  .city-panel .cp-head{padding:14px 16px;}
  .city-body{height:calc(100vh - 215px);height:calc(100dvh - 215px);}
  .prov-list{width:118px;}
  .city-list{padding:12px;}
  .city-list a{padding:6px 10px;font-size:12px;}

  /* ---------- 首页 Hero / 搜索 ---------- */
  .hero{padding:38px 14px;}
  .hero h1{font-size:26px;line-height:1.5;margin-bottom:10px;overflow-wrap:break-word;word-break:break-all;}
  .hero p{font-size:13px;margin-bottom:20px;line-height:1.7;overflow-wrap:break-word;}
  .hero .searchbox{display:flex;flex-direction:column;width:100%;border-radius:8px;}
  .hero .searchbox input{width:100% !important;padding:12px 14px;border-bottom:1px solid #f3f4f6;box-sizing:border-box;}
  .hero .searchbox button{padding:13px;font-size:15px;}

  /* ---------- 通用标题 ---------- */
  .section-title{font-size:18px;margin:26px 0 14px;}

  /* ---------- 车源卡片网格：3列 -> 2列 ---------- */
  .car-grid{grid-template-columns:repeat(2,1fr);gap:12px;}
  .car-card .pic{height:120px;}
  .car-card .info{padding:10px;}
  .car-card .info h3{font-size:14px;margin-bottom:6px;}
  .car-card .info .meta{font-size:11px;}

  /* ---------- 广告 ---------- */
  .ad-grid{grid-template-columns:repeat(2,1fr);gap:12px;}
  .ad-item img{height:96px;}
  .ad-item .label{font-size:12px;padding:16px 8px 6px;}
  .banner-item img{height:84px;}

  /* ---------- 流程步骤 ---------- */
  .steps{grid-template-columns:repeat(2,1fr);gap:12px;}
  .step{padding:18px 12px;}
  .step .num{width:38px;height:38px;line-height:38px;font-size:16px;}
  .notice{padding:16px;font-size:13px;}

  /* ---------- 新闻列表项 ---------- */
  .news-item{gap:12px;}
  .news-item .npic{width:118px;height:78px;}
  .news-item .ninfo{padding:12px 12px 12px 0;}
  .news-item .ninfo h4{font-size:15px;margin-bottom:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .news-item .ninfo p{font-size:12px;-webkit-line-clamp:2;}
  .news-more{margin-top:10px;}

  /* ---------- 车源列表页 ---------- */
  .list-head{margin:20px 0 12px;flex-wrap:wrap;gap:6px;}
  .list-head h1{font-size:19px;}
  .filter{padding:12px;gap:10px;}
  .filter select,.filter input{width:100% !important;padding:10px 12px;box-sizing:border-box;}
  .filter button{width:100%;padding:11px;}
  .pager{gap:6px;margin:22px 0;}
  .pager a,.pager span{min-width:30px;padding:6px 9px;font-size:13px;}

  /* ---------- 详情页 ---------- */
  .breadcrumb{font-size:12px;margin:16px 0 0;line-height:1.8;}
  .detail-wrap{grid-template-columns:1fr;gap:16px;margin:18px 0;}
  .detail-pic{height:220px;}
  .detail-body{padding:18px;}
  .detail-body h1{font-size:19px;line-height:1.5;margin-bottom:12px;}
  .price-row{flex-wrap:wrap;gap:8px;padding:12px;}
  .price-row .price{font-size:22px;}
  .price-row span[style*="margin-left:auto"]{width:100%;margin-left:0 !important;}
  .tags{gap:8px;}
  .tags span{padding:3px 10px;font-size:12px;}
  .info-list{grid-template-columns:1fr;gap:10px;padding:14px;}
  .info-list div{font-size:13px;}
  .side{gap:14px;}
  .side-box{padding:16px;}

  /* ---------- 发布 / 编辑车源 ---------- */
  .pub-wrap{margin:18px auto 8px;padding:0 12px;}
  .pub-card{padding:22px 18px;}
  .pub-card h2{font-size:20px;}
  .pub-card .row{grid-template-columns:1fr;gap:0;}
  .pub-card input[type=text],.pub-card input[type=number],.pub-card select,.pub-card textarea{padding:12px 13px;font-size:15px;}
  .pub-card button{padding:14px;font-size:16px;}
  .pub-card .curpic img{width:96px;height:64px;}
  .pub-card .curpic{flex-wrap:wrap;gap:8px;}

  /* ---------- 用户中心 ---------- */
  .user-wrap{grid-template-columns:1fr;gap:14px;margin:16px 0;}
  .user-side{padding:22px 16px;}
  .user-main{padding:20px 16px;}
  .user-main h2{font-size:18px;}
  .car-row{flex-wrap:wrap;gap:10px;padding:12px;}
  .car-row .thumb{width:88px;height:62px;}
  .car-row .price{font-size:16px;}
  .car-row .ops{width:100%;justify-content:flex-end;gap:8px;margin-top:2px;}
  .car-row .ops a{padding:7px 12px;}
  .user-main table{display:block;overflow-x:auto;white-space:nowrap;}

  /* ---------- 登录 / 注册 ---------- */
  .auth-wrap{padding:34px 14px 20px;}
  .auth-card{width:100%;padding:28px 22px;}
  .auth-card h2{font-size:20px;}

  /* ---------- 新闻详情 ---------- */
  .article{padding:22px 18px;margin:16px auto 8px;border-radius:8px;}
  .article h1{font-size:19px;line-height:1.6;margin-bottom:12px;}
  .article .meta{flex-wrap:wrap;gap:8px 14px;font-size:12px;padding-bottom:12px;margin-bottom:16px;}
  .article .content{font-size:15px;line-height:2;}
  .article .gallery{grid-template-columns:repeat(2,1fr);gap:10px;}
  .article .gallery img{height:120px;}
  .article .cover{max-height:240px;}

  /* ---------- 页脚 ---------- */
  .footer{margin-top:34px;}
  .footer .container{flex-direction:column;gap:22px;padding-top:26px;}
  .footer h4{margin-bottom:8px;}
}
