/* 基础样式 */
body {
    background-color: #f0f7ff;
    background-image:
            radial-gradient(circle at 10% 20%, rgba(255,183,215,0.1) 0%, transparent 20%),
            radial-gradient(circle at 90% 70%, rgba(166,189,255,0.1) 0%, transparent 30%);
    padding-bottom: 30px;
    color: #333;
}
.container {
    max-width: 1200px;
    padding-left: 15px;
    padding-right: 15px;
    margin-left: auto;
    margin-right: auto;
}

/* 顶部导航  */
.site-header {
    background: linear-gradient(135deg, #ff9fd4 0%, #b58eff 100%);
    padding: 18px 0;
    box-shadow: 0 3px 15px rgba(200, 120, 255, 0.2);
    margin-bottom: 30px;
    border-bottom: 2px solid rgba(255,255,255,0.3);
}
.logo {
    display: flex;
    align-items: center;
    color: #fff;
    font-weight: bold;
    font-size: 1.5rem;
    text-decoration: none;
    text-shadow: 0 2px 4px rgba(100, 50, 150, 0.3);
}
.logo i {
    color: #fff;
    margin-right: 10px;
    font-size: 1.8rem;
    text-shadow: 0 2px 4px rgba(100, 50, 150, 0.3);
}
.login-link {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s;
    text-shadow: 0 1px 2px rgba(100, 50, 150, 0.2);
}
.login-link:hover {
    color: #fff;
    text-decoration: none;
    transform: scale(1.05);
}

/* 页面标题 */
.page-title {
    color: #8a5fff;
    font-weight: bold;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    text-shadow: 0 1px 2px rgba(138, 95, 255, 0.2);
}
.page-title i {
    color: #ff7eb9;
    margin-right: 10px;
    animation: float 3s ease-in-out infinite;
}

/* 分类区域 */
.category-container {
    background-color: rgba(255,255,255,0.85);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(138, 95, 255, 0.1);
    margin-bottom: 25px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.7);
}
.category-scroller {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 10px;
}
.category-list-shanjun {
    display: flex;
    flex-wrap: nowrap;
    margin: 0;
    padding: 0;
    list-style: none;
}
.category-item {
    margin-right: 10px;
    flex: 0 0 auto;
}
.category-link {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s;
    font-weight: 500;
}
.category-link:hover{
    text-decoration: none;
}
.category-link.active {
    background: linear-gradient(135deg, #ff7eb9 0%, #b58eff 100%);
    color: #fff;
    box-shadow: 0 3px 8px rgba(200, 120, 255, 0.3);
}
.category-link.inactive {
    background-color: #f0f5ff;
    color: #6a5acd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.category-link.inactive:hover {
    background-color: #e6eeff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

/* 商品列表 */
.product-list {
    margin-bottom: 30px;
}
.product-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    background-color: rgba(255,255,255,0.9);
    padding: 18px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(138, 95, 255, 0.08);
    margin-bottom: 15px;
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.8);
    display: none;
}
.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(138, 95, 255, 0.15);
}

.product-image {
    width: 90px;
    height: 90px;
    flex-shrink: 0;
    margin-right: 18px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    border: 2px solid #fff;
}
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.product-item:hover .product-image img {
    transform: scale(1.08);
}

.product-details {
    flex: 1;
    min-width: 0;
    margin-bottom: 15px;
}
@media (min-width: 576px) {
    .product-details {
        margin-bottom: 0;
    }
}

.product-title {
    font-weight: 600;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #6a5acd;
    font-size: 1.1rem;
    /* 允许在单词内换行 */
    word-break: break-word;
    /* 允许在单词之间换行 */
    overflow-wrap: break-word;
    /* 确保文本不会溢出容器 */
    white-space: normal;
}
.product-desc {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-actions {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px dashed #f0e6ff;
}
@media (min-width: 576px) {
    .product-actions {
        width: auto;
        padding-top: 0;
        border-top: none;
        min-width: 240px;
    }
}

.product-price {
    color: #ff6b9b;
    font-weight: bold;
    font-size: 1.2rem;
    text-shadow: 0 1px 2px rgba(255,107,155,0.1);
}
.product-sales {
    font-size: 0.9rem;
    color: #888;
    margin: 0 10px;
    display: flex;
    align-items: center;
}
.product-sales i {
    color: #b58eff;
    margin-right: 5px;
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, #b58eff 0%, #8a5fff 100%);
    border: none;
    padding: 6px 18px;
    border-radius: 20px;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(138, 95, 255, 0.2);
    transition: all 0.3s;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #a779ff 0%, #7d48ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(138, 95, 255, 0.3);
}

/* 分页样式 */
.pagination-container {
    text-align: center;
    margin-top: 30px;
}
.pagination .page-item .page-link {
    color: #8a5fff;
    border-color: #e6d9ff;
    border-radius: 8px;
    margin: 0 3px;
    transition: all 0.2s;
}
.pagination .page-item.active .page-link {
    background-color: #b58eff;
    border-color: #b58eff;
}
.pagination .page-item:hover .page-link:not(.active) {
    background-color: #f0e6ff;
    transform: translateY(-2px);
}

/* 滚动条样式 */
.category-scroller::-webkit-scrollbar {
    height: 6px;
}
.category-scroller::-webkit-scrollbar-track {
    background: #f0e6ff;
    border-radius: 10px;
}
.category-scroller::-webkit-scrollbar-thumb {
    background: #d9c8ff;
    border-radius: 10px;
}
.category-scroller::-webkit-scrollbar-thumb:hover {
    background: #c2a5ff;
}

/* 动画效果 */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}