/**************************************
 * 商城响应式样式
 * 完全独立的商城系统样式
 * 基于PC端风格设计，支持响应式
 **************************************/

/* === 基础重置 === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Helvetica', '宋体';
    font-size: 14px;
    color: #333;
    background-color: #f0f0f0;
    min-width: 320px;
}

a {
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

img {
    max-width: 100%;
    display: block;
}

/* === 1. 商城主容器 === */
.shop-container {
    width: 100%;
    min-height: 100vh;
    background-color: #f0f0f0;
}

/* === 2. 商城Banner === */
.shop-banner {
    width: 100%;
    height: 442px;
    background-color: #fff;
    position: relative;
    overflow: hidden;
}

.shop-banner .banner-wrapper {
    width: 1200px;
    height: 442px;
    margin: 0 auto;
    position: relative;
}

.shop-banner .banner-slide {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.shop-banner .banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Banner指示器 */
.shop-banner .banner-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.shop-banner .banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.shop-banner .banner-dot.active {
    width: 14px;
    height: 14px;
    background-color: #FD66B5;
}

/* === 3. 商品分类导航 === */
.shop-category {
    width: 1200px;
    margin: 30px auto;
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
}

.shop-category:hover {
    box-shadow: 0 0 24px rgba(0,0,0,0.08);
}

.shop-category-list {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
}

.shop-category-item {
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    padding: 10px;
}

.shop-category-item:hover {
    transform: translateY(-5px);
}

.shop-category-item img {
    width: 60px;
    height: 60px;
    border-radius: 30px;
    margin: 0 auto 10px;
    object-fit: cover;
}

.shop-category-item font {
    display: block;
    font-size: 14px;
    color: #333;
    transition: all 0.3s;
}

.shop-category-item:hover font,
.shop-category-item.active font {
    color: #FD66B5;
}

/* 商品分类文字导航（用于商品分类筛选） */
.shop-category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 20px;
    align-items: center;
    justify-content: flex-start;
}

.shop-category-nav .category-link {
    display: inline-block;
    padding: 8px 20px;
    font-size: 15px;
    color: #666;
    background-color: #f5f5f5;
    border-radius: 20px;
    transition: all 0.3s;
    text-decoration: none;
    white-space: nowrap;
}

.shop-category-nav .category-link:hover {
    color: #fff;
    background-color: #FD66B5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(253, 102, 181, 0.2);
}

.shop-category-nav .category-link.active {
    color: #fff;
    background-color: #FD66B5;
    font-weight: bold;
}

/* === 4. 商品列表容器 === */
.shop-goods-container {
    width: 1200px;
    margin: 0 auto 30px auto;
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    min-height: 580px;
    transition: all 0.3s;
}

.shop-goods-container:hover {
    box-shadow: 0 0 24px rgba(0,0,0,0.08);
}

.shop-goods-container h1 {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
    position: relative;
}

.shop-goods-container h1::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #FD66B5;
    margin: 10px auto 0;
}

/* === 5. 商品列表（5列，与用户列表一致） === */
.shop-goods-list {
    display: flex;
    flex-wrap: wrap;
    clear: both;
    overflow: auto;
}

.shop-goods-item {
    width: 200px;
    height: 340px;
    margin: 0 15px 20px 16px;
    float: left;
    position: relative;
}

.shop-goods-item:nth-child(5n) {
    margin-right: 0;
}

/* === 6. 商品卡片 === */
.shop-goods-item a {
    display: block;
    text-decoration: none;
    color: #333;
}

.shop-goods-item .goods-image {
    width: 200px;
    height: 200px;
    overflow: hidden;
    position: relative;
    border-radius: 3px;
    background-color: #f5f5f5;
}

.shop-goods-item .goods-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s;
}

/* Hover效果（与用户列表一致） */
.shop-goods-item:hover .goods-image {
    background-color: #000;
}

.shop-goods-item:hover .goods-image img {
    filter: blur(8px);
    opacity: 0.6;
    transform: scale(1.1);
}

/* 查看详情按钮 */
.shop-goods-item .goods-image::after {
    content: '查看详情';
    position: absolute;
    bottom: -36px;
    left: 42px;
    width: 120px;
    line-height: 36px;
    text-align: center;
    background-color: #FD66B5;
    color: #fff;
    font-size: 14px;
    font-weight: normal;
    border-radius: 30px;
    transition: all 0.3s;
}

.shop-goods-item:hover .goods-image::after {
    bottom: 25px;
}

