/**
 * 边栏分类区域 - 优雅清爽现代风格
 * 使用Bootstrap Icons和anime.js
 */

/* ===== 分类区域容器 ===== */
.widget_product_categories {
    background: #F5F5F5;
    /* border-radius: 16px; */
    padding: 0;
    margin-bottom: 2rem;
    border: none;
    position: relative;
    overflow: hidden;
}

/* ===== 分类标题 ===== */
.widget_product_categories .widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    padding: 1.25rem 1.5rem;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

/* 使用Bootstrap图标 - 分类图标 (实心版本) */
.widget_product_categories .widget-title::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%232c3e50' d='M1 2a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V2zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1V2zM1 7a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V7zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V7zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1V7zM1 12a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1v-2zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1v-2zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-2z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.widget_product_categories .widget-title::after {
    display: none;
}

/* ===== 分类列表 ===== */
.widget_product_categories .list-group {
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.widget_product_categories .list-group-item {
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 1.5rem;
    background: transparent;
    color: #2c3e50;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    text-decoration: none;
    position: relative;
}

.widget_product_categories .list-group-item:last-child {
    border-bottom: none;
    border-radius: 0 0 16px 16px;
}

.widget_product_categories .list-group-item:first-child {
    border-radius: 0;
}

/* ===== 悬停效果 ===== */
.widget_product_categories .list-group-item:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #1a1a1a;
    text-decoration: none;
    transform: translateX(4px);
}

