/* ========================================
   山东亿盟 - 产品展示页样式
   与主页统一的工业风格
   ======================================== */

/* ========== 筛选栏 ========== */
.filter-bar {
    background: rgba(26, 26, 46, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0;
    transition: background 0.3s;
}

.header.scrolled .filter-bar {
    background: rgba(26, 26, 46, 0.97);
}

.filter-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 0;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.filter-label {
    font-size: 13px;
    font-weight: 600;
    color: #cbd5e1;
    white-space: nowrap;
}

.filter-tags {
    display: flex;
    gap: 5px;
}

.filter-tag {
    padding: 6px 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    background: transparent;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s;
    font-family: inherit;
    white-space: nowrap;
}

.filter-tag:hover {
    border-color: var(--primary);
    color: var(--white);
    background: rgba(199, 70, 10, 0.12);
}

.filter-tag.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.filter-search {
    position: relative;
    margin-left: auto;
}

.search-input {
    padding: 8px 36px 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    width: 220px;
    transition: all 0.25s;
    color: var(--white);
    background: rgba(255, 255, 255, 0.06);
}

.search-input::placeholder {
    color: #64748b;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(199, 70, 10, 0.12);
    width: 260px;
    background: rgba(255, 255, 255, 0.1);
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    pointer-events: none;
    opacity: 0.5;
}

/* ========== 产品主区域 ========== */
.products-main {
    padding-top: 210px;
    min-height: 100vh;
    background: var(--light);
}

.products-top {
    text-align: center;
    margin-bottom: 48px;
}

.products-top .section-title {
    margin-bottom: 8px;
}

.products-count {
    font-size: 15px;
    color: var(--gray);
}

.products-count span {
    font-weight: 700;
    color: var(--primary);
}

/* ========== 产品网格 ========== */
#productsGrid.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding-bottom: 80px;
}

/* ========== 产品卡片 ========== */
#productsGrid .product-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s;
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

#productsGrid .product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
}

#productsGrid .product-card:hover .product-card-link {
    color: var(--primary);
}

.product-card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card:hover .product-card-image img {
    transform: scale(1.06);
}

.product-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 14px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.badge-tractor { background: #1d4ed8; }
.badge-dump    { background: #c7460a; }
.badge-other   { background: #6b21a8; }

.product-card-body {
    padding: 22px;
}

.product-card-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
    line-height: 1.3;
}

.product-card-desc {
    font-size: 14px;
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-attrs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.attr-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.attr-brand    { background: #fef3c7; color: #92400e; }
.attr-drive    { background: #dbeafe; color: #1e40af; }
.attr-category { background: #dcfce7; color: #166534; }

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.product-card-spec {
    font-size: 13px;
    color: var(--gray);
}

.product-card-spec span {
    font-weight: 600;
    color: var(--dark);
}

.product-card-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    transition: color 0.3s;
}

.product-card-link:hover {
    color: var(--primary-dark);
}

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

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.6;
}

.empty-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.empty-hint {
    font-size: 15px;
    color: var(--gray);
}

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

/* ========================================
   响应式 - 平板
   ======================================== */
@media (max-width: 1024px) {
    .products-main { padding-top: 190px; }
    #productsGrid.products-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
    .product-card-image { height: 190px; }
}

/* ========================================
   响应式 - 手机
   ======================================== */
@media (max-width: 768px) {
    .filter-container {
        gap: 12px;
        padding: 10px 0;
    }

    .filter-row {
        gap: 12px;
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
        flex-wrap: wrap;
    }

    .filter-tags {
        flex-wrap: wrap;
    }

    .filter-label {
        font-size: 12px;
        min-width: 56px;
    }

    .filter-tag {
        padding: 5px 10px;
        font-size: 11px;
    }

    .filter-search {
        width: 100%;
        margin-left: 0;
    }

    .search-input {
        width: 100%;
        font-size: 13px;
    }

    .search-input:focus {
        width: 100%;
    }

    .products-main { padding-top: 280px; }
    #productsGrid.products-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .product-card-image { height: 180px; }
    .product-card-body { padding: 18px; }
    .product-card-name { font-size: 16px; }
    .product-card-desc { font-size: 13px; }
    .attr-tag { font-size: 10px; padding: 2px 8px; }
    .empty-state { padding: 50px 16px; }
    .empty-icon { font-size: 48px; }
    .empty-text { font-size: 17px; }
}

@media (max-width: 480px) {
    .products-main { padding-top: 310px; }
    #productsGrid.products-grid { grid-template-columns: 1fr; gap: 14px; max-width: 360px; margin-left: auto; margin-right: auto; }
    .product-card-image { height: 220px; }
    .filter-bar { padding: 8px 0; }
    .filter-tag { padding: 4px 10px; font-size: 11px; }
    .empty-state { padding: 40px 14px; }
}