* {
    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;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 공통 버튼 스타일 */
.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;
}



/* ===================== SVG 핀 마커 ===================== */
.w-sell-marker,
.w-deals-marker {
    position: relative;
    display: inline-block;
    cursor: pointer;
}
.w-pin-drop {
    display: block;
    line-height: 0;
    transition: filter .15s ease, transform .15s ease;
}
/* N 뱃지 */
.w-sell-marker .w-marker-new,
.w-deals-marker .w-marker-new {
    position: absolute;
    top: 2px;
    right: 0px;
    width: 15px; height: 15px;
    background: #ff3b30;
    color: #fff;
    font-size: 8.5px;
    font-weight: 800;
    border-radius: 50%;
    border: 1.5px solid #fff;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
/* 선택(active) 상태 */
.w-sell-marker.w-marker-active .w-pin-drop,
.w-deals-marker.w-marker-active .w-pin-drop {
    filter: brightness(1.3) drop-shadow(0 6px 14px rgba(0,0,0,.5)) !important;
    transform: scale(1.12);
    transform-origin: 40px 112px;
}
.w-sell-marker.w-marker-active,
.w-deals-marker.w-marker-active {
    z-index: 10002;
    background: transparent !important;
}
.w-marker-z-index { z-index: 200 !important; }

/* ===================== 네모 말풍선 마커 (실거래) ===================== */
.w-marker {
    position: relative;
    display: inline-block;
    background: #2F4B7C;
    border-radius: 7px;
    padding: 3px 7px 4px;
    color: #fff;
    text-align: center;
    cursor: pointer;
    min-width: 60px;
    font-family: 'Pretendard', 'Apple SD Gothic Neo', sans-serif;
    box-shadow: 0 2px 8px rgba(0,0,0,0.28);
    transition: transform .15s ease, box-shadow .15s ease;
}
.w-marker-top-text {
    font-size: 9px;
    font-weight: 500;
    color: rgba(255,255,255,0.88);
    line-height: 1.1;
    letter-spacing: -0.2px;
}
.w-marker-main-text {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
    line-height: 1.1;
    margin: 1px 0 0;
}
.w-marker-bottom-text {
    font-size: 8px;
    font-weight: 700;
    color: rgba(255,255,255,0.88);
    line-height: 1.1;
    letter-spacing: -0.2px;
}
.w-marker-arrow {
    display: block;
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #2F4B7C;
}
.w-marker-tcat-deals            { background: #2F4B7C; }
.w-marker-tcat-deals-arrow      { border-top-color: #2F4B7C; }
.w-deals-marker.w-marker-active {
    background: #e8456b !important;
    transform: scale(1.1) translateY(-2px);
    z-index: 10002;
}
.w-deals-marker.w-marker-active .w-marker-arrow { border-top-color: #e8456b !important; }

/* ===================== 보물지도 카테고리 핀 마커 (세련된 pill 스타일) ===================== */
.tcat-pin {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
}
.tcat-pin-inner {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px 6px 9px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,.28);
    white-space: nowrap;
    position: relative;
    border: 1.5px solid rgba(255,255,255,.35);
}
/* 삼각형 꼬리 */
.tcat-pin-inner::after {
    content: '';
    position: absolute;
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
}
.tcat-pin-icon {
    display: flex;
    align-items: center;
    color: rgba(255,255,255,.95);
    flex-shrink: 0;
}
.tcat-pin-price {
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.3px;
    line-height: 1;
}
/* 카테고리별 색상 */
.tcat-pin-camping .tcat-pin-inner           { background: #2d6a4f; }
.tcat-pin-camping .tcat-pin-inner::after    { border-top: 8px solid #2d6a4f; }

.tcat-pin-factory .tcat-pin-inner           { background: #37474f; }
.tcat-pin-factory .tcat-pin-inner::after    { border-top: 8px solid #37474f; }

.tcat-pin-nongmak .tcat-pin-inner           { background: #7c5c42; }
.tcat-pin-nongmak .tcat-pin-inner::after    { border-top: 8px solid #7c5c42; }

.tcat-pin-building .tcat-pin-inner          { background: #c0392b; }
.tcat-pin-building .tcat-pin-inner::after   { border-top: 8px solid #c0392b; }

/* hover */
.tcat-pin:hover .tcat-pin-inner { filter: brightness(1.12); }

/* active (선택됨) */
.tcat-pin.w-marker-active {
    transform: translateY(-3px) scale(1.18) !important;
    z-index: 10002 !important;
}
.tcat-pin.w-marker-active .tcat-pin-inner {
    box-shadow: 0 4px 16px rgba(0,0,0,.45) !important;
    border-color: rgba(255,255,255,.7) !important;
}

/* ===================== 보물지도 카테고리별 active 마커 색상 (말풍선 전용) ===================== */
.w-marker.w-marker-active.w-marker-active-camping { background-color: #2E7D32 !important; }
.w-marker.w-marker-active.w-marker-active-camping .w-marker-arrow { border-top-color: #2E7D32 !important; }

.w-marker.w-marker-active.w-marker-active-factory { background-color: #37474F !important; }
.w-marker.w-marker-active.w-marker-active-factory .w-marker-arrow { border-top-color: #37474F !important; }

.w-marker.w-marker-active.w-marker-active-nongmak { background-color: #6D4C41 !important; }
.w-marker.w-marker-active.w-marker-active-nongmak .w-marker-arrow { border-top-color: #6D4C41 !important; }

.w-marker.w-marker-active.w-marker-active-building { background-color: #B71C1C !important; }
.w-marker.w-marker-active.w-marker-active-building .w-marker-arrow { border-top-color: #B71C1C !important; }



/* .w-deals-marker defined in SVG pin section above */


.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; }

/* ============================================================
   앱 설치 CTA 배너 (모바일 전용 — iOS/Android JS 감지)
   ============================================================ */
#app-install-banner {
    display: none; /* JS가 모바일 감지 후 flex로 전환 */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10002;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    padding: 8px 12px;
    gap: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    overflow: hidden;
}
.app-banner-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: contain;
    flex-shrink: 0;
    border: 1px solid #eee;
    padding: 3px;
}
.app-banner-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.app-banner-info strong {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
}
.app-banner-info span {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.app-banner-btn {
    background: #3380FD;
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none !important;
    flex-shrink: 0;
    white-space: nowrap;
    display: inline-block;
}
.app-banner-close {
    background: none;
    border: none;
    color: #bbb;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    padding: 4px 2px;
}
