/* 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%;
    height:180px;
    background:#f5f5f5;
    overflow:hidden;
}
.card-img img{
    width:100%;
    height:100%;
    object-fit:cover;
}

/* ========== 首页布局 ========== */
.home-main{
    display: grid;
    grid-template-columns: 140px 640px 280px;
    gap: 20px;
}

/* 首页左侧分类栏【适配fish图片图标核心修改】 */
.home-left-cate .cate-list{}
.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 1fr;
    gap:20px;
}
.hot-card{
    border:1px solid #eee;
    display: flex;
    flex-direction: column; /*垂直排列：图片在上，标题在下*/
}
.card-title{
    padding:8px 10px 4px;
    font-size:15px;
    text-align:center;
}
.card-info{
    padding:0 10px 10px;
    font-size:12px;
    color:#999;
}

/* 首页右侧边栏 */
.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 280px;
    gap:24px;
    padding: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;
}
/* 列表中间区域 */
.list-center{}
.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;
}
.filter-tab{}
.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(3,1fr);
    gap:24px;
}
.recipe-item{
    border:1px solid #eee;
    border-radius:8px;
    overflow:hidden;
}
.recipe-img{
    width:100%;
    height:160px;
}
.recipe-img img{
    width:100%;
    height:100%;
    object-fit:cover;
}
.recipe-info{
    padding:12px;
}
.recipe-name{
    font-size:15px;
    margin:0 0 6px;
    text-align: center;
}
.recipe-name a{
    color:#333;
}
.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: 30px 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;
}
.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;
}

/* ========== 内容详情页专属样式 ========== */
.article-main{
    display: grid;
    grid-template-columns: 820px 280px;
    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-author{
    margin:20px 0 30px;
}
.author-name{
    font-size:16px;
    color:#333;
    font-weight:bold;
}
.article-desc{
    margin-top:8px;
    font-size:14px;
    color:#666;
    line-height:1.7;
}
/* 详情四大内容模块通用 */
.article-block{
    margin-bottom:36px;
}
.block-title{
    font-size:20px;
    color:#b89860;
    padding-bottom:10px;
    border-bottom:1px solid #eee;
    margin-bottom:16px;
}
.block-content{
    font-size:16px;
    color:#333;
    line-height:1.8;
}
/* 食材准备条目 */
.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{}
.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;
    }
    /* 卡片图片高度自适应，固定高度改为自动 */
    .card-img {
        height: auto;
    }
    /* 全局缩小基础字号，适配手机阅读 */
    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: 1;
    }
    .home-left-cate {
        grid-row: 2;
		display: none; /* 新增，移动端直接隐藏左侧分类整块 */
    }
    .home-right {
        grid-row: 3;
    }
    /* 首页卡片双列改单列 */
    .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-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;
    }
}