/* =========================================
   Mobile Nav for WeddingWishLove
   Version: 2.0.0
   ========================================= */

/* ========== 響應式斷點 ========== */
@media screen and (max-width: 768px) {
    
    /* ========== 隱藏桌面元素 ========== */
    #secondary-nav,
    .header-nav,
    .nav-dark,
    .header-bottom,
    .header-main {
        display: none !important;
    }
    
    /* 調整內容區域 */
    body {
        padding-bottom: 70px !important;
    }
    
    /* ========== 底部 5 宮格導航 ========== */
    .mnwl-bottom-nav {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: #fff !important;
        border-top: 1px solid #e0e0e0 !important;
        display: flex !important;
        justify-content: space-around !important;
        align-items: center !important;
        height: 60px !important;
        z-index: 9999 !important;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.08) !important;
    }
    
    .mnwl-nav-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-decoration: none !important;
        color: #888 !important;
        font-size: 10px !important;
        padding: 6px 8px !important;
        flex: 1 !important;
        height: 100% !important;
        transition: all 0.25s ease !important;
        position: relative !important;
    }
    
    .mnwl-nav-icon {
        font-size: 24px !important;
        margin-bottom: 2px !important;
        display: block !important;
        filter: grayscale(30%) !important;
        transition: all 0.25s ease !important;
    }
    
    .mnwl-nav-text {
        font-size: 10px !important;
        font-weight: 500 !important;
        transition: all 0.25s ease !important;
    }
    
    .mnwl-nav-item.active {
        color: #d4a574 !important;
    }
    
    .mnwl-nav-item.active .mnwl-nav-icon {
        filter: grayscale(0%) !important;
        transform: scale(1.1) !important;
    }
    
    .mnwl-nav-item:active {
        transform: scale(0.92) !important;
    }
    
    .mnwl-nav-item .badge {
        position: absolute !important;
        top: 4px !important;
        right: calc(50% - 18px) !important;
        background: #ff4757 !important;
        color: white !important;
        font-size: 9px !important;
        font-weight: bold !important;
        width: 16px !important;
        height: 16px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.2) !important;
    }
    
    /* ========== 漢堡選單按鈕 ========== */
    .mnwl-hamburger {
        position: fixed !important;
        top: 15px !important;
        left: 15px !important;
        width: 44px !important;
        height: 44px !important;
        background: rgba(255,255,255,0.95) !important;
        border: none !important;
        border-radius: 8px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 5px !important;
        z-index: 10000 !important;
        cursor: pointer !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
        transition: all 0.3s ease !important;
    }
    
    .mnwl-hamburger:hover {
        background: #fff !important;
        box-shadow: 0 3px 12px rgba(0,0,0,0.15) !important;
    }
    
    .mnwl-hamburger:active {
        transform: scale(0.95) !important;
    }
    
    .mnwl-hamburger-line {
        width: 20px !important;
        height: 2px !important;
        background: #333 !important;
        border-radius: 2px !important;
        transition: all 0.3s ease !important;
    }
    
    /* ========== 全屏選單遮罩 ========== */
    .mnwl-menu-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(0,0,0,0.5) !important;
        z-index: 10001 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: all 0.3s ease !important;
    }
    
    .mnwl-menu-overlay.active {
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .mnwl-menu-container {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 85% !important;
        max-width: 320px !important;
        height: 100% !important;
        background: #fff !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease !important;
        display: flex !important;
        flex-direction: column !important;
        box-shadow: 5px 0 20px rgba(0,0,0,0.15) !important;
    }
    
    .mnwl-menu-overlay.active .mnwl-menu-container {
        transform: translateX(0) !important;
    }
    
    /* 選單頭部 */
    .mnwl-menu-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 15px 20px !important;
        border-bottom: 1px solid #f0f0f0 !important;
        background: #fafafa !important;
    }
    
    .mnwl-logo {
        height: 40px !important;
        width: auto !important;
    }
    
    .mnwl-site-name {
        font-size: 18px !important;
        font-weight: 600 !important;
        color: #333 !important;
    }
    
    .mnwl-menu-close {
        width: 36px !important;
        height: 36px !important;
        background: none !important;
        border: none !important;
        font-size: 20px !important;
        color: #666 !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.2s ease !important;
    }
    
    .mnwl-menu-close:hover {
        color: #333 !important;
        transform: rotate(90deg) !important;
    }
    
    /* 選單內容 */
    .mnwl-menu-content {
        flex: 1 !important;
        overflow-y: auto !important;
        padding: 10px 0 !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .mnwl-menu-section {
        border-bottom: 1px solid #f5f5f5 !important;
    }
    
    .mnwl-menu-parent {
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 16px 20px !important;
        background: none !important;
        border: none !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        color: #333 !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
        text-align: left !important;
    }
    
    .mnwl-menu-parent:hover {
        background: #fafafa !important;
    }
    
    .mnwl-menu-parent span:first-child {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
    }
    
    .mnwl-toggle-icon {
        font-size: 12px !important;
        color: #999 !important;
        transition: transform 0.3s ease !important;
    }
    
    .mnwl-menu-parent.expanded .mnwl-toggle-icon {
        transform: rotate(180deg) !important;
    }
    
    /* 子選單 */
    .mnwl-submenu {
        max-height: 0 !important;
        overflow: hidden !important;
        transition: max-height 0.3s ease !important;
        background: #fafafa !important;
    }
    
    .mnwl-submenu a {
        display: block !important;
        padding: 14px 20px 14px 50px !important;
        color: #666 !important;
        text-decoration: none !important;
        font-size: 14px !important;
        border-top: 1px solid #f0f0f0 !important;
        transition: all 0.2s ease !important;
    }
    
    .mnwl-submenu a:hover {
        background: #f0f0f0 !important;
        color: #d4a574 !important;
        padding-left: 55px !important;
    }
    
    /* 選單底部 */
    .mnwl-menu-footer {
        padding: 15px 20px !important;
        background: #fafafa !important;
        border-top: 1px solid #e0e0e0 !important;
        display: flex !important;
        gap: 10px !important;
    }
    
    .mnwl-menu-footer a {
        flex: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        padding: 12px 16px !important;
        border-radius: 8px !important;
        text-decoration: none !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        transition: all 0.2s ease !important;
    }
    
    .mnwl-btn-phone {
        background: #d4a574 !important;
        color: #fff !important;
    }
    
    .mnwl-btn-phone:hover {
        background: #c49464 !important;
    }
    
    .mnwl-btn-line {
        background: #06c755 !important;
        color: #fff !important;
    }
    
    .mnwl-btn-line:hover {
        background: #05b64d !important;
    }
}

/* ========== 桌面版：隱藏所有手機元素 ========== */
@media screen and (min-width: 769px) {
    .mnwl-bottom-nav,
    .mnwl-hamburger,
    .mnwl-menu-overlay {
        display: none !important;
    }
}

/* ========== 小螢幕手機優化 (< 380px) ========== */
@media screen and (max-width: 380px) {
    .mnwl-nav-text {
        font-size: 9px !important;
    }
    
    .mnwl-nav-icon {
        font-size: 22px !important;
    }
    
    .mnwl-menu-container {
        width: 90% !important;
    }
}
