/*!
 * NodeBuy 域名挂牌增强 —— 站点级精简样式（全站生效）
 *
 * 1. 隐藏右上角：购物车、登录 / 注册、已登录用户菜单
 * 2. 隐藏商品详情页「普通库存 / 自动发货 / 库存 / 销量 / 每单限购」整个区域
 * 3. 隐藏商品列表卡片的「库存 / 销量」
 * 4. 隐藏移动端底部购买条（含加入购物车 / 立即购买）
 * 5. 域名商品页隐藏 NodeBuy 原生购买面板（JS 生效前也不闪现）
 * 6. Telegram 联系入口：右下角悬浮按钮 + 商品页咨询按钮（样式）
 * 7. 导航隐藏「订单查询」入口（桌面导航 / 移动端抽屉 / 移动端底部 Tab）
 *
 * 说明：1~5、7 项全部使用 display:none，不删除任何 DOM，注释即可还原。
 */

/* 1. 右上角：购物车 + 登录/注册 + 用户菜单 */
.nb-header__cart,
.nb-header-auth,
.nb-header-user {
    display: none !important;
}

/* 2. 商品详情页：库存 / 发货方式 / 销量 / 限购 区域 */
.nb-product-meta {
    display: none !important;
}

/* 3. 商品卡片：库存 / 销量 */
.nb-product-card__meta {
    display: none !important;
}

/* 4. 移动端底部购买条 */
.nb-product-buybar {
    display: none !important;
}

/* 5. 域名商品页：原生购买面板（数量 / 邮箱 / 优惠码 / 加入购物车 / 立即购买） */
.nbdl-domain-product .nb-buy-panel {
    display: none !important;
}

/* 隐藏后让价格行独占，避免摘要区留下空白间距 */
.nb-product-single__summary .nb-product-single__price-row {
    margin-bottom: 0;
}

/* ============================================================
 * 7. 导航隐藏「订单查询」入口
 * ------------------------------------------------------------
 * 站点不需要订单查询功能，隐藏全部 3 个前端入口：
 *   a) 桌面导航 .nb-nav__list       （「订单」）
 *   b) 移动端抽屉 .nb-mobile-drawer__list（「订单」）
 *   c) 移动端底部 Tab .nb-mobile-tabbar  （「订单查询」）
 * 该页仍可通过 /order-query/ 直达，仅从导航中移除。
 *
 * 注意：a/b 是 display:grid + gap，c 是 grid-template-columns:repeat(4,1fr)，
 * 只隐藏 <a> 会在网格里留下一个空格 —— 所以 a/b 要连 <li> 一起隐藏
 * （用 :has 选中父级），c 则同步把 4 列改成 3 列。
 * ============================================================ */

/* c) 底部 Tab 栏：隐藏该项 + 列数 4 → 3，避免右侧空一格 */
.nb-mobile-tabbar > a[href*="/order-query/"] {
    display: none !important;
}

.nb-mobile-tabbar {
    grid-template-columns: repeat(3, 1fr);
}

/* a/b) 桌面导航与移动抽屉：连 <li> 一起隐藏，避免 grid 留空 */
.nb-nav__list li:has(> a[href*="/order-query/"]),
.nb-mobile-drawer__list li:has(> a[href*="/order-query/"]) {
    display: none !important;
}

/* 兜底：不支持 :has 的旧浏览器，至少把链接文字藏掉 */
.nb-nav__list > li > a[href*="/order-query/"],
.nb-mobile-drawer__list > li > a[href*="/order-query/"] {
    display: none !important;
}

/* ============================================================
 * 6. Telegram 联系入口
 * ============================================================ */

/* 右下角悬浮按钮（全站） */
.nbdl-tg-float {
    position: fixed;
    right: 20px;
    bottom: 22px;
    z-index: 9990;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px 10px 13px;
    border-radius: 999px;
    background: #229ed9;
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none !important;
    box-shadow: 0 6px 20px rgba(34, 158, 217, .38);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.nbdl-tg-float:hover,
.nbdl-tg-float:focus {
    background: #1c8fc6;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(34, 158, 217, .5);
}

.nbdl-tg-float__icon {
    display: block;
    flex: 0 0 auto;
}

.nbdl-tg-float__label {
    white-space: nowrap;
}

/* 窄屏：只留圆形图标；若页面底部有原生 Tab 栏则抬高，避免压住 */
@media (max-width: 900px) {
    .nbdl-tg-float {
        right: 12px;
        bottom: 14px;
        padding: 12px;
    }

    .nbdl-tg-float__label {
        display: none;
    }

    .nbdl-has-tabbar .nbdl-tg-float {
        bottom: 78px;
    }
}

/* 域名商品页：购买按钮下方的咨询按钮 */
.nbdl-tg-inline {
    margin: 0 0 16px;
}

.nbdl-tg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    box-sizing: border-box;
    padding: 11px 18px;
    border: 1px solid #229ed9;
    border-radius: 10px;
    background: #fff;
    color: #1c8fc6 !important;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background .18s ease, color .18s ease;
}

.nbdl-tg-btn:hover,
.nbdl-tg-btn:focus {
    background: #229ed9;
    color: #fff !important;
}

.nbdl-tg-btn__icon {
    font-size: 15px;
    line-height: 1;
}

.nbdl-tg-hint {
    margin: 8px 0 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: #6b7280;
    text-align: center;
}
