/* Product Category Page - B2B Style */
:root {
    --primary-color: #1e3a5f;
    --secondary-color: #2d5a87;
    --accent-color: #c9a227;
    --text-dark: #1a1a1a;
    --text-gray: #666;
    --bg-light: #f5f7fa;
    --border-color: #e5e7eb;
    --white: #fff;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --radius: 8px;
    --transition: all 0.3s ease;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
.product-page { max-width: 1200px; margin: 0 auto; padding: 20px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--text-dark); }
.product-breadcrumb { padding: 15px 0; font-size: 14px; color: var(--text-gray); }
.breadcrumb-wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.breadcrumb-wrap a { color: var(--primary-color); text-decoration: none; transition: var(--transition); }
.breadcrumb-wrap a:hover { color: var(--accent-color); }
.breadcrumb-sep { color: #ccc; }
.breadcrumb-current { color: var(--text-gray); }
.product-layout { display: grid; grid-template-columns: 280px 1fr; gap: 30px; margin-top: 20px; }
.product-sidebar { flex-shrink: 0; }
/* Sidebar Widget - Enhanced for UX & SEO */
.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius);
    padding: 0;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.sidebar-widget .widget-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--white);
    padding: 14px 18px;
    margin: 0;
    border-bottom: none;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar-widget .widget-title::before {
    content: '';
    display: block;
    width: 3px;
    height: 18px;
    background: var(--accent-color);
    border-radius: 2px;
}
.sidebar-widget .widget-title a {
    color: var(--white);
    text-decoration: none;
    transition: opacity 0.2s;
}
.sidebar-widget .widget-title a:hover {
    opacity: 0.85;
}

