/**************************************
 * 商城响应式样式
 * 完全独立的商城系统样式
 * 基于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: 600px;
    background-color: #fff;
    position: relative;
    overflow: hidden;
}

.shop-banner .banner-wrapper {
    width: 1200px;
    height: 600px;
    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;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: relative;
}

/* 分类导航底部装饰线 */
.shop-category::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(253, 102, 181, 0.2) 20%,
        rgba(253, 102, 181, 0.4) 50%,
        rgba(253, 102, 181, 0.2) 80%,
        transparent 100%);
}

.shop-category:hover {
    box-shadow: 0 4px 12px 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: 25px 20px 25px;
    min-height: 580px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* 顶部装饰条 - 渐变色彩带 */
.shop-goods-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        #FD66B5 0%, 
        #FF8CB5 25%, 
        #FFA5C5 50%, 
        #FF8CB5 75%, 
        #FD66B5 100%);
    z-index: 1;
}

/* 左侧装饰线 */
.shop-goods-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, 
        rgba(253, 102, 181, 0.3) 0%, 
        rgba(253, 102, 181, 0.1) 50%,
        rgba(253, 102, 181, 0) 100%);
    z-index: 1;
}

.shop-goods-container:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* === 5. 商品列表（5列，优化紧凑布局） === */
.shop-goods-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    clear: both;
}

.shop-goods-item {
    width: 220px;
    position: relative;
    background-color: #fff;
    border-radius: 8px;
    transition: all 0.3s;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

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

.shop-goods-item .goods-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
    background-color: #f8f8f8;
    border-radius: 8px 8px 0 0;
}

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

/* 卡片hover效果 */
.shop-goods-item:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
    transform: translateY(-5px);
}

.shop-goods-item:hover .goods-image {
    background-color: #000;
}

.shop-goods-item:hover .goods-image img {
    filter: blur(6px);
    opacity: 0.7;
    transform: scale(1.05);
}

/* 查看详情按钮 */
.shop-goods-item .goods-image::after {
    content: '查看详情';
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    line-height: 34px;
    text-align: center;
    background-color: #FD66B5;
    color: #fff;
    font-size: 13px;
    font-weight: normal;
    border-radius: 20px;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(253, 102, 181, 0.4);
}

.shop-goods-item:hover .goods-image::after {
    bottom: 50%;
    margin-top: -17px;
}

/* === 7. 商品信息（紧凑布局优化） === */
.shop-goods-item .goods-title {
    padding: 8px 12px 4px;
    font-size: 14px;
    color: #333;
    line-height: 19px;
    height: 42px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-all;
    font-weight: 500;
    background-color: #fff;
}

