/* ============================================================
   /assets/home/css/products.css - 完整版
   ============================================================ */

/* ============================================================
   产品分类筛选
   ============================================================ */

.product-filters {
    padding: 28px 0 12px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.product-filters .container {
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 分类行 ===== */
.filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 4px 0;
}

.filter-row-level1 {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #dee2e6;
}

.filter-row-level2 {
    margin-bottom: 0;
    padding-left: 0;
}

/* ===== 分类行标签 ===== */
.filter-row-label {
    font-size: 12px;
    font-weight: 600;
    color: #adb5bd;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-right: 4px;
    flex-shrink: 0;
}

/* ===== 一级分类按钮 ===== */
.filter-btn {
    display: inline-block;
    padding: 7px 22px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 500;
    color: #1a2332;
    background: #ffffff;
    border: 2px solid #e9ecef;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 一级分类悬停：边框变蓝色 */
.filter-btn:hover {
    color: #1a365d;
    border-color: #1a365d;
    background: #ffffff;
    transform: translateY(-1px);
}

/* 一级分类选中：蓝色背景 */
.filter-btn.active {
    color: #ffffff;
    background: #1a365d;
    border-color: #1a365d;
}

.filter-btn.active:hover {
    transform: none;
}

/* ===== 全部产品按钮 ===== */
.filter-btn-all {
    background: #f8f9fa;
    border-color: #e9ecef;
}

.filter-btn-all:hover {
    background: #ffffff;
    border-color: #1a365d;
    color: #1a365d;
}

.filter-btn-all.active {
    background: #1a365d;
    color: #ffffff;
    border-color: #1a365d;
}

/* ===== 二级分类按钮 ===== */
.filter-btn-sub {
    display: inline-block;
    padding: 5px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 400;
    color: #495057;
    background: #f1f3f5;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 二级分类悬停：边框变蓝色 */
.filter-btn-sub:hover {
    color: #1a365d;
    border-color: #1a365d;
    background: #ffffff;
}

/* 二级分类选中：蓝色背景 */
.filter-btn-sub.active {
    color: #ffffff;
    background: #1a365d;
    border-color: #1a365d;
}

.filter-btn-sub.active:hover {
    transform: none;
}

/* ===== 空状态 ===== */
.empty-tip {
    text-align: center;
    padding: 80px 20px;
    color: #adb5bd;
}

.empty-tip i {
    font-size: 56px;
    display: block;
    margin-bottom: 16px;
    color: #dee2e6;
}

/* ============================================================
   产品网格布局（产品页专用）
   ============================================================ */

.products-page {
    padding: 60px 0;
}

.products-page .products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

@media (min-width: 768px) {
    .products-page .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
    }
}

@media (min-width: 1200px) {
    .products-page .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================================
   产品卡片样式（首页和产品页共用）
   ============================================================ */

.product-card {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f8f9fa;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.product-card:hover .product-img img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
    padding-right: 56px;
}

.product-title {
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 16px;
    color: #1a2332;
}

.product-desc {
    font-size: 13px;
    color: #6b7a8f;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================================
   快速询价按钮
   ============================================================ */

.quick-quote-icon {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: var(--accent);
    color: #ffffff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.quick-quote-icon:hover {
    background: var(--accent-dark);
    transform: scale(1.1);
}

.quick-quote-icon i {
    font-size: 18px;
}

/* ============================================================
   CTA 横幅样式
   ============================================================ */

.cta-banner {
    background: #f8f9fa;
    color: #1a2332;
    text-align: center;
    padding: 60px 20px;
}

.cta-banner .container {
    max-width: 800px;
    margin: 0 auto;
}

.cta-banner h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1a2332;
}

.cta-banner h2 i {
    color: var(--accent);
    margin-right: 10px;
}

.cta-banner p {
    font-size: 15px;
    color: #6b7a8f;
    margin-bottom: 28px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-banner .btn-primary {
    background: var(--accent);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(245, 166, 35, 0.3);
}

.cta-banner .btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 166, 35, 0.4);
}

/* ============================================================
   响应式适配
   ============================================================ */

/* 平板及以下 */
@media (max-width: 768px) {
    .product-filters {
        padding: 20px 0 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .product-filters .container {
        padding: 0 16px;
        min-width: 100%;
        width: auto;
    }

    .filter-row {
        flex-wrap: nowrap;
        gap: 6px 10px;
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .filter-row::-webkit-scrollbar {
        display: none;
    }

    .filter-row-level1 {
        margin-bottom: 6px;
        padding-bottom: 6px;
        border-bottom: 1px dashed #dee2e6;
    }

    .filter-row-level2 {
        padding-left: 0;
    }

    .filter-btn {
        padding: 6px 16px;
        font-size: 13px;
        flex-shrink: 0;
        border-width: 1.5px;
    }

    .filter-btn-sub {
        padding: 4px 12px;
        font-size: 12px;
        flex-shrink: 0;
        border-width: 1.5px;
    }

    .filter-row-label {
        font-size: 10px;
        flex-shrink: 0;
    }

    .products-page {
        padding: 40px 0;
    }

    .product-info {
        padding: 16px;
        padding-right: 48px;
    }

    .quick-quote-icon {
        width: 36px;
        height: 36px;
        bottom: 12px;
        right: 12px;
    }

    .quick-quote-icon i {
        font-size: 14px;
    }

    .product-title {
        font-size: 14px;
    }

    .product-desc {
        font-size: 12px;
    }

    .cta-banner {
        padding: 50px 20px;
    }

    .cta-banner h2 {
        font-size: 22px;
    }

    .cta-banner p {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .cta-banner .btn-primary {
        padding: 12px 24px;
        font-size: 14px;
    }

    .pagination {
        gap: 4px;
        margin-top: 32px;
    }

    .pagination a {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* 手机端 */
@media (max-width: 480px) {
    .product-filters {
        padding: 14px 0 4px;
    }

    .product-filters .container {
        padding: 0 12px;
    }

    .filter-row {
        gap: 4px 8px;
    }

    .filter-btn {
        padding: 5px 12px;
        font-size: 12px;
        border-radius: 24px;
    }

    .filter-btn-sub {
        padding: 4px 10px;
        font-size: 11px;
        border-radius: 24px;
    }

    .filter-row-level1 {
        margin-bottom: 4px;
        padding-bottom: 4px;
    }

    .products-page {
        padding: 24px 0 40px;
    }

    .products-page .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 4px;
    }

    .product-card {
        border-radius: 12px;
        box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
    }

    .product-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
    }

    .product-info {
        padding: 10px 12px 12px;
        padding-right: 40px;
    }

    .product-title {
        font-size: 13px;
        font-weight: 600;
        margin-bottom: 4px;
        line-height: 1.3;
    }

    .product-desc {
        font-size: 11px;
        line-height: 1.3;
        -webkit-line-clamp: 2;
        color: #8a9bb0;
    }

    .quick-quote-icon {
        width: 30px;
        height: 30px;
        bottom: 10px;
        right: 10px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }

    .quick-quote-icon i {
        font-size: 12px;
    }

    .pagination {
        margin-top: 28px;
        gap: 4px;
    }

    .pagination a {
        padding: 5px 10px;
        font-size: 12px;
        border-radius: 6px;
        min-width: 32px;
        text-align: center;
    }

    .pagination a.prev,
    .pagination a.next {
        font-size: 12px;
        padding: 5px 12px;
    }

    .empty-tip {
        padding: 50px 16px;
        font-size: 14px;
    }

    .empty-tip i {
        font-size: 40px;
        margin-bottom: 12px;
    }

    .cta-banner {
        padding: 36px 16px;
    }

    .cta-banner h2 {
        font-size: 18px;
    }

    .cta-banner p {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .cta-banner .btn-primary {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* 极小屏 */
@media (max-width: 375px) {
    .filter-btn {
        padding: 4px 10px;
        font-size: 11px;
    }

    .filter-btn-sub {
        padding: 3px 8px;
        font-size: 10px;
    }

    .products-page .products-grid {
        gap: 8px;
        padding: 0 2px;
    }

    .product-info {
        padding: 8px 8px 10px;
        padding-right: 34px;
    }

    .product-title {
        font-size: 12px;
    }

    .product-desc {
        font-size: 10px;
        -webkit-line-clamp: 1;
    }

    .quick-quote-icon {
        width: 26px;
        height: 26px;
        bottom: 8px;
        right: 8px;
    }

    .quick-quote-icon i {
        font-size: 10px;
    }

    .pagination a {
        padding: 4px 8px;
        font-size: 11px;
        min-width: 28px;
    }

    .cta-banner h2 {
        font-size: 16px;
    }
}

/* 平板竖屏 (481px - 820px) */
@media (min-width: 481px) and (max-width: 820px) {
    .products-page .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .filter-btn {
        padding: 6px 18px;
        font-size: 13px;
    }

    .filter-btn-sub {
        padding: 5px 14px;
        font-size: 12px;
    }
}

/* ============================================================
   方案十：时间线/步骤式布局（圆点上方加箭头）
   ============================================================ */

.product-filters {
    padding: 32px 0 20px;
    background: linear-gradient(to bottom, #f8f9fa, #ffffff);
    border-bottom: 1px solid #e9ecef;
}

.product-filters .container {
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 一级分类：步骤式 ===== */
.filter-row-level1 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    padding: 4px 0 16px 0;
    position: relative;
}

.filter-row-level1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
}

.filter-row-level1 .filter-btn {
    padding: 8px 24px 8px 8px;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

/* 步骤编号 - 圆点 */
.filter-row-level1 .filter-btn::before {
    content: attr(data-step);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    font-size: 11px;
    font-weight: 700;
    color: #adb5bd;
    background: #f1f3f5;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
    transition: all 0.25s ease;
    position: relative;
    z-index: 2;
}

/* ===== 选中状态：圆点上方显示小箭头 ===== */
.filter-row-level1 .filter-btn.active::after {
    content: '▲';
    position: absolute;
    top: -18px;
    left: 4px;
    font-size: 10px;
    color: var(--accent);
    opacity: 0;
    transform: translateY(4px);
    transition: all 0.3s ease;
}

.filter-row-level1 .filter-btn.active::after {
    opacity: 1;
    transform: translateY(0);
}

/* 步骤连接线 */
.filter-row-level1 .filter-btn:not(:last-child)::after {
    content: '—';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    color: #dee2e6;
    font-size: 14px;
}

.filter-row-level1 .filter-btn:hover {
    color: var(--accent);
}

.filter-row-level1 .filter-btn:hover::before {
    background: #e9ecef;
    color: var(--accent);
}

.filter-row-level1 .filter-btn.active {
    color: var(--accent);
    font-weight: 600;
}

.filter-row-level1 .filter-btn.active::before {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 119, 192, 0.30);
}

/* ===== 二级分类 ===== */
.filter-row-level2 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    padding: 12px 0 4px 40px;
    border-left: 2px solid #e9ecef;
    margin-left: 12px;
}

.filter-row-level2 .filter-btn-sub {
    display: inline-flex;
    align-items: center;
    padding: 4px 16px 4px 0;
    font-size: 13px;
    font-weight: 400;
    color: #8c9aa8;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

/* 小圆点 */
.filter-row-level2 .filter-btn-sub::before {
    content: '';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    margin-right: 10px;
    flex-shrink: 0;
    transition: all 0.2s ease;
    opacity: 0.3;
}

.filter-row-level2 .filter-btn-sub:hover {
    color: var(--accent);
}

.filter-row-level2 .filter-btn-sub:hover::before {
    opacity: 0.6;
}

.filter-row-level2 .filter-btn-sub.active {
    color: var(--accent);
    font-weight: 500;
}

.filter-row-level2 .filter-btn-sub.active::before {
    opacity: 1;
    box-shadow: 0 2px 8px rgba(0, 119, 192, 0.30);
}

/* 二级分类选中：圆点内部显示白色箭头 */
.filter-row-level2 .filter-btn-sub.active::after {
    content: '›';
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

.filter-row-level2 .filter-btn-sub.active {
    padding-left: 20px;
}