/* Category Navigation - Modern Accordion Style */
.category-nav {
    list-style: none;
    padding: 10px 0;
}
.category-item {
    margin: 0;
    border-bottom: 1px solid var(--border-color);
}
.category-item:last-child {
    border-bottom: none;
}
.category-item > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 18px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 14px;
}
.category-item > a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
    padding-left: 22px;
}
.category-item > a .nav-arrow {
    position: relative;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.4;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.category-item > a:hover .nav-arrow {
    opacity: 1;
    color: var(--primary-color);
}
/* 重置 visited 样式，避免紫色显示 */
.category-nav a:visited {
    color: var(--text-dark);
}
/* 当前选中分类 - 支持各种 WordPress class */
.category-nav > li.current > a,
.category-nav > li.current-cat > a,
.category-nav > li.current > a:visited,
.category-nav > li.current-cat > a:visited,
.category-nav > li.has-children.current > a,
.category-nav > li.has-children.current > a:visited {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
}
.category-nav > li.current > a .nav-arrow::before,
.category-nav > li.current-cat > a .nav-arrow::before,
.category-nav > li.has-children.current > a .nav-arrow::before {
    background: rgba(255,255,255,0.25);
    color: #fff;
}
/* 父分类选中 */
.category-nav > li.current-cat-parent > a,
.category-nav > li.current-cat-parent > a:visited,
.category-nav > li.has-children.current-cat-parent > a,
.category-nav > li.has-children.current-cat-parent > a:visited {
    color: var(--text-dark);
    background: rgba(0, 102, 204, 0.08);
}
.category-nav > li.has-children > a .nav-arrow::before {
    content: '+';
    font-size: 18px;
    font-weight: 700;
    color: #0066cc;
    background: rgba(0, 102, 204, 0.12);
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    position: absolute;
}
.category-nav > li.has-children > a:hover .nav-arrow::before {
    background: #0066cc;
    color: #fff;
    transform: scale(1.1);
}
.category-nav > li.has-children.open > a .nav-arrow::before {
    content: '-';
    font-size: 22px;
}

/* Current/Active State */
.category-nav > li.current > a {
    background: linear-gradient(90deg, var(--primary-color), transparent);
    color: var(--white);
    font-weight: 600;
}
.category-nav > li.current > a:hover {
    background: linear-gradient(90deg, var(--primary-color), transparent);
    color: var(--white);
    padding-left: 18px;
}
.category-nav > li.current > a .nav-arrow {
    opacity: 1;
    color: var(--white);
}

/* Sub-category - Clean Indented List */
.sub-category {
    list-style: none;
    padding: 0;
    margin: 0;
    background: var(--bg-light);
    display: none;
}
.category-nav > li.current > .sub-category,
.category-nav > li.has-children.open > .sub-category {
    display: block;
}
.sub-category-item {
    margin: 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.sub-category-item:last-child {
    border-bottom: none;
}
.sub-category-item a {
    display: flex;
    align-items: center;
    padding: 11px 18px 11px 30px;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s ease;
    border-left: 2px solid var(--border-color);
    margin-left: 18px;
}
.sub-category-item a:hover {
    color: var(--primary-color);
    background: rgba(255,255,255,0.7);
    border-left-color: var(--primary-color);
}
.sub-category-item.current a {
    color: var(--accent-color);
    font-weight: 600;
    border-left-color: var(--accent-color);
}

/* Sidebar CTA - Quote Block */
.sidebar-cta {
    background: linear-gradient(135deg, #1e3a5f, #2d5a87);
    color: #fff;
    border-radius: var(--radius);
    margin-bottom: 20px;
}
.sidebar-cta .widget-title {
    color: #fff;
    background: transparent;
}
.sidebar-cta .widget-title::before {
    display: none;
}
.sidebar-cta p {
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 15px;
    opacity: 0.9;
    padding: 15px 18px 0;
}
.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 18px 18px;
    padding: 11px 20px;
    background: #c9a227;
    color: #1a1a1a;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}
.cta-btn:hover {
    background: #ddb52e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201,162,39,0.4);
}
.cta-btn::after {
    content: '→';
    transition: transform 0.2s ease;
}
.cta-btn:hover::after {
    transform: translateX(3px);
}

/* Sidebar Contact Block */
.sidebar-contact {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}
.sidebar-contact .widget-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--white);
    padding: 14px 18px;
    margin: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}
.sidebar-contact .widget-title::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent-color);
}
.sidebar-contact .contact-content {
    padding: 18px;
}
.sidebar-contact p {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 10px;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.sidebar-contact p:last-child {
    margin-bottom: 0;
}
.sidebar-contact strong {
    color: var(--text-dark);
    min-width: 50px;
}
/* Full-width category header (above sidebar+content layout) */
.category-header-full {
    width: 100%;
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}
.category-header-full .product-title {
    margin-bottom: 8px;
}
.category-header-full .product-count {
    display: inline-block;
    margin-bottom: 15px;
}
.category-header-full .product-description {
    text-align: left;
    margin-top: 10px;
    margin-bottom: 0;
    border: 1px solid #ddd;
    border-left: none;
    border-radius: 8px;
    background: #fafafa;
    padding: 20px;
    box-sizing: border-box;
}

.product-main { min-width: 0; }
.product-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 15px; padding-bottom: 20px; border-bottom: 2px solid var(--border-color); margin-bottom: 20px; }
.product-title { font-size: 28px; font-weight: 700; color: var(--primary-color); }
.product-count { font-size: 14px; color: var(--text-gray); background: var(--bg-light); padding: 6px 12px; border-radius: 20px; }
.product-description { margin-bottom: 25px; padding: 15px; background: var(--bg-light); border-radius: var(--radius); border-left: 4px solid var(--accent-color); }
.product-description p { color: var(--text-gray); line-height: 1.6; font-size: 15px; }
.product-list-title { font-size: 20px; font-weight: 600; color: var(--text-dark); margin: 0 0 20px 0; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 25px; }
.product-item { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); border: 1px solid var(--border-color); }
.product-item:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.12); border-color: var(--accent-color); }
.product-link { display: block; text-decoration: none; color: inherit; }
.product-image { position: relative; aspect-ratio: 1/1; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-image img { width: 100%; height: auto; max-height: 100%; object-fit: contain; transition: transform 0.3s ease; }
.product-item:hover .product-image img { transform: scale(1.05); }
/* Video play button */
.video-thumb .play-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,0.6); border-radius: 50%; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; opacity: 0.8; transition: all 0.3s ease; pointer-events: none; }
.video-thumb .play-btn svg { margin-left: 4px; }
.video-thumb:hover .play-btn { opacity: 1; background: rgba(201,162,39,0.9); transform: translate(-50%, -50%) scale(1.1); }
.product-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #ccc; font-size: 14px; }
.product-name { padding: 15px; font-size: 15px; font-weight: 600; color: var(--text-dark); text-align: center; line-height: 1.4; min-height: 4.2em; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; }
.no-products { grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: var(--text-gray); }
.no-products p { font-size: 16px; }
.product-pagination { margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--border-color); }
.pagination-numbers { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.page-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; background: var(--white); color: var(--text-dark); text-decoration: none; border: 1px solid var(--border-color); border-radius: 6px; font-size: 14px; font-weight: 500; transition: var(--transition); }
.page-btn:hover { background: var(--primary-color); color: var(--white); border-color: var(--primary-color); }
.page-btn.current { background: var(--primary-color); color: var(--white); border-color: var(--primary-color); }
.page-btn.prev, .page-btn.next { padding: 0 16px; }
.page-dots { padding: 0 8px; color: var(--text-gray); }
@media (max-width: 1024px) { .product-layout { grid-template-columns: 240px 1fr; gap: 25px; } }
@media (max-width: 768px) { .product-layout { grid-template-columns: 1fr; } .product-sidebar { order: 2; } .product-main { order: 1; } .category-nav { max-height: none; overflow-y: visible; border: none; border-radius: 0; } .category-item { margin-bottom: 0; border-bottom: 1px solid var(--border-color); } .category-item:last-child { border-bottom: none; } .category-item > a { padding: 12px 40px 12px 15px; font-size: 14px; } .category-nav > li.has-children > a { position: relative; } .category-nav > li.has-children > a::after { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 16px; color: var(--text-secondary); } .sub-category { display: none; padding-left: 15px; background: var(--bg-light); } .sub-category.active { display: block; } .sub-category-item a { padding: 10px 15px; font-size: 13px; } .product-title { font-size: 22px; } .product-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; } .sidebar-widget { padding: 15px; } .category-header-full { margin-bottom: 20px; padding-bottom: 15px; } .category-header-full .product-title { font-size: 22px; } .category-header-full .product-description { padding: 12px; } }
@media (max-width: 480px) { .product-page { padding: 15px; } .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } .product-name { padding: 8px 10px !important; font-size: 13px !important; line-height: 19.4px !important; height: 70px !important; overflow: hidden !important; display: block !important; } .product-title { font-size: 20px; } .page-btn { min-width: 36px; height: 36px; font-size: 13px; } .category-header-full .product-title { font-size: 20px; } }

/* Popular Products Widget */
.sidebar-popular .popular-list,
.popular-widget .popular-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.popular-widget .popular-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}
.popular-widget .popular-item:first-child {
    padding-top: 20px;
}
.popular-widget .popular-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.popular-widget .popular-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    display: block;
}
.popular-widget .popular-thumb img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    display: block;
}
.popular-widget .popular-no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 60px;
    background: #f0f4f8;
    color: #999;
    font-size: 11px;
    border-radius: 4px;
}
.popular-widget .popular-info {
    flex: 1;
    min-width: 0;
}
.popular-widget .popular-title {
    display: block;
    font-size: 14px;
    color: var(--text-dark);
    text-decoration: none;
    line-height: 1.4;
    overflow-wrap: break-word;
    word-break: break-word;
}
.popular-widget .popular-title:hover {
    color: var(--primary-color);
}
.popular-widget .popular-price {
    display: inline-block;
    margin-top: 4px;
    font-size: 13px;
    color: #d4a843;
    font-weight: 600;
}

/* Popular Videos Widget */
.sidebar-popular .popular-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-popular .popular-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}
.sidebar-popular .popular-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.sidebar-popular .popular-thumb {
    flex-shrink: 0;
    display: block;
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}
.sidebar-popular .popular-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.sidebar-popular .video-thumb::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.8);
}
.sidebar-popular .video-thumb::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 54%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 0 5px 9px;
    border-color: transparent transparent transparent #fff;
    z-index: 1;
}
.sidebar-popular .popular-info {
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}
.sidebar-popular .popular-title {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.4;
    text-decoration: none;
    margin-bottom: 4px;
}
.sidebar-popular .popular-title:hover {
    color: var(--secondary-color);
}
.sidebar-popular .popular-date {
    font-size: 11px;
    color: var(--text-gray);
}

/* Category Banner */
.category-banner {
    width: 100%;
    margin-bottom: 24px;
    overflow: hidden;
    border-radius: 8px;
}
.category-banner img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}
@media (max-width: 768px) {
    .category-banner {
        margin-bottom: 16px;
        border-radius: 6px;
    }
    .category-banner img {
        border-radius: 6px;
    }
}