
.menu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 10;
}

.products_menu_item {
    justify-content: left;
}

.products_menu_item span {
    margin: auto 0;
}

.products_menu_item img {
    margin-left: 2vw;
}

.products_option {
    /*把border限制在width内*/
    box-sizing: border-box;
}

.button {
    margin-left: 3%;
}

/* 确保表格内容不会溢出 */
#productTable td {
    white-space: nowrap;
    overflow: hidden;
}

/* 应用到需要截断的文本 */
.truncate {
    display: inline-block;
    max-width: 15ch; /* 或者根据需要设置宽度 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.newItemForm .input {
    margin-bottom: 4vh;
}

.search_box button, .search_box input {
    margin-right: 15px;
    padding: 12px 20px;
    width: auto;
    min-width: 80px;
}

select {
}

.basket {
    position: relative;
    box-sizing: border-box;
}

.basket_dot {
    font-size: 1vw;
    display: none;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #ffffff;
    width: max(1vw, 2.5vh);
    height: max(1vw, 2.5vh);
    top: 4vh;
    left: 10vw;
    background-color: red;
    border-radius: 50%;
    position: absolute;
}

/* 定义小红点 */
.dot {
    width: 10px;
    height: 10px;
    background-color: red;
    border-radius: 50%;
    position: absolute;
    animation: flyToBasket 1s forwards;
    display: none; /* 默认隐藏 */
}

.product_num {
    width: 1vw;
}

#searchInput,#user_searchInput,#order_searchInput{
    width: 40%;
}

/* 动画关键帧 */
@keyframes flyToBasket {
    from {
    }
    to {
        left: 11vw;
        top: 31.5vh;

    }
}

@media (max-width: 1300px) {
    .basket_dot {
        width: max(0.7vw, 2vh);
        height: max(0.7vw, 2vh);
        top: 4vh;
        font-size: 1.5vw;
    }

}
.add_button{
    position: absolute;
    left: 70vw;
}
/* 优化数量选择器和按钮大小 */
.quantity-selector button {
    padding: 4px 12px;
    font-size: min(2vh, 1.4vw);
    height: auto;
}

.quantity-selector .product_num {
    min-width: 30px;
    font-size: min(2vh, 1.4vw);
}

/* 让表格按钮更大一些 */
#productTable .button button {
    padding: 6px 16px;
    font-size: min(2vh, 1.4vw);
    height: auto;
}

@media (max-width: 800px) {
    .basket_dot {
        width: min(4vw, 1.5vh);
        height: min(4vw, 1.5vh);
        top: 3vh;
        left: 3vh;
        font-size: 1.5vw;
    }

    @media (max-width: 800px) {
        .products_menu_item span {
            margin: auto;
        }

        .add_button{
            right:0;

        }
    }
}
