/* 产品列表页 */

.products-page {
    padding-bottom: 0;
}

.products-body {
    padding-bottom: clamp(56px, 10vw, 88px);
}

.products-body .container {
    max-width: 1120px;
}

.products-toolbar {
    display: block !important;
    margin-bottom: 20px;
}

.products-toolbar .video-toolbar-inner {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.products-search-bar {
    display: block !important;
    margin-bottom: 20px;
}

.products-search-inner {
    display: block;
    margin: 0;
    padding: 16px 18px 18px;
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.products-search-label {
    display: block;
    margin-bottom: 10px;
    font-size: 12px;
    letter-spacing: 0.12em;
    color: var(--gold);
}

.products-search-row {
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.products-search-input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    height: 44px;
    padding: 0 16px;
    font-size: 15px;
    line-height: 44px;
    font-family: var(--font-cn);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: #faf9f6;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.products-search-input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(42, 74, 48, 0.1);
}

.products-search-input::placeholder {
    color: var(--text-muted);
}

.products-search-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: stretch;
    gap: 10px;
}

.products-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    height: 44px;
    padding: 0 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-family: var(--font-cn);
    letter-spacing: 0.1em;
    line-height: 1;
    cursor: pointer;
    border: none;
    box-sizing: border-box;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.products-search-btn--primary {
    background: var(--primary);
    color: #fff;
}

.products-search-btn--primary:hover {
    background: var(--primary-light);
    color: #fff;
    box-shadow: 0 4px 12px rgba(42, 74, 48, 0.22);
}

.products-search-btn--ghost {
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.products-search-btn--ghost:hover {
    background: rgba(42, 74, 48, 0.06);
    color: var(--primary);
}

.products-category-wrap {
    margin-bottom: 28px;
}

.products-category-nav {
    margin-bottom: 0;
}

/* 分类网格（首页、产品列表共用）：手机一行 3 个、图标加大 */
.catalog-category-grid,
.products-category-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 10px;
    overflow: visible !important;
    flex-wrap: wrap;
    padding: 4px 0 8px !important;
    margin: 0 !important;
    mask-image: none !important;
    -webkit-mask-image: none !important;
    scroll-snap-type: none;
}

.catalog-category-grid .category-rail-item,
.products-category-grid .category-rail-item {
    min-width: 0 !important;
    max-width: none !important;
    width: 100%;
    scroll-snap-align: unset;
    padding: 12px 6px 10px;
}

.catalog-category-grid .category-rail-ico,
.products-category-grid .category-rail-ico {
    width: 56px;
    height: 56px;
    border-radius: 14px;
}

.catalog-category-grid .category-rail-icon-svg,
.products-category-grid .category-rail-icon-svg {
    width: 38px;
    height: 38px;
}

.catalog-category-grid .category-rail-label,
.products-category-grid .category-rail-label {
    font-size: 13px;
    max-width: none;
    -webkit-line-clamp: 2;
}

.products-video-block {
    padding-top: 8px;
}

.products-video-grid {
    margin-bottom: 40px;
}

.products-pagination {
    margin-top: 8px;
}

@media screen and (min-width: 769px) {
    .catalog-category-grid,
    .products-category-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px 14px;
    }

    .catalog-category-grid .category-rail-ico,
    .products-category-grid .category-rail-ico {
        width: 60px;
        height: 60px;
    }

    .catalog-category-grid .category-rail-icon-svg,
    .products-category-grid .category-rail-icon-svg {
        width: 40px;
        height: 40px;
    }

    .products-video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (min-width: 992px) {
    .catalog-category-grid,
    .products-category-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .products-video-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .products-search-inner {
        padding: 14px 14px 16px;
    }

    .products-search-row {
        flex-direction: column;
        gap: 10px;
    }

    .products-search-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        width: 100%;
    }

    .products-search-btn {
        width: 100%;
        min-width: 0;
    }

    .products-video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .products-video-grid .video-card-thumb {
        height: 140px;
    }
}

@media screen and (max-width: 400px) {
    .products-search-input {
        font-size: 16px;
    }
}
