/* 在文件顶部添加全局 box-sizing 设置 */
* {
    box-sizing: border-box;
}
.medicine-container {
    padding-bottom: 19.79%;
}

.medicine-content {
    position: relative;
    max-width: 13rem;
    margin: 0 auto;
    padding: 0.4rem 0;
    display: flex;
}

.medicine-main-container {
    width: 100%;
    position: absolute;
    top: 48%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.medicine-search-navigation,
.medicine-search-hot ul {
    list-style: none;
    display: flex;
    justify-content: center;
}

.medicine-search-hot ul li {
    cursor: pointer;
}

.medicine-search-navigation li {
    color: #fff;
    font-family: "SourceHanSansCN-Bold";
    line-height: 0.3rem;
    padding: 0 0.24rem;
    font-weight: bold;
    cursor: pointer;
}

.medicine-search-navigation li.active {
    border-bottom: 2px solid #fff;
}


.medicine-search-input {
    position: relative;
    width: 8.3rem;
    margin: 0.1rem 0 0.3rem 0;
}

.medicine-search-input input {
    width: 100%;
    height: 0.43rem;
    border-radius: 0.2rem;
    padding-left: 0.15rem;
    color: #fff !important;
    background: rgba(225, 225, 225, 0.4);
    border: 1px solid rgba(225, 225, 225, 0.4);
}

.medicine-search-input input::placeholder {
    color: #E9E9E9;
    font-size: 0.14rem;
}

.medicine-search-input input:focus {
    outline: none;
    border-color: inherit;
    box-shadow: none;
    border: 1px solid #E8E8E8;
}

.search-input-btu {
    position: absolute;
    right: 0.2rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    padding: 0;
    border: 0;
    outline: 0;
}

.search-input-btu .iconfont {
    font-size: 0.28rem;
    color: #fff;
}

.medicine-search-hot {
    display: flex;
    align-items: center;
}

.medicine-search-hot span,
.medicine-search-hot ul li {
    font-size: 0.13rem;
    line-height: 0.3rem;
    font-weight: bold;
    color: #fff;
}

.medicine-search-hot span {
    display: inline-block;
    margin-right: 0.2rem;
}

.medicine-search-hot ul li {
    padding: 0 0.18rem;
    border-radius: 0.15rem;
    background: rgba(225, 225, 225, 0.4);
    border: 1px solid rgba(225, 225, 225, 0.4);
    margin: 0 0.12rem;
}

/* 菜单样式 */
.medicine-main-nav {
    position: relative;
    width: 2.3rem;
    min-width: 2.3rem;
    max-width: 2.3rem;
    height: 100%;
    float: left;
}

.medicine-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.medicine-nav-title {
    display: block;
    font-family: "SourceHanSansCN-Medium";
    font-weight: 600;
    position: relative;
    height: 0.36rem;
    line-height: 0.36rem;
    padding-left: 0.06rem
}

.medicine-nav-content:hover {
    background: #fff;
    color: #DB0008;
}

.medicine-nav-title-right {
    position: absolute;
    right: 0.05rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.medicine-nav-title-right.rotate-90 {
    transform: rotate(90deg);
}

.menu-navigation {
    display: flex;
    justify-content: space-between;
}

.menu-navigation .add-btu {
    background: #DB0008;
    color: #fff;
    padding: 0.04rem 0.2rem;
    border-radius: 0.16rem;
    border: 1px solid #DB0008;
    border-radius: 0.06rem;
}

.medicine-subnav-list {
    list-style: none;
    display: block;
    color: #999999;
    border-radius: 0.06rem;
    line-height: 0.3rem;
    min-width: 1.1rem;
    margin: 0 0 0 0.04rem;
}

.medicine-subnav-item {
    padding: 0.04rem 0.09rem;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    transition: background-color 0.2s ease;
    width: fit-content;
    min-width: 100%;
}

.medicine-subnav-item:hover {
    color: #DB0008;
}

.medicine-subnav-item.active {
    color: #DB0008;
}
.medicine-content-item {
    position: relative;
    background: #fff;
    border-radius: 4px;
    padding: 0.15rem 0.1rem 0.15rem 0.3rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    overflow: hidden;
}

.medicine-content-title {
    color: #333;
    font-weight: bold;
    font-family: "SourceHanSansCN-Bold";
    transition: color 0.3s ease;
}

.medicine-content-desc {
    color: #ccc;
    font-size: 0.12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.medicine-content-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.medicine-content-item:hover .medicine-content-title {
    color: #DB0008;
}
.medicine-main-content {
    position: relative;
    padding-left: 0.38rem;
    width: calc(100% - 2.3rem);
    max-width: calc(100% - 2.3rem);
    overflow: hidden;
}

.medicine-content-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.2rem;
    width: 100%;
    max-width: 100%;
}

.medicine-nav-content {
    position: relative;
    display: flex;
    align-items: center;
    padding-left: 0.1rem;
    cursor: pointer;
}

.medicine-nav-icon {
    position: relative;
    display: inline-block;
    width: 0.17rem;
    height: 0.17rem;
    margin-right: 8px;
}

.medicine-nav-icon img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s ease;
}

.medicine-nav-item {
    width: 1.3rem;
}
.medicine-nav-item.active .medicine-nav-content {
    color: #DB0008;
    border-radius: 0.06rem;
}

.medicine-nav-item .medicine-nav-icon .hover-icon {
    opacity: 0;
}

.medicine-nav-item:hover .medicine-nav-icon .hover-icon {
    opacity: 1;
}

.medicine-nav-item:hover .medicine-nav-icon .normal-icon {
    opacity: 0;
}

.medicine-nav-item.active .medicine-nav-icon .hover-icon {
    opacity: 1;
}

.medicine-nav-item.active .medicine-nav-icon .normal-icon {
    opacity: 0;
}

.medicine-subnav-icon {
    position: relative;
    display: inline-block;
    width: 0.17rem;
    height: 0.17rem;
    margin-right: 0.12rem;
}

.medicine-subnav-icon img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s ease;
}

