/* 用户端商城样式 */
body {
    margin: 0;
    padding: 0;
    background-color: #f5f7fa;
}

/* 顶部导航栏 */
.shop-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
}

.main-nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

/* 搜索栏 */
.search-section {
    background: white;
    padding: 30px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.search-box-large {
    display: flex;
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.search-input-large {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #dcdfe6;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-input-large:focus {
    border-color: #667eea;
    outline: none;
}

.btn-large {
    padding: 15px 30px;
    font-size: 16px;
}

/* 分类导航 */
.category-section {
    background: white;
    padding: 20px 0;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.category-nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 15px 20px;
    border-radius: 8px;
    transition: all 0.3s;
    min-width: 100px;
}

.category-item:hover {
    background-color: #f5f7fa;
    transform: translateY(-3px);
}

.category-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.category-name {
    font-size: 14px;
    color: #606266;
    font-weight: 500;
}

/* 主内容区 */
.shop-main {
    padding: 30px 0 60px;
}

.section {
    margin-bottom: 50px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-header h2 {
    font-size: 24px;
    color: #303133;
    margin: 0;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-select {
    padding: 8px 15px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

/* 商品网格 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.product-image {
    width: 100%;
    height: 220px;
    position: relative;
    background-color: #f5f7fa;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-placeholder {
    font-size: 64px;
    color: #c0c4cc;
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f56c6c;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: #303133;
    margin: 0 0 10px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-desc {
    font-size: 14px;
    color: #909399;
    margin: 0 0 15px 0;
    flex: 1;
    line-height: 1.6;
}

.product-price-section {
    margin-bottom: 15px;
}

.price-current {
    font-size: 22px;
    font-weight: bold;
    color: #f56c6c;
    margin-right: 10px;
}

.price-original {
    font-size: 14px;
    color: #909399;
    text-decoration: line-through;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #ebeef5;
}

.sales-info {
    font-size: 12px;
    color: #909399;
}

/* 商品详情 */
.product-detail-header {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.product-detail-image {
    width: 400px;
    height: 400px;
    border-radius: 8px;
    background-color: #f5f7fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-info {
    flex: 1;
}

.product-detail-title {
    font-size: 28px;
    font-weight: bold;
    color: #303133;
    margin-bottom: 20px;
}

.product-detail-price {
    display: flex;
    align-items: baseline;
    gap: 15px;
    margin-bottom: 25px;
}

.product-detail-price-current {
    font-size: 36px;
    font-weight: bold;
    color: #f56c6c;
}

.product-detail-price-original {
    font-size: 20px;
    color: #909399;
    text-decoration: line-through;
}

.product-detail-meta {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    padding: 20px 0;
    border-top: 1px solid #ebeef5;
    border-bottom: 1px solid #ebeef5;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.meta-label {
    font-size: 14px;
    color: #909399;
}

.meta-value {
    font-size: 18px;
    color: #303133;
    font-weight: 600;
}

.product-detail-description {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #ebeef5;
}

.product-detail-description h3 {
    font-size: 18px;
    color: #303133;
    margin-bottom: 15px;
}

.product-detail-description p {
    line-height: 1.8;
    color: #606266;
    font-size: 15px;
}

/* 页脚 */
.shop-footer {
    background: #2c3e50;
    color: white;
    padding: 30px 0;
    text-align: center;
    margin-top: 60px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    overflow: auto;
    padding: 20px;
    align-items: flex-start;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    margin: 20px auto;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-large {
    max-width: 1000px;
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #ebeef5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #303133;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #909399;
    padding: 0;
    width: 35px;
    height: 35px;
    line-height: 35px;
    border-radius: 4px;
    transition: all 0.3s;
}

.modal-close:hover {
    background-color: #f5f7fa;
    color: #303133;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #ebeef5;
    text-align: right;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .main-nav {
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
    }

    .search-box-large {
        flex-direction: column;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .product-detail-header {
        flex-direction: column;
    }

    .product-detail-image {
        width: 100%;
        height: 300px;
    }

    .category-nav {
        gap: 15px;
    }

    .category-item {
        min-width: 80px;
        padding: 10px 15px;
    }
}

