/*
Theme Name: MU MOON
Theme URI: http://shangcheng.cn:8020
Author: MU MOON
Description: MU MOON 灯具品牌主题 - 支持古腾堡自定义HTML编辑
Version: 1.0.0
Text Domain: mu-moon
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --page-side-pad: clamp(20px, 3.2vw, 60px);
}

/* 引入自定义字体 */
@font-face {
    font-family: 'MontserratBold';
    src: url('fonts/Montserrat-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'MontserratLight';
    src: url('fonts/Montserrat-Light.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'MontserratBold';
    src: url('fonts/Montserrat-Regular.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat Semi Bold';
    src: url('fonts/Montserrat Semi Bold.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}
body {
    font-family: Arial, sans-serif;
    background-color: #000;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    display: block;
}

/* 页面主体容器：自适应宽度，最大 1920px */
.layout-wrapper {
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    min-height: 100vh;
}

/* 页面主体内容区域 - 为固定导航栏留出空间 */
.page-content {
    padding-top: clamp(20px, 7.2vw, 70px);
}

/* ================= 导航栏 ================= */
.navbar {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1920px;
    z-index: 1000;
    padding: clamp(12px, 0.8vw, 15px) clamp(20px, 3.2vw, 60px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.9);
    border-bottom: none;
    transition: all 0.3s ease;
    will-change: transform;
    max-height: 80px;
    height: 100%;
}

.logo-container {
    display: flex;
    align-items: center;
    flex: 1;
    margin-left: -15px;
    margin-right: 15px;
}

.logo {
    width: clamp(140px, 11vw, 210px);
    height: clamp(40px, 3.2vw, 60px);
    background-image: url('images/logo1.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
}

.nav-center-wrapper {
    display: flex;
    justify-content: center;
    flex: 1;
}

.nav-links {
    display: flex;
    gap: clamp(18px, 3.6vw, 70px);
    list-style: none;
}

.nav-links li {
    list-style: none;
}

.nav-links a {
    color: #999;
    text-decoration: none;
    font-size: clamp(12px, 1.05vw, 20px);
    letter-spacing: 1px;
    transition: color 0.3s;
    text-transform: capitalize;
    white-space: nowrap;
    font-family: 'MontserratLight', Arial, sans-serif;
}

.nav-links a:hover {
    color: #fff;
}

.navbar-spacer {
    flex: 1;
}
.social-icon {
    position: relative;  /* 新增：浮层定位基准 */
}
/* 二维码浮层：默认隐藏 */
.social-qr,
.social-icon .social-qr {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    width: 100px;
    height: 100px;
    padding: 4px;
    box-sizing: border-box;          /* 关键：padding 算进 70px 内 */
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    z-index: 100;
    pointer-events: none;
}

/* 浮层底部小三角 */
.social-qr::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #fff;
}

.social-icon .social-qr img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;               /* 图片铺满容器 */
    display: block;
}

/* hover 图标时显示 */
.social-icon:hover .social-qr,
.social-icon:focus .social-qr {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
@media (hover: hover) {
    .social-icon {
        cursor: default;
    }
}
/* 移动端没有 hover，禁用浮层 */
@media (max-width: 768px) {
    .social-qr {
        display: none !important;
    }
}
/* ================= 移动端汉堡菜单 ================= */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    z-index: 1002;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: #fff;
    transition: all 0.3s ease;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.98);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu a {
    color: #fff;
    text-decoration: none;
    font-size: 24px;
    letter-spacing: 2px;
    text-transform: capitalize;
}

/* ================= 移动端底部导航栏 ================= */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1920px;
    height: 68px;
    background-color: #111;
    border-top: 1px solid #333;
    z-index: 1001;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: #666;
    transition: color 0.25s ease;
    flex: 1;
    height: 100%;
    padding: 6px 4px;
    cursor: pointer;
}

.mobile-bottom-nav .nav-item svg {
    width: 22px;
    height: 22px;
    stroke: #666;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.25s ease;
}

.mobile-bottom-nav .nav-item span {
    font-size: 9px;
    letter-spacing: 0.5px;
    font-family: 'MontserratLight', Arial, sans-serif;
    text-transform: uppercase;
    transition: color 0.25s ease;
}

.mobile-bottom-nav .nav-item.active,
.mobile-bottom-nav .nav-item:hover {
    color: #fff;
}

.mobile-bottom-nav .nav-item.active svg,
.mobile-bottom-nav .nav-item:hover svg {
    stroke: #fff;
}

.mobile-bottom-nav .nav-item.active span,
.mobile-bottom-nav .nav-item:hover span {
    color: #fff;
}

/* ================= 页脚 ================= */
.site-footer {
    border-top: none;
    margin-top: 0;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: clamp(24px, 2.4vw, 46px);
    margin-bottom: clamp(14px, 1.15vw, 22px);
}

.footer-content {
    max-width: 1920px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 0 clamp(20px, 3.2vw, 60px);
    position: relative;
}

.footer-links {
    display: flex;
    gap: clamp(14px, 1.8vw, 35px);
    flex: 1;
    justify-content: center;
    white-space: nowrap;
    margin-left: clamp(0px, 11vw, 213px);
    list-style: none;
}

.footer-links li {
    list-style: none;
}

.footer-links a {
    color: #999;
    text-decoration: none;
    font-size: clamp(10px, 0.62vw, 12px);
    letter-spacing: 1px;
    text-transform: capitalize;
    font-family: 'MontserratLight', Arial, sans-serif;
}

.footer-links a:hover {
    color: #fff;
}

.social-icons {
    display: flex;
    gap: clamp(14px, 1.45vw, 28px);
    z-index: 2;
    margin-left: auto;
    margin-right: 0;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon img {
    max-width: 30px;
    height: auto;
    display: block;
}

/* ================= 响应式适配 ================= */

/* 中等屏幕 (768px - 1500px) */
@media (max-width: 1500px) and (min-width: 768px) {
	.page-content {
    padding-top: clamp(20px, 7.2vw, 50px);
}
    .navbar {
        padding: clamp(12px, 0.9vw, 15px) clamp(20px, 2.7vw, 40px);
		 
    }
    .logo {
        width: clamp(140px, 12vw, 180px);
        height: clamp(40px, 3.4vw, 50px);
    }
    .nav-links {
        gap: clamp(16px, 3.4vw, 50px);
    }
    .nav-links a {
        font-size: clamp(12px, 1.2vw, 18px);
    }
    .logo-container {
        margin-right: 20px;
    }
    .nav-center-wrapper {
        margin-left: 20px;
    }
    .social-icons {
        margin-right: 0;
    }
}

/* 移动端 (< 768px) */
@media (max-width: 767px) {
    .layout-wrapper {
        width: 100%;
    }
    
    .navbar {
        padding: 10px 15px;
        position: fixed;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
		   
    }
    
    .logo-container {
        justify-content: flex-start;
        flex: none;
        margin-left: 0;
        margin-right: 0;
    }
    
    .logo {
        width: 100px;
        height: 25px;
    }
    
    .menu-toggle {
        display: flex !important;
        order: 2;
    }
    
    .nav-center-wrapper {
        display: none;
    }
    
    .navbar-spacer {
        display: none;
    }
    
    .mobile-menu {
        display: flex;
    }
    
    .page-content {
        padding-top: clamp(20px, 7.2vw, 50px);
    }
    
    .site-footer {
        margin-top: 20px;
        margin-bottom: 0px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 0;
        padding: 0 20px;
    }
    
    .footer-links {
        margin-left: 0;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px 0;
        width: 100%;
        margin-bottom: 0;
    }
    
    .footer-links a {
        flex: none;
        width: auto;
        text-align: center;
        font-size: 10px;
        padding: 4px 2px;
        position: relative;
    }
    
    .footer-links a:nth-child(1)::after,
    .footer-links a:nth-child(2)::after,
    .footer-links a:nth-child(4)::after,
    .footer-links a:nth-child(5)::after {
        content: '|';
        position: absolute;
        right: -10px;
        top: 50%;
        transform: translateY(-50%);
        color: #999;
        font-size: 13px;
        pointer-events: none;
    }
    
    .footer-links a:nth-child(2) {
        padding-left: 20px;
    }
    
    .footer-links a:nth-child(5) {
        padding-left: 10px;
    }
    
    .social-icons {
        margin-left: 0;
        margin-right: 0;
        gap: 20px;
        justify-content: center;
        width: 100%;
        margin-top: 14px;
        padding-bottom: 10px;
    }
    
    .social-icon {
        max-width: 52px;
    }
    
    .social-icon img {
        width: 100%;
        height: 100%;
    }
    
    .mobile-bottom-nav {
        display: flex !important;
    }
}

/* 超小屏幕优化 (< 480px) */
@media (max-width: 479px) {
	.site-footer {
    margin-bottom: 0;  
}
    .navbar {
        padding: 8px 10px;
        gap: 8px;
		  
    }
    
    .logo {
        width: 130px;
        height: 40px;
    }
    
    .menu-toggle span {
        width: 22px;
    }
    
    .footer-links {
        gap: 10px 0;
    }
    
    .footer-links a {
        flex: none;
        width: auto;
        font-size: 10px;
        position: relative;
    }
    
    .footer-links a:nth-child(1)::after,
    .footer-links a:nth-child(2)::after,
    .footer-links a:nth-child(4)::after,
    .footer-links a:nth-child(5)::after {
        content: '|';
        position: absolute;
        right: -10px;
        top: 50%;
        transform: translateY(-50%);
        color: #999;
        font-size: 10px;
        pointer-events: none;
    }
    
    .footer-links a:nth-child(2) {
        padding-left: 20px;
    }
    
    .footer-links a:nth-child(5) {
        padding-left: 10px;
    }
    
    .social-icons {
        gap: 18px;
        margin-top: 12px;
    }
}
