/* 产品列表页 /products */

body.ky-b2b-products {
    background: #fff;
}

body.ky-b2b #content.ky-products-page {
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
}

body.ky-b2b:has(> main.ky-products-page) > .ky-mall-footer {
    margin-top: 0;
}

.ky-products-page {
    flex: 1 0 auto;
    width: 100%;
    background: #fff;
}

/* 与首页相同的搜索区 */
.ky-products-hero {
    width: 100%;
    background: #fff;
}

.ky-products-hero-inner {
    max-width: 1148px;
    margin: 0 auto;
    padding: 32px 24px 28px;
    box-sizing: border-box;
}

.ky-products-hero .ky-index-search {
    display: flex;
    align-items: stretch;
    width: 1100px;
    max-width: 100%;
    margin: 0 auto;
    border: 1px solid #d5d9de;
    background: #fff;
    box-sizing: border-box;
}

.ky-products-hero .ky-index-search-input {
    flex: 1;
    min-width: 0;
    height: 52px;
    padding: 0 18px;
    font-size: 15px;
    color: #132a3e;
    background: transparent;
    border: none;
    outline: none;
    box-sizing: border-box;
}

.ky-products-hero .ky-index-search-input::placeholder {
    color: #9aa5b1;
}

.ky-products-hero .ky-index-search-btn {
    flex-shrink: 0;
    width: 56px;
    height: 52px;
    border: none;
    border-left: 1px solid #d5d9de;
    background: #fff;
    color: #132a3e;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
}

.ky-products-hero .ky-index-search-btn .iconfont {
    font-size: 20px;
}

.ky-products-hero .ky-index-search-btn:hover {
    color: #00a1e9;
    background: #f7f8fa;
}

/* 搜索框以下：灰底内容区 */
.ky-products-content {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #eff0f2;
    padding-top: 32px;
    padding-bottom: 60px;
    box-sizing: border-box;
}

.ky-products-body {
    flex: 1 0 auto;
    width: 1108px;
    max-width: calc(100% - 32px);
    min-height: calc(100vh - 320px);
    margin: 0 auto;
    box-sizing: border-box;
}

.ky-products-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    min-height: 40px;
}

.ky-products-count {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #132a3e;
}

.ky-products-sort-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ky-products-sort {
    margin-left: auto;
    min-width: 140px;
    height: 40px;
    padding: 0 36px 0 14px;
    border: 1px solid #d5d9de;
    border-radius: 4px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7c8f' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E") no-repeat right 12px center;
    font-size: 14px;
    color: #132a3e;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
}

.ky-products-sort:focus {
    outline: none;
    border-color: #00a1e9;
}

body.ky-b2b-products .ky-goods-grid {
    gap: 36px;
}

body.ky-b2b-products .goods_item .main {
    width: 100%;
    max-width: none;
    padding-top: 0;
    padding-bottom: 0;
}

/* 居中分页 */
.ky-products-pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: 36px;
}

.ky-products-pagination__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}

.ky-products-pagination__arrow,
.ky-products-pagination__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 6px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 15px;
    color: #132a3e;
    box-sizing: border-box;
    transition: color 0.2s, background 0.2s;
}

.ky-products-pagination__arrow {
    font-size: 22px;
    line-height: 1;
    color: #6b7c8f;
}

.ky-products-pagination__arrow:hover:not(.is-disabled) {
    color: #132a3e;
}

.ky-products-pagination__arrow.is-disabled {
    opacity: 0.35;
    pointer-events: none;
    cursor: default;
}

.ky-products-pagination__num:hover {
    color: #00a1e9;
}

.ky-products-pagination__num.is-active {
    border: 1px solid #132a3e;
    background: #fff;
    font-weight: 600;
    color: #132a3e;
    pointer-events: none;
    cursor: default;
}

.ky-products-pagination__ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 36px;
    color: #9aa5b1;
    font-size: 14px;
    user-select: none;
}

.ky-products-pagination__summary {
    margin: 0;
    font-size: 14px;
    color: #6b7c8f;
    text-align: center;
}

@media (max-width: 1100px) {
    .ky-products-hero-inner {
        padding: 24px 16px 20px;
    }

    .ky-products-content {
        padding-top: 24px;
    }

    .ky-products-body {
        max-width: calc(100% - 24px);
    }
}
