/* x032 主题 - 布局样式 */

/* ========== Header 布局 ========== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: var(--shadow);
}

/* 顶部信息条 */
.topbar {
    background: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-dark) 100%);
    padding: 8px 0;
    color: var(--white);
    font-size: 13px;
}

.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar-left {
    display: flex;
    gap: 20px;
}

.topbar-left span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.topbar-left i {
    color: var(--accent);
}

.topbar-center {
    flex: 1;
    text-align: center;
}

.topbar-center span {
    background: rgba(0, 176, 255, 0.2);
    padding: 4px 16px;
    border-radius: 20px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.topbar-lang select {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    padding: 4px 8px;
    border-radius: var(--radius);
    cursor: pointer;
}

.topbar-lang select option {
    background: var(--primary);
    color: var(--white);
}

/* 主导航区 */
.header-main {
    padding: 15px 0;
    background: var(--white);
}

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

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}

.logo img {
    max-height: 40px;
}

.nav ul {
    display: flex;
    gap: 35px;
}

.nav a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    padding: 8px 0;
    position: relative;
    transition: color 0.3s;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}

.nav a:hover {
    color: var(--primary);
}

.nav a:hover::after {
    width: 100%;
}

.nav li.has-submenu {
    position: relative;
}

.nav .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 180px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
}

.nav li.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav .submenu li a {
    display: block;
    padding: 10px 20px;
    color: var(--text);
}

.nav .submenu li a:hover {
    background: var(--bg);
    color: var(--primary);
}

.nav .submenu li a::after {
    display: none;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-form {
    display: flex;
    align-items: center;
    background: var(--bg);
    border-radius: 25px;
    padding: 8px 15px;
}

.search-form input {
    border: none;
    background: transparent;
    width: 180px;
    padding: 4px 0;
}

.search-form button {
    background: transparent;
    color: var(--primary);
}

.icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg);
    color: var(--text);
    transition: all 0.3s;
}

.icon-btn:hover {
    background: var(--primary);
    color: var(--white);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 18px;
    height: 18px;
    background: var(--accent);
    color: var(--white);
    font-size: 11px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 移动端菜单 */
.mobile-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    background: var(--bg);
    border-radius: var(--radius);
    color: var(--primary);
}

.mobile-menu {
    display: none;
    background: var(--white);
    padding: 20px;
    border-top: 1px solid var(--border);
}

.mobile-menu.open {
    display: block;
}

.mobile-menu li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

@media (max-width: 992px) {
    .nav {
        display: none;
    }
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .search-form {
        display: none;
    }
}

/* ========== Footer 布局 ========== */
.footer {
    background: var(--primary-dark);
    color: var(--white);
}

/* 订阅区块 */
.footer-newsletter {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 60px 0;
    text-align: center;
}

.footer-newsletter h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.footer-newsletter p {
    margin-bottom: 25px;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 10px;
}

.newsletter-input-wrapper {
    flex: 1;
    position: relative;
}

.newsletter-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
}

.newsletter-form input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: none;
    border-radius: var(--radius);
}

.newsletter-submit {
    padding: 12px 30px;
    background: var(--accent);
    color: var(--white);
    border-radius: var(--radius);
    font-weight: 600;
    transition: background 0.3s;
}

.newsletter-submit:hover {
    background: var(--accent-hover);
}

/* 主要 Footer 内容 */
.footer-main {
    padding: 60px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-column h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-column p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    margin-bottom: 15px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-contact i {
    color: var(--accent);
    margin-top: 3px;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    transition: all 0.3s;
}

.footer-social a:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

/* 底部版权栏 */
.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px 0;
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-top {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: var(--white);
    border-radius: 50%;
    transition: all 0.3s;
}

.back-top:hover {
    background: var(--primary-light);
    transform: translateY(-3px);
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-bottom-inner {
        flex-direction: column;
        gap: 15px;
    }
    .newsletter-form {
        flex-direction: column;
    }
}