/* 价格和信息容器 - 横向布局，带浅色背景 */
.shop-goods-item .goods-price {
    padding: 8px 12px 10px;
    color: #FF3366;
    font-size: 20px;
    font-weight: bold;
    font-family: 'Arial', 'Helvetica', sans-serif;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    background: linear-gradient(to bottom, #fafafa 0%, #f5f5f5 100%);
    border-top: 1px solid #efefef;
}

/* 货币符号已由 format_price() 函数动态提供，无需固定显示 */
/*.shop-goods-item .goods-price::before {
    content: '¥';
    font-size: 13px;
    margin-right: 1px;
    font-weight: normal;
}*/

.shop-goods-item .goods-info {
    display: inline-block;
    font-size: 12px;
    color: #999;
    margin-left: auto;
    padding-left: 8px;
    font-weight: normal;
    font-family: 'Microsoft YaHei', sans-serif;
}

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

/* === 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列（仅PC端） */
@media (max-width: 1280px) {
    .shop-goods-container,
    .shop-category,
    .shop-banner .banner-wrapper {
        width: 970px;
    }
    
    .shop-goods-list {
        gap: 16px;
    }
    
    .shop-goods-item {
        width: 220px;
    }
}

/* 移动端：2列（包含所有平板和手机） */
@media (max-width: 1024px) {
    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::after {
        left: 10px;
        right: 10px;
        height: 1px;
    }
    
    .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: 15px 10px;
        background-color: #fff;
        min-height: auto;
        box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    }
    
    /* 移动端保留顶部装饰条 */
    .shop-goods-container::before {
        height: 3px;
    }
    
    /* 移动端左侧装饰线稍细 */
    .shop-goods-container::after {
        width: 2px;
    }
    
    .shop-goods-container:hover {
        box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    }
    
    /* 商品列表 - 移动端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;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    
    .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: 38px;
        padding: 6px 8px 2px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        background-color: #fff;
    }
    
    /* 商品价格 - 移动端优化（价格和浏览量同行，带背景） */
    .shop-goods-item .goods-price {
        font-size: 16px;
        padding: 6px 8px 8px;
        color: #FF3366;
        font-weight: bold;
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        background: linear-gradient(to bottom, #fafafa 0%, #f5f5f5 100%);
        border-top: 1px solid #efefef;
    }
    
    /* 货币符号已由 format_price() 函数动态提供，无需固定显示 */
    /*.shop-goods-item .goods-price::before {
        font-size: 11px;
    }*/
    
    /* 商品信息 - 移动端优化 */
    .shop-goods-item .goods-info {
        display: inline-block;
        font-size: 11px;
        color: #999;
        margin-left: auto;
        padding-left: 6px;
    }
    
    .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: 1024px) {
    .show-pc {
        display: none;
    }
    
    .show-mobile {
        display: block;
    }
    
    /* 移动端平滑滚动 */
    html {
        scroll-behavior: smooth;
    }
}

/* === 15. 通用内容容器（my_money.php、订单页面等） === */

/* PC端：1200px宽度容器 */
.shop-content-container {
    width: 1200px;
    margin: 30px auto;
    background-color: #fff;
    border-radius: 8px;
    padding: 25px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.shop-content-container:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* 内容卡片 */
.shop-card {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 20px;
}

/* 统计信息网格（PC端：4列） */
.shop-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.shop-stat-item {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    text-align: center;
}

.shop-stat-label {
    color: #999;
    font-size: 12px;
    margin-bottom: 8px;
}

.shop-stat-value {
    color: #333;
    font-size: 16px;
    font-weight: bold;
}

/* 列表行 */
.shop-list-row {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.shop-list-item {
    flex: 1;
    min-width: 200px;
}

.shop-list-amount {
    font-size: 18px;
    font-weight: bold;
    text-align: right;
}

/* 按钮 */
.shop-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 40px;
    background: #E83191;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.shop-btn:hover {
    background: #d52a7f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 49, 145, 0.3);
}

/* 标题 */
.shop-title {
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: bold;
}

/* 大数字显示 */
.shop-large-number {
    font-size: 48px;
    color: #E83191;
    font-weight: bold;
}

.shop-number-label {
    color: #999;
    margin-top: 10px;
    font-size: 14px;
}

/* 移动端适配（包含所有平板和手机） */
@media (max-width: 1024px) {
    .shop-content-container {
        width: 100%;
        margin: 10px 0;
        padding: 15px;
        border-radius: 0;
        box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    }
    
    .shop-card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .shop-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin: 15px 0;
    }
    
    .shop-stat-item {
        padding: 10px;
    }
    
    .shop-stat-label {
        font-size: 11px;
    }
    
    .shop-stat-value {
        font-size: 14px;
    }
    
    .shop-list-row {
        padding: 12px 0;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .shop-list-item {
        width: 100%;
    }
    
    .shop-list-amount {
        text-align: left;
        width: 100%;
        margin-top: 5px;
    }
    
    .shop-btn {
        padding: 10px 30px;
        font-size: 13px;
        margin-top: 15px;
    }
    
    .shop-title {
        font-size: 16px;
    }
    
    .shop-large-number {
        font-size: 32px;
    }
    
    .shop-number-label {
        font-size: 12px;
    }
}