@import url(../css/iconfont.css);

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== 顶部导航栏 ========== */
.top-bar {
    background: #f8f8f8;
    border-bottom: 1px solid #eee;
    font-size: 12px;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.top-bar .welcome {
    color: #666;
}

.top-links {
    display: flex;
    gap: 20px;
}

.top-links a {
    color: #666;
    text-decoration: none;
}

.top-links a:hover {
    color: #DD302D;
}

/* ========== PC端头部 ========== */
.pc-header {
    padding: 20px 0;
}

.pc-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pc-header .logo img {
    height: 45px;
    width: auto;
}

.search-box form {
    display: flex;
}

.search-box input {
    width: 350px;
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 30px 0 0 30px;
    font-size: 14px;
    outline: none;
}

.search-box input:focus {
    border-color: #DD302D;
}

.search-box button {
    padding: 10px 20px;
    background: #DD302D;
    color: white;
    border: none;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
}

/* ========== PC端导航 ========== */
.pc-nav {
    background: #fff;
    border-bottom: 2px solid #DD302D;
}

.pc-nav .container {
    display: flex;
    align-items: center;
    height: 46px;
}

.nav-home {
    background: #DD302D;
    padding: 0 24px;
    height: 46px;
    line-height: 46px;
    margin-right: 30px;
}

.nav-home a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.nav-menu {
    display: flex;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-menu > li > a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: block;
    padding: 14px 0;
}

.nav-menu > li > a:hover {
    color: #DD302D;
}

/* 下拉菜单 */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 46px;
    left: -15px;
    background: white;
    min-width: 420px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 15px;
    z-index: 100;
    border: 1px solid #eee;
}

.nav-item:hover .dropdown-menu {
    display: block;
}

/* 过渡区域，防止鼠标移开菜单消失 */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 10px;
}

.dropdown-menu:hover {
    display: block;
}

.dropdown-columns {
    display: flex;
    gap: 20px;
}

.dropdown-column {
    flex: 1;
}

.dropdown-column a {
    display: block;
    padding: 8px 0;
    color: #555;
    text-decoration: none;
    font-size: 13px;
}

.dropdown-column a:hover {
    color: #DD302D;
}

/* ========== 手机端头部 ========== */
.mobile-header {
    display: none;
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
}

.mobile-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
}

/* 汉堡菜单图标 */
.menu-icon {
    width: 24px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.menu-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background: #333;
    transition: all 0.3s;
}

.mobile-header .logo img {
    height: 32px;
    width: auto;
}

.mobile-icons {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cart-icon {
    font-size: 20px;
    text-decoration: none;
    color: #333;
}

/* 侧滑菜单 */
.side-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: #fff;
    z-index: 1001;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    overflow-y: auto;
}

.side-menu.open {
    left: 0;
}

.side-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #eee;
}

.side-menu-header .logo img {
    height: 30px;
    width: auto;
}

.close-menu {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 5px;
}

.side-menu-content {
    padding: 16px;
}

.menu-section {
    margin-bottom: 24px;
}

.menu-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #DD302D;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
}

.menu-section a {
    display: block;
    padding: 10px 0;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.menu-section a:hover {
    color: #DD302D;
}

/* 遮罩层 */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}

.menu-overlay.active {
    display: block;
}

/* ========== 响应式 ========== */
@media (min-width: 993px) {
    .mobile-header, .side-menu, .menu-overlay {
        display: none !important;
    }
    .top-bar, .pc-header, .pc-nav {
        display: block !important;
    }
}

@media (max-width: 992px) {
    .top-bar, .pc-header, .pc-nav {
        display: none !important;
    }
    
    .mobile-header {
        display: block !important;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
}