/* product.php 页面专用样式 */

/* ==================== 页面头部样式 ==================== */
.page-header-bg {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    padding: 60px 0;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.page-header-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.05"><path d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/></g></g></svg>');
    opacity: 0.5;
}

.page-header-content {
    position: relative;
    z-index: 1;
}

.page-main-title {
    font-size: 36px;
    color: white;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-icon, .nav-icon {
    font-size: 40px;
}

.highlight {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 4px;
}

.page-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin-bottom: 15px;
}

.stat-item strong {
    color: #fff;
    font-size: 18px;
}

.stat-divider {
    opacity: 0.3;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.breadcrumb-icon {
    margin-right: 5px;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.9);
}

.breadcrumb a:hover {
    color: white;
}

.separator {
    opacity: 0.5;
}

.breadcrumb-current {
    color: white;
    opacity: 1;
}

/* ==================== 搜索区域 ==================== */
.search-section {
    margin-bottom: 30px;
}

.search-box-wrapper {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.search-form-advanced {
    margin-bottom: 15px;
}

.search-input-group {
    display: flex;
    gap: 10px;
}

.search-input-advanced {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
}

.search-input-advanced:focus {
    outline: none;
    border-color: #38ef7d;
    box-shadow: 0 0 0 3px rgba(56, 239, 125, 0.1);
}

.search-button {
    padding: 15px 30px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(56, 239, 125, 0.4);
}

.btn-icon {
    font-size: 18px;
}

.search-tips {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #999;
}

.tip-icon {
    font-size: 16px;
}

/* ==================== 筛选栏 ==================== */
.filter-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
}

.filter-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 15px;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    min-width: 100px;
    padding-top: 8px;
}

.label-icon {
    font-size: 16px;
}

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

.filter-item {
    padding: 8px 20px;
    background: #f8f9fa;
    border-radius: 20px;
    color: #666;
    font-size: 14px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-item:hover {
    background: #e8e8e8;
    color: #333;
}

.filter-item.active {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(56, 239, 125, 0.3);
}

.filter-icon {
    font-size: 12px;
}

/* ==================== 产品列表 ==================== */
.product-list-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.list-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.list-count {
    color: #999;
    font-size: 14px;
    font-weight: 400;
}

.view-mode {
    display: flex;
    gap: 8px;
}

.view-btn {
    padding: 8px 12px;
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
}

.view-btn:hover {
    background: #f8f9fa;
    border-color: #11998e;
}

.view-btn.active {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    border-color: transparent;
}

.view-icon {
    font-size: 18px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-img-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #f8f9fa;
}

.product-img-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

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

.product-card:hover .product-img-link img {
    transform: scale(1.08);
}

.img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(17, 153, 142, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: all 0.3s;
}

.product-card:hover .img-overlay {
    opacity: 1;
}

.overlay-icon {
    font-size: 40px;
    color: white;
}

.overlay-text {
    color: white;
    font-size: 16px;
    font-weight: 500;
}

.badge {
    position: absolute;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    z-index: 2;
}

.badge-hot {
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
}

.badge-new {
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.badge-recommend {
    top: 42px;
    left: 12px;
    background: linear-gradient(135deg, #f5af19 0%, #f12711 100%);
}

.badge-low-stock {
    top: 42px;
    right: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.badge-icon {
    margin-right: 3px;
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 16px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.product-link {
    color: #333;
    font-weight: 600;
    display: block;
    transition: all 0.3s;
}

.product-link:hover {
    color: #11998e;
}

.product-desc {
    color: #666;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 15px;
    height: 42px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-meta {
    margin-bottom: 15px;
}

.product-price-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.product-price {
    font-size: 24px;
    color: #f44336;
    font-weight: bold;
}

.product-market-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.discount-badge {
    padding: 2px 8px;
    background: #f44336;
    color: white;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.product-stats {
    display: flex;
    gap: 15px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #999;
    font-size: 12px;
}

.stat-icon {
    font-size: 14px;
}

.stat-value {
    color: #666;
}

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

.btn-view, .btn-cart {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-view {
    background: #f8f9fa;
    color: #333;
}

.btn-view:hover {
    background: #e8e8e8;
}

.btn-cart {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.btn-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 239, 125, 0.4);
}

/* ==================== 分页 ==================== */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 25px;
    border-top: 1px solid #f0f0f0;
}

.pagination-info {
    color: #999;
    font-size: 14px;
}

.pagination-links {
    display: flex;
    gap: 5px;
}

.page-link {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    color: #666;
    font-size: 14px;
    transition: all 0.3s;
}

.page-link:hover {
    border-color: #38ef7d;
    color: #11998e;
}

.page-link.active {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    border-color: transparent;
}

.page-ellipsis {
    padding: 0 10px;
    color: #999;
    display: flex;
    align-items: center;
}

.pagination-jump {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #999;
    font-size: 14px;
}

.jump-input {
    width: 50px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    text-align: center;
}

/* ==================== 空状态 ==================== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 12px;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-title {
    font-size: 20px;
    color: #333;
    margin-bottom: 10px;
}

.empty-desc {
    color: #999;
    margin-bottom: 30px;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(56, 239, 125, 0.4);
}

/* ==================== 动画效果 ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== 列表视图模式 ==================== */
.product-grid.view-list {
    grid-template-columns: 1fr;
}

.product-grid.view-list .product-card {
    display: flex;
    flex-direction: row;
}

.product-grid.view-list .product-img-wrapper {
    width: 300px;
    height: 220px;
    flex-shrink: 0;
}

.product-grid.view-list .product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-grid.view-list .product-desc {
    height: auto;
    -webkit-line-clamp: 3;
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .product-grid.view-list .product-card {
        flex-direction: column;
    }
    
    .product-grid.view-list .product-img-wrapper {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .page-header-bg {
        padding: 40px 0;
    }

    .page-main-title {
        font-size: 28px;
    }

    .page-stats {
        flex-direction: column;
        gap: 5px;
        font-size: 14px;
    }

    .breadcrumb {
        flex-wrap: wrap;
    }

    .search-box-wrapper {
        padding: 20px;
    }

    .search-input-group {
        flex-direction: column;
    }

    .search-button {
        width: 100%;
        justify-content: center;
    }

    .filter-section {
        padding: 20px;
    }

    .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-label {
        min-width: auto;
    }

    .product-list-section {
        padding: 20px;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .list-header {
        flex-direction: column;
        gap: 15px;
    }

    .product-actions {
        flex-direction: column;
    }

    .pagination {
        flex-direction: column;
        gap: 20px;
    }

    .pagination-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .pagination-jump {
        display: none;
    }
}

@media (max-width: 576px) {
    .filter-item {
        font-size: 13px;
        padding: 6px 15px;
    }

    .product-card:hover .img-overlay {
        opacity: 0;
    }

    .product-stats {
        flex-direction: column;
        gap: 8px;
    }
}