/* === 7. 商品信息 === */
.shop-goods-item .goods-title {
    margin-top: 10px;
    font-size: 14px;
    color: #333;
    line-height: 20px;
    height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-all;
}

.shop-goods-item .goods-price {
    margin-top: 8px;
    color: #E83191;
    font-size: 18px;
    font-weight: bold;
    font-family: Arial, sans-serif;
}

.shop-goods-item .goods-price::before {
    content: '¥';
    font-size: 14px;
    margin-right: 2px;
}

.shop-goods-item .goods-info {
    margin-top: 5px;
    font-size: 12px;
    color: #999;
}

.shop-goods-item .goods-info .ico {
    font-family: "www_zeai_cn_iconfont" !important;
    font-style: normal;
    margin-right: 3px;
}

/* === 8. 商品标签 === */
.shop-goods-item .goods-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: #FD66B5;
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    z-index: 1;
}

.shop-goods-item .goods-tag.new {
    background-color: #ff6600;
}

.shop-goods-item .goods-tag.hot {
    background-color: #ff0000;
}

/* 销量标签 */
.shop-goods-item .goods-sales {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    z-index: 1;
}

/* === 9. 认证标识 === */
.shop-goods-item .goods-cert {
    width: 54px;
    height: 50px;
    position: absolute;
    top: -2px;
    left: -2px;
    z-index: 2;
}

/* === 10. 空数据提示 === */
.nodatatips {
    text-align: center;
    color: #999;
    padding: 80px 0;
}

.nodatatips .ico {
    font-size: 50px;
    color: #ccc;
    display: block;
    margin-bottom: 15px;
}

/* === 11. 加载更多 === */
.load-more {
    text-align: center;
    padding: 30px 0;
}

