/* ============================================================
 * Product List Page
 * ============================================================ */

.product-section {
    padding-bottom: 15px;
    background: #f4f6f9;
}

.product-crumb {
    background: #f4f6f9;
}

.product-crumb .container {
    max-width: var(--container-wide);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 48px;
    padding-top: 12px;
    padding-bottom: 12px;
    color: var(--jz-gray-700);
    font-size: 12.5px;
}

.product-crumb a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--jz-gray-700);
    transition: color var(--transition-base);
}

.product-crumb a:hover {
    color: var(--jz-red);
}

.product-crumb__item:last-child {
    color: var(--jz-ink);
    font-weight: 500;
}

.product-crumb__sep {
    color: var(--jz-gray-300);
    font-size: 11px;
}

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

.product-card {
    background: #fff;
    box-shadow: 0 8px 24px rgba(20, 35, 58, 0.06);
}

.product-filter {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
}

.product-list-panel {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
}

.product-filter {
    min-height: 401px;
}

.product-list-panel {
    min-height: 520px;
}

.product-toolbar {
    display: flex;
    flex-shrink: 0;
    justify-content: flex-end;
    gap: 10px;
}

.product-btn {
    height: 36px;
    min-width: 104px;
    padding: 0 18px;
    border: 1px solid #c7d2df;
    border-radius: 4px;
    background: #fff;
    color: #314155;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    line-height: 34px;
    transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.product-btn:hover {
    border-color: #94a7bd;
    color: #162033;
}

.product-btn--secondary {
    background: #f8fafc;
}

.product-btn--primary {
    border-color: #D80027;
    background: #D80027;
    box-shadow: 0 6px 14px rgba(216, 0, 39, .18);
    color: #fff;
}

.product-btn--primary:hover {
    border-color: #B8001F;
    background: #B8001F;
    color: #fff;
}

.product-filter__body {
    padding: 8px;
    background: #fff;
}

.product-filter__body,
.product-list-panel > :not(.product-loading-mask) {
    position: relative;
    z-index: 1;
}

.product-filter__columns {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(210px, 246px);
    gap: 8px;
    height: 320px;
    overflow-x: auto;
    overflow-y: hidden;
    align-items: stretch;
}

.product-filter__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px 16px;
    border-top: 1px solid #e6ebf1;
    background: #fff;
}

.product-filter-column {
    display: flex;
    min-width: 0;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e0e6ee;
    border-radius: 4px;
    background: #fff;
}

.product-filter-column__head {
    flex-shrink: 0;
    padding: 14px;
    border-bottom: 1px solid #e6ebf1;
    background: #fbfcfe;
}

.product-filter-column__title {
    margin-bottom: 10px;
    color: #172033;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-filter-column__search {
    width: 100%;
    height: 34px;
    padding: 0 32px 0 10px;
    border: 1px solid #cfd8e3;
    border-radius: 4px;
    background: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238795a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-position: right 10px center;
    background-repeat: no-repeat;
    background-size: 14px 14px;
    color: #172033;
    font-size: 13px;
    outline: none;
}

.product-filter-column__search:focus {
    border-color: #D80027;
}

.product-filter-column__values {
    flex: 1;
    min-height: 0;
    height: auto;
    padding: 8px 10px 12px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #b7c3d3 #eef2f6;
}

.product-filter-column__values::-webkit-scrollbar,
.product-table-wrap::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.product-filter-column__values::-webkit-scrollbar-thumb,
.product-table-wrap::-webkit-scrollbar-thumb {
    background: #b7c3d3;
}

.product-filter-column__values::-webkit-scrollbar-track,
.product-table-wrap::-webkit-scrollbar-track {
    background: #eef2f6;
}

.product-filter-option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 5px 6px;
    color: #405064;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.4;
}

.product-filter-option:hover {
    background: #f2f6fb;
}

.product-filter-option input {
    flex-shrink: 0;
    margin: 3px 0 0;
    accent-color: #D80027;
}

.product-filter-option__text {
    min-width: 0;
    word-break: break-word;
}

.product-filter-empty,
.product-table-empty {
    padding: 34px 24px;
    color: #7a8697;
    font-size: 14px;
    text-align: center;
}

.product-list-panel__summary {
    min-width: 0;
    color: #657184;
    font-size: 14px;
}

.product-table-wrap {
    width: 100%;
    overflow-x: auto;
    background: #fff;
}

.product-loading-mask {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .72);
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s ease, visibility .18s ease;
    pointer-events: none;
    z-index: 5;
}

.product-loading-mask.is-visible {
    opacity: 1;
    visibility: visible;
}

.product-loading-mask__inner {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #7b8797;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .02em;
}

.product-loading-mask__inner .fa {
    color: #c7d0db;
    font-size: 24px;
}

.product-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: #27364a;
    font-size: 14px;
}

