/* 모바일 화면 레이아웃 - max-width: 430px */

body {
    justify-content: center;
    background: url('../../img/layout/webBackground.jpg') no-repeat center center fixed;
    background-size: cover;

}
body #wrapper{background-color: #fff;}

#page_wrap {
    max-width: 430px;
    width: 100%;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 6px 0 20px rgba(219, 219, 219, 0.8), -6px 0 20px rgba(219, 219, 219, 0.8);
}

#hd,
#wrapper,
#ft {
    max-width: 430px;
    width: 100%;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
}

body > *:not(#hd):not(#wrapper):not(#ft):not(script):not(style):not(link) {
    max-width: 430px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* 1200px 고정폭 요소들 100%로 override */
#ft_wr,
#hd_pop,
#hd_menu,
#container,
#ft_copy,
#sit_ov_wrap,
#tnb .inner {
    width: 100% !important;
}

/* PC 전용 요소 숨김 */
#tnb {
    display: none !important;
}

/* 내부 요소 overflow 방지 */
#wrapper,
#ft,
#container,
#ft_wr {
    overflow-x: hidden;
    box-sizing: border-box;
}
#hd {
    overflow: visible;
    box-sizing: border-box;
}

/* 모든 내부 요소 max-width 제한 */
#container *,
#ft * {
    max-width: 100%;
    box-sizing: border-box;
}

/* ===== hd_wrapper: 왼쪽 햄버거 / 가운데 로고 / 오른쪽 돋보기 ===== */
#hd_wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 15px !important;
    background: #fff;
    border-bottom: 1px solid #eee;
    width: 100% !important;
    height: auto !important;
    position: relative;
}

#hd_wrapper:after {
    display: none !important;
}

#hd_wrapper #logo {
    flex: 1;
    text-align: center;
    float: none !important;
    padding: 0 !important;
}

#hd_wrapper #logo img {
    max-height: 50px;
    width: auto;
    margin-bottom: 10px;
}

/* 기존 검색/로그인 영역 숨김 */
#hd_wrapper .hd_sch_wr,
#hd_wrapper .hd_login {
    display: none !important;
}

#hd_hamburger,
#hd_search_open {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    padding: 8px;
    color: #333;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}

/* ===== 검색 오버레이 (위에서 내려오는 형태) ===== */
#hd_search_overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    height: 200px;
    background: #fff;
    z-index: 10001;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

#hd_search_inner {
    width: 100%;
    padding: 15px 25px 20px;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    box-sizing: border-box;
}

#hd_search_close {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #555;
    padding: 5px;
}

.hd_search_title {
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    font-style: italic;
    letter-spacing: 2px;
    margin: 5px 0 18px;
    color: #222;
}

#hd_search_overlay #hd_sch {
    border: none;
    padding: 0;
    margin: 0;
}

#hd_sch .hd_sch_input_wrap {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #333;
}


#hd_sch{border-radius: 0px !important;}
#hd_sch .hd_sch_input_wrap #sch_str {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 0px 5px;
    background: transparent;
    height: 50px;
    width: 100%;
        color: #000;
}

#hd_sch .hd_sch_input_wrap #sch_str:focus{border: none !important; outline: none; box-shadow: none;}
#hd_sch .hd_sch_input_wrap #sch_submit {
    height: 50px;
    width: 50px;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #555;
    padding: 5px;
}

/* ===== 카카오톡 버튼 ===== */
#kakao_btn {
    position: fixed;
    bottom: 90px;
    left: 15px;
    width: 50px;
    height: 50px;
    z-index: 1000;
    animation: kakaoBounce 1.5s ease-in-out infinite;
}

#kakao_btn img {
    width: 100%;
    height: 100%;
    display: block;
}

@keyframes kakaoBounce {
    0% { transform: translateX(3px); }
    25% { transform: translateX(-2px); }
    50% { transform: translateX(3px); }
    75% { transform: translateX(-2px); }
    100% { transform: translateX(3px); }
}

/* ===== 햄버거 네비게이션 (왼쪽에서 슬라이드) ===== */
#hd_nav_overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 9998;
}

#hd_nav_overlay.open {
    display: block;
}

#hd_nav_menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background: #fff;
    z-index: 9999;
    overflow-y: auto;
    transition: left 0.3s ease;
    padding: 20px;
    box-shadow: 2px 0 8px rgba(0,0,0,0.15);
}

#hd_nav_menu.open {
    left: 0;
}

#hd_nav_close {
    position: absolute;
    top: 12px;
    right: 15px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #333;
    padding: 5px;
}

/* 네비 로고 */
.nav_logo {
    text-align: center;
    padding: 15px 0 10px;
}

.nav_logo img {
    max-height: 44px;
    width: auto;
}

/* 회원 메뉴 */
.nav_member {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px 12px;
    list-style: none;
    padding: 10px 0 20px;
    margin: 0;
    border-bottom: 1px solid #eee;
}

.nav_member li a {
    font-size: 13px;
    color: #555;
    text-decoration: none;
}

.nav_member li a:hover {
    color: #000;
}

/* ===== 카테고리 아코디언 ===== */
#hd_nav_menu #category {
    display: block !important;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    background: none !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

#hd_nav_menu #category h2,
#hd_nav_menu #category .close_btn,
#hd_nav_menu #category_all_bg {
    display: none !important;
}

#hd_nav_menu #category ul.cate {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
}

#hd_nav_menu #category ul.cate:after {
    display: none !important;
}

#hd_nav_menu #category .cate_li_1 {
    float: none !important;
    width: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
    border-left: none !important;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

#hd_nav_menu #category .cate_li_1_a {
    display: block;
    padding: 14px 40px 14px 5px;
    color: #333 !important;
    text-decoration: none;
    font-size: 15px;
    font-weight: normal !important;
    margin-bottom: 0 !important;
}

/* +/- 토글 버튼 */
#hd_nav_menu #category .cate_toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 44px;
    height: 46px;
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 서브 카테고리 (접힌 상태) */
#hd_nav_menu #category .sub_cate {
    display: none;
    list-style: none;
    padding: 0 0 10px;
    margin: 0;
}

#hd_nav_menu #category .sub_cate.open {
    display: block;
}

#hd_nav_menu #category .cate_li_2 a {
    display: block;
    padding: 8px 5px 8px 20px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

#hd_nav_menu #category .cate_li_2 a:hover {
    color: #000;
}

/* 메뉴 리스트 (히트상품 등) */
#hd_nav_menu .hd_menu {
    list-style: none;
    padding: 0;
    margin: 15px 0 0;
}

#hd_nav_menu .hd_menu li a {
    display: block;
    padding: 14px 5px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    text-decoration: none;
    font-size: 15px;
}

#hd_nav_menu .hd_menu li a:hover {
    color: #000;
    background: #fafafa;
}

/* ===== 푸터 반응형 ===== */
#ft {
    min-width: 0 !important;
}

#ft_wr {
    width: 100% !important;
    max-width: 100% !important;
    padding: 20px 15px !important;
    display: block !important;
}

#ft_wr:after {
    display: none !important;
}

#ft_wr .ft_cnt {
    width: 100% !important;
    float: none !important;
    padding: 10px 0 !important;
}

#ft_copy {
    width: 100% !important;
    padding: 15px !important;
    font-size: 12px;
}

/* 568px 이하 모바일에서는 100% */
@media (max-width: 568px) {
    #hd,
    #wrapper,
    #ft,
    body > *:not(script):not(style):not(link) {
        max-width: 100%;
    }
}
