/* 와인파인 사용자 화면 */
:root {
    --wf-bg: #f7f5f1;
    --wf-paper: #fffdfa;
    --wf-ink: #2b2420;
    --wf-muted: #7a7169;
    --wf-line: #d9d2c8;
    --wf-wine: #7b1e2b;
    --wf-wine-dark: #5c141f;
    --wf-gold: #d4a017;
}
body.wf-body { margin: 0; background: var(--wf-bg); color: var(--wf-ink); font-family: "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif; font-size: 15px; line-height: 1.55; }
body.wf-body #hd_login_msg { position: static; text-align: right; padding: 4px 16px; font-size: 12px; color: var(--wf-muted); }
.wf-body a { color: inherit; text-decoration: none; }
.wf-body img { max-width: 100%; }
.wf-body [hidden] { display: none !important; }

.wf-topbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 24px; border-bottom: 1px solid var(--wf-line); background: var(--wf-paper); }
.wf-brand { font-family: "Nanum Myeongjo", "Noto Serif KR", serif; font-weight: 700; font-size: 20px; color: var(--wf-wine); letter-spacing: 1px; }
.wf-topbar-right a { margin-left: 14px; font-size: 13px; color: var(--wf-muted); }
.wf-topbar-right a:hover { color: var(--wf-wine); }

.wf-page { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }

/* 메인 */
.wf-main { display: flex; justify-content: center; align-items: center; min-height: calc(100vh - 140px); }
.wf-main-box { width: 100%; max-width: 760px; padding: 70px 24px; border: 1px solid var(--wf-line); background: var(--wf-paper); text-align: center; box-shadow: 0 8px 30px rgba(43,36,32,.06); }
.wf-main-title { margin: 0 0 34px; font-family: "Nanum Myeongjo", "Noto Serif KR", serif; font-weight: 500; font-size: 42px; letter-spacing: -1px; }

