/* 商城系统样式 - 美化版 */
.shop-page {
    background: linear-gradient(135deg, #f5f7fa 0%, #e3e8ee 100%);
    min-height: 100vh;
}

/* 搜索栏 */
.shop-search {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.shop-search form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 10px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    outline: none;
    color: #333;
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.4);
    transition: all 0.3s;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.5);
}

/* 分类导航 */
.shop-category {
    background: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 10px;
}

.category-list {
    display: flex;
    overflow-x: auto;
    padding: 0 15px;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.category-list::-webkit-scrollbar {
    display: none;
}

.category-item {
    display: inline-block;
    padding: 8px 18px;
    margin-right: 12px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e3e8ee 100%);
    border-radius: 20px;
    font-size: 14px;
    color: #555;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    font-weight: 500;
}

.category-item:hover,
.category-item.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.3);
}

/* 商品区块 */
.shop-section {
    background: #fff;
    padding: 20px 15px;
    margin-bottom: 12px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.section-title {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid transparent;
    background: linear-gradient(to right, #f093fb, #f5576c) left bottom no-repeat;
    background-size: 100px 2px;
}

.title-icon {
    font-size: 22px;
    margin-right: 10px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.title-text {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 商品网格 */
.goods-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.goods-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.goods-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.1) 0%, rgba(245, 87, 108, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.goods-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 24px rgba(245, 87, 108, 0.2);
}

.goods-item:hover::before {
    opacity: 1;
}

.goods-item a {
    display: block;
    text-decoration: none;
    color: #333;
}

.goods-thumb {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background: #f5f5f5;
}

.goods-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.goods-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.4);
    z-index: 1;
}

.goods-tag.new {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.4);
}

.goods-info {
    padding: 10px;
}

.goods-name {
    font-size: 14px;
    line-height: 1.4;
    height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.goods-price {
    display: flex;
    align-items: baseline;
    margin-bottom: 5px;
}

.price-current {
    font-size: 17px;
    font-weight: 800;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-market {
    font-size: 12px;
    color: #aaa;
    text-decoration: line-through;
    margin-left: 6px;
}

.goods-sales {
    font-size: 12px;
    color: #999;
    background: linear-gradient(135deg, #f5f7fa 0%, #e3e8ee 100%);
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
}

/* 购物车页面 */
.cart-list {
    background: #fff;
}

.cart-item {
    display: flex;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.cart-checkbox {
    margin-right: 10px;
}

.cart-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 10px;
}

.cart-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cart-name {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 5px;
}

.cart-spec {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.cart-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-price {
    font-size: 16px;
    color: #ff6b6b;
    font-weight: bold;
}

.cart-num {
    display: flex;
    align-items: center;
}

.num-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.num-input {
    width: 40px;
    height: 24px;
    text-align: center;
    border: 1px solid #ddd;
    border-left: none;
    border-right: none;
    outline: none;
}

.cart-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #eee;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-total {
    font-size: 16px;
}

.cart-total-price {
    font-size: 20px;
    color: #ff6b6b;
    font-weight: bold;
}

.cart-submit {
    background: #ff6b6b;
    color: #fff;
    border: none;
    padding: 10px 30px;
    border-radius: 20px;
    font-size: 16px;
    cursor: pointer;
}

.cart-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 商品详情 */
.goods-detail-images {
    background: #fff;
}

.goods-detail-images img {
    width: 100%;
    display: block;
}

.goods-detail-info {
    background: #fff;
    padding: 15px;
    margin-top: 10px;
}

.goods-detail-name {
    font-size: 18px;
    font-weight: bold;
    line-height: 1.4;
    margin-bottom: 10px;
}

.goods-detail-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.goods-detail-price {
    display: flex;
    align-items: baseline;
    margin-bottom: 15px;
}

.detail-price-current {
    font-size: 24px;
    font-weight: bold;
    color: #ff6b6b;
}

.detail-price-market {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    margin-left: 10px;
}

.goods-spec-list {
    margin-bottom: 15px;
}

.spec-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.spec-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.spec-item {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.spec-item.active {
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.goods-detail-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #eee;
    padding: 10px 15px;
    display: flex;
    gap: 10px;
}

.detail-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-cart {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.btn-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-buy {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
}

.btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 87, 108, 0.4);
}

.btn-favorite {
    width: 55px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e3e8ee 100%);
    color: #666;
    font-size: 20px;
}

.btn-favorite.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
}

/* 订单列表 */
.order-list {
    padding: 10px 0;
}

.order-item {
    background: #fff;
    margin-bottom: 10px;
    padding: 15px;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.order-no {
    font-size: 14px;
    color: #666;
}

.order-status {
    font-size: 14px;
    color: #ff6b6b;
}

.order-goods {
    margin-bottom: 10px;
}

.order-goods-item {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.order-goods-item:last-child {
    border-bottom: none;
}

.order-goods-thumb {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 10px;
}

.order-goods-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-goods-info {
    flex: 1;
}

.order-goods-name {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 5px;
}

.order-goods-spec {
    font-size: 12px;
    color: #999;
}

.order-goods-price {
    text-align: right;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
}

.order-total {
    font-size: 14px;
}

.order-total-price {
    font-size: 18px;
    color: #ff6b6b;
    font-weight: bold;
}

.order-actions {
    display: flex;
    gap: 10px;
}

.order-btn {
    padding: 6px 15px;
    border: 1px solid #ddd;
    border-radius: 15px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
}

.order-btn.primary {
    background: #ff6b6b;
    border-color: #ff6b6b;
    color: #fff;
}

/* 响应式 */
@media (min-width: 768px) {
    .goods-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .shop-search,
    .shop-category,
    .shop-section {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }
}
