* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
}

.container {
    width:94%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 30px 20px;
    background-color: #f5f5f5;
}   
 
.header-section {
    margin-bottom: 30px;
}   
 
.page-title {
    font-size: 40px;
    font-weight: 400;
    color: #333;
}   
 
.filter-section {
    /* background: #fff; */
    margin-bottom: 20px;
}

.btn-download svg{
    width: 15.74px;
    height: 16px;
}
 
.filter-row {
    display: flex;
    gap: 80px;
}
 
.filter-group {
    width: calc(33.333% - 54px);
}

.filter-label {
    display: block;
    font-size: 18px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.custom-select {
    position: relative;
}

.custom-select select {
    width: 100%;
    height: 38px;
    padding: 0 35px 0 12px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 16px;
    color: #333;
    appearance: none;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.custom-select select:focus {
    outline: none;
    border-color: #1e5aa8;
}

.custom-select::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #666;
    pointer-events: none;
}

select option {
    padding: 8px 12px;
    font-size: 13px;
    background: #fff;
    color: #333;
}

select option:checked {
    background: #1e5aa8;
    color: #fff;
}

select option:disabled {
    background: #f5f5f5;
    color: #ccc;
    cursor: not-allowed;
}

.part-number-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-radius: 6px;
    margin-bottom: 20px;
}

.part-number-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.part-label {
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.part-value {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 18px;
    color: #333;
    padding: 8px 16px;
    border-radius: 4px;
    min-width: 320px;
}

.part-actions {
    display: flex;
    gap: 10px;
}

.btn {
    height: 34px;
    padding: 0 18px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-reset {
    background: rgba(99, 99, 99, 1);
    color: #fff;
}

.btn-copy {
    background: rgba(99, 99, 99, 1);
    color: #fff;
}

.btn-download {
    background: rgba(99, 99, 99, 1);
    color: #fff;
    padding: 0 24px;
    gap: 8px;
}

.btn-download:hover {
    background: #3d3d3d;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-copy:disabled:hover {
    background: #9ca3af;
}

.btn-download:disabled:hover {
    background: #4a4a4a;
}

.table-wrapper {
    background: #fff;
    border: 1px solid #cfd5e4;
    border-radius: 2px;
    box-shadow: none;
    overflow: hidden;
    margin-bottom: 20px;
}

.mobile-builder {
    display: none;
}

.mobile-step {
    background: #fff;
    border: 1px solid #cfd5e4;
    margin-bottom: 14px;
}

.mobile-step-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: #2e469a;
    color: #fff;
}

.mobile-step-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.mobile-step-value {
    min-width: 0;
    max-width: 52%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: #eef3ff;
}

.mobile-clear {
    display: none;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    position: relative;
    flex: 0 0 22px;
}

.mobile-clear.visible {
    display: inline-flex;
}

.mobile-clear::before,
.mobile-clear::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 10px;
    width: 10px;
    height: 2px;
    border-radius: 2px;
    background: #2e469a;
}

.mobile-clear::before {
    transform: rotate(45deg);
}

.mobile-clear::after {
    transform: rotate(-45deg);
}

.mobile-option-list {
    display: grid;
    gap: 1px;
    background: #cfd5e4;
}

.mobile-option {
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    border: 0;
    background: #fff;
    color: #273044;
    text-align: left;
    cursor: pointer;
}

.mobile-option .cell-inner {
    pointer-events: none;
}

.mobile-option.selected {
    background: #c9dcf6;
    color: #143a7a;
    box-shadow: inset 4px 0 0 #245aa8;
}

.mobile-option.disabled {
    background: #eeeeef;
    color: #9ba1ad;
    cursor: not-allowed;
}

.mobile-empty {
    padding: 20px 12px;
    text-align: center;
    color: #777;
    background: #fff;
    border: 1px solid #cfd5e4;
}

.table-scroll {
    overflow-x: hidden;
    width: 100%;
}

.product-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
    table-layout: fixed;
    background: #fff;
}

.product-table thead tr {
    background: #2e469a;
}

.product-table th {
    height: 96px;
    padding: 12px 10px 10px;
    text-align: left;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    position: relative;
    vertical-align: top;
    white-space: nowrap;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 1);
    border-bottom: 1px solid #20357d;
}

.product-table th:last-child {
    border-right: 0;
}

.th-header {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
    position: relative;
    height: 100%;
    padding-top: 0;
}

.th-header::after {
    content: '';
    position: absolute;
    left: -10px;
    right: -10px;
    top: 28px;
    height: 1px;
    background: rgba(255, 255, 255, 0.72);
    pointer-events: none;
}

.th-title {
    display: block;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.th-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    height: 34px;
    padding: 5px 7px 5px 9px;
    border: 1px solid #d8e0f0;
    border-radius: 3px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    min-width: 0;
}

.filter-content {
    font-size: 12px;
    color: #25345f;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 22px;
    min-width: 0;
}

.filter-clear {
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 50%;
    background: #2f61b9;
    cursor: pointer;
    margin-left: 6px;
    display: none;
    align-items: center;
    justify-content: center;
    flex: 0 0 20px;
    position: relative;
    padding: 0;
    box-shadow: 0 1px 2px rgba(22, 43, 108, 0.26);
}