/* ===== 激活状态 ===== */
.widget_product_categories .list-group-item.active {
    background: rgba(255, 255, 255, 0.25);
    color: var(--theme-color, #D7183D);
    font-weight: 600;
    border-left: 3px solid var(--theme-color, #D7183D);
}

.widget_product_categories .list-group-item.active:hover {
    background: rgba(255, 255, 255, 0.3);
    color: var(--theme-color, #D7183D);
    transform: translateX(6px);
}

/* ===== 图标样式 ===== */
.widget_product_categories .list-group-item i {
    font-size: 1.1rem;
    margin-right: 0.75rem;
    color: #5a6c7d;
    transition: all 0.25s ease;
    width: 20px;
    text-align: center;
}

.widget_product_categories .list-group-item:hover i {
    color: #2c3e50;
}

.widget_product_categories .list-group-item.active i {
    color: var(--theme-color, #D7183D);
}

/* ===== 分类名称 ===== */
.widget_product_categories .category-name {
    flex: 1;
    font-weight: inherit;
}

/* ===== 产品数量徽章 (已移除) ===== */
/* 不再显示产品数量 */

/* ===== 层级缩进 ===== */
.widget_product_categories .list-group-item[style*="padding-left"] {
    background: rgba(255, 255, 255, 0.1);
    border-left: 2px solid rgba(255, 255, 255, 0.3);
    margin-left: 1rem;
    border-radius: 0 8px 8px 0;
}

.widget_product_categories .list-group-item[style*="padding-left"]:hover {
    background: rgba(255, 255, 255, 0.2);
    border-left-color: rgba(255, 255, 255, 0.5);
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .widget_product_categories {
        margin: 1rem 0;
        border-radius: 12px;
    }

    .widget_product_categories .widget-title {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }

    .widget_product_categories .list-group-item {
        padding: 0.85rem 1.25rem;
        font-size: 0.85rem;
    }

    .widget_product_categories .list-group-item:hover {
        transform: translateX(2px);
    }

    .widget_product_categories .list-group-item.active:hover {
        transform: translateX(4px);
    }
}

/* ===== 入场动画已移除 ===== */

/* ===== 标签云区域 ===== */
.widget_product_tags {
    background: #F5F5F5;
    padding: 0;
    margin-bottom: 2rem;
    border: none;
    position: relative;
    overflow: hidden;
}

/* ===== 标签云标题 ===== */
.widget_product_tags .widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    padding: 1.25rem 1.5rem;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

/* 标签云图标 */
.widget_product_tags .widget-title::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%232c3e50' d='M2 2a1 1 0 0 1 1-1h4.586a1 1 0 0 1 .707.293l7 7a1 1 0 0 1 0 1.414l-4.586 4.586a1 1 0 0 1-1.414 0l-7-7A1 1 0 0 1 2 6.586V2zm3.5 4a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3z'/%3e%3cpath fill='%232c3e50' d='M1.293 7.793A1 1 0 0 1 1 7.086V2a1 1 0 0 0-1 1v4.586a1 1 0 0 0 .293.707l7 7a1 1 0 0 0 1.414 0l.043-.043-7.457-7.457z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.widget_product_tags .widget-title::after {
    display: none;
}

/* ===== 标签云容器 ===== */
.widget_product_tags .tagcloud {
    padding: 1.5rem;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-start;
}

/* ===== 标签样式 ===== */
.widget_product_tags .tagcloud a {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    color: #6c757d;
    padding: 0.25rem 0.6rem;
    border-radius: 0 !important;
    text-decoration: none;
    font-size: 0.75rem !important;
    font-weight: 500;
    /* border: 1px solid rgba(0, 0, 0, 0.08); */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    line-height: 1.2;
    position: relative;
    padding-left: 1.8rem !important;
}

/* 覆盖原有的图标样式，调整间距 */
.widget_product_tags .tagcloud a::before {
    content: '\f5af' !important;
    font-family: 'bootstrap-icons' !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 1.6rem !important;
    /* background: rgba(145, 145, 145, 0.79) !important; */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.7rem !important;
    color: #1e1c1c !important;
    transform: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* ===== 标签悬停效果 ===== */
.widget_product_tags .tagcloud a:hover {
    background: var(--theme-color, #D7183D);
    color: white;
    text-decoration: none;
    transform: none !important;
    box-shadow: 0 2px 8px rgba(215, 24, 61, 0.3);
    /* border-color: var(--theme-color, #D7183D); */
}

.widget_product_tags .tagcloud a:hover::before {
    background: var(--theme-color, #0f0f0f);
    color: white !important;
}

/* 强制覆盖所有可能的transform效果 */
.widget_product_tags .tagcloud a,
.widget_product_tags .tagcloud a:hover,
.widget_product_tags .tagcloud a:focus,
.widget_product_tags .tagcloud a:active {
    transform: none !important;
}

/* ===== 标签大小变化 ===== */
.widget_product_tags .tagcloud a[style*="font-size: 12px"] {
    font-size: 0.7rem !important;
    padding: 0.2rem 0.5rem;
}

.widget_product_tags .tagcloud a[style*="font-size: 14px"] {
    font-size: 0.72rem !important;
    padding: 0.22rem 0.55rem;
}

.widget_product_tags .tagcloud a[style*="font-size: 16px"] {
    font-size: 0.75rem !important;
    padding: 0.25rem 0.6rem;
}

.widget_product_tags .tagcloud a[style*="font-size: 18px"] {
    font-size: 0.78rem !important;
    padding: 0.28rem 0.65rem;
    font-weight: 600;
}

.widget_product_tags .tagcloud a[style*="font-size: 20px"],
.widget_product_tags .tagcloud a[style*="font-size: 22px"],
.widget_product_tags .tagcloud a[style*="font-size: 24px"] {
    font-size: 0.8rem !important;
    padding: 0.3rem 0.7rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.12);
}

/* ===== 热门标签特殊效果 ===== */
.widget_product_tags .tagcloud a[style*="font-size: 20px"]:hover,
.widget_product_tags .tagcloud a[style*="font-size: 22px"]:hover,
.widget_product_tags .tagcloud a[style*="font-size: 24px"]:hover {
    background: linear-gradient(135deg, var(--theme-color, #D7183D), #c41230);
    box-shadow: 0 3px 12px rgba(215, 24, 61, 0.4);
    transform: none !important;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .widget_product_tags {
        margin: 1rem 0;
    }

    .widget_product_tags .widget-title {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }

    .widget_product_tags .tagcloud {
        padding: 1.25rem;
        gap: 0.4rem;
    }

    .widget_product_tags .tagcloud a {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.5rem;
    }

    /* 移动端标签悬停效果已简化，无需额外transform */
}

/* ===== 热销商品区域 ===== */
.widget_best_sellers {
    background: #F5F5F5;
    padding: 0;
    margin-bottom: 2rem;
    border: none;
    position: relative;
    overflow: hidden;
}

/* ===== 热销商品标题 ===== */
.widget_best_sellers .widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    padding: 1.25rem 1.5rem;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

/* 热销商品图标 */
.widget_best_sellers .widget-title::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%232c3e50' d='M2.866 14.85c-.078.444.36.791.746.593l4.39-2.256 4.389 2.256c.386.198.824-.149.746-.592l-.83-4.73 3.522-3.356c.33-.314.16-.888-.282-.95l-4.898-.696L8.465.792a.513.513 0 0 0-.927 0L5.354 5.12l-4.898.696c-.441.062-.612.636-.283.95l3.523 3.356-.83 4.73zm4.905-2.767-3.686 1.894.694-3.957a.565.565 0 0 0-.163-.505L1.71 6.745l4.052-.576a.525.525 0 0 0 .393-.288L8 2.223l1.847 3.658a.525.525 0 0 0 .393.288l4.052.576-2.906 2.77a.565.565 0 0 0-.163.506l.694 3.957-3.686-1.894a.503.503 0 0 0-.468 0z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.widget_best_sellers .widget-title::after {
    display: none;
}

/* ===== 热销商品列表 ===== */
.widget_best_sellers .list-group {
    background: transparent;
    border: none;
}

.widget_best_sellers .list-group-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(223, 223, 223, 0.3);
    padding: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.widget_best_sellers .list-group-item:last-child {
    border-bottom: none;
}

.widget_best_sellers .list-group-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
}

/* ===== 整体商品链接 ===== */
.widget_best_sellers .product-link {
    display: flex;
    align-items: start;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.widget_best_sellers .product-link:hover {
    text-decoration: none;
    color: inherit;
}

/* ===== 商品图片样式 ===== */
.widget_best_sellers .product-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.widget_best_sellers .list-group-item:hover .product-image {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.8);
}

.widget_best_sellers .product-image img {
    transition: all 0.3s ease;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.widget_best_sellers .list-group-item:hover .product-image img {
    transform: scale(1.1);
}

/* ===== 商品信息样式 ===== */
.widget_best_sellers .product-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex-grow: 1;
}

.widget_best_sellers .product-title {
    color: #2c3e50;
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.3;
    transition: all 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.widget_best_sellers .list-group-item:hover .product-title {
    color: var(--theme-color, #D7183D);
}

.widget_best_sellers .product-price {
    color: #6c757d;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.widget_best_sellers .list-group-item:hover .product-price {
    color: #5a6c7d;
}

/* ===== 价格样式增强 ===== */
.widget_best_sellers .product-price .price {
    font-weight: 600;
    color: var(--theme-color, #D7183D);
}

.widget_best_sellers .product-price .price del {
    color: #95a5a6;
    font-weight: 400;
    font-size: 0.75rem;
}

.widget_best_sellers .product-price .price ins {
    text-decoration: none;
    color: var(--theme-color, #D7183D);
    font-weight: 600;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .widget_best_sellers {
        margin: 1rem 0;
    }

    .widget_best_sellers .widget-title {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }

    .widget_best_sellers .product-link {
        padding: 0.75rem 1.25rem;
    }

    .widget_best_sellers .product-image {
        width: 50px;
        height: 50px;
    }

    .widget_best_sellers .product-title {
        font-size: 0.85rem;
    }

    .widget_best_sellers .product-price {
        font-size: 0.75rem;
    }

    .widget_best_sellers .list-group-item:hover {
        transform: translateX(2px);
    }
}

/* ===== 空状态样式 ===== */
.widget_best_sellers .list-group-item:only-child {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 2rem 1.5rem;
}

/* ===== 微交互效果 ===== */
.widget_product_categories .list-group-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: rgba(255, 255, 255, 0.1);
    transition: width 0.3s ease;
    z-index: 0;
}

.widget_product_categories .list-group-item:hover::before {
    width: 100%;
}

.widget_product_categories .list-group-item>* {
    position: relative;
    z-index: 1;
}

/* ===== 滚动条美化 ===== */
.widget_product_categories::-webkit-scrollbar {
    width: 4px;
}

.widget_product_categories::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.widget_product_categories::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    transition: background 0.3s ease;
}

.widget_product_categories::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}