/* ========================================
   Nova Cleo 移动端 H5 适配优化
   ======================================== */

/* 默认隐藏移动端菜单（桌面端不显示） */
.nc-mobile-menu-btn {
    display: none;
}
.nc-mobile-menu {
    display: none;
}

/* 移动端通用优化 */
@media (max-width: 768px) {
    /* 头部导航优化 */
    .nc-header-inner {
        padding: 0 12px;
        height: 56px;
    }
    .nc-logo-text {
        font-size: 16px;
        letter-spacing: 1px;
    }
    .nc-nav {
        display: none;
    }
    .nc-header-actions {
        gap: 8px;
    }
    .nc-btn-outline {
        padding: 4px 12px;
        font-size: 12px;
    }
    
    /* 移动端汉堡菜单按钮 */
    .nc-mobile-menu-btn {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 4px;
        width: 36px;
        height: 36px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 6px;
        z-index: 1002;
        position: relative;
    }
    .nc-mobile-menu-btn span {
        display: block;
        width: 20px;
        height: 2px;
        background: #c0c8e0;
        border-radius: 2px;
        transition: all 0.3s;
    }
    .nc-mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .nc-mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    .nc-mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    /* 移动端菜单面板 */
    .nc-mobile-menu {
        display: none;
        position: fixed;
        top: 56px;
        left: 0;
        width: 100%;
        background: rgba(10, 14, 39, 0.98);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(74, 108, 247, 0.2);
        z-index: 1001;
        padding: 16px;
        animation: slideDown 0.3s ease;
    }
    .nc-mobile-menu.show {
        display: block;
    }
    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    .nc-mobile-menu a {
        display: block;
        color: #c0c8e0;
        text-decoration: none;
        padding: 12px 16px;
        border-radius: 8px;
        font-size: 15px;
        transition: all 0.3s;
        margin-bottom: 4px;
    }
    .nc-mobile-menu a:hover, .nc-mobile-menu a.active {
        background: rgba(74, 108, 247, 0.15);
        color: #fff;
    }
    .nc-mobile-menu .nc-mobile-menu-divider {
        height: 1px;
        background: rgba(74, 108, 247, 0.15);
        margin: 12px 0;
    }
    .nc-mobile-menu .nc-mobile-menu-title {
        color: #8899aa;
        font-size: 11px;
        padding: 8px 16px 4px;
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    
    /* 首屏轮播优化 */
    .nc-hero {
        height: 320px;
        border-radius: 0;
    }
    .nc-hero-slide {
        padding: 0 20px;
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }
    .nc-hero-content h1 {
        font-size: 24px;
    }
    .nc-hero-content p {
        font-size: 13px;
    }
    .nc-hero-visual {
        display: none;
    }
    .nc-hero-prev, .nc-hero-next {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    /* 品类卡片优化 */
    .nc-category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .nc-category-card {
        padding: 24px 16px;
    }
    .nc-category-icon {
        font-size: 36px;
    }
    .nc-category-card h3 {
        font-size: 16px;
    }
    
    /* 特色专区优化 */
    .nc-featured-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .nc-featured-card {
        height: 140px;
    }
    
    /* 直播区域优化 */
    .nc-live-container {
        flex-direction: column;
    }
    .nc-live-window {
        min-width: 100%;
        max-width: 100%;
    }
    .nc-live-video {
        height: 180px;
    }
    
    /* 商品列表优化 */
    .nc-shop-layout {
        flex-direction: column;
        padding: 12px;
    }
    .nc-filters {
        width: 100%;
        display: flex;
        gap: 8px;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }
    .nc-filter-group {
        min-width: 140px;
        flex-shrink: 0;
        margin-bottom: 0;
    }
    .nc-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .nc-product-img {
        height: 160px;
    }
    .nc-product-name {
        font-size: 13px;
    }
    .nc-price-current {
        font-size: 16px;
    }
    .nc-product-actions {
        flex-direction: column;
    }
    
    /* 商品详情优化 */
    .nc-product-detail {
        flex-direction: column;
        padding: 12px;
    }
    .nc-product-gallery {
        max-width: 100%;
    }
    .nc-main-image {
        height: 280px;
    }
    .nc-product-title {
        font-size: 20px;
    }
    .nc-product-actions-big {
        flex-direction: column;
    }
    .nc-product-features {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    /* 购物车优化 */
    .nc-cart-layout {
        flex-direction: column;
    }
    .nc-cart-summary {
        width: 100%;
    }
    .nc-cart-item {
        flex-wrap: wrap;
    }
    
    /* 结算页面优化 */
    .nc-checkout-layout {
        flex-direction: column;
    }
    .nc-checkout-sidebar {
        width: 100%;
    }
    .nc-form-row {
        flex-direction: column;
    }
    .nc-payment-methods {
        flex-wrap: wrap;
    }
    .nc-payment-card {
        min-width: calc(33% - 8px);
    }
    
    /* 底部优化 */
    .nc-footer-main {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .nc-footer-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    /* 悬浮按钮优化 */
    .nc-floating-actions {
        right: 12px;
        bottom: 60px;
    }
    .nc-float-btn {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }
    
    /* 博客页面优化 */
    .nc-blog-hero {
        padding: 32px 16px;
    }
    .nc-blog-hero h1 {
        font-size: 24px;
    }
    .nc-blog-intro {
        font-size: 14px;
    }
    
    /* 直播控制台优化 */
    .nc-studio-sidebar {
        display: none;
    }
    .nc-studio-grid {
        grid-template-columns: 1fr;
    }
    
    /* 管理后台优化 */
    .nc-admin-sidebar {
        display: none;
    }
    .nc-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .nc-live-monitor {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .nc-category-grid {
        grid-template-columns: 1fr;
    }
    .nc-featured-grid {
        grid-template-columns: 1fr;
    }
    .nc-product-grid {
        grid-template-columns: 1fr;
    }
    .nc-payment-card {
        min-width: calc(50% - 6px);
    }
    .nc-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* 社交分享组件 */
.nc-share-bar {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 16px;
    background: rgba(26, 31, 78, 0.4);
    border: 1px solid rgba(74, 108, 247, 0.15);
    border-radius: 12px;
    margin: 20px 0;
}

.nc-share-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(26, 31, 78, 0.6);
    border: 1px solid rgba(74, 108, 247, 0.2);
    color: #c0c8e0;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.nc-share-btn:hover {
    transform: scale(1.1);
    border-color: #4a6cf7;
    background: rgba(74, 108, 247, 0.2);
}

.nc-share-btn.wechat:hover { color: #07c160; border-color: #07c160; }
.nc-share-btn.weibo:hover { color: #e6162d; border-color: #e6162d; }
.nc-share-btn.qq:hover { color: #12b7f5; border-color: #12b7f5; }
.nc-share-btn.link:hover { color: #4a6cf7; border-color: #4a6cf7; }

/* 直播窗口竖屏适配 */
@media (max-width: 768px) and (orientation: portrait) {
    .nc-live-window {
        aspect-ratio: 9/16;
        max-height: 70vh;
    }
    .nc-live-video {
        height: 60%;
    }
}

/* 触摸优化 */
@media (hover: none) and (pointer: coarse) {
    .nc-category-card:active,
    .nc-product-card:active,
    .nc-featured-card:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    .nc-btn-primary:active,
    .nc-btn-cart:active,
    .nc-btn-buy:active {
        transform: scale(0.96);
    }
}

/* 安全区域适配（iPhone X+） */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .nc-floating-actions {
        bottom: calc(60px + env(safe-area-inset-bottom));
    }
    .nc-footer {
        padding-bottom: calc(24px + env(safe-area-inset-bottom));
    }
}