.load-more button {
    background-color: #FD66B5;
    color: #fff;
    border: none;
    padding: 12px 40px;
    border-radius: 30px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.load-more button:hover {
    background-color: #E83191;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(253, 102, 181, 0.3);
}

/* === 12. 响应式适配 === */

/* 中屏：4列 */
@media (max-width: 1280px) {
    .shop-goods-container,
    .shop-category,
    .shop-banner .banner-wrapper {
        width: 970px;
    }
    
    .shop-goods-item {
        width: 200px;
        margin-right: 13px;
    }
    
    .shop-goods-item:nth-child(5n) {
        margin-right: 13px;
    }
    
    .shop-goods-item:nth-child(4n) {
        margin-right: 0;
    }
}

/* 小屏：3列 */
@media (max-width: 1024px) {
    .shop-goods-container,
    .shop-category,
    .shop-banner .banner-wrapper {
        width: 750px;
    }
    
    .shop-banner {
        height: 330px;
    }
    
    .shop-banner .banner-wrapper {
        height: 330px;
    }
    
    .shop-goods-item {
        width: 220px;
        margin-right: 15px;
    }
    
    .shop-goods-item:nth-child(4n) {
        margin-right: 15px;
    }
    
    .shop-goods-item:nth-child(3n) {
        margin-right: 0;
    }
    
    .shop-goods-item .goods-image::after {
        left: 52px;
        width: 100px;
    }
}

/* 移动端：2列 */
@media (max-width: 768px) {
    body {
        padding-bottom: 60px; /* 底部Tab栏高度 */
        background-color: #f5f5f5;
    }
    
    /* Banner - 移动端优化 */
    .shop-banner {
        height: auto;
        margin-bottom: 0;
    }
    
    .shop-banner .banner-wrapper {
        width: 100%;
        height: auto;
    }
    
    .shop-banner .banner-slide img {
        height: auto;
        border-radius: 0;
    }
    
    .shop-banner .banner-dots {
        bottom: 10px;
    }
    
    /* 分类导航容器 - 移动端优化 */
    .shop-category {
        width: 100%;
        border-radius: 0;
        margin: 0;
        padding: 12px 10px;
        background-color: #fff;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }
    
    .shop-category:hover {
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }
    
    /* 分类文字导航 - 横向滚动优化 */
    .shop-category-nav {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        padding: 3px 0;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }
    
    /* 隐藏滚动条 */
    .shop-category-nav::-webkit-scrollbar {
        display: none; /* Chrome/Safari/Opera */
    }
    
    .shop-category-nav .category-link {
        display: inline-block;
        flex-shrink: 0;
        font-size: 13px;
        padding: 6px 14px;
        border-radius: 16px;
        background-color: #f5f5f5;
        color: #666;
        transition: all 0.3s;
    }
    
    .shop-category-nav .category-link.active {
        background-color: #FD66B5;
        color: #fff;
        font-weight: normal;
    }
    
    /* 商品容器 - 移动端优化 */
    .shop-goods-container {
        width: 100%;
        border-radius: 0;
        margin: 10px 0 0 0;
        padding: 12px 10px 15px;
        background-color: #fff;
        min-height: auto;
    }
    
    .shop-goods-container:hover {
        box-shadow: none;
    }
    
    .shop-goods-container h1 {
        font-size: 16px;
        font-weight: bold;
        margin-bottom: 12px;
        padding-bottom: 8px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .shop-goods-container h1::after {
        display: none;
    }
    
    /* 商品列表 - 移动端2列布局 */
    .shop-goods-list {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 10px 0;
    }
    
    .shop-goods-item {
        width: calc(50% - 5px);
        height: auto;
        margin: 0;
        float: none;
        background-color: #fff;
    }
    
    .shop-goods-item:nth-child(n) {
        margin-right: 0;
    }
    
    /* 商品图片 - 1:1 正方形 */
    .shop-goods-item .goods-image {
        width: 100%;
        padding-top: 100%; /* 1:1比例 */
        height: 0;
        position: relative;
        background-color: #f8f8f8;
        border-radius: 4px;
        overflow: hidden;
    }
    
    .shop-goods-item .goods-image picture {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: block;
    }
    
    .shop-goods-item .goods-image img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
    
    /* 商品标签 - 移动端优化 */
    .shop-goods-item .goods-tag {
        font-size: 11px;
        padding: 2px 8px;
        border-radius: 10px;
        top: 6px;
        left: 6px;
    }
    
    /* 销量标签 - 移动端优化 */
    .shop-goods-item .goods-sales {
        font-size: 11px;
        padding: 2px 8px;
        border-radius: 10px;
        bottom: 6px;
        right: 6px;
    }
    
    /* 移动端禁用hover效果 */
    .shop-goods-item:hover .goods-image {
        background-color: #f8f8f8;
    }
    
    .shop-goods-item:hover .goods-image img {
        filter: none;
        transform: none;
        opacity: 1;
    }
    
    .shop-goods-item .goods-image::after {
        display: none;
    }
    
    /* 商品标题 - 移动端优化 */
    .shop-goods-item .goods-title {
        font-size: 13px;
        line-height: 18px;
        height: 36px;
        margin-top: 8px;
        padding: 0 2px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    /* 商品价格 - 移动端优化 */
    .shop-goods-item .goods-price {
        font-size: 16px;
        margin-top: 5px;
        padding: 0 2px;
        color: #E83191;
        font-weight: bold;
    }
    
    .shop-goods-item .goods-price::before {
        font-size: 12px;
    }
    
    /* 商品信息 - 移动端优化 */
    .shop-goods-item .goods-info {
        font-size: 11px;
        margin-top: 3px;
        padding: 0 2px;
        color: #999;
    }
    
    .shop-goods-item .goods-info .ico {
        font-size: 11px;
    }
    
    /* 加载更多按钮 - 移动端优化 */
    .load-more {
        padding: 20px 0 15px;
    }
    
    .load-more button {
        padding: 10px 35px;
        font-size: 13px;
        border-radius: 20px;
    }
    
    /* 空数据提示 - 移动端优化 */
    .nodatatips {
        padding: 60px 0;
    }
    
    .nodatatips .ico {
        font-size: 40px;
    }
    
    /* 移动端分类（图片式，如果使用） */
    .shop-category-list {
        justify-content: flex-start;
    }
    
    .shop-category-item {
        width: 25%;
        margin-bottom: 15px;
        padding: 8px;
    }
    
    .shop-category-item img {
        width: 45px;
        height: 45px;
    }
    
    .shop-category-item font {
        font-size: 12px;
        margin-top: 5px;
    }
}

/* === 13. 加载提示 === */
.loading-tip {
    text-align: center;
    padding: 50px 0;
    color: #999;
}

.loading-tip .ico {
    font-size: 30px;
    display: inline-block;
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* === 14. 工具类 === */
.clear {
    clear: both;
}

.text-center {
    text-align: center;
}

.show-pc {
    display: block;
}

.show-mobile {
    display: none;
}

@media (max-width: 768px) {
    .show-pc {
        display: none;
    }
    
    .show-mobile {
        display: block;
    }
    
    /* 移动端平滑滚动 */
    html {
        scroll-behavior: smooth;
    }
}