* {
    box-sizing: border-box;
}
/* 头部样式 */
.header {
    width: 100%;
    height: 60px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.header_container {
    padding: 0 .729rem;
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.header_logo {
    height: 40px;
}

.header_logo a {
    display: block;
    height: 100%;
}

.header_logo img {
    height: 100%;
    object-fit: contain;
}

/* 导航菜单 */
.header_nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.header_menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 40px;
}

.header_menu_item {
    position: relative;
}

.header_menu_item a {
    display: block;
    font-size: 16px;
    color: #59200a;
    text-decoration: none;
    transition: color 0.3s;
    white-space: nowrap;
}

.header_menu_item a:hover,
.header_menu_item.active a {
    color: #59200a;
    font-weight: bold;
}

.header_menu_item.active::after {
    content: '';
    position: absolute;
    bottom: -19px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: #59200a;
}

/* 二级下拉菜单 */
.header_menu_item.has_submenu {
    position: relative;
}

/* 创建隐藏的桥接区域，防止闪烁 */
.header_menu_item.has_submenu::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 20px;
    background: transparent;
    z-index: 99;
}

.submenu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    list-style: none;
    margin: 20px 0 0 0;
    padding: 10px 0;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, margin-top 0.2s ease;
    z-index: 100;
    pointer-events: none;
    border-top: 2px solid #59200a;
    border-bottom: 2px solid #59200a;
}

.header_menu_item.has_submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    margin-top: 20px;
    pointer-events: auto;
}

.submenu li {
    padding: 0;
    margin: 0;
}

.submenu li a {
    display: block;
    padding: 12px 20px;
    font-size: 14px;
    color: #59200a;
    text-decoration: none;
    transition: all 0.3s;
    white-space: nowrap;
}

.submenu li a:hover {
    background: #f8f5f2;
    padding-left: 25px;
    font-weight: normal;
}

/* 下拉箭头提示 */
/* .header_menu_item.has_submenu > a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 6px;
    vertical-align: middle;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #59200a;
    transition: transform 0.3s;
} */

.header_menu_item.has_submenu:hover > a::after {
    transform: rotate(180deg);
}

/* 搜索图标 */
.header_search {
    margin-left: .526rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
}


.header_search img {
    width: 24px;
    height: 24px;
}

/* 移动端菜单按钮 */
.header_mobile_btn {
    display: none;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 10px;
}

.header_mobile_btn i {
    font-size: 24px;
    color: #59200a;
    transition: transform 0.3s;
}

.header_mobile_btn.active i {
    transform: rotate(90deg);
}

/* 移动端菜单 */
.header_mobile_menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s;
}

.header_mobile_menu.active {
    max-height: 500px;
    overflow-y: auto;
}

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

.header_mobile_menu li {
    border-bottom: 1px solid #f0f0f0;
}

.header_mobile_menu a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.header_mobile_menu a:active {
    background: #f5f5f5;
}

/* 移动端二级菜单 */
.mobile_has_submenu {
    position: relative;
}

.mobile_has_submenu > a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 8px;
    vertical-align: middle;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #59200a;
    transition: transform 0.3s;
}

.mobile_has_submenu.open > a::after {
    transform: rotate(180deg);
}

.mobile_submenu {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f8f5f2;
}

.mobile_submenu li {
    border-bottom: 1px solid #e8e8e8;
}

.mobile_submenu li:last-child {
    border-bottom: none;
}

.mobile_submenu a {
    padding-left: 40px;
    font-size: 13px;
    color: #59200a;
}

/* 搜索弹窗 */
.search_modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
}

.search_modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.search_modal_content {
    background: #fff;
    border-radius: 8px;
    padding: 60px 40px;
    width: 90%;
    max-width: 600px;
    position: relative;
}

.search_modal_close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s;
}

.search_modal_close:hover {
    background: #f5f5f5;
}

.search_modal_close i {
    font-size: 20px;
    color: #666;
}

.search_modal_input {
    display: flex;
    gap: 10px;
}

.search_modal_input input {
    flex: 1;
    height: 48px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0 20px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.search_modal_input input:focus {
    border-color: #59200a;
}

.search_modal_input button {
    width: 48px;
    height: 48px;
    background: #59200a;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.search_modal_input button:hover {
    background: #3d1507;
}

.search_modal_input button img {
    width: 24px;
    height: 24px;
}
.pagination {
    display: flex;
    justify-content: center;
    margin: 0 auto;
}
.pagination li {
    margin-right: 10px;
}
.pagination li a,.pagination li span {
    width: 42px;
    height: 42px;
    font-size: 13px;
    border: 1px solid #59200a;
    background: #FFF;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    cursor: pointer;
}
.pagination li:last-child {
    margin-right: 0;
}
.pagination li:hover a,.pagination li:hover span {
    background: #59200a;
    color: #fff;
}
.pagination li:hover a {
    color: #fff;
}
.pagination .active a,.pagination .active span {
    background: #59200a;
    color: #fff;
}
.pagination .active a {
    color: #fff;
}
.h-flex {
    display: none;
    align-items: center;
}
.h-flex .header_search {
    margin-left: 20px;
}
/* 响应式设计 */
@media screen and (max-width: 1024px) {
    .header_menu {
        gap: 30px;
    }
    
    .header_menu_item a {
        font-size: 15px;
    }
}

@media screen and (max-width: 768px) {
    .header_nav {
        display: none;
    }
    .h-flex {
        display: flex;
    }
    .header_mobile_btn {
        display: flex;
    }
    
    .header_mobile_menu {
        display: block;
    }
}

/* 为页面主体添加顶部间距，避免被固定头部遮挡 */
body {
    padding-top: 60px;
}