.filter-clear.visible {
    display: inline-flex;
}

.filter-clear::before,
.filter-clear::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 9px;
    width: 10px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
}

.filter-clear::before {
    transform: rotate(45deg);
}

.filter-clear::after {
    transform: rotate(-45deg);
}

.filter-clear:hover {
    background: #1f4f9d;
}

.product-table tbody tr {
    background: #fff;
}

.product-table tbody tr:nth-child(even) {
    background: #fafbfe;
}

.option-column-cell {
    padding: 0;
    vertical-align: top;
    border-right: 1px solid rgba(204, 206, 210, 1);
}

.option-column-cell:last-child {
    border-right: 0;
}

.option-column-list {
    height: 350px;
    min-height: 350px;
    max-height: 350px;
    overflow-y: auto;
    overflow-x: hidden;
    /* scrollbar-gutter: stable; */
    /* scrollbar-width: thin;
    scrollbar-color: #8290ad #eef1f7; */
}  

.option-column-list::-webkit-scrollbar {
    width: 8px;
}

.option-column-list::-webkit-scrollbar-button:single-button:vertical:decrement,
.option-column-list::-webkit-scrollbar-button:single-button:vertical:increment,
.option-column-list::-webkit-scrollbar-button:vertical:start:decrement,
.option-column-list::-webkit-scrollbar-button:vertical:end:increment {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.option-column-list::-webkit-scrollbar-track {
    background: #eef1f7;
    border-left: 1px solid #d9deea;
}

.option-column-list::-webkit-scrollbar-thumb {
    min-height: 36px;
    background: #8290ad;
    border: 2px solid #eef1f7;
    border-radius: 4px;
}

.option-column-list::-webkit-scrollbar-thumb:hover {
    background: #2e469a;
}

.option-column-list::-webkit-scrollbar-corner {
    background: #eef1f7;
}

.data-cell {
    width: 100%;
    height: 50px;
    padding: 9px 11px;
    color: #273044;
    vertical-align: top;
    position: relative;
    cursor: pointer;
    transition: background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
    border-right: 0;
    border-bottom: 1px solid rgba(204, 206, 210, 1);
    overflow: hidden;
    word-break: break-word;
    background: #fff;
}

.empty-option-cell {
    height: 58px;
    padding: 9px 11px;
    border-right: 1px solid rgba(204, 206, 210, 1);
    border-bottom: 1px solid rgba(204, 206, 210, 1);
    background: #fff;
}

.data-cell.disabled {
    color: #9ba1ad;
    background: #eeeeef;
    cursor: not-allowed;
    opacity: 1;
}

.data-cell.disabled:hover {
    background: #eeeeef;
    box-shadow: none;
}

.data-cell.selected {
    background: #c9dcf6;
    color: #143a7a;
    border: 1px solid #245aa8;
}

.empty-cell {
    padding: 28px 12px;
    text-align: center;
    color: #777;
    font-size: 13px;
}

.cell-inner {
    display: flex;
    gap: 6px;
    min-width: 0;
    height: 100%;
    align-items: center;
}
.cell-txt{
    display:flex;
    flex-direction:column;
    min-width: 0;
}

.cell-main {
    font-size: 14px;
    line-height: 1.35;
    color: inherit;
    min-width: 0;
    white-space: nowrap;
}

.cell-sub {
    flex: 1;
    font-size: 14px;
    color: #606a7f;
    line-height: 1.35;
    word-break: break-word;
    white-space: pre-line;
}

.cell-icon {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #536784;
    cursor: help;
}

.col-case { width: 14%; }
.col-terminal { width: 20%; }
.col-voltage { width: 10%; }
.col-capacitance { width: 10%; }
.col-tolerance { width: 8%; }
.col-dielectric { width: 18%; }
.col-package { width: 8%; }
.col-suffix { width: 12%; }

@media (max-width: 768px) {
    body {
        background: #f2f3f6;
    }

    .container {
        width: 100%;
        padding: 50px 12px 24px;
    }

    .header-section {
        margin-bottom: 18px;
    }

    .page-title {
        font-size: 28px;
    }

    .filter-row {
        flex-direction: column;
        gap: 12px;
    }

    .filter-group {
        width: 100%;
    }

    .filter-label {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .custom-select select {
        height: 42px;
        font-size: 14px;
    }

    .part-number-section {
        display: block;
        padding: 12px;
        background: #fff;
        border: 1px solid #d8dce6;
        border-radius: 0;
    }

    .part-number-left {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .part-label {
        font-size: 14px;
    }

    .part-value {
        width: 100%;
        min-width: 0;
        padding: 8px 0;
        font-size: 15px;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    .part-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .part-number-right {
        margin-top: 8px;
    }

    .btn {
        width: 100%;
        height: 40px;
    }

    .table-wrapper {
        display: none !important;
    }

    .mobile-builder.is-visible {
        display: block;
        margin-bottom: 18px;
    }

}