.product-table th,
.product-table td {
    height: 58px;
    min-width: 152px;
    max-width: 230px;
    padding: 11px 14px;
    border-right: 1px solid #e6ebf1;
    border-bottom: 1px solid #e6ebf1;
    background: #fff;
    text-align: left;
    vertical-align: middle;
}

.product-table th {
    z-index: 4;
    height: 46px;
    background: #f7f9fc;
    color: #172033;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.product-table .is-fixed {
    position: sticky;
    z-index: 5;
    background: #fff;
    box-shadow: 1px 0 0 #e6ebf1;
}

.product-table th.is-fixed {
    z-index: 8;
    background: #f7f9fc;
}

.product-sticky-head {
    position: fixed;
    top: var(--nav-current-h, var(--nav-h-shrink, 68px));
    left: 0;
    z-index: calc(var(--z-header, 900) - 1);
    display: none;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 6px 16px rgba(20, 35, 58, .08);
    pointer-events: none;
}

.product-sticky-head.is-visible {
    display: block;
}

.product-sticky-head__inner {
    overflow: hidden;
}

.product-sticky-head__fixed {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3;
    overflow: hidden;
    background: #f7f9fc;
    box-shadow: 2px 0 0 #e6ebf1;
}

.product-sticky-head table {
    border-collapse: separate;
    border-spacing: 0;
    color: #27364a;
    font-size: 14px;
}

.product-sticky-head th {
    height: 46px;
    padding: 11px 14px;
    border-right: 1px solid #e6ebf1;
    border-bottom: 1px solid #e6ebf1;
    background: #f7f9fc;
    color: #172033;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
}

.product-table .col-image {
    left: 0;
    min-width: 86px;
    max-width: 86px;
    text-align: center;
}

.product-table .col-name {
    left: 86px;
    min-width: 230px;
    max-width: 230px;
}

.product-table .col-brand {
    left: 316px;
    min-width: 150px;
    max-width: 150px;
}

.product-table .col-manual {
    left: 466px;
    min-width: 84px;
    max-width: 84px;
    text-align: center;
}

.product-name {
    color: #172033;
    font-weight: 700;
    line-height: 1.45;
    word-break: break-word;
}

.product-image {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border: 0;
    background: transparent;
}

.product-image-view {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    overflow: hidden;
    border-radius: 4px;
    background: #f4f6f9;
}

.product-image-placeholder {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: #f4f6f9;
    color: #8b97a8;
    font-family: FontAwesome;
    font-size: 20px;
}

.product-image-placeholder::before {
    content: "\f1c5";
    color: #b3bcc8;
}

.product-image-preview {
    position: absolute;
    z-index: calc(var(--z-header, 900) + 20);
    display: none;
    width: 220px;
    height: 220px;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: 1px solid #e0e6ee;
    background: #fff;
    box-shadow: 0 12px 30px rgba(20, 35, 58, .18);
    transform: translateY(-50%);
    pointer-events: none;
}

.product-image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-image-preview.is-visible {
    display: flex;
}

.product-manual-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: #D80027;
    font-size: 20px;
    text-decoration: none;
}

.product-manual-link:hover {
    color: #B8001F;
    text-decoration: underline;
}

.product-param-value {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-pagination {
    padding: 16px 24px 20px;
    border-top: 1px solid #e6ebf1;
    background: #fff;
}

.product-pagination:empty {
    display: none;
}

.product-pagination .pager-box,
.product-pagination .pager {
    display: flex;
    justify-content: center;
}

.product-pagination .pager {
    flex-wrap: wrap;
    gap: 5px;
}

.product-pagination .pager a,
.product-pagination .pager span {
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    border: 1px solid #d7dee8;
    background: #fff;
    color: #4b5b70;
    line-height: 30px;
    text-align: center;
    text-decoration: none;
    transition: border-color .18s ease, color .18s ease, background .18s ease;
}

.product-pagination .pager a:hover {
    border-color: #D80027;
    background: #fff7f8;
    color: #D80027;
}

.product-pagination .pager .js-selected {
    border-color: #D80027;
    background: #fff;
    color: #D80027;
    font-weight: 700;
}

.product-pagination .pager .js-disabled {
    cursor: not-allowed;
    opacity: .45;
}

@media (max-width: 768px) {
    .product-section {
        padding-bottom: 15px;
    }


    .product-toolbar {
        width: 100%;
    }

    .product-filter__foot {
        align-items: stretch;
        flex-direction: column;
    }

    .product-btn {
        flex: 1;
    }

    .product-filter__columns {
        grid-auto-columns: minmax(190px, 220px);
        height: 320px;
    }

    .product-table .col-name {
        left: 76px;
        min-width: 190px;
        max-width: 190px;
    }

    .product-table .col-image {
        left: 0;
        min-width: 76px;
        max-width: 76px;
    }

    .product-table .col-brand {
        left: 266px;
    }

    .product-table .col-manual {
        left: 416px;
    }
}
