/*
Theme Name: GeneratePress Child
Template: generatepress
Description: PCB信息港 - 标准分离式定制主题
*/

/* 全局布局 */
.homepage-layout .grid-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px 15px;
}

/* 第一行：轮播7 : 右侧3 间隔30px */
.top-banner-row {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    align-items: stretch;
}
.banner-slider-wrap {
    flex: 7;
    position: relative;
    overflow: visible;
    border-radius: 4px;
}
.price-sidebar {
    flex: 3;
    display: none; /* 预留报价模块 */
    background: #fff;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 4px;
}

/* ========== 轮播样式 ========== */
.slider-stage {
    width: 100%;
    height: 400px;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}
.slider-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}
.slider-item.active {
    display: block !important;
}
.slider-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

/* Banner 文章标题 */
.banner-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: #fff;
    font-size: 22px;
    font-weight: 600;
    z-index: 3;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(0,0,0,0.6);
    border: none;
    color: #fff;
    cursor: pointer;
    z-index: 99999;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.prev-arrow {
    left: 15px;
}
.next-arrow {
    right: 15px;
}
.slider-arrow::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border: solid #fff;
    border-width: 2px 2px 0 0;
}
.prev-arrow::before {
    transform: rotate(-135deg);
}
.next-arrow::before {
    transform: rotate(45deg);
}

/* ========== 三列频道布局 ========== */
.channel-three-col-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.channel-col {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 20px;
}

/* 频道标题：18字符限制 + 悬浮显示完整标题 */
.channel-col-heading {
    font-size: 18px;
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.channel-col-heading a {
    color: #222;
    text-decoration: none;
}
.channel-col-heading a:hover {
    color: #007cba;
}

/* 文章列表 */
.channel-post-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.channel-post-item {
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}
.channel-post-item:last-child {
    border-bottom: none;
}
.channel-post-item a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
}
.channel-post-item a:hover {
    color: #007cba;
}

/* ======================== B 站频道页 + 详情页 布局样式（补齐）======================== */
.site-content {
    max-width: 1240px;
    margin: 30px auto;
    padding: 0 15px;
}
.category-row,
.single-post-row {
    display: flex;
    gap: 30px;
}
.category-main,
.single-post-main {
    flex: 1;
    min-width: 0;
}
.category-sidebar,
.single-post-sidebar {
    width: 320px;
    min-width: 320px;
}

/* 频道头部 */
.category-header h1 {
    font-size: 24px;
    margin: 0 0 10px;
}
.category-header h2 {
    font-size: 16px;
    font-weight: normal;
    color: #666;
    margin: 0 0 20px;
}

/* 频道大图 */
.category-banner-section {
    margin-bottom: 20px;
}
.category-banner-item a {
    display: block;
    position: relative;
}
.category-banner-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}
.category-banner-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 20px;
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: 18px;
    border-radius: 0 0 6px 6px;
}

/* 频道文章列表 */
.category-post-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.category-post-list li {
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
}
.category-post-list li a {
    font-size: 16px;
    color: #222;
    text-decoration: none;
}
.category-post-list li a:hover {
    color: #007cba;
}

/* 侧边栏通用 */
.sidebar-widget {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 18px;
    margin-bottom: 20px;
}
.sidebar-widget-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}
.sidebar-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-widget li {
    padding: 6px 0;
    border-bottom: 1px dashed #f1f1f1;
}
.sidebar-widget li a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
}
.sidebar-widget li a:hover {
    color: #007cba;
}

/* 详情页 */
.single-post-main h1 {
    font-size: 26px;
    margin: 0 0 20px;
    line-height: 1.4;
}
.single-post-content {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
}
.breadcrumbs {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}
.breadcrumbs a {
    color: #007cba;
    text-decoration: none;
}

/* 响应式 */
@media(max-width: 992px){
    .category-row,
    .single-post-row {
        flex-direction: column;
    }
    .category-sidebar,
    .single-post-sidebar {
        width: 100%;
        min-width: auto;
    }
    .channel-three-col-row {
        grid-template-columns: 1fr;
    }
}
@media(max-width: 768px){
    .top-banner-row {
        flex-direction: column;
    }
    .slider-item img,
    .slider-stage {
        height: 260px;
    }
    .banner-title {
        font-size: 18px;
        padding: 15px 20px;
    }
}