/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */

/* Banner样式 */
.product-category-banner {
    width: 100%;
    margin-bottom: 30px;
    overflow: hidden;
}

.product-category-banner img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* ============================================
   产品分类列表短代码样式
   ============================================ */

/* 分类网格容器 */
.product-categories-grid {
    display: grid;
    gap: 30px;
    margin: 40px 0;
}

/* PC端：2列布局 */
@media (min-width: 768px) {
    .product-categories-grid[data-columns="2"] {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-categories-grid[data-columns="3"] {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .product-categories-grid[data-columns="4"] {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 移动端：1列布局 */
@media (max-width: 767px) {
    .product-categories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* 分类卡片 */
.category-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.category-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* 分类卡片图片区域 */
.category-card-image {
    position: relative;
    width: 100%;
    height: 400px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 移动端图片高度调整 */
@media (max-width: 767px) {
    .category-card-image {
        height: 350px;
    }
}

/* 渐变叠加层 */
.category-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
    display: flex;
    align-items: flex-end;
    padding: 30px;
    transition: background 0.3s ease;
}

.category-card:hover .category-card-overlay {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.8) 100%
    );
}

/* 分类内容区域 */
.category-card-content {
    width: 100%;
    color: #fff;
}

/* 分类标题 */
.category-card-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    color: #fff;
    line-height: 1.3;
}

@media (max-width: 767px) {
    .category-card-title {
        font-size: 24px;
    }
}

/* 分类描述 */
.category-card-description {
    margin: 0;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
}

.category-card-description p {
    margin: 0;
    font-size: 15px;
}

/* PC端：默认隐藏描述，hover时显示 */
@media (min-width: 768px) {
    .category-card-description {
        opacity: 0;
        max-height: 0;
        overflow: hidden;
        transform: translateY(10px);
        transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.3s ease;
    }
    
    .category-card:hover .category-card-description {
        opacity: 1;
        max-height: 500px;
        transform: translateY(0);
    }
}

/* 移动端：直接显示描述 */
@media (max-width: 767px) {
    .category-card-description {
        opacity: 1;
        max-height: none;
        font-size: 14px;
    }
}

/* Read More 链接 */
.category-card-readmore {
    display: inline-block;
    margin-top: 15px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
    transition: transform 0.3s ease;
}

.category-card-readmore::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: #fff;
    transition: width 0.3s ease;
}

.category-card:hover .category-card-readmore {
    transform: translateX(5px);
}

.category-card:hover .category-card-readmore::after {
    width: 100%;
}

/* 无分类提示 */
.no-categories-found {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

/* ============================================
   产品分类面包屑导航样式
   ============================================ */

.ct-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 15px 0;
    font-size: 14px;
    line-height: 1.6;
}

.ct-breadcrumbs span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ct-breadcrumbs a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.ct-breadcrumbs a:hover {
    color: #000;
    text-decoration: underline;
}

.ct-breadcrumbs .last-item {
    color: #333;
    font-weight: 500;
}

.ct-breadcrumbs .ct-separator {
    opacity: 0.5;
    flex-shrink: 0;
}

/* 移动端优化 */
@media (max-width: 767px) {
    .ct-breadcrumbs {
        font-size: 13px;
        padding: 10px 0;
        gap: 6px;
    }
    
    .ct-breadcrumbs .ct-separator {
        width: 6px;
        height: 6px;
    }
}

/* ============================================
   分类Banner横幅展示样式
   ============================================ */

.category-banner-hero {
    width: 100%;
    margin: 0 0 40px 0;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.category-banner-hero-image {
    width: 100%;
    height: var(--banner-height, 460px);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    border-radius: 16px;
}

/* 移动端高度 */
@media (max-width: 767px) {
    .category-banner-hero-image {
        height: var(--banner-mobile-height, 350px);
    }
    
    .category-banner-hero {
        border-radius: 12px;
    }
    
    .category-banner-hero-image {
        border-radius: 12px;
    }
}

/* 渐变叠加层 */
.category-banner-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.05) 30%,
        rgba(0, 0, 0, 0.3) 60%,
        rgba(0, 0, 0, 0.6) 100%
    );
    display: flex;
    align-items: flex-end;
    border-radius: 16px;
}

@media (max-width: 767px) {
    .category-banner-hero-overlay {
        border-radius: 12px;
    }
}

/* 内容区域 */
.category-banner-hero-content {
    padding: 50px;
    max-width: 100%;
    width: 100%;
}

@media (max-width: 1024px) {
    .category-banner-hero-content {
        padding: 40px;
    }
}

@media (max-width: 767px) {
    .category-banner-hero-content {
        padding: 30px 25px;
    }
}

/* 标题样式 */
.category-banner-hero-title {
    font-size: 48px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 15px 0;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

@media (max-width: 1024px) {
    .category-banner-hero-title {
        font-size: 40px;
    }
}

@media (max-width: 767px) {
    .category-banner-hero-title {
        font-size: 28px;
        margin: 0 0 12px 0;
    }
}

/* 描述样式 */
.category-banner-hero-description {
    max-width: 800px;
}

.category-banner-hero-description p {
    font-size: 16px;
    line-height: 1.6;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

@media (max-width: 1024px) {
    .category-banner-hero-description p {
        font-size: 15px;
    }
}

@media (max-width: 767px) {
    .category-banner-hero-description {
        max-width: 100%;
    }
    
    .category-banner-hero-description p {
        font-size: 14px;
        line-height: 1.5;
    }
}

.our-series-desc,
.our-series-btn {
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    transition: opacity 0.3s ease, max-height 0.3s ease, visibility 0.3s ease;
}

@media (min-width: 1025px) {
    .our-series:hover .our-series-desc,
    .our-series:hover .our-series-btn {
        opacity: 1;
        visibility: visible;
        max-height: 500px; /* 设置一个足够大的值，确保内容能完全显示 */
    }
}

@media (max-width: 1024px) {
    .our-series-desc,
    .our-series-btn {
        opacity: 1 !important;
        visibility: visible !important;
        max-height: 500px !important; /* 或者使用 none */
    }
}
