/* 商城页面基础样式 */
.shop-page {
    background: #f8f9fa;
    min-height: calc(100vh - 60px);
}

.shop-page .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 商城页头部 */
.shop-page .shop-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
    padding: 40px 0;
    margin-bottom: 30px;
    text-align: center;
    color: #fff;
    width: 100%;
}

.shop-page .shop-header .page-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.shop-page .shop-header .shop-search {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.shop-page .shop-header .search-form {
    display: flex;
    gap: 10px;
    padding: 0 15px;
    width: 100%;
}

.shop-page .shop-header .search-form input {
    flex: 1;
    height: 50px;
    padding: 0 25px;
    border: none;
    border-radius: 25px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 16px;
}

.shop-page .shop-header .search-form input::placeholder {
    color: rgba(255,255,255,0.6);
}

.shop-page .shop-header .search-form button {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 25px;
    background: #ff6b00;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shop-page .shop-header .search-form button:hover {
    background: #ff4d00;
}

/* 商城主体内容 */
.shop-page .shop-content {
    display: flex;
    gap: 30px;
}

/* 侧边栏 */
.shop-page .shop-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.shop-page .shop-sidebar .sidebar-block {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.shop-page .shop-sidebar .block-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.shop-page .shop-sidebar .category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.shop-page .shop-sidebar .category-item {
    margin-bottom: 5px;
}

.shop-page .shop-sidebar .category-item a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #666;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.shop-page .shop-sidebar .category-item.active a,
.shop-page .shop-sidebar .category-item a:hover {
    background: #fff5e6;
    color: #ff6b00;
}

/* 价格筛选 */
.shop-page .shop-sidebar .price-filter {
    padding: 5px 0;
    width: 100%;
}

.shop-page .shop-sidebar .price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    width: 100%;
}

.shop-page .shop-sidebar .price-inputs input {
    flex: 1;
    height: 40px;
    padding: 0 10px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    width: calc(50% - 4px);
    min-width: 0;
    font-size: 14px;
}

.shop-page .shop-sidebar .price-inputs::before {
    content: "¥";
    color: #666;
    font-size: 14px;
}

.shop-page .shop-sidebar .price-inputs::after {
    content: "-";
    color: #666;
    margin: 0 2px;
}

.shop-page .shop-sidebar .price-btn {
    width: 100%;
    height: 40px;
    background: #ff6b00;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shop-page .shop-sidebar .price-btn:hover {
    background: #ff4d00;
}

/* 商品列表区域 */
.shop-page .shop-main {
    flex: 1;
    min-width: 0;
}

/* 筛选栏 */
.shop-page .shop-main .shop-filter {
    background: #fff;
    padding: 20px 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.shop-page .shop-main .filter-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.shop-page .shop-main .filter-item {
    color: #666;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.shop-page .shop-main .filter-item.active,
.shop-page .shop-main .filter-item:hover {
    background: #ff6b00;
    color: #fff;
}

/* 商品列表 */
.shop-page .shop-main .product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.shop-page .shop-main .product-item {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.shop-page .shop-main .product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: rgba(255,107,0,0.1);
}

.shop-page .shop-main .product-img {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
    background: #f8f9fa;
}

.shop-page .shop-main .product-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 80%, rgba(0,0,0,0.03));
    z-index: 1;
}

.shop-page .shop-main .product-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.shop-page .shop-main .product-item:hover .product-img img {
    transform: scale(1.08);
}

.shop-page .shop-main .product-discount {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ff6b00;
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(255,107,0,0.3);
}

.shop-page .shop-main .product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.shop-page .shop-main .product-name {
    font-size: 16px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 48px;
}

.shop-page .shop-main .product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 13px;
    color: #999;
    padding-bottom: 15px;
    border-bottom: 1px dashed #eee;
}

.shop-page .shop-main .product-price {
    margin-bottom: 20px;
    display: flex;
    align-items: baseline;
}

.shop-page .shop-main .price-current {
    font-size: 24px;
    color: #ff6b00;
    font-weight: 600;
    display: flex;
    align-items: baseline;
}
.shop-page .shop-main .price-original {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    margin-left: 8px;
}

