* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {           /* ① 높이 100 % 확보 */
    height: 100%;
    -webkit-touch-callout: none;
    -webkit-user-select: none;

    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;


}

body {
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
    display: flex;
    flex-direction: column;
}

input::placeholder,
textarea::placeholder {
    color: #c0c0c0;   /* 원하는 색 */
    opacity: 1;       /* Safari 등에서 흐려지는 기본값 무력화 */
}

.header {
    width: 100%;
    height: 60px;
    background-color: #a5d1f21a;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    /*position: sticky;
    top: 0;*/
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    flex: 0 0 60px;
}

.header-left {
    flex-shrink: 0;
    width: clamp(70px, 10vw, 100px);
}
.header-left a {
    display: flex;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-center {
    display: flex;
    gap: 8px;
    align-items: center;
}
.header-center a {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    box-sizing: border-box;
    height: 26px;
}

.header-center a span {
    display: block;
}

.header-center a img {
    width: 26px;
}

.mobile-header-right {
    display: none;
}

.layout-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}


.main-content {
    flex: 1; /* 핵심: 이게 있어야 푸터가 밀림 */
}


#mypageBtn span {
    padding-left: 5px;
}


#buyBtn::after {
    content: "";
    position: absolute;
    bottom: -4px; /* 글자보다 약간 아래 */
    width: 85%; /* 글자보다 살짝 짧게 */
    height: 2px;
    background-color: #ffaf28;
    left: 50%;
    transform: translateX(-50%); /* 가운데 정렬 */
}


#sellInfoBtn::after {
    content: "";
    position: absolute;
    bottom: -4px;
    width: 85%;
    height: 2px;
    background-color: #0081ff;
    left: 50%;
    transform: translateX(-50%);
}

/*#toggleSellBtn.toggle_active {
    color: #0081ff;
}*/

.w_btn_group_func {
    display: flex;
    align-items: center;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 10px;
    background-color: #fff;
    padding: 3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.w_btn_group_line {
    display: none;
    position: relative;
    width: 1px;
    height: 38px;
    background-color: #efefef;
}
.w_btn_group_line:after {
    display: block;
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 13px;
    background-color: #a2a2a2;
}
.w_btn_group_func a {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 80px;
    height: 38px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    background-color: #efefef;
    cursor: pointer;
}
.w_btn_group_func a.toggle_active {
    border: none;
}
#toggleBuyBtn {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    color: #4f4949;
}
/*#toggelBuyBtn:after {
    display: block;
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 0.5px;
    height: 13px;
    background-color: #a2a2a2;
    z-index: 10;
}*/
#toggleBuyBtn.toggle_active {
    background-color: #f5a020;

}
#toggleBuyBtn.toggle_active:after {
    display: none;
}
#toggleSellBtn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
#toggleSellBtn.toggle_active {
    background-color: #0081ff;
    color: #fff;

}



.login-icon {
    width: 32px;
    height: 32px;
    background-color: #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
}
.container {
    width: 100%;
    height: calc(100dvh - 60px); /* 주소창 포함한 동적 높이에서 헤더 제외 */
    position: relative;
}

/* 파일업로드 공통 */
.file-upload {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ccc;
    margin-top: 15px;
}

.file-name {
    flex: 1;
    padding: 10px 16px;
    background: #fff;
    color: #999;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-btn {
    background: #f5a020;
    color: #fff;
    font-weight: bold;
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
}

.upload-btn:hover {
    background: #ee9a1b;
}


/* 약관등 팝업 관련 */
.terms-popup {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    max-height: 80vh;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.terms-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 16px;
}

.terms-body {
    max-height: 60vh;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
    color: #333;

    /* ✅ 스크롤바 숨기기 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE & Edge */

    /* Webkit (Chrome, Safari) */
}
.terms-body::-webkit-scrollbar {
    display: none;
}


/* 알림 팝업 */
body.modal-open {
    overflow: hidden;
}

.ios-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100000;
}

.ios-modal-hidden {
    display: none;
}

.ios-modal-box {
    background: white;
    border-radius: 14px;
    width: 280px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.ios-modal-title {
    margin: 20px 16px 8px;
    font-size: 17px;
    font-weight: 600;
    color: #000;
}

.ios-modal-message {
    margin: 0 16px 20px;
    font-size: 14px;
    color: #444;
    line-height: 1.4;
}

.ios-modal-button-wrap {
    border-top: 1px solid #ccc;
}

.ios-modal-btn {
    width: 100%;
    padding: 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #007aff;
    background: none;
    border: none;
    cursor: pointer;
}

.ios-modal-btn:hover {
    background: #f2f2f2;
}

/* 처음엔 숨김 → JS로 필요할 때만 보여줌 */
#modalCancelBtn      { display:none; }

/* 두 개 버튼이 보일 때 가로 배치 */
.ios-modal-button-wrap.two-btns{
    display:flex;
}
.ios-modal-button-wrap.two-btns .ios-modal-btn{
    flex:1 1 50%;
}
.ios-modal-button-wrap.two-btns .ios-modal-btn + .ios-modal-btn{
    border-left:1px solid #ccc;
}

/* 취소 버튼 색상(선택) */
.ios-cancel-btn{ color:#ff3b30; }



.main-footer {
    background-color: #007bff;
    color: #ffffff;
    padding: 30px 20px;
    font-size: 14px;
    line-height: 1.7;
    position: static; /* ★ 고정 제거 */
    z-index: auto;
    margin-top: auto;    /* 남은 공간 ↗ 자동 채우기 → 푸터는 맨 아래 */


}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;

}

.footer-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-company {
    font-size: 12px;
    color: #d0d4e4;
    margin-bottom: 12px;
}

.footer-copy {
    font-size: 12px;
    color: #bbb;
}



/* 페이징 */

/* 전체 페이징 감싸는 영역 */
.paging_wrap {
    text-align: center;
    margin-top: 30px;
}

/* 내부 pagination 컨테이너 */
.pagination {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

/* 공통 버튼 스타일 */
.pagination a {
    display: inline-block;
    padding: 6px 12px;
    font-size: 12px;
    color: #333;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-decoration: none;
    min-width: 36px;
    text-align: center;
    transition: all 0.2s ease-in-out;
}

/* 현재 페이지 */
.pagination a.active {
    background-color: #0081ff;
    color: #fff;
    font-weight: bold;
    border-color: #0081ff;
    pointer-events: none;
}

/* 이전/다음/처음/끝 버튼 스타일 */
.pagination a.first,
.pagination a.prev,
.pagination a.next,
.pagination a.last {
    font-weight: bold;
}

/* 호버 효과 */
.pagination a:hover:not(.active) {
    background-color: #f4f4f4;
    border-color: #999;
}

/* ⬇️ 공통 CSS(한 번만) – 기존 파일에 이어붙이기 */
#loading_overlay{
    position:fixed; inset:0;
    display:flex; align-items:center; justify-content:center;
    background:rgba(0,0,0,.35);      /* 반투명 배경 */
    z-index:99999;
}
#loading_overlay .loader{
    width:48px; height:48px;
    border:5px solid rgba(255,255,255,.3);
    border-top-color:#fff;
    border-radius:50%;
    animation:spin 1s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}



