/* static/css/main.css 首页+列表+详情+分类统一专用样式 */
/* ========== 全局公共复用（合并base外重复样式） ========== */
.wrap{
    width: 1100px;
    margin: 0 auto;
}
.split-line{
    height:1px;
    background:#eee;
    margin:12px 0;
}
.right-module{
    border:1px solid #eee;
    padding:15px;
    border-radius:6px;
    margin-bottom:20px;
}
.module-title{
    font-size:16px;
    font-weight:bold;
    margin-bottom:16px;
    color:#333;
}
.tag-list{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}
/* 合并两处重复tag-item，新增100%宽度实现每行单独一个标签 */
.tag-item{
    width: 100%;
    box-sizing: border-box;
    font-size:15px;
    padding:4px 6px;
    background:#f7f7f7;
}
.tag-item:hover{
    background:#ff6700;
    color:#fff;
}
.card-img{
    width:100%;
    aspect-ratio:3/2;
    background:#f5f5f5;
    overflow:hidden;
}
.card-img img{
    width:100%;
    height:100%;
    object-fit:cover;
}

/* ========== 首页布局 ========== */
.home-main{
    display: grid;
    grid-template-columns: 140px 1fr 180px;
    gap: 20px;
}

/* 首页左侧分类栏【适配fish图片图标核心修改】 */
.home-left-cate .cate-item{
    display: flex;
    align-items: center;
    height: 38px;
    font-size:14px;
    cursor:pointer;
}
.home-left-cate .cate-item .icon{
    width:24px;
    height:24px;
    margin-right:8px;
    vertical-align: middle;
    object-fit: contain;
}
.home-left-cate .all-cate{
    margin-top:10px;
    text-align:center;
}
.home-left-cate .all-cate a{
    color:#e64320;
}

/* 首页中间主区域 - 轮播模块 */
.home-center .banner-box{
    width:100%;
    height:320px;
    position:relative;
    overflow:hidden;
    margin-bottom:30px;
}
.banner-img{
    width:100%;
    height:100%;
    background:#eee;
}
.banner-desc{
    position:absolute;
    left:20px;
    bottom:30px;
    color:#fff;
}
.banner-desc h3{
    font-size:26px;
    margin-bottom:6px;
}
.banner-dots{
    position:absolute;
    bottom:10px;
    left:50%;
    transform:translateX(-50%);
}

/* 首页中间 */
.hot-card-wrap{
    display:grid;
    grid-template-columns: 1fr;
    gap:20px;
}
.hot-card{
    border:1px solid #eee;
    border-radius:8px;
    overflow:hidden;
    transition: 0.22s ease all;
    min-height:60px;
    display:flex;
    align-items:center;
    justify-content:center;
}
.hot-card:hover{
    border-color:#ff6700;
    box-shadow: 0 2px 8px rgba(255,103,0,0.12);
}
.hot-card:hover .card-title{
    color:#ff6700;
}
.hot-card:active{
    transform: scale(0.98);
}
.card-title{
    font-size:15px;
    text-align:center;
    padding:0 10px;
}
/* 首页古籍卡片 */
.guji-card {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    background:#fff;
    height:100%;
    box-sizing: border-box;
    transition:0.22s ease all;
}
.guji-card:hover{
    border-color:#ff6700;
    box-shadow:0 2px 8px rgba(255,103,0,0.12);
}
.guji-card-title {
    font-size: 22px;
    font-weight:bold;
    margin-bottom:12px;
    color:#222;
}
.guji-card-text {
    font-size:15px;
    line-height:1.9;
    color:#333;
}
.guji-card-link{
    display:block;
    text-decoration:none;
    color:#333;
    height:100%;
}
/* 首页右侧边栏 */
.home-right .login-box{
    border:1px solid #eee;
    padding:20px;
    text-align:center;
    margin-bottom:20px;
}
.login-btn{
    width:100%;
    height:36px;
    line-height:36px;
    background:#e64320;
    color:#fff;
    margin-bottom:8px;
    cursor:pointer;
}
.login-text{
    font-size:13px;
    margin:10px 0;
}
.report-tip{
    margin-top:15px;
    font-size:13px;
    color:#e64320;
    text-align:center;
}

