/* mall.css - 积分商城专用样式（与首页风格完全统一） */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
}

body {
    min-height: 100vh;
    background-color: #f8f9fa; /* 与首页 bg-gray-100 一致 */
}

/* 顶部导航栏 */
.header {
    background: #fff; /* 与首页导航栏背景一致 */
    box-shadow: 0 2px 8px rgba(0,0,0,0.08); /* 与首页 shadow-card 一致 */
    color: #333;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.header-title {
    font-size: 18px;
    font-weight: 600;
    color: #FF4757; /* 与首页 primary 主色调一致 */
}

.back-btn {
    cursor: pointer;
    font-size: 20px;
    color: #ADB5BD; /* 与首页 gray-500 一致 */
}

.empty {
    width: 20px; /* 占位保持标题居中 */
}

/* 主内容区 */
.content {
    padding: 70px 20px 80px;
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
}

/* 搜索框 */
.search-box {
    background: #fff;
    border-radius: 8px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08); /* 与首页 shadow-card 一致 */
}

.search-icon {
    color: #ADB5BD; /* 与首页 gray-500 一致 */
    margin-right: 10px;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: #333;
}

.search-input::placeholder {
    color: #CED4DA; /* 与首页 gray-400 一致 */
}

/* 分类导航 */
.category-nav {
    background: #fff;
    border-radius: 8px;
    padding: 15px 0;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08); /* 与首页 shadow-card 一致 */
    overflow-x: auto;
    scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.category-list {
    display: flex;
    padding: 0 15px;
    gap: 20px;
    min-width: max-content;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.category-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #FF47571a; /* 与首页 primary/10 一致 */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    color: #FF4757; /* 与首页 primary 主色调一致 */
}

.category-icon.active {
    background: #FF4757; /* 与首页 primary 主色调一致 */
    color: white;
}

.category-name {
    font-size: 12px;
    color: #666;
}

.category-item.active .category-name {
    color: #FF4757; /* 与首页 primary 主色调一致 */
    font-weight: 500;
}

/* 商品列表标题 */
.goods-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.goods-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.goods-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 18px;
    background: linear-gradient(to right, #FF4757, #7066E0); /* 与首页 主色调+辅助色 渐变一致 */
    border-radius: 2px;
}

.sort-options {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #ADB5BD; /* 与首页 gray-500 一致 */
}

.sort-option {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 3px;
}

.sort-option.active {
    color: #FF4757; /* 与首页 primary 主色调一致 */
    font-weight: 500;
}

/* 商品列表 */
.goods-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.goods-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08); /* 与首页 shadow-card 一致 */
    transition: all 0.3s ease;
    position: relative;
}

.goods-item::after {
    content: '可兑换';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #FF4757; /* 与首页 primary 主色调一致 */
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    z-index: 10;
}

.goods-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12); /* 与首页 shadow-hover 一致 */
    transform: translateY(-3px);
}

.goods-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
    background: #E9ECEF; /* 与首页 gray-200 一致 */
}

.goods-info {
    padding: 10px;
}

.goods-name {
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.goods-stock {
    font-size: 11px;
    color: #ADB5BD; /* 与首页 gray-500 一致 */
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}

.goods-points {
    font-size: 13px;
    color: #FF4757; /* 与首页 primary 主色调一致 */
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.goods-points::before {
    content: '✦';
    font-size: 10px;
}

/* 兑换按钮 */
.exchange-btn {
    width: 100%;
    height: 36px;
    background: #FF4757; /* 与首页 primary 主色调一致 */
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.exchange-btn:hover {
    background: #e63e4d; /* primary 深色变体，提升交互体验 */
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
}

.exchange-btn:disabled {
    background: #CED4DA; /* 与首页 gray-400 一致 */
    cursor: not-allowed;
}

/* 底部导航栏 */
/* 底部导航栏 */
.footer-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.05); /* 与首页底部导航阴影一致 */
    z-index: 100;
}

/* 网格布局 - 与首页保持一致 */
.grid {
    display: grid;
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.h-14 {
    height: 3.5rem;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ADB5BD; /* 与首页 gray-500 一致 */
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s ease;
}

.nav-item.active {
    color: #FF4757; /* 与首页 primary 主色调一致 */
}

.nav-icon {
    font-size: 20px;
    margin-bottom: 5px;
}

.text-xs {
    font-size: 12px;
}

.mt-1 {
    margin-top: 0.25rem;
}

/* 加载状态 */
.loading {
    color: #FF4757; /* 与首页 primary 主色调一致 */
    text-align: center;
    padding: 50px 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #FF4757; /* 与首页 primary 主色调一致 */
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #ADB5BD; /* 与首页 gray-500 一致 */
    font-size: 14px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.3;
}