/* 第一行：左右两个span */
.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 40px 24px 40px;
}
.search-header span {
    font-weight: bold;
    color: white;
    font-size: 30px;
    letter-spacing: 2px;
}
.search-header a {
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 1);
    border-radius: 17px;
    color: rgba(255, 255, 255, 1);
    font-size: 17px;
    padding: 5px 23px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-header a:hover,
.search-header a:focus{
    background-color: rgba(255, 255, 255, 0.9);
}

/* 第二行：白色横线 */
.search-divider {
    height: 0.5px;
    background: white;
    margin-bottom: 30px;
}

/* 第三行：输入框和搜索按钮 */
.search-input-row {
    position: relative;
    margin-bottom: 20px;
    padding: 0 40px 0 40px;
}
.search-input-row input {
    width: 100%;
    height: 40px;
    padding: 10px 180px 10px 25px;
    border: none;
    border-radius: 20.5px !important;
    font-size: 13px;
    background-color: white;
    box-sizing: border-box;
    color: #272727;
    letter-spacing: 1.8px;
}
.search-input-row input::placeholder {
    color: #272727;
    letter-spacing: 1.8px;
}
.search-input-row a {
    position: absolute;
    right: 39px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 35px;
    background: #ACBAFF;
    border: none;
    border-radius: 20.5px;
    font-size: 17px;
    letter-spacing: 1.8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #272727;
    font-weight: bold;
}
.search-input-row a:hover {
    background: #2a4fd8;
    color: white;
}

.search-input-row a:active,
.search-input-row a:focus {
    background: #2a4fd8;
    color: white;
}

.search-selects-row {
    display: flex;
    gap: 10px;
    padding: 0 40px 0 40px;
}

.search-dropdown {
    flex: 1;
}

.search-dropdown>button {
    position: relative;
    width: 100%;
    padding-left: 45px;
    height: 40px;
    border: none;
    border-radius: 20.5px;
    /*font-weight: bold;*/
    font-size: 17px;
    color: white;
    background: #001FB7;
    transition: all 0.5s ease;
    text-align: left;
}
.search-dropdown>button:hover {
    background: #001FB7;
}
.search-dropdown>button::after {
    text-align: right;
    position: absolute;
    right: 15px;
    top: 16px;
}

.search-dropdown .dropdown-toggle::after,
.search-dropdown .dropdown-toggle.show::after {
    border-width: 8px 6px 0 6px;
    margin-left: 0.5em;
}

.search-dropdown>button.show {
    color: #001FB7;
    background: white;
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px 8px;
    outline: 2px solid rgba(255, 255, 255, 0.5);
}

.search-dropdown:nth-child(1) > button {
    background-image: url('../images/position.png');
    background-repeat: no-repeat;
    background-position: left 20px center;
    background-size: 16px 16px;
}

.search-dropdown:nth-child(1) > button.show {
    background-image: url('../images/position-dark.png');
}

.search-dropdown:nth-child(2) > button {
    background-image: url('../images/size.png');
    background-repeat: no-repeat;
    background-position: left 20px center;
    background-size: 16px 16px;
}

.search-dropdown:nth-child(2) > button.show {
    background-image: url('../images/size-dark.png');
}

.search-dropdown:nth-child(3) > button {
    background-image: url('../images/price-tag.png');
    background-repeat: no-repeat;
    background-position: left 20px center;
    background-size: 16px 16px;
}

.search-dropdown:nth-child(3) > button.show {
    background-image: url('../images/price-tag-dark.png');
}

.search-dropdown:nth-child(4) > button {
    background-image: url('../images/tag.png');
    background-repeat: no-repeat;
    background-position: left 20px center;
    background-size: 16px 16px;
}

.search-dropdown:nth-child(4) > button.show {
    background-image: url('../images/tag-dark.png');
}

.search-selects-row a {
    display: none;
}


.search-input-small {
    display: none !important;
}

/* Checkbox布局样式 */
.checkbox-container {
    padding: 10px;
    min-width: 900px;
}

.checkbox-row {
    margin-bottom: 8px;
}

.checkbox-row.select-all {
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

.checkbox-columns {
    display: flex;
    gap: 20px;
}

.checkbox-column {
    flex: 1;
}

.checkbox-row.category {
    font-weight: bold;
    margin-top: 10px;
    margin-bottom: 20px;
}

.checkbox-row.category label,
.checkbox-row.select-all label {
    cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}


/* 价格选项卡样式 */
.price-dropdown-menu {
    padding-top: 0 !important;
}
.price-dropdown-menu li {
    background: #D5DCFD;
    border-radius: 3px;
}
.price-dropdown-menu li button {
    color: #001FB7 !important;
}

.price-tabs {
    min-width: 400px;
}

.price-tabs .nav-tabs {
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 15px;
    display: flex;
}

.price-tabs .nav-item {
    flex: 1;
    text-align: center;
}

.price-tabs .nav-link {
    color: #001FB7;
    border: 1px solid transparent;
    border-bottom: none;
    width: 100%;
}

.price-tabs .nav-link.active {
    color: #001FB7;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
    font-weight: bold;
}

.price-tabs .nav-link:hover:not(.active) {
    border-color: #e9ecef #e9ecef #dee2e6;
}

.price-inputs {
    padding: 0 10px;
}

.price-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
}

.price-input-group .price-input {
    padding: 8px 12px;
    border: 1px solid #001FB7 !important;
    border-radius: 4px;
    font-size: 14px;
    color: #001FB7;
    width: 100%;
    margin-bottom: 5px;
}

.price-input-group .input-label {
    font-size: 12px;
    color: #001FB7;
    text-align: left;
}