/* ========== 头部 header 样式 ========== */
.header-wrap{
    height:70px;
    border-bottom:1px solid #eee;
}
.header-inner{
    height:70px;
    display:flex;
    align-items:center;
    gap:32px; /* 统一模块间距，取消space-between避免分散失衡 */
    width:1100px;
    margin:0 auto;
}
.logo{
    font-size:36px;
    font-weight:700;
    color:#e64320;
    letter-spacing:2px;
    line-height:1;
    text-decoration:none;
}
.search-box{
    display:flex;
    width:360px;
    height:36px;
    border:1px solid #ddd;
    border-radius:18px;
    overflow:hidden;
}
.search-input{
    flex:1;
    padding:0 15px;
    font-size:14px;
}
.search-btn{
    width:80px;
    background:#e64320;
    color:#fff;
    cursor:pointer;
    border:none;
}
.top-nav{
    display:flex;
    gap:26px;
    align-items:center;
}
.nav-item{
    font-size:16px; 
    color:#333;
    text-decoration:none;
    padding:5px 10px; /* 内边距生成红色悬浮框 */
    border-radius:3px;
    transition:all 0.2s ease;
}
.nav-item.active{
    color:#e64320; /* 当前页红色文字 */
}
/* 鼠标悬浮红色底色白字，红框效果匹配 */
.nav-item:hover{
    background:#e64320;
    color:#fff;
}
.header-login{
    margin-left:auto; /* 登录模块自动靠右，不挤压导航 */
    display:flex;
    gap:22px;
}
.header-login a{
    font-size:16px;
    color:#333;
    text-decoration:none;
}
.header-login a:hover{
    color:#e64320;
}

/* ========== 底部 footer 样式 ========== */
.footer-wrap{
    margin-top:50px;
    padding:30px 0; /* 原40px，整体上下内边距缩小，减少顶部空白 */
    background:#f7f7f7;
}
.footer-inner{
    text-align:center;
}
.footer-about h4{
    font-size:18px;
    margin-bottom:10px;
}
.footer-about p{
    color:#666;
    margin-bottom:8px; /* 原15px，标语和友情链接之间空隙收窄 */
}
.footer-link{
    margin-bottom:8px; /* 原15px，友情链接和版权行之间空隙收窄 */
}
.footer-link a{
    margin:0 3px;
    font-size:13px;
    color:#666;
}
.footer-copyright{
    font-size:12px;
    color:#999;
}

