/* 频道页面 - 船舶交易分类频道样式 */

/* ===== CSS 变量定义 - 匹配搜船网设计系统 ===== */
:root {
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --system-blue: #0A84FF;
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f8f9fa;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== 基础容器样式 ===== */
.channel-container {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    padding-bottom: 60px;
}

/* ===== 头部导航栏优化 ===== */
#head-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, var(--system-blue) 0%, var(--primary-600) 100%);
    box-shadow: 0 2px 12px rgba(10, 132, 255, 0.25);
    backdrop-filter: blur(10px);
}

.head-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 50px;
    padding: 0 16px;
    background: transparent;
}

.head-bar-back,
.head-bar-right {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
}

.head-bar-back a,
.head-bar-right a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.head-bar-back img,
.head-bar-right img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    vertical-align: middle;
}

.head-bar-back a:hover,
.head-bar-right a:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.08);
}

.head-bar-title {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.3px;
    line-height: 50px;
}

/* ===== 网格菜单样式 (mid <= 3) ===== */
.gird-5 {
    padding: 20px 16px;
    background: var(--bg-secondary);
    margin: 12px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.gird-5 ul {
    /*display: grid;*/
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.gird-5 li {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.gird-5 li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 12px 8px;
    border-radius: 12px;
    width: 100%;
}

.gird-5 li a:hover {
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--primary-100) 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(10, 132, 255, 0.15);
}

.gird-5 li img {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.gird-5 li span {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
}

/* ===== 分类侧边栏样式 (mid > 3) ===== */
.cat-side {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%) !important;
    border-right: 1px solid var(--border-color);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
}

.cat-side ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cat-side .side_li,
.cat-side .side_on {
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    cursor: pointer;
}

.cat-side .side_li:hover {
    background: linear-gradient(90deg, var(--primary-50) 0%, transparent 100%) !important;
    border-left-color: var(--system-blue);
}

.cat-side .side_on {
    background: linear-gradient(90deg, var(--primary-100) 0%, var(--primary-50) 100%) !important;
    border-left-color: var(--system-blue);
    color: var(--system-blue) !important;
    font-weight: 600 !important;
}

/* ===== 主内容区域样式 ===== */
.cat-main {
    background: var(--bg-secondary);
    min-height: calc(100vh - 50px);
}

.cat-main h3 {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    border-bottom: 2px solid var(--border-color) !important;
    padding: 0 20px !important;
    margin: 0;
    height: 52px;
    line-height: 52px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    position: sticky;
    top: 50px;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.cat-main h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.cat-main h3 a:hover {
    color: var(--system-blue);
}

.cat-main ul {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color) !important;
    overflow: hidden;
}

.cat-main li {
    float: none !important;
    text-align: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 12px 8px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.cat-main li:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(10, 132, 255, 0.12);
    border-color: var(--primary-400);
}

.cat-main li a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.cat-main li p {
    height: auto !important;
    line-height: 1.5 !important;
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.cat-main li img {
    width: 100% !important;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.cat-main li:hover img {
    transform: scale(1.05);
}

/* ===== 响应式优化 ===== */
@media (max-width: 375px) {
    .gird-5 ul {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
    
    .cat-main ul {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========== 针对 360x740 等小屏设备的精确优化 ========== */
@media (max-width: 380px) and (min-width: 340px) {
    /* 基础容器调整 */
    .channel-container {
        padding-bottom: 50px;
    }
    
    /* 头部导航栏优化 */
    #head-bar {
        height: 46px;
    }
    
    .head-bar {
        height: 46px;
        padding: 0 12px;
    }
    
    .head-bar-back,
    .head-bar-right {
        height: 46px;
    }
    
    .head-bar-back a,
    .head-bar-right a {
        width: 36px;
        height: 36px;
    }
    
    .head-bar-back img,
    .head-bar-right img {
        width: 22px;
        height: 22px;
    }
    
    .head-bar-title {
        font-size: 16px;
        line-height: 46px;
    }
    
    /* 网格菜单样式优化 */
    .gird-5 {
        padding: 16px 12px;
        margin: 8px;
        border-radius: 12px;
    }
    
    .gird-5 ul {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 10px !important;
    }
    
    .gird-5 li a {
        padding: 10px 6px;
    }
    
    .gird-5 li img {
        width: 36px;
        height: 36px;
        margin-bottom: 6px;
    }
    
    .gird-5 li span {
        font-size: 11px;
    }
    
    /* 分类侧边栏优化 */
    .cat-side {
        border-right: 1px solid var(--border-color) !important;
    }
    
    .cat-side ul {
        padding: 0;
    }
    
    .cat-side .side_li,
    .cat-side .side_on {
        font-size: 13px;
        padding: 12px 10px;
    }
    
    /* 主内容区域优化 */
    .cat-main {
        min-height: calc(100vh - 46px);
    }
    
    .cat-main h3 {
        height: 46px;
        line-height: 46px;
        top: 46px;
        font-size: 15px;
        padding: 0 16px !important;
    }
    
    .cat-main ul {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        padding: 12px !important;
    }
    
    .cat-main li {
        padding: 10px 8px;
        border-radius: 10px;
    }
    
    .cat-main li p {
        margin-top: 6px;
        font-size: 12px;
        line-height: 1.4 !important;
    }
    
    .cat-main li img {
        border-radius: 6px;
    }
}

@media (min-width: 768px) {
    .cat-main ul {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
}

/* ===== 动画效果 ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cat-main h3,
.cat-main ul,
.cat-side {
    animation: fadeIn 0.5s ease forwards;
}

/* ===== 加载状态 ===== */
#load-fix,
#head-fix {
    background: transparent;
}

/* ===== 链接悬停效果 ===== */
.cat-side a,
.cat-main a {
    position: relative;
    overflow: hidden;
}

.cat-side a::after,
.cat-main a::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, var(--primary-100) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    border-radius: 50%;
}

.cat-side a:hover::after,
.cat-main a:hover::after {
    width: 300px;
    height: 300px;
}

/* ===== 滚动条美化 ===== */
.cat-side::-webkit-scrollbar {
    width: 4px;
}

.cat-side::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.cat-side::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--system-blue) 0%, var(--primary-600) 100%);
    border-radius: 2px;
}

.cat-side::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-600) 0%, var(--primary-700) 100%);
}

/* ===== 选中状态高亮 ===== */
.cat-side .side_on {
    color: var(--system-blue) !important;
    font-weight: 600 !important;
    background: linear-gradient(90deg, var(--primary-100) 0%, var(--primary-50) 100%) !important;
    border-left: 3px solid var(--system-blue);
}

/* ===== 图标阴影优化 ===== */
.gird-5 li img,
.cat-side img {
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
}


.head-bar-right, .head-bar-back{
    padding: 0 0 0 0 !important;
}