/* 连接符和单位样式 */
.price-row .dash,
.price-row .unit {
    color: #001FB7;
    margin-top: 8px; /* 与输入框对齐 */
}

.price-row span {
    color: #001FB7;
}

.price-ranges {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.price-column {
    flex: 1;
}

.price-option {
    display: block;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 14px;
    color: #001FB7;
}

/* 新增样式以确保radio按钮选项长度一致并正确对齐 */
.price-option .btn {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    border-radius: 7px;
    color: #001FB7;
    border-color: #001FB7;
}
.price-option input:checked+.btn {
    background: #001FB7;
}

.price-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.price-actions .btn {
    flex: 1;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: normal;
}

.price-actions .btn-primary {
    background-color: #001FB7;
    border-color: #001FB7;
    border-radius: 7px;
    color: white;
}

.price-actions .btn-primary:hover {
    background-color: #001680;
    border-color: #001680;
}

.price-actions .btn-secondary {
    background-color: transparent;
    border-color: transparent;
    color: #001FB7;
    text-decoration: underline;
}

.price-actions .btn-secondary:hover {
    background-color: transparent;
    border-color: transparent;
    color: #001680;
}

/* 新增样式用于size选项 */
.size-options {
    padding: 15px;
    min-width: 300px;
}

.size-inputs {
    /*padding: 0 10px 15px 10px;*/
    /*border-bottom: 1px solid #eee;*/
    /*margin-bottom: 15px;*/
}

.size-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
}

.size-input-group {
    display: flex;
    flex-direction: column;
    flex: 1;
}
/* 输入框样式 */
.size-input-group .size-input {
    padding: 8px 12px;
    border: 1px solid #001FB7 !important;
    border-radius: 4px;
    font-size: 14px;
    color: #001FB7;
    width: 100%;
    margin-bottom: 5px;
}

/* 标签样式 */
.size-input-group .input-label {
    font-size: 12px;
    color: #001FB7;
    text-align: left;
}

/* 连接符和单位样式 */
.size-row .dash,
.size-row .unit {
    color: #001FB7;
    margin-top: 8px; /* 与输入框对齐 */
}

.size-row span {
    color: #001FB7;
}

.size-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
    margin-top: 10px;
}

.size-actions .btn {
    flex: 1;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: normal;
}

.size-actions .btn-primary {
    background-color: #001FB7;
    border-color: #001FB7;
    border-radius: 7px;
    color: white;
}

.size-actions .btn-primary:hover {
    background-color: #001680;
    border-color: #001680;
}

.size-actions .btn-secondary {
    background-color: transparent;
    border-color: transparent;
    color: #001FB7;
    text-decoration: underline;
}

.size-actions .btn-secondary:hover {
    background-color: transparent;
    border-color: transparent;
    color: #001680;
}

/* 当屏幕小于992px时，将四个dropdown改为两行两列布局 */
@media (max-width: 1199.98px) {
    .search-header {
        padding: 20px 0 5px 0;
    }
    .search-header span {
        font-weight: normal;
    }
    .search-header a {
        display: none;
    }
    .search-divider {
        margin-bottom: 20px;
    }
    .search-input-row {
        padding: 0 ;
    }
    .search-input-row a {
        right: 0;
    }
    .search-selects-row {
        padding: 0;
    }
    .search-selects-row {
        flex-wrap: wrap;
        gap: 15px;
    }
    .search-dropdown {
        flex: 0 0 100%;
        /*flex: 0 0 calc(50% - 10px);*/

    }
    .search-dropdown>button {
        font-weight: normal;
    }
    .search-selects-row a {
        /*flex: 0 0 calc(50% - 10px);*/
        flex: 0 0 100%;
        display: block;
        box-sizing: border-box;
        border: 1px solid rgba(255, 255, 255, 1);
        border-radius: 17px;
        color: rgba(255, 255, 255, 1);
        font-size: 17px;
        padding: 5px 23px;
        cursor: pointer;
        transition: all 0.5s ease;
        text-align: center;
    }
    .search-selects-row a:hover {
        background: #2a4fd8;
        color: white;
        box-shadow: 0 4px 12px rgba(42, 79, 216, 0.3);
    }

    .search-input-small {
        display: block !important;
    }
    .search-input-large {
        display: none !important;
    }

    /* 移动端下拉菜单优化 */
    .dropdown-menu {
        max-width: 100%;
        width: 95vw;
        max-height: 70vh;
        overflow-y: auto;
    }

    .checkbox-container {
        min-width: auto;
        max-width: 100%;
    }

    .checkbox-columns {
        flex-direction: column;
    }

    .search-dropdown {
        flex: 0 0 100%;
    }

    .checkbox-row {
        padding: 8px 0;
    }

    .checkbox-row.category,
    .checkbox-row.select-all {
        padding: 12px 0;
    }

    .price-tabs {
        min-width: auto;
        padding: 10px;
    }

    .price-ranges {
        flex-direction: column;
        gap: 10px;
    }

    .price-row {
        flex-wrap: wrap;
    }

    .price-row input.price-input {
        flex: 0 0 calc(40% - 5px);
    }

    .price-actions {
        flex-direction: column;
    }

    .price-actions .btn {
        width: 100%;
    }

    .size-ranges {
        flex-direction: column;
        gap: 10px;
    }

    .size-row {
        flex-wrap: wrap;
    }

    .size-row input.size-input {
        flex: 0 0 calc(40% - 5px);
    }

    .size-actions {
        flex-direction: column;
    }

    .size-actions .btn {
        width: 100%;
    }
}