/* ========== 列表页专属样式 ========== */
.list-main{
    display: grid;
    grid-template-columns: 140px 1fr;
    gap:24px;
    padding:0 0 30px 0;
}
/* 列表左侧分类栏 */
.list-left-cate{
    border:1px solid #eee;
    border-radius:6px;
}
.cate-block{
    padding:12px 16px;
}
.cate-title{
    font-size:15px;
    font-weight:bold;
    color:#333;
    margin-bottom:10px;
}
.cate-item{
    font-size:14px;
    color:#666;
    line-height:2.2;
    cursor:pointer;
}
.cate-item.active{
    color:#ff6700;
}
.cate-item:hover{
    color:#ff6700;
}
.all-cate{
    text-align:center;
    padding:12px;
    font-size:14px;
}
.all-cate a{
    color:#0077cc;
}
/* 列表中间区域 */
.bread-nav{
    font-size:13px;
    color:#999;
    margin-bottom:16px;
}
.bread-nav a{
    color:#0077cc;
}
.list-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:20px;
}
.list-head h1{
    font-size:22px;
    color:#333;
}
.tab-item{
    padding:6px 14px;
    border:1px solid #eee;
    border-radius:20px;
    margin-left:8px;
    cursor:pointer;
    font-size:14px;
}
.tab-item.active{
    background:#ff6700;
    color:#fff;
    border-color:#ff6700;
}
.recipe-list-wrap{
    display:grid;
    grid-template-columns: repeat(4,1fr);/*列表页一行显示几个菜*/
    gap:24px;
}
.recipe-item{
    display:block;
    border:1px solid #eee;
    border-radius:8px;
    overflow:hidden;
    transition: 0.22s ease all;
}
.recipe-item:hover{
    border-color:#ff6700;
    box-shadow: 0 2px 8px rgba(255,103,0,0.12);
}
.recipe-item:active{
    transform: scale(0.98);
}
.recipe-img{
    width:100%;
    height:160px;
}
.recipe-img img{
    width:100%;
    height:100%;
    object-fit:cover;
}
.recipe-info{
    padding:12px;
    display:flex;
    align-items:center;  /*垂直居中核心，只控制内部文字，外部盒子尺寸不变*/
    justify-content:center;
    min-height:20px; /* 统一卡片内部高度，保证全部方框高度一致 */
}
.recipe-name{
    font-size:15px;
    margin:0;
    text-align: center;
}
.recipe-tag{
    display:inline-block;
    font-size:12px;
    color:#ff6700;
    border:1px solid #ff6700;
    padding:2px 6px;
    border-radius:3px;
    margin-bottom:8px;
}
.recipe-material{
    font-size:13px;
    color:#999;
    margin-bottom:8px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.recipe-author{
    font-size:13px;
    color:#666;
}
/* 列表右侧边栏 */
.list-right{}
.relate-card-wrap{
    display:grid;
    grid-template-columns: repeat(3,1fr);
    gap:8px;
}
.relate-card{
    text-align:center;
    font-size:13px;
    color:#333;
}
.new-recipe-item{
    display:grid;
    grid-template-columns:60px 1fr;
    gap:10px;
    margin-bottom:12px;
}
.item-img{
    width:60px;
    height:60px;
    background:#eee;
    border-radius:4px;
}
.new-recipe-item h4{
    font-size:14px;
    margin:0;
    font-weight:normal;
    color:#333;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.new-recipe-item p{
    font-size:12px;
    color:#999;
    margin:2px 0;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.author{
    font-size:12px;
    color:#666;
}
/* 分页 */
.page{
    margin-top:30px;
    text-align:center;
}

/* ========== 自定义分类浏览页专属样式 ========== */
.cate-page-wrap {
    padding: 5px 0;
}
.page-title {
    font-size: 32px;
    color: #222;
    margin: 0 0 24px;
}
.cate-main-box {
    background: #f6f6f6;
    border-radius: 8px;
    padding: 30px;
}
.cate-block-row {
    margin-bottom: 30px;
}
.row-title {
    font-size: 20px;
    font-weight: bold;
    color: #222;
    margin-bottom: 20px;
    padding-bottom:12px;
    position: relative;
}
.row-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 80px;
    height: 1px;
    background-color: #b89860;
}
.row-title::before {
    content: "";
    position: absolute;
    left: 80px;
    right: 0;
    bottom: 0;
    height: 1px;
    background-color: #eeeeee;
}
.cate-col-group {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}
.cate-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.col-label {
    font-size: 16px;
    color: #b89860;
    margin-bottom: 4px;
}
.col-item {
    font-size: 16px;
    color: #333;
    line-height: 1.8;
    cursor: pointer;
}
.col-item:hover {
    color: #ff6700;
}
.expand-btn {
    font-size: 13px;
    color: #0077cc;
    margin-top: 8px;
    cursor: pointer;
}
/* 自定义页面单折叠功能样式 */
.col-item-more {
    display: none;
}
.cate-col.open .col-item-more {
    display: block;
}
.toggle-btn {
    margin-top: 6px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
}
.toggle-btn:hover {
    color: #c82423;
}
/* 自定义页面，横向排列，页面宽度不够自动换行 */
.col-item-wrap{
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    padding:4px 0 14px 0;
}
/*========== 饮食古籍卡片模块 - 桌面端 ==========*/
.antique-card-wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 0px;
}
.antique-card {
  background: #f7f7f7;
  border-radius: 8px;
  padding: 20px;
  /* 默认就有浅阴影，页面加载即可看到卡片隆起效果 */
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: 0.2s ease;
}
.antique-card:hover {
  /* 悬浮时阴影加深，强化凸起交互感 */
  box-shadow: 0 3px 10px rgba(0,0,0,0.11);
  transform: translateY(-2px);
}
.antique-card__title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 8px;
}
.antique-card__meta {
  font-size: 14px;
  color: #777;
  margin-bottom: 12px;
}
.antique-card__desc {
  font-size:14px;
  color:#444;
  line-height:1.6;
}
.antique-card-link{
    display: block;
    text-decoration: none;
    color: inherit;
}