.shop-page .shop-main .product-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.shop-page .shop-main .btn-view,
.shop-page .shop-main .btn-buy {
    flex: 1;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.shop-page .shop-main .btn-view {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #e5e5e5;
}

.shop-page .shop-main .btn-view:hover {
    background: #eee;
    color: #333;
    border-color: #ddd;
}

.shop-page .shop-main .btn-buy {
    background: #ff6b00;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.shop-page .shop-main .btn-buy:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.shop-page .shop-main .btn-buy::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255,255,255,0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.shop-page .shop-main .btn-buy:hover:not(:disabled) {
    background: #ff4d00;
}

.shop-page .shop-main .btn-buy:hover:not(:disabled)::before {
    left: 100%;
}

/* 分页 */
.shop-page .pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.shop-page .pagination a,
.shop-page .pagination span {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    background: #fff;
    border-radius: 8px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
}

.shop-page .pagination a:hover,
.shop-page .pagination span.current {
    background: #ff6b00;
    color: #fff;
}

/* 响应式适配 */
@media (max-width: 992px) {
    .shop-page .shop-content {
        flex-direction: column;
    }
    
    .shop-page .shop-sidebar {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .shop-page .shop-header {
        padding: 30px 0;
    }
    
    .shop-page .shop-header .page-title {
        font-size: 24px;
    }
    
    .shop-page .shop-filter {
        flex-direction: column;
        gap: 15px;
    }
    
    .shop-page .shop-main .product-list {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .shop-page .shop-main .product-actions {
        flex-direction: column;
    }
}

/* 商城基础样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px;
}

/* 提示信息 */
.alert-primary {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px 20px;
    color: #333;
    margin-bottom: 20px;
    font-size: 14px;
}

/* 搜索导航 */
.navbar {
    background: #fff !important;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

.navbar-brand {
    font-size: 16px;
    color: #666;
    font-weight: 500;
}

.form-inline {
    display: flex;
    gap: 10px;
}

.form-control {
    height: 40px;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    padding: 0 15px;
    font-size: 14px;
    width: 250px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #ff6b00;
    box-shadow: 0 0 0 0.2rem rgba(255,107,0,0.15);
}

.btn-outline-success {
    height: 40px;
    padding: 0 20px;
    border-radius: 8px;
    border: 1px solid #ff6b00;
    background: transparent;
    color: #ff6b00;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-success:hover {
    background: #ff6b00;
    color: #fff;
    border-color: #ff6b00;
}

/* 商品卡片 */
.card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 25px;
    background: #fff;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.card-body {
    padding: 20px;
}

.card-text {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.5;
}

.text-danger {
    color: #ff6b00 !important;
    font-weight: 600;
    font-size: 18px;
}

/* 购买按钮和弹窗样式 */
.btn-buy {
    background: #ff6b00;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.btn-buy:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-buy::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255,255,255,0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.btn-buy:hover:not(:disabled) {
    background: #ff4d00;
}

.btn-buy:hover:not(:disabled)::before {
    left: 100%;
}

/* Layer弹窗样式优化 */
.layui-layer {
    border-radius: 12px !important;
}

.layui-layer-title {
    background: #fff !important;
    border-bottom: 1px solid #f0f0f0 !important;
    padding: 15px 20px !important;
    font-size: 16px !important;
    color: #333 !important;
    font-weight: 500 !important;
}

.layui-layer-content {
    padding: 20px !important;
    font-size: 14px !important;
    color: #666 !important;
    line-height: 1.6 !important;
}

.layui-layer-btn {
    padding: 10px 20px 20px !important;
    text-align: right !important;
    border-top: 1px solid #f0f0f0 !important;
}

.layui-layer-btn a {
    border-radius: 8px !important;
    padding: 8px 20px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    height: auto !important;
    line-height: 1.5 !important;
    margin: 0 0 0 10px !important;
}

.layui-layer-btn .layui-layer-btn0 {
    background: #ff6b00 !important;
    border-color: #ff6b00 !important;
    color: #fff !important;
}

.layui-layer-btn .layui-layer-btn0:hover {
    background: #ff4d00 !important;
    border-color: #ff4d00 !important;
}

.layui-layer-btn .layui-layer-btn1 {
    background: #f5f5f5 !important;
    color: #666 !important;
    border-color: #e5e5e5 !important;
}

.layui-layer-btn .layui-layer-btn1:hover {
    background: #eee !important;
    color: #333 !important;
}

/* 加载提示样式 */
.layui-layer-loading {
    background: rgba(255,255,255,0.9) !important;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1) !important;
}

.layui-layer-msg {
    border-radius: 8px !important;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1) !important;
}

/* 购买成功提示 */
.buy-success {
    text-align: center;
    padding: 20px;
}

.buy-success .success-icon {
    color: #52c41a;
    font-size: 48px;
    margin-bottom: 15px;
}

.buy-success .success-title {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.buy-success .success-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

/* 购买错误提示 */
.buy-error {
    text-align: center;
    padding: 20px;
}

.buy-error .error-icon {
    color: #ff4d4f;
    font-size: 48px;
    margin-bottom: 15px;
}

.buy-error .error-title {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.buy-error .error-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .form-control {
        width: 100%;
    }
    
    .form-inline {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-outline-success {
        width: 100%;
    }
    
    .card-text {
        flex-direction: column;
        gap: 10px;
    }
    
    .text-danger {
        display: block;
    }
}