/* 子菜单内容样式 */
.submenu-content {
    margin-bottom: 0.3rem;
}
.medicine-subnav-item .medicine-subnav-icon .hover-sub-icon {
    opacity: 0;
}

.medicine-subnav-item:hover .medicine-subnav-icon .normal-sub-icon {
    opacity: 0;
}

.medicine-subnav-item:hover .medicine-subnav-icon .hover-sub-icon {
    opacity: 1;
}

.medicine-subnav-item.active .medicine-subnav-icon .normal-sub-icon {
    opacity: 0;
}

.medicine-subnav-item.active .medicine-subnav-icon .hover-sub-icon {
    opacity: 1;
}
/* 响应式设计 */
@media (max-width: 1600px) {
    .medicine-content {
        max-width: 13rem;
    }
}

@media (max-width: 992px) {
    .medicine-content-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* 大于1920px分辨率 - 最大宽度1600px */
@media (min-width: 1921px) {
    .main-container.medicine-content {
        max-width: 16rem;
    }
}

/* 1920px分辨率 - 最大宽度1300px */
@media (min-width: 1920px) and (max-width: 1920px) {
    .main-container.medicine-content {
        max-width: 14rem;
    }
}

/* 1600px-1919px分辨率 - 最大宽度1200px */
@media (min-width: 1600px) and (max-width: 1919px) {
    .main-container.medicine-content {
        max-width: 13rem;
    }
}

/* 1400px-1599px分辨率 - 最大宽度1000px */
@media (min-width: 1400px) and (max-width: 1599px) {
    .main-container.medicine-content {
        max-width: 13rem;
    }
}

/* 1200px-1399px分辨率 - 最大宽度900px */
@media (min-width: 1200px) and (max-width: 1399px) {
    .main-container.medicine-content {
        max-width: 12rem;
    }
}

/* 992px-1199px分辨率 - 最大宽度800px */
@media (min-width: 992px) and (max-width: 1199px) {
    .main-container.medicine-content {
        max-width: 11rem;
    }
}