/* ========== 内容详情页专属样式 ========== */
.article-main{
    display: grid;
    grid-template-columns: 1fr 180px;
    gap:30px;
    padding:30px 0;
}
/* 详情左侧主体区域 */
.article-left{}
.article-title{
    font-size:30px;
    color:#222;
    margin:12px 0 20px;
}
.article-pic{
    width:100%;
    aspect-ratio:3/2;
    border-radius:8px;
    overflow:hidden;
}
.article-pic img{
    width:100%;
    height:100%;
    object-fit:cover;
}
.article-operate{
    margin:16px 0;
}
.collect-btn{
    background:#ff3b30;
    color:#fff;
    border:none;
    padding:10px 32px;
    border-radius:4px;
    font-size:15px;
    cursor:pointer;
}
/* 菜谱过渡提示块，用于版本流变与食材明细之间 */
.article-transition{
    margin:20px 0 30px;
}
.article-transition .transition-text{
    border-top: 1px solid #e5e5e5;
    padding-top:16px;
    margin-top:0;
    font-size:14px;
    color:#666;
    line-height:1.7;
}
/* 详情四大内容模块通用 */
.article-block{
    margin-bottom:36px;
}
.block-title{
    font-size:20px;
    color:#b89860;
    padding-bottom:10px;
    margin-bottom:16px;
    border-bottom: none;
    background: linear-gradient(to right,#b89860 0,#b89860 80px,#eeeeee 80px,#eeeeee 100%);
    background-size:100% 2px;
    background-repeat:no-repeat;
    background-position:left bottom;
}

.block-content{
    font-size:16px;
    color:#333;
    line-height:1.8;
}
.block-content img{
    max-width:100% !important;
    height:auto !important;
    box-sizing:border-box;
}
/* 食材准备条目 */
.material-item{
    display:flex;
    justify-content:space-between;
    padding:6px 0;
    border-bottom:1px solid #f2f2f2;
}
.material-item span{
    color:#999;
}
/* 制作步骤列表 */
.step-list{}
.step-item{
    display:flex;
    gap:12px;
    margin-bottom:14px;
}
.step-num{
    width:24px;
    height:24px;
    line-height:24px;
    text-align:center;
    background:#eee;
    border-radius:50%;
    flex-shrink:0;
    color:#666;
}
/* 详情右侧侧边栏 */
.article-right{
    width:180px;
    float:right;
    margin-left:70px;
}
.module-title{
    font-size:16px;
    color:#b89860;
    margin-bottom:16px;
}
.tag-group{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}
/* 详情页tag-item 保留原有多标签并排逻辑，不受上面全局tag-item影响 */
.tag-group .tag-item{
    width:auto;
    padding:6px 16px;
    background:#f6f6f6;
    color:#333;
    font-size:14px;
    border-radius:4px;
}
.cate-item a {
    margin-left: 15px;  /* 控制图标与文字之间的间距，自行调整像素 */
}
.block-split {
    margin: 20px 0;
    height: 1px;
    background-color: #eeeeee;
}

/* ========== 全局移动端基础适配（全站通用） ========== */
@media screen and (max-width: 768px) {
    /* 全局容器取消固定1100宽度，左右留边距 */
    .wrap {
        width: 100%;
        padding: 0 12px;
        box-sizing: border-box;
    }
    /* 全局图片自适应，杜绝横向滚动 */
    img {
        max-width: 100%;
        height: auto;
        object-fit: cover;
    }
    /* 手机端首页卡片对齐列表样式 */
    .hot-card{
    border-radius:8px;
    overflow:hidden;
    min-height:100px;
    /* 继承桌面端flex居中，不再重写display，避免覆盖 */
    }
    .hot-card .card-title{
    padding:0 8px;
    }
	/*手机端首页图片改为16比9 */
    .hot-card .card-img{
    aspect-ratio:16/9;
    }
    /* 全局缩小基础字号，适配手机阅读 */
    body {
        font-size: 14px;
    }
    .module-title, .block-title {
        font-size: 16px;
    }

    /* ========== 顶部头部header适配 ========== */
    .header-wrap {
        height: auto;
        padding: 12px 0;
    }
    .header-inner {
        width: 100%;
        height: auto;
        flex-wrap: wrap;
        gap: 12px;
    }
    .logo {
        width: 100%;
        font-size: 26px;
    }
    .search-box {
        width: 100%;
        max-width: unset;
        order: 2;
    }
    .top-nav {
        order: 3;
        gap: 10px;
    }
    .header-login {
        order: 4;
        margin-left: auto;
    }
    .nav-item, .header-login a {
        font-size: 14px;
        padding: 4px 6px;
    }

    /* ========== 首页三栏grid布局适配（左分类+中间主内容+右侧边栏） ========== */
    .home-main {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    /* 调整展示顺 */
    .home-center {
        grid-row: 2;
    }
    /* 移动端：左侧菜系分类 */
    .home-left-cate {
        grid-row: 1;
    }
    .home-left-cate .cate-list{
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;/* 生成3列，列宽度完全相等 */
        gap: 12px 10px;/* 12px：上下两行菜系之间的垂直距离； 10px：同一行两个菜系（川菜与湘菜）中间的横向空隙  */
    }
    .home-left-cate .cate-item{
        height:42px;/*  */
        box-sizing:border-box;/* 每一个菜系条目盒子固定高度 42px ， PC 端是 38px */
        justify-content:center;/* flex 布局的水平居中 */
    }
    /* 移动端隐藏右侧边栏 */
    .home-right {
        grid-row: 3;
        display: none;
    }
    /* 首页卡片双列改单列 */
    .hot-card-wrap {
        grid-template-columns: 1fr;
    }
    /* 轮播高度缩小适配手机 */
    .home-center .banner-box {
        height: auto;
    }
    .banner-desc h3 {
        font-size: 20px;
    }

    /* ========== 列表页布局适配 ========== */
    .list-main {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .recipe-list-wrap {
        grid-template-columns: 1fr;
    }

    /* ========== 自定义分类浏览页适配 ========== */
    .cate-col-group {
        grid-template-columns: repeat(2, 1fr);
    }

    /* ========== 菜谱详情页双栏适配（主内容+右侧边栏） ========== */
    .article-main {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    /* 手机端隐藏详情页右侧边栏 */
    .article-right {
        display: none !important;
        float: none !important;
        width: 100% !important;
        margin: 0 !important;
    }
    .article-title {
        font-size: 22px;
    }

    /* ========== 通用组件微调 ========== */
    /* 标签列表铺满整行 */
    .tag-list {
        gap: 6px;
    }
    .tag-group .tag-item {
        padding: 4px 10px;
        font-size: 13px;
    }
    /* 侧边模块上下边距缩小 */
    .right-module {
        padding: 12px;
    }
	/* 移动端隐藏右侧边栏登录框（红圈整块） */
    .login-box {
        display: none;
    }
    /* 页脚缩小间距 */
    .footer-wrap {
        margin-top: 30px;
        padding: 20px 0;
    }
    /* 移动端底部各行垂直间距收紧 */
    .footer-about p {
        margin-bottom: 6px;
    }
    .footer-link {
        margin-bottom: 6px;
    }
    .footer-link a {
        margin: 0 2px;
        font-size: 12px;
    }
    .footer-copyright {
        font-size: 11px;
    }
	/*========== 饮食古籍卡片模块 ==========*/
	.antique-card-wrap {
        grid-template-columns: 1fr;
    }
}

/* 古籍卡片 - 平板适配 */
@media (max-width:992px) and (min-width:769px) {
  .antique-card-wrap {
    grid-template-columns: repeat(2,1fr);
  }
}