/* mobile menu */
.mobile_menu {
    display: none;
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    background: #fff;
    z-index: 1000;
    height: 60px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mobile_menu_nav {
    display: flex;
    height: 100%;
}
.mobile_menu_nav a {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}
.mobile_nav_icon {
    font-size: 30px;
}
.mobile_nav_text {
    font-size: 13px;
    color: #595959;
}

.icon {
    width: 24px;
    height: 24px;
    stroke: #999;
    transition: stroke 0.2s;
}
/*.icon:hover {
    stroke: #0081ff;
}

.mobile_nav_text:hover {
    color: #0081ff;
}*/



/* 클릭 후 활성 색 */
.icon.is-active { stroke:#0081ff; }

.mobile_nav_text.is-active {
    color: #0081ff;
}



/* marker */
.w-marker {
    display: inline-block;
    width: 60px;
    background-color: #003169;
    color: #fff;
    border-radius: 4px;
    padding: 4px 6px;
    text-align: center;
    font-size: 11px;
    font-weight: bold;
    line-height: 1.2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    position: relative;
}



.w-marker-new {
    position: absolute;
    top: -6px;
    right: -6px;
    background-color: red;
    color: white;
    font-size: 10px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 10;
}

.w-marker-top-text {
    font-size: 9px;
    font-weight: normal;
}
.w-marker-main-text {

}
.w-marker-bottom-text {
    font-size: 9px; font-weight: normal;
}

.w-marker-arrow {
    position: absolute;
    bottom: -8px;
    left: 50%;
    margin-left: -6px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #003169;
}


.w-marker-sell-color {
    background-color: #0081ff !important;
}
.w-marker-sell-arrow-color {
    border-top: 8px solid #0081ff !important;
}


.w-sell-marker {
    position: relative;
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.w-marker-active{
    transform: translateY(-2px) scale(1.5);
    z-index: 10002;
    background-color: #e8456b !important;
}

.w-marker-active .w-marker-arrow{

    border-top: 8px solid #e8456b !important;
}



.w-marker-z-index {
    z-index: 200 !important;
}


.w-deals-marker {
    position: relative;
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}


.w-cluster {
    background:#0081ff;
    position: relative;
    color:white;
    border-radius:50%;
    width:40px;
    height:40px;
    display:flex;
    align-items:center;
    justify-content:center;
    z-index: 1000;
}
.w-cluster-buy-color {
    background:#ffaf28 !important;
}




@media screen and (max-width: 1032px) {
    .header {
        flex-direction: row; /* 기존처럼 수평 배치 */
        height: 60px;        /* ✅ 고정 높이 재지정 */
        align-items: center;

    }

    .header-center {
        gap: 5px;
    }

    .header-center a {
        font-size: 12px;
    }


    .header-right {
        display: none;
        /*flex-wrap: nowrap;
        gap: 16px;*/
    }

    .mobile-header-right {
        display: block;
    }

    .mobile-search-btn {
        cursor: pointer;
    }
    .mobile-search-btn .icon {
        width: 30px;
        height: 30px;
    }

    .terms-popup {
        padding: 9px;
    }

    .w_btn_group_func {
        top: 10px;
        padding: 3px;
    }
    .w_btn_group_func.mobile-search-active {
        top: 80px;
    }
    .w_btn_group_func a {
        width: 65px;
        height: 28px;
        font-size: 14px;
    }
    .w_btn_group_line {
        height: 28px;
    }

    .mobile_menu {
        display: block;
    }

    .main-footer {
        padding-bottom: 90px;
    }


}

.w_btn_view_term {
    font-size: 12px;
    color: #333;
    cursor: pointer;
    text-decoration: underline;
}

.w_btn_common {
    flex: 1;
    padding: 12px 0;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}
.w_btn_yellow {
    background-color: #ffaf28;
    color: #333;

}
.w_btn_blue {
    background-color: #0081ff;
    color: #fff;
}



.ph-red::placeholder { color:#e74c3c; font-size: 13px}
.ph-blue::placeholder { color:#3380fd; }
