@charset "utf-8";
/* ==========================================================================
   남자닷컴 쇼핑몰 — 폰(900px 이하) 보정
   default_shop.css 뒤에 실려 덮어씁니다. (shop.head.php 가 넣습니다)
   ========================================================================== */
@media (max-width: 900px) {

    /* ── 1. 전체메뉴(3선) : 어두운 전체 화면, 메뉴 안에서 스크롤 ─────────── */
    #gnb #category, #category {
        position: fixed !important;
        top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
        width: auto !important; max-height: none !important; height: 100dvh;
        margin: 0 !important; border: 0 !important; border-radius: 0;
        padding: 20px 12px 12px !important;
        overflow-y: auto !important; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
        z-index: 1400 !important;
        background: #121214 !important; color: #e6e6e6;
        box-shadow: none !important;
    }
    #category_all_bg { z-index: 1399 !important; background: rgba(0,0,0,.6) !important; }
    body.nm_cate_open { overflow: hidden; }

    /* 배너 → 분류 2단 (category.php 의 <style> 이 뒤에 읽히므로 전부 !important) */
    #category .cate_ttl { position: static !important; margin: 0 0 16px !important; padding: 0 !important; border: 0 !important; }
    #category .cate_ttl img { border-radius: 12px; }
    #category .cate_ttl.is_empty { background: #1f1f23 !important; }
    #category .cate_grp { margin-bottom: 22px !important; padding: 0 !important; border: 0 !important; background: none !important; }
    #category .cate_d1 { margin: 0 0 10px !important; padding: 0 2px !important; border: 0 !important; font-size: 15px !important; font-weight: 800; letter-spacing: -.03em; color: #fff !important; }
    #category .cate_d1 a { color: #fff !important; }
    #category .cate_cols { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 10px !important; align-items: start; }
    #category .cate_unit {
        grid-column: span 1 !important; display: block !important; margin: 0 !important; padding: 12px 14px 10px !important;
        border: 1px solid #2a2a2f !important; border-radius: 12px !important; background: #1b1b1f !important; min-width: 0;
    }
    #category .cate_d2 { flex: none !important; margin: 0 0 6px !important; padding: 0 0 6px !important; border-bottom: 1px solid #2a2a2f !important; font-size: 13.5px !important; font-weight: 700 !important; }
    #category .cate_d2 a { color: #fff !important; }
    #category .cate_d3 { margin: 0 !important; padding: 0 !important; }
    #category .cate_d3 > li { margin: 0 !important; }
    #category .cate_d3 a { display: block; padding: 3px 0 !important; font-size: 12.5px !important; line-height: 1.45 !important; color: #a9a9b0 !important; }
    #category .cate_d3 a:active, #category .cate_d3 a:hover { color: #fff !important; }
    #category .cate_d4, #category .cate_d5 { margin: 2px 0 4px !important; padding-left: 8px !important; border-left: 1px solid #2a2a2f !important; }
    #category .cate_d4 a, #category .cate_d5 a { font-size: 11.5px !important; color: #7c7c85 !important; }
    #category .no-cate { color: #a9a9b0 !important; }

    /* 닫기: 스크롤 상자 안에서 sticky 로 아래에 붙인다.
       어두운 단추(테두리 선) + 가는 X 를 CSS 로 그린다. 글자는 하나만 (테마가 덧붙이던 것은 지움) */
    #category { display: flex; flex-direction: column; }
    #category > * { flex: none; }
    #gnb #category .close_btn, #category .close_btn {
        position: sticky !important; bottom: 12px !important; top: auto !important; right: auto !important; left: auto !important;
        display: flex !important; align-items: center; justify-content: center; gap: 10px;
        width: 100% !important; height: 52px !important; margin: auto 0 0 !important; padding: 0 !important;
        border: 1px solid #3a3a41 !important; border-radius: 12px !important; background: #1b1b1f !important; color: #fff !important;
        font-family: inherit; font-size: 14px !important; font-weight: 700; letter-spacing: -.02em; line-height: 52px !important;
        box-shadow: 0 10px 28px rgba(0,0,0,.45); cursor: pointer; z-index: 3; overflow: hidden;
    }
    #gnb #category .close_btn:active, #category .close_btn:active { background: #26262b !important; }
    #gnb #category .close_btn .fa, #category .close_btn .fa { display: none !important; }
    #gnb #category .close_btn .sound_only, #category .close_btn .sound_only { display: none !important; }
    #gnb #category .close_btn:before, #category .close_btn:before {
        content: "" !important; display: block; width: 14px; height: 14px; flex: none;
        background:
            linear-gradient(#fff, #fff) center / 100% 1.5px no-repeat,
            linear-gradient(#fff, #fff) center / 1.5px 100% no-repeat;
        transform: rotate(45deg); opacity: .9;
    }
    #gnb #category .close_btn:after, #category .close_btn:after { content: "닫기" !important; position: static !important; width: auto !important; height: auto !important; background: none !important; }

    /* ── 2. 맨 위 작은 줄 : 주문조회 · 로그인/로그아웃 · 정보수정 · 접속자만 ─── */
    #tnb .tnb_inner { height: auto; min-height: 34px; padding: 0 12px; }
    #tnb .tnb_left { display: flex; align-items: center; gap: 6px; }
    #tnb .tnb_left .tnb_desc, #tnb .tnb_left .tnb_divider { display: none !important; }   /* LIVE 표시는 두고 안내문만 뺀다 */
    #tnb .tnb_live_text { font-size: 11px; font-weight: 800; letter-spacing: .04em; }
    .tnb_right { margin-left: auto; gap: 0; font-size: 12px; }
    .tnb_right > a, .tnb_right > span { display: none; }
    .tnb_right > a.tnb_order, .tnb_right > a.tnb_login, .tnb_right > a.tnb_logout,
    .tnb_right > a.tnb_modify, .tnb_right > a.tnb_connect { display: inline-flex; align-items: center; height: 34px; padding: 0 8px; }
    .tnb_right > a.tnb_connect b { margin-left: 4px; }

    /* ── 3. 우측 퀵바 → 화면 아래 고정 띠, 패널은 아래에서 40% 올라옴 ─────── */
    body { padding-bottom: 60px; }                          /* 띠에 가리지 않게 */
    #side_menu {
        display: block !important;                          /* default_shop.css 가 860px 이하에서 숨기던 것을 되살린다 */
        position: fixed !important; top: auto !important; bottom: 0 !important; left: 0 !important; right: 0 !important;
        height: auto !important; padding: 0 !important; z-index: 1200;
    }
    #quick {
        position: fixed !important; top: auto !important; bottom: 0 !important; left: 0 !important; right: 0 !important;
        display: flex; width: 100% !important; margin: 0 !important; padding: 0 0 env(safe-area-inset-bottom) !important;
        border: 0 !important; border-top: 1px solid #2a2a2f !important; border-radius: 0 !important;
        background: #121214 !important; box-shadow: 0 -6px 20px rgba(0,0,0,.35) !important;
    }
    /* 맨 위에서는 감춤 → 내려가면 올라옴 */
    #quick { transition: transform .25s ease, opacity .25s ease; }
    body.nm_at_top:not(.nm_qk_open) #quick { transform: translateY(110%); opacity: 0; pointer-events: none; }
    body.nm_at_top:not(.nm_qk_open) { padding-bottom: 0; }
    #quick li { flex: 1 1 0; border: 0 !important; }
    #quick li + li { border-top: 0 !important; }
    #quick li.qk_scroll { display: none; }
    #quick li button {
        display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
        width: 100% !important; height: 58px !important; padding: 0; background: transparent !important; color: #8e8e96 !important; font-size: 18px !important;
    }
    #quick li button.btn_sm_on { color: #fff !important; }
    #quick li button.btn_sm_on i, .btn_sm_on i { color: #fff !important; }
    #quick .qk_tit {
        display: block !important; position: static !important; margin: 0 !important; padding: 0 !important;
        background: none !important; box-shadow: none !important; color: inherit !important;
        font-size: 10px !important; font-weight: 600; line-height: 1 !important; white-space: nowrap;
    }
    #quick .qk_tit:after { display: none !important; }
    #top_btn { display: none !important; }

    /* 열린 패널: 아래 띠 위에서 화면 높이의 40%, 어두운 바탕 */
    #tabs_con { position: static; }
    .qk_con, .side_mn_wr1, .side_mn_wr2, .side_mn_wr3, .side_mn_wr4 {
        position: fixed !important; left: 0 !important; right: 0 !important; bottom: 59px !important; top: auto !important;
        width: 100% !important; height: 40vh !important; height: 40dvh !important; max-height: 40dvh;
        border: 0 !important; border-radius: 16px 16px 0 0; background: #1b1b1f !important; color: #e6e6e6;
        box-shadow: 0 -12px 30px rgba(0,0,0,.5) !important; overflow: hidden; z-index: 1201;
    }
    .qk_con_wr { height: 100% !important; overflow-y: auto !important; -webkit-overflow-scrolling: touch; padding-bottom: 16px; }
    .qk_con h2.s_h2, .qk_con .s_h2 { position: sticky; top: 0; z-index: 1; padding: 14px 18px; background: #1b1b1f !important; border-bottom: 1px solid #2a2a2f !important; color: #fff !important; }
    .qk_con h2.s_h2 span, .qk_con .s_h2 span { background: #2a2a2f !important; color: #fff !important; }
    .qk_con_wr a, .qk_con_wr .side_tnb li a, .qk_con_wr .btn_side_shop { color: #d0d0d6 !important; }
    .qk_con_wr .side_tnb li a { border-bottom: 1px solid #26262b; }
    .qk_con_wr .side_tnb li:hover a { color: #fff !important; }
    .qk_con_wr .con_close { position: absolute !important; top: 6px !important; right: 8px !important; width: 40px !important; height: 40px !important; font-size: 22px !important; color: #8e8e96 !important; background: none !important; }
    #side_menu_bg { bottom: 59px !important; background: rgba(0,0,0,.55) !important; }
    body.nm_qk_open { overflow: hidden; }

    /* 열었을 때 버튼 4개를 세로 띠로 바꾸던 데스크톱 규칙 무효화 */
    #side_menu.is_open #quick { position: fixed !important; left: 0 !important; right: 0 !important; bottom: 0 !important; top: auto !important; width: 100% !important; height: auto !important; flex-direction: row; border-radius: 0 !important; }
    #side_menu.is_open #quick li button { width: 100% !important; height: 58px !important; }
}

/* ── 560px 이하: GNB 줄 정리 ───────────────────────────────────── */
@media (max-width: 560px) {
    .gnb_1dli { padding: 0 !important; }
    #gnb { border-top: 0 !important; border-bottom: 0 !important; }
}
@media (max-width: 900px) {
    #container { padding-top: 10px !important; }
}
