.header {
    position: relative;
    z-index: 999;
}

.header-primary.sticky + .content {
    margin-top: 80px;
}

.header-top {
    background-color: var(--primary-color, #4CAF50);
    padding: 8px 0;
}

.header-top-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-link-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-link-list-item {
    position: relative;
}

.header-link-list-item a {
    color: var(--primary-color, #000);
    text-decoration: none;
    font-size: 13px;
}


.header-middle {
    background-color: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.header-middle-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.header-logo a {
    display: block;
}

.header-logo img {
    max-height: 50px;
    width: auto;
}

.header-logo .logo-text {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color, #4CAF50);
    text-decoration: none;
}

.header-search {
    flex: 1;
    max-width: 600px;
}

.header-search .input-group {
    display: flex;
    align-items: stretch;
    border: 2px solid var(--primary-color, #4CAF50);
    border-radius: 5px;
    overflow: hidden;
}

.header-search .category-select {
    border: none;
    padding: 10px 15px;
    font-size: 14px;
    background-color: #FFF;
    min-width: 150px;
    cursor: pointer;
    margin-right: 5px;
    color: var(--primary-color, #4CAF50);
    font-weight: bold;
}
.category-select:focus {
    outline: none;
}
.header-search .form-control {
    border: none;
    padding: 15px 15px;
    font-size: 14px;
    flex: 1;
    outline: none;
    height: 100%;
    background-color: #FFF;
}
.form-control::selection {
    background-color: #FFF;
}

/* 兼容 Firefox */
.form-control::-moz-selection {
   background-color: #FFF;
}
/* 彻底覆盖自动填充背景色 */
.input-group input:-webkit-autofill,
.input-group input:-webkit-autofill:hover,
.input-group input:-webkit-autofill:focus,
.input-group input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: #000000 !important;
    background-color: transparent !important;
}

/* 同时设置普通状态背景 */
.input-group .form-control {
    background-color: #ffffff;
}

/* 聚焦时的背景 */
.input-group .form-control:focus {
    background-color:#ffffff;
    outline: none;
}
.header-search-icon {
    background-color: #fff;
    border: none;
    color: var(--primary-color, #4CAF50);
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.header-search-icon:hover {
     transform: rotate(20deg);
}

.header-link {
    display: flex;
    align-items: center;
    gap: 20px;
}
.form-control:hover{
    box-shadow: none;
}
.category-select:before {
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    -o-transform: translateY(-50%);
    transform: translateY(-50%);
    height: 15px;
    width: 1px;
    background-color: #3BB77E;
    right: -8px;
    top: 50%;
    z-index: 5;
}
.header-link-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-link-login,
.header-link-wishlist,
.header-link-cart {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.header-link-login:hover,
.header-link-wishlist:hover,
.header-link-cart:hover {
    color: var(--primary-color, #4CAF50);
}

.header-link-list-icon {
    font-size: 20px;
}

.header-link-list-text {
    font-size: 14px;
    color: #787b85;
}



.header-primary {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 10px 5px;
    position: relative;
    transition: all 0.3s ease;
}

.header-primary.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-primary-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-category {
    position: relative;
}

.category-btn {
    background-color: var(--primary-color, #4CAF50);
    color: #fff;
    border: none;
    padding: 15px 25px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover {
    background-color: var(--button-hover-color, #45a049);
}

.category-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
        width: 100%;
    background-color: #fff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 0;
    padding: 10px 0;
    z-index: 1000;
}

.category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-list li {
    margin: 0;
}

.category-list .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.category-list .dropdown-item:hover {
    background-color: #f5f5f5;
    color: var(--primary-color, #4CAF50);
}

.category-list .dropdown-item img {
    width: 30px;
    height: 30px;
    object-fit: cover;
}

.header-menu {
    flex: 1;
}
.current-menu-item a{
    color: var(--primary-color, #4CAF50);
}
.primary-nav .menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 30px;
}

.primary-nav .menu li {
    position: relative;
}

.primary-nav .menu li a {
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 15px 0;
    display: block;
    transition: all 0.3s ease;
}

.primary-nav .menu li a:hover {
    color: var(--primary-color, #4CAF50);
}

.primary-nav .menu li.dropdown > a::after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-left: 5px;
}

.primary-nav .menu .dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background-color: #fff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.primary-nav .menu li:hover > .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.primary-nav .menu .dropdown-content li {
    margin: 0;
}

.primary-nav .menu .dropdown-content a {
    padding: 10px 20px;
}

.primary-nav .menu .dropdown-content a:hover {
    background-color: #f5f5f5;
}

.header-call {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-call-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color, #4CAF50);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.header-call-number p {
    margin: 0;
    font-size: 12px;
    color: #999;
}

.header-call-btn {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.header-call-btn:hover {
    color: var(--primary-color, #4CAF50);
}

@media (max-width: 991px) {
    .header-top {
        display: none;
    }
    
    .header-middle-wrapper {
        flex-wrap: wrap;
    }
    
    .header-search {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin-top: 15px;
    }
    
    .header-link-list-text {
        display: none;
    }
    
    .header-primary-wrapper {
        flex-wrap: nowrap;
        align-items: center;
        min-height: auto;
        height: auto;
        overflow: visible;
    }
    
    .header-category {
        width: 100%;
    }
    
    .category-btn {
        width: 100%;
        justify-content: center;
    }
    
    .header-menu {
        width: 100%;
        order: 3;
    }
    
    .primary-nav .menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }
    
    .header-call {
        display: none;
    }
}
.header-link-list-icon i {
    display: inline-block;
}

.header-link-list-icon:hover i {
    animation: rotateAndScale 0.4s ease-in-out;
}

@keyframes rotateAndScale {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(15deg) scale(1.2); }
    100% { transform: rotate(0deg) scale(1); }
}

/* 购物车图标样式 */
.header-link-list-icon {
    position: relative;
    display: inline-block;
}



.header-link-cart i {
    font-size: 14px;
}

.header-link-cart .cart-count {
    background-color: #ff0000;
    color: #fff;
    font-size: 11px;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    position: absolute;
    top: -6px;
    right: -10px;
    font-weight: bold;
    display: inline-block;
}
.cartsa{
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background-color: #DEF9EC;
}











