.simple-category-filter {
    display: flex;
    flex-wrap: wrap; /* 允许子元素换行 */
}

.category-list {
    width: 20%;
    padding-right: 20px;
    background-color: #f9f9f9; /* 设置背景颜色 */
    border-radius: 5px; /* 添加圆角 */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* 添加阴影 */
}

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

.category-list ul li {
    position: relative;
}

.category-list ul li a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s ease; /* 添加过渡效果 */
}

.category-list ul li a:hover {
    background-color: #eaeaea; /* 悬停时背景颜色变化 */
}

.category-list ul ul {
    padding-left: 20px;
    display: none; /* 默认隐藏子菜单 */
}

.category-list ul ul ul {
    padding-left: 20px; /* 为三级菜单添加内边距 */
}

.category-list ul li a img {
    max-width: 20px;
    height: auto;
    margin-right: 7px;
    vertical-align: middle;
}


.product-list {
    width: 80%;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    align-content: flex-start;
    list-style-type: none;
    margin: 0;
    padding: 0;
    row-gap: 8px; 
}

/* 假设当前设置的每行产品数为 4，可根据实际情况修改 */
.product-list .product {
    width: calc(100% / 4);
    box-sizing: border-box;
    padding: 10px;
}

.load-more-button {
    text-align: center;
    margin-top: 20px;
    width: 100%; /* 按钮宽度占满一行 */
    order: 1; /* 确保按钮在产品列表之后 */
}

.woocommerce-loop-product__title {
    font-size: 15px; /* 设置字体大小为 18px */
    word-wrap: break-word; /* 允许单词换行 */
    white-space: normal; /* 正常换行 */
    max-width: 100%; /* 最大宽度不超过父元素（产品项）宽度，通常与图片宽度一致 */
        display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    max-height: 3em;
}

.add_to_cart_button {
    border: 1px solid #ccc; /* 添加 1px 宽的灰色边框 */
    padding: 5px 10px; /* 增加内边距，让按钮内容与边框有间距 */
    border-radius: 3px; /* 给边框添加圆角 */
    text-align: center; /* 文本居中 */
    display: inline-block; /* 让按钮以块级元素显示，但不会独占一行 */
    transition: background-color 0.3s ease;
}

.add_to_cart_button:hover {
    background-color: #eaeaea; /* 悬停时背景颜色变化 */
}

/* 箭头样式 */
.category-list a .arrow-down {
    display: inline-block;
    margin-left: 5px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid currentColor; /* 颜色跟随文字颜色 */
    transition: transform 0.3s ease;
}

.category-list a.active .arrow-down {
    transform: rotate(180deg);
}



/* Style 1: 现有风格 */
.style1.category-list {
    width: 20%;
    padding-right: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.style1.category-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.style1.category-list ul li {
    position: relative;
}

.style1.category-list ul li a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.style1.category-list ul li a:hover {
    background-color: #eaeaea;
}

.style1.category-list ul ul {
    padding-left: 20px;
    display: none;
}

.style1.category-list ul ul ul {
    padding-left: 20px;
}

/* Style 2: 简洁风格 */
.style2.category-list {
    width: 20%;
    padding-right: 20px;
    background-color: #fff;
    border: 1px solid #eee;
}

.style2.category-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.style2.category-list ul li {
    border-bottom: 1px solid #eee;
}

.style2.category-list ul li a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.style2.category-list ul li a:hover {
    background-color: #f5f5f5;
}

.style2.category-list ul ul {
    padding-left: 20px;
    display: none;
    background-color: #f9f9f9;
}

.style2.category-list ul ul ul {
    padding-left: 20px;
}

/* Style 3: 深色风格 */
.style3.category-list {
    width: 20%;
    padding-right: 20px;
    background-color: #333;
    color: #fff;
}

.style3.category-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.style3.category-list ul li {
    border-bottom: 1px solid #444;
}

.style3.category-list ul li a {
    display: block;
    padding: 10px 15px;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.style3.category-list ul li a:hover {
    background-color: #444;
}

.style3.category-list ul ul {
    padding-left: 20px;
    display: none;
    background-color: #444;
}

.style3.category-list ul ul ul {
    padding-left: 20px;
}

/* Tags Style */
.scf-tags-container {
    width: 100%;
    flex-basis: 100%;
    margin-bottom: 20px;
    padding: 0 10px;
    box-sizing: border-box;
}

.scf-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    overflow: hidden;
    max-height: 65px; /* 2 lines: approx 28px per tag + 8px gap */
    transition: max-height 0.3s ease-out;
}

.scf-tags-list.expanded {
    max-height: 1000px; /* Large enough value to show all */
}

.scf-tag {
    display: inline-block;
    padding: 5px 12px;
    background-color: #f0f0f1;
    border-radius: 15px;
    color: #333;
    font-size: 15px; /* 字号放大 */
    font-weight: bold; /* 加粗 */
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1.2;
    border: 1px solid transparent;
}

.scf-tag:hover {
    background-color: #e5e5e5;
    border-color: #ccc;
}

.scf-tag.active {
    background-color: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.scf-tags-arrow {
    text-align: center;
    cursor: pointer;
    color: #888;
    margin-top: 5px;
    line-height: 1;
}

.scf-tags-arrow:hover {
    color: #333;
}

.scf-tags-arrow .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}
