/* 产品页面样式 */
.product_sub_page {
    padding: 0;
    background-color: #fff;
}

/* 产品分类菜单样式 */
.product_sub_page-menu-items-container {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    border-radius: 10px;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    font-size: 20px;
}

.product_sub_page-menu-category {
    border-bottom: 1px solid #eaeaea;
}

.product_sub_page-menu-category:last-child {
    border-bottom: none;
}

.product_sub_page-menu-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    transition: background 0.3s ease;
}

.product_sub_page-menu-category.active .product_sub_page-menu-category-header {
    background: #e3f2fd;
}

.product_sub_page-menu-category-header:hover {
    background: #e9ecef;
}

.category-link {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.category-link::before {
    content: "▼";
    font-size: 10px;
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.product_sub_page-menu-category.active .category-link::before {
    transform: rotate(-180deg);
}

.product_sub_page-menu-toggle {
    cursor: pointer;
    color: #6c757d;
    padding: 5px;
    transition: transform 0.3s ease;
}

.product_sub_page-menu-category.active .product_sub_page-menu-toggle {
    transform: rotate(180deg);
}

.product_sub_page-menu-subitems {
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

.product_sub_page-menu-subitems.collapsed {
    max-height: 0;
    opacity: 0;
    display: none;
}

.product_sub_page-menu-subitems.expanded {
    opacity: 1;
}

.product_sub_page-menu-subitem {
    padding: 12px 20px 12px 35px;
    border-bottom: 1px solid #f1f1f1;
    background: white;
    transition: background 0.2s ease;
}

.product_sub_page-menu-subitem:last-child {
    border-bottom: none;
}

.product_sub_page-menu-subitem:hover {
    background: #f8f9fa;
}

.product_sub_page-menu-subitem.active {
    background: #e3f2fd;
    border-left: 3px solid #1874d5;
}

.product_sub_page-menu-subitem a {
    text-decoration: none;
    color: #495057;
    font-size: 16px;
    display: block;
    transition: color 0.2s ease;
}

.product_sub_page-menu-subitem a::before {
    content: "●";
    margin-right: 8px;
    font-size: 10px;
    color: #74b9ff;
}

.product_sub_page-menu-subitem.active a::before {
    color: #1874d5;
}

.product_sub_page-menu-subitem a:hover {
    color: #1874d5;
}

/* 面包屑样式 */
.product_sub_page-breadcrumb {
    background: white;
    padding: 15px 0px;
    border-radius: 6px;
    font-size: 14px;
}

.product_sub_page-breadcrumb a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 2px 4px;
    border-radius: 3px;
}

.product_sub_page-breadcrumb a:hover {
    color: #1976d2;
    background-color: #f5f5f5;
}

.product_sub_page-breadcrumb span:last-child {
    color: #666;
    font-weight: 500;
}

.product-detail_sub_page-breadcrumb-separator {
    margin: 0 8px;
    color: #999;
}

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.product_sub_page-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* 子分类网格布局 */
.subcategory-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.subcategory-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.subcategory-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.subcategory-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.subcategory-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.subcategory-item:hover .subcategory-image img {
    transform: scale(1.05);
}

.subcategory-info {
    padding: 20px;
}

.subcategory-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.subcategory-desc {
    color: #666;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.5;
}

/* 产品列表样式 */
.product-list {
    /* margin-top: 30px; */
}

.product-list-title {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.product-item {
    display: flex;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.product-image {
    width: 250px;
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.product-desc {
    height: 1px;
    margin-bottom: 15px;
    line-height: 1.5;
}

/* 链接按钮样式 */
.subcategory-link,
.product-link {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

/* 无选择提示 */
.no-selection {
    text-align: center;
    padding: 60px 20px;
    color: #95a5a6;
    font-size: 18px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.mobile-you {
    display: none;
}

/* 左侧菜单移动端样式 */
@media (max-width: 768px) {
    .product_sub_page-layout {
        flex-direction: column;
        gap: 15px;
    }

    .product_sub_page-sidebar {
        flex: none;
        width: 100%;
    }

    .product_sub_page-menu-items-container {
        border-radius: 0;
        box-shadow: none;
        background: transparent;
        display: flex;
        flex-wrap: wrap;
        /* justify-content: space-around; */
        overflow: visible !important;
        padding: 10px 0;
        scrollbar-width: none;
        position: relative;
    }

    .product_sub_page-menu-items-container::-webkit-scrollbar {
        display: none;
    }

    .product_sub_page-menu-category {
        width: 46%;
        border-bottom: none;
        /* 关键修复：确保相对定位的父元素有合适的尺寸和溢出设置 */
        position: relative;
        flex-shrink: 0;
        margin-right: 10px;
        min-width: 150px;
        overflow: visible !important;
    }

    .product_sub_page-menu-category-header {
        padding: 10px 20px;
        white-space: nowrap;
        background: white;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        position: relative;
        z-index: 1;
    }

    .product_sub_page-menu-toggle {
        display: none;
    }

    .product_sub_page-menu-category.active .product_sub_page-menu-category-header {
        background: #1874d5;
        color: white;
    }

    .product_sub_page-menu-category.active .category-link {
        color: white;
    }

    .category-link::before {
        display: none;
    }

    .product_sub_page-menu-subitems {
        position: absolute;
        top: 100%;
        /* 从父元素底部开始 */
        left: 0;
        width: 100%;
        background: white;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        z-index: 2;
        /* 提高层级确保显示在最前面 */
        margin-top: 5px;

        /* 确保显示控制 */
        display: none;
        max-height: none !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .product_sub_page-menu-subitems.collapsed {
        display: none;
    }

    .product_sub_page-menu-subitems.expanded {
        display: block;
        background: url('../images/下拉底框.png');
    }

    .product_sub_page-menu-subitem {
        padding: 12px 15px;
        border-bottom: none;
        white-space: normal;
        background: none;
    }

    .product_sub_page-menu-subitem:last-child {
        border-bottom: none;
    }

    .product_sub_page-menu-subitem a {
        font-size: 14px;
        white-space: normal;
        word-wrap: break-word;
        color: #ffffff;
    }

    .product_sub_page-menu-subitem:hover a {
        color: #000000;
    }

    .category-link {
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .subcategory-grid {
        grid-template-columns: 1fr;
    }

    .product-item {
        flex-direction: column;
    }

    .product-image {
        width: 100%;
        height: 200px;
    }

    .product-list-title {
        font-size: 20px;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .product_sub_page-menu-items-container {
        max-width: 100%;
    }

    .product_sub_page-menu-category-header {
        padding: 12px;
    }

    .product_sub_page-menu-subitem {
        padding: 10px 15px 10px 10px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .product_sub_page-menu-subitem.active {
        background: none;
    }

    .product_sub_page-menu-subitem.active:hover {
        background: #f8f9fa;
        ;
    }

    .mobile-you {
        display: block;
        width: 10px;
        height: 16px;
    }
}

/* ===== PC端样式 ===== */
@media (min-width: 992px) {
    .product_sub_page .container {
        max-width: none;
        padding: 0;
    }

    .product_sub_page-main-content,
    .product_sub_page-breadcrumb-header,
    .product_sub_page-logo-section {
        width: 77%;
        margin: 0 auto;
    }

    .product_sub_page-main-content>.container,
    .product_sub_page-breadcrumb-header>.container,
    .product_sub_page-logo-section>.container {
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
        padding: 0;
        border-radius: 0;
        overflow: hidden;
    }

    .product_sub_page-layout {
        display: flex;
        gap: 30px;
        max-width: 1200px;
        margin: 0 auto;
    }

    .product_sub_page-sidebar {
        width: 220px;
        background-color: #fff;
        padding: 10px;
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    }

    .product_sub_page-menu-header {
        width: 100%;
        margin-bottom: 15px;
        text-align: center;
    }

    .product_sub_page-menu-header img {
        max-width: 100%;
        height: auto;
    }

    .product_sub_page-content {
        flex: 1;
        background-color: #fff;
        padding: 25px;
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    }

    /* .product_sub_page-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    } */

    .product_sub_page-container.detail-view {
        display: block;
        /* 详情视图时，切换回块布局 */
    }

    .product_sub_page-logo-section {
        background-color: #1874d5;
        padding: 20px 0;
        margin-bottom: 30px;
    }

    .product_sub_page-title-main {
        color: #fff;
        margin: 0;
        font-size: 28px;
        font-weight: bold;
        text-align: center;
    }

    .product_sub_page-breadcrumb-header {
        background-color: transparent;
        padding: 15px 0;
    }

    .product_sub_page-breadcrumb {
        font-size: 14px;
    }

    .product_sub_page-breadcrumb-item {
        display: inline-block;
    }

    .product_sub_page-breadcrumb-separator {
        margin: 0 8px;
        color: #ccc;
    }

    .product_sub_page-breadcrumb-item.current {
        color: #1874d5;
        font-weight: 500;
    }

    .product_sub_page-loading {
        text-align: center;
        padding: 30px;
        font-size: 16px;
        color: #666;
    }

    .product_sub_page-error-message {
        color: #dc3545;
        text-align: center;
        padding: 30px 0;
        font-size: 16px;
    }

    /* 产品卡片样式 */
    .product-card {
        background-color: #fff;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        overflow: hidden;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        display: flex;
        flex-direction: column;
    }

    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    }

    .product-card-link {
        text-decoration: none;
        color: inherit;
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .product-card-image-wrapper {
        width: 100%;
        padding-top: 56.25%;
        /* 16:9 宽高比 */
        position: relative;
        overflow: hidden;
    }

    .product-card-image-wrapper img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        /* 保证图片不变形 */
    }

    .product-card-content {
        padding: 15px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        flex-grow: 1;
        background-color: #f8f9fa;
    }

    .product-card-title {
        font-size: 16px;
        font-weight: 500;
        margin: 0 0 10px 0;
        line-height: 1.4;
        flex-grow: 1;
    }

    .product-card-action {
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }

    .product-card-button {
        color: #1874d5;
        font-size: 14px;
        font-weight: 500;
        text-decoration: none;
        padding: 5px 10px;
        border: 1px solid #1874d5;
        border-radius: 20px;
        transition: background-color 0.3s, color 0.3s;
    }

    .product-card-button:hover {
        background-color: #1874d5;
        color: #fff;
    }

    .product_sub_page-no-data {
        text-align: center;
        padding: 30px 0;
        color: #999;
        font-size: 16px;
        grid-column: 1 / -1;
        /* 让此元素占据整行 */
    }

    /* 产品详情内容样式 */
    .product-detail-content {
        padding: 20px;
        background-color: #fff;
        grid-column: 1 / -1;
        /* 占据整个网格宽度 */
    }

    .product-detail-title {
        font-size: 28px;
        text-align: center;
        margin-bottom: 25px;
        color: #333;
        font-weight: 600;
    }

    .product-detail-body {
        font-size: 16px;
        line-height: 1.8;
        color: #555;
    }

    .product-detail-body img {
        max-width: 100%;
        height: auto;
        margin: 20px auto;
        display: block;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
}

/* ===== 平板过渡样式 ===== */
@media (min-width: 768px) and (max-width: 991px) {
    .product_sub_page-layout {
        flex-direction: column;
        max-width: 90%;
        margin: 0 auto;
    }

    .product_sub_page-sidebar {
        width: 100%;
        margin-bottom: 20px;
        display: flex;
        justify-content: center;
        padding: 10px;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    }

    .product_sub_page-menu-header {
        display: none;
    }

    .product_sub_page-content {
        padding: 20px;
    }

    .product_sub_page-container {
        grid-template-columns: repeat(2, 1fr);
        /* 平板上仍然是2列 */
    }
}

/* ===== 手机端样式 ===== */
@media (max-width: 767px) {
    .product_sub_page .container {
        padding-left: 0;
        padding-right: 0;
    }

    .product_sub_page-content {
        background-color: transparent;
        box-shadow: none;
        padding: 10px;
    }

    .product_sub_page-layout {
        flex-direction: column;
        gap: 0;
    }

    .product_sub_page-sidebar {
        width: 100%;
        display: flex;
        padding: 0 10px;
        margin: 0;
        box-shadow: none;
        border-bottom: 1px solid #eee;
        border-radius: 0;
        background-color: #f8f9fa;
        position: relative;
    }

    .product_sub_page-menu-header {
        display: none;
    }

    .product_sub_page-container {
        grid-template-columns: 1fr;
        /* 手机上改为单列 */
        gap: 15px;
    }

    .product_sub_page-breadcrumb-header {
        padding: 8px 0;
    }

    .product_sub_page-breadcrumb {
        padding: 0 10px;
        font-size: 15px;
    }

    .product_sub_page-logo-section {
        padding: 15px 0;
        margin-bottom: 15px;
    }

    .product_sub_page-title-main {
        font-size: 20px;
    }
}