.wf-search { display: inline-flex; align-items: stretch; gap: 12px; }
.wf-search-input { width: 300px; max-width: 60vw; padding: 12px 14px; border: 2px solid #a53a48; border-radius: 4px; background: #fff; font-size: 17px; color: var(--wf-ink); outline: none; }
.wf-search-input:focus { border-color: var(--wf-wine); box-shadow: 0 0 0 3px rgba(123,30,43,.12); }
.wf-search-input::placeholder { color: #b9b1a8; }
.wf-logo-btn { display: inline-flex; flex-direction: column; justify-content: center; align-items: center; min-width: 64px; padding: 4px 8px; border: 1px solid var(--wf-ink); border-radius: 3px; background: #fff; cursor: pointer; font-family: "Nanum Myeongjo", "Noto Serif KR", serif; font-weight: 700; font-size: 17px; line-height: 1.1; color: var(--wf-wine); }
.wf-logo-btn:hover { background: var(--wf-wine); color: #fff; border-color: var(--wf-wine); }
.wf-nearby-btn { display: inline-block; margin-top: 22px; padding: 9px 22px; border: 1px solid var(--wf-ink); border-radius: 3px; background: #fff; font-size: 17px; cursor: pointer; color: var(--wf-ink); }
.wf-nearby-btn:hover { background: var(--wf-ink); color: #fff; }
.wf-nearby-btn:disabled { opacity: .6; cursor: default; }

.wf-nearby { margin-top: 36px; text-align: left; }
.wf-map { width: 100%; height: 360px; border: 1px solid var(--wf-line); background: #eee; }
.wf-nearby-msg { margin: 14px 0 8px; color: var(--wf-muted); }
.wf-nearby-list { list-style: none; margin: 0; padding: 0; }
.wf-nearby-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--wf-line); cursor: pointer; }
.wf-nearby-item:hover { background: #fff; }
.wf-nearby-thumb { flex: 0 0 80px; height: 60px; overflow: hidden; border-radius: 3px; background: #e9e4dc; }
.wf-nearby-thumb img { width: 100%; height: 100%; object-fit: cover; }
.wf-nearby-info { display: flex; flex-direction: column; min-width: 0; }
.wf-nearby-info span { font-size: 13px; color: var(--wf-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-nearby-info em { font-style: normal; font-size: 12px; color: var(--wf-wine); }

/* 목록 */
.wf-search-sm { display: flex; justify-content: center; margin-bottom: 28px; }
.wf-search-sm .wf-search-input { font-size: 15px; padding: 9px 12px; }
.wf-search-sm .wf-logo-btn { font-size: 14px; min-width: 54px; }
.wf-list-layout { display: flex; gap: 28px; align-items: flex-start; }
.wf-filter { flex: 0 0 190px; padding: 18px 16px; border: 1px solid var(--wf-ink); background: var(--wf-paper); position: sticky; top: 16px; }
.wf-filter h2 { margin: 0 0 20px; font-size: 18px; font-weight: 600; }
.wf-filter h3 { margin: 18px 0 8px; font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.wf-filter ul { list-style: none; margin: 0; padding: 0; }
.wf-filter li { margin: 4px 0; }
.wf-filter label { display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-size: 14px; }
.wf-filter input { margin: 0; width: 15px; height: 15px; accent-color: var(--wf-wine); }
.wf-filter-reset { display: inline-block; margin-top: 16px; font-size: 12px; color: var(--wf-wine); text-decoration: underline; }
.wf-list-body { flex: 1 1 auto; min-width: 0; }
.wf-list-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.wf-list-title { margin: 0; font-size: 30px; font-weight: 700; word-break: break-all; }
.wf-list-count { margin: 4px 0 0; font-size: 17px; color: var(--wf-muted); }
.wf-list-count strong { color: var(--wf-ink); }
.wf-logos { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.wf-logos img { height: 34px; width: auto; }
.wf-empty { padding: 60px 0; text-align: center; color: var(--wf-muted); }

.wf-cards { list-style: none; margin: 0; padding: 0; }
.wf-card { display: flex; gap: 22px; padding: 14px; margin-bottom: 14px; border: 1px solid var(--wf-line); background: var(--wf-paper); cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.wf-card:hover, .wf-card:focus { border-color: var(--wf-wine); box-shadow: 0 6px 18px rgba(123,30,43,.10); outline: none; }
.wf-card-img { flex: 0 0 240px; height: 160px; overflow: hidden; border: 1px solid var(--wf-line); background: #eee; }
.wf-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wf-noimg { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #a39b92; font-size: 14px; background: repeating-linear-gradient(45deg, #efeae3, #efeae3 10px, #e7e1d9 10px, #e7e1d9 20px); }
.wf-card-info { flex: 1 1 auto; min-width: 0; padding: 6px 0; }
.wf-card-info h3 { margin: 0 0 6px; font-size: 21px; font-weight: 700; }
.wf-card-info p { margin: 3px 0; }
.wf-card-addr { color: var(--wf-muted); font-size: 14px; }
.wf-card-rv { font-size: 14px; }
.wf-card-rv::before { content: "★ "; color: var(--wf-gold); }
.wf-card-tags { margin-top: 10px !important; padding-top: 10px; border-top: 1px dashed var(--wf-line); font-size: 14px; color: var(--wf-ink); }

/* 모달 */
.wf-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.wf-modal-bg { position: absolute; inset: 0; background: rgba(30,20,20,.55); }
.wf-modal-box { position: relative; width: 100%; max-width: 860px; max-height: 92vh; overflow-y: auto; background: var(--wf-paper); border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.wf-modal-close { position: sticky; top: 8px; float: right; margin: 8px 8px 0 0; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255,255,255,.9); font-size: 26px; line-height: 1; cursor: pointer; color: var(--wf-ink); z-index: 2; }
.wf-modal-close:hover { background: var(--wf-wine); color: #fff; }
.wf-modal-body { padding: 24px 28px 32px; clear: both; }
.wf-loading, .wf-error { padding: 40px; text-align: center; color: var(--wf-muted); }

/* 상세 */
.wf-detail-photos { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; margin-bottom: 20px; }
.wf-photo-main { height: 320px; border: 1px solid var(--wf-line); background: #eee; overflow: hidden; }
.wf-photo-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wf-photo-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; align-content: start; max-height: 320px; overflow-y: auto; }
.wf-photo-grid li { height: 100px; border: 1px solid var(--wf-line); overflow: hidden; background: #eee; cursor: pointer; }
.wf-photo-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.wf-photo-grid li:hover img { transform: scale(1.06); }
.wf-detail-info { display: flex; justify-content: space-between; gap: 20px; padding: 16px 0; border-top: 1px solid var(--wf-line); border-bottom: 1px solid var(--wf-line); }
.wf-detail-name { margin: 0 0 6px; font-size: 26px; font-weight: 700; }
.wf-detail-addr { margin: 0; color: var(--wf-muted); }
.wf-detail-tags { margin: 12px 0 0; font-size: 14px; }
.wf-detail-right { flex: 0 0 auto; text-align: right; font-size: 14px; }
.wf-detail-right p { margin: 4px 0; }
.wf-label { display: inline-block; margin-right: 6px; color: var(--wf-muted); }
.wf-detail-btns { display: flex; gap: 10px; margin: 16px 0; }
.wf-btn { display: inline-block; padding: 9px 18px; border: 1px solid var(--wf-ink); border-radius: 3px; background: #fff; font-size: 14px; cursor: pointer; color: var(--wf-ink); }
.wf-btn:hover { background: var(--wf-ink); color: #fff; }
.wf-btn-primary { background: var(--wf-wine); border-color: var(--wf-wine); color: #fff; }
.wf-btn-primary:hover { background: var(--wf-wine-dark); }
.wf-notice { padding: 14px 16px; margin: 10px 0 20px; background: #f3eee6; border-left: 4px solid var(--wf-wine); }
.wf-notice h3 { margin: 0 0 6px; font-size: 15px; }
.wf-notice-body { font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.wf-reviews h3 { margin: 10px 0 12px; font-size: 18px; }
.wf-review-cnt { color: var(--wf-wine); }
.wf-review-form { padding: 14px; margin-bottom: 16px; border: 1px solid var(--wf-line); background: #fff; }
.wf-review-row { display: flex; gap: 8px; margin-bottom: 8px; }
.wf-review-row input { flex: 1 1 auto; padding: 8px 10px; border: 1px solid var(--wf-line); border-radius: 3px; font-size: 14px; }
.wf-review-form textarea { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--wf-line); border-radius: 3px; font-size: 14px; resize: vertical; }
.wf-review-list { list-style: none; margin: 0; padding: 0; }
.wf-review-item { padding: 12px 0; border-top: 1px solid var(--wf-line); }
.wf-review-meta { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: 13px; }
.wf-review-meta span { color: var(--wf-muted); }
.wf-review-item p { margin: 0; font-size: 14px; word-break: break-word; }
.wf-review-empty { padding: 20px 0; text-align: center; color: var(--wf-muted); font-size: 14px; }

@media (max-width: 760px) {
    .wf-main-box { padding: 48px 16px; }
    .wf-main-title { font-size: 30px; }
    .wf-search { width: 100%; }
    .wf-search-input { flex: 1 1 auto; width: auto; max-width: none; }
    .wf-list-layout { flex-direction: column; }
    .wf-filter { position: static; width: 100%; box-sizing: border-box; }
    .wf-filter ul { display: flex; flex-wrap: wrap; gap: 4px 14px; }
    .wf-filter label { gap: 6px; }
    .wf-list-title { font-size: 24px; }
    .wf-logos img { height: 26px; }
    .wf-card { flex-direction: column; gap: 10px; }
    .wf-card-img { flex: none; width: 100%; height: 180px; }
    .wf-modal { padding: 0; }
    .wf-modal-box { max-height: 100vh; border-radius: 0; height: 100%; }
    .wf-modal-body { padding: 16px; }
    .wf-detail-photos { grid-template-columns: 1fr; }
    .wf-photo-main { height: 220px; }
    .wf-photo-grid { grid-template-columns: repeat(3, 1fr); max-height: none; }
    .wf-photo-grid li { height: 80px; }
    .wf-detail-info { flex-direction: column; }
    .wf-detail-right { text-align: left; }
}

/* 필터: 개수 표시 및 접힘 그룹 */
.wf-filter-list { list-style: none; margin: 0; padding: 0; }
.wf-filter-list label { gap: 8px; }
.wf-filter-name { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.wf-filter-cnt { flex: 0 0 auto; font-size: 12px; color: var(--wf-muted); }
.wf-filter label.is-zero { color: #b3aba2; }
.wf-filter-group { margin-top: 18px; }
.wf-filter-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; color: var(--wf-ink); cursor: pointer; text-align: left; }
.wf-filter-toggle small { margin-left: 6px; font-size: 11px; font-weight: normal; color: var(--wf-wine); text-decoration: none; }
.wf-filter-arrow { width: 8px; height: 8px; margin-right: 4px; border-right: 2px solid var(--wf-ink); border-bottom: 2px solid var(--wf-ink); transform: rotate(-45deg); transition: transform .15s; }
.wf-filter-group.is-open .wf-filter-arrow { transform: rotate(45deg); }
.wf-filter-group .wf-filter-list { margin-top: 8px; max-height: 260px; overflow-y: auto; }
@media (max-width: 760px) {
    .wf-filter-group .wf-filter-list { max-height: none; }
}

/* 위치 확인 실패 시 지역 선택 */
.wf-region-pick { margin-top: 26px; padding: 16px; border: 1px dashed var(--wf-line); background: #fff; text-align: center; }
.wf-region-pick-msg { margin: 0 0 12px; font-size: 14px; color: var(--wf-muted); }
.wf-region-pick-form { display: inline-flex; gap: 8px; align-items: stretch; }
.wf-region-pick-form select { padding: 8px 10px; border: 1px solid var(--wf-line); border-radius: 3px; font-size: 15px; background: #fff; color: var(--wf-ink); }
