/* PC 商城样式 */
.mall-wrap {
    width: 100%;
    min-height: 600px;
    background: #f5f6fa;
    padding-bottom: 60px;
}

.mall-container {
    width: 1200px;
    margin: 0 auto;
    padding-top: 20px;
}

/* 搜索栏 */
.mall-search {
    background: #fff;
    border-radius: 12px;
    padding: 20px 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mall-search h2 {
    font-size: 24px;
    color: #333;
    margin: 0;
    font-weight: 600;
}

.mall-search h2 i {
    display: inline-block;
    width: 6px;
    height: 24px;
    background: #ff4d4f;
    border-radius: 3px;
    margin-right: 10px;
    vertical-align: middle;
}

.mall-search-form {
    display: flex;
    width: 420px;
}

.mall-search-form input[type="text"] {
    flex: 1;
    height: 42px;
    border: 2px solid #ff4d4f;
    border-right: 0;
    border-radius: 21px 0 0 21px;
    padding: 0 20px;
    font-size: 14px;
    outline: none;
}

.mall-search-form button {
    width: 80px;
    height: 42px;
    background: #ff4d4f;
    color: #fff;
    border: 0;
    border-radius: 0 21px 21px 0;
    cursor: pointer;
    font-size: 15px;
}

/* 分类 */
.mall-category {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.mall-category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.mall-category-item {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 20px;
    background: #f5f6fa;
    color: #555;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
}

.mall-category-item:hover,
.mall-category-item.active {
    background: #ff4d4f;
    color: #fff;
}

/* 商品列表 */
.mall-goods-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.mall-goods-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
}

.mall-goods-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.mall-goods-img {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mall-goods-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.mall-goods-item:hover .mall-goods-img img {
    transform: scale(1.05);
}

.mall-goods-info {
    padding: 14px;
}

.mall-goods-name {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    height: 42px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 10px;
}

.mall-goods-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.mall-goods-price {
    color: #ff4d4f;
    font-size: 18px;
    font-weight: 700;
}

.mall-goods-price small {
    font-size: 12px;
    font-weight: 400;
}

.mall-goods-sold {
    font-size: 12px;
    color: #999;
}

/* 分页 */
.mall-pagination {
    margin-top: 40px;
    text-align: center;
}

.mall-pagination .pagination {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.mall-pagination .pagination li {
    margin: 0 5px;
}

.mall-pagination .pagination li a,
.mall-pagination .pagination li span {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 6px;
    background: #fff;
    color: #555;
    text-decoration: none;
    border: 1px solid #e8e8e8;
}

.mall-pagination .pagination li.active span {
    background: #ff4d4f;
    color: #fff;
    border-color: #ff4d4f;
}

.mall-empty {
    text-align: center;
    padding: 80px 0;
    color: #999;
    font-size: 15px;
}

/* 商品详情 */
.mall-detail {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.mall-breadcrumb {
    font-size: 13px;
    color: #999;
    margin-bottom: 24px;
}

.mall-breadcrumb a {
    color: #666;
    text-decoration: none;
}

.mall-breadcrumb a:hover {
    color: #ff4d4f;
}

.mall-detail-main {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.mall-detail-gallery {
    width: 420px;
    flex-shrink: 0;
}

.mall-detail-main-img {
    width: 420px;
    height: 420px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.mall-detail-main-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mall-detail-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.mall-detail-thumbs img {
    width: 72px;
    height: 72px;
    border-radius: 6px;
    object-fit: cover;
    border: 2px solid transparent;
    cursor: pointer;
}

.mall-detail-thumbs img.active,
.mall-detail-thumbs img:hover {
    border-color: #ff4d4f;
}

.mall-detail-info {
    flex: 1;
}

.mall-detail-title {
    font-size: 22px;
    color: #333;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 16px;
}

.mall-detail-price-row {
    background: #fff5f5;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.mall-detail-price {
    font-size: 32px;
    color: #ff4d4f;
    font-weight: 700;
}

.mall-detail-price small {
    font-size: 16px;
    font-weight: 400;
}

.mall-detail-sold {
    margin-top: 6px;
    font-size: 13px;
    color: #666;
}

.mall-detail-meta-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.mall-detail-meta-label {
    width: 80px;
    color: #999;
    flex-shrink: 0;
}

.mall-detail-meta-value {
    color: #333;
}

.mall-detail-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mall-detail-spec-tag {
    padding: 6px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
}

.mall-detail-actions {
    margin-top: 30px;
    display: flex;
    gap: 16px;
}

.mall-btn {
    display: inline-block;
    padding: 14px 48px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    border: 0;
}

.mall-btn-primary {
    background: #ff4d4f;
    color: #fff;
}

.mall-btn-primary:hover {
    background: #ff2a2d;
}

.mall-btn-default {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
}

.mall-detail-shop {
    background: #fafafa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.mall-detail-shop img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.mall-detail-shop-name {
    font-size: 16px;
    color: #333;
    font-weight: 600;
    margin-bottom: 6px;
}

.mall-detail-shop-desc {
    font-size: 13px;
    color: #999;
}

.mall-detail-content {
    font-size: 14px;
    color: #555;
    line-height: 1.8;
}

.mall-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
}

@media (max-width: 1240px) {
    .mall-container {
        width: 96%;
    }
    .mall-goods-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .mall-goods-list {
        grid-template-columns: repeat(2, 1fr);
    }
    .mall-detail-main {
        flex-direction: column;
    }
    .mall-detail-gallery,
    .mall-detail-main-img {
        width: 100%;
        height: auto;
    }
}
