/* goodwith-realty — 매물 목록·상세. 스킨 색상 변수(--gw-*)를 따르고, 모든 클래스는 rt- 접두어 */
.rt-pagehead { padding: clamp(56px, 9vw, 120px) 0 clamp(28px, 4vw, 48px); background: var(--gw-surface, #f3f4f6); text-align: center; }
.rt-pagehead h1 { margin: 6px 0 10px; font-family: var(--gw-font-head, inherit); font-size: clamp(26px, 3.6vw, 40px); font-weight: 500; color: var(--gw-ink, #111); }
.rt-pagehead p { color: var(--gw-muted, #666); }
.rt-eyebrow { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--gw-accent, #a47a48); }
.rt-section { padding-block: clamp(32px, 5vw, 64px) clamp(56px, 8vw, 96px); }
.rt-muted { color: var(--gw-muted, #6b7280); font-size: .92em; }

/* 필터 */
.rt-filter { display: grid; gap: 18px; padding: clamp(18px, 3vw, 28px); background: var(--gw-surface, #f5f5f4); border: 1px solid var(--gw-line, #e5e7eb); border-radius: var(--gw-radius, 6px); }
.rt-filter fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.rt-filter__deals { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--gw-line, #e5e7eb) !important; }
.rt-tab input, .rt-chip input { position: absolute; opacity: 0; pointer-events: none; }
.rt-tab span { display: inline-block; padding: 10px 18px 12px; font-weight: 700; color: var(--gw-muted, #666); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.rt-tab input:checked + span { color: var(--gw-primary, #222); border-color: var(--gw-primary, #222); }
.rt-tab input:focus-visible + span, .rt-chip input:focus-visible + span { outline: 2px solid var(--gw-accent, #a47a48); outline-offset: 2px; }
.rt-filter__label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; color: var(--gw-ink, #222); }
.rt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rt-chip span { display: inline-block; padding: 7px 14px; border: 1px solid var(--gw-line, #d1d5db); border-radius: 999px; background: var(--gw-bg, #fff); font-size: 14px; cursor: pointer; transition: .15s; }
.rt-chip input:checked + span { background: var(--gw-primary, #222); border-color: var(--gw-primary, #222); color: var(--gw-primary-ink, #fff); }
.rt-filter__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.4fr) auto; gap: 12px; align-items: end; }
.rt-filter select, .rt-filter input[type="search"], .rt-sort select {
  width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--gw-line, #d1d5db); border-radius: var(--gw-radius, 6px);
  background: var(--gw-bg, #fff); color: var(--gw-ink, #111); font: inherit; font-size: 15px; }
.rt-filter__actions { display: flex; align-items: center; gap: 12px; }
.rt-filter__actions .gw-btn { min-height: 44px; padding: 8px 22px; }
.rt-filter__reset { font-size: 14px; color: var(--gw-muted, #666); white-space: nowrap; }
@media (max-width: 960px) { .rt-filter__row { grid-template-columns: 1fr 1fr; } .rt-filter__field--q { grid-column: 1 / -1; } .rt-filter__actions { grid-column: 1 / -1; } .rt-filter__actions .gw-btn { flex: 1; } }
@media (max-width: 520px) { .rt-tab span { padding: 9px 12px 11px; } }

.rt-listbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 18px; }
.rt-listbar__count { color: var(--gw-muted, #666); }
.rt-listbar__count b { color: var(--gw-ink, #111); font-size: 1.15em; }
.rt-sort select { min-height: 40px; width: auto; }

/* 카드 */
.rt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); list-style: none; margin: 0; padding: 0; }
.rt-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1024px) { .rt-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .rt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .rt-grid, .rt-grid--4 { grid-template-columns: 1fr; } }
.rt-card { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; background: var(--gw-bg, #fff); border: 1px solid var(--gw-line, #e5e7eb); border-radius: var(--gw-radius, 8px); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.rt-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0, 0, 0, .09); }
.rt-card__img { position: relative; aspect-ratio: 4 / 3; background: var(--gw-surface, #eee); overflow: hidden; }
.rt-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.rt-card:hover .rt-card__img img { transform: scale(1.04); }
.rt-card__noimg { display: grid; place-items: center; height: 100%; color: var(--gw-muted, #888); font-size: 14px; }
.rt-card__count { position: absolute; right: 10px; bottom: 10px; padding: 3px 9px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; }
.rt-card__body { display: grid; gap: 6px; padding: 16px 18px 20px; }
.rt-card__type { font-size: 13px; color: var(--gw-muted, #666); }
.rt-card__price { font-size: 20px; font-weight: 800; color: var(--gw-primary, #111); letter-spacing: -.01em; }
.rt-card__title { font-weight: 600; color: var(--gw-ink, #111); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-card__spec { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--gw-muted, #555); }
.rt-card__spec span + span::before { content: "·"; margin-right: 10px; color: var(--gw-line, #ccc); }
.rt-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.rt-card__tags i { font-style: normal; font-size: 12px; color: var(--gw-accent, #8a6a3a); }

.rt-badges { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; }
.rt-badges--inline { position: static; margin: 0 0 12px; }
.rt-badge { display: inline-block; padding: 4px 10px; border-radius: 3px; font-size: 12px; font-style: normal; font-weight: 700; color: #fff; background: #334155; }
.rt-badge--sale { background: #b42318; }
.rt-badge--jeonse { background: #1d4ed8; }
.rt-badge--monthly { background: #047857; }
.rt-badge--short { background: #7c3aed; }
.rt-badge--reserved { background: #f59e0b; color: #1f1300; }
.rt-badge--hot { background: var(--gw-accent, #a47a48); }
.rt-badge--type { background: transparent; color: var(--gw-ink, #333); border: 1px solid var(--gw-line, #ccc); }

.rt-empty { padding: 56px 20px; text-align: center; border: 1px dashed var(--gw-line, #d1d5db); border-radius: var(--gw-radius, 8px); }
.rt-empty p + p { margin-top: 8px; color: var(--gw-muted, #666); }
.rt-empty p:last-child { margin-top: 20px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.rt-pager { margin-top: 40px; }

/* 법정 표기 */
.rt-legal { margin-top: 48px; padding: 18px 20px; border-top: 1px solid var(--gw-line, #e5e7eb); font-size: 13px; color: var(--gw-muted, #666); }
.rt-legal__title { font-weight: 700; color: var(--gw-ink, #333); margin-bottom: 6px; }
.rt-legal dl { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; }
.rt-legal dl div { display: flex; gap: 6px; }
.rt-legal dt { font-weight: 600; }
.rt-legal dd { margin: 0; }
.rt-legal__note { margin-top: 8px; font-size: 12px; }

/* 상세 */
.rt-view { padding: calc(var(--rf-hh, 0px) + clamp(20px, 3vw, 36px)) 0 clamp(64px, 8vw, 110px); }
.rt-crumb { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; font-size: 13px; color: var(--gw-muted, #666); }
.rt-crumb a { color: inherit; }
.rt-view__top { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: clamp(20px, 3.4vw, 48px); align-items: start; }
@media (max-width: 900px) { .rt-view__top { grid-template-columns: 1fr; } }
.rt-gallery__main { position: relative; aspect-ratio: 4 / 3; background: #111; border-radius: var(--gw-radius, 8px); overflow: hidden; }
.rt-gallery__main--empty { display: grid; place-items: center; background: var(--gw-surface, #eee); color: var(--gw-muted, #777); }
.rt-gallery__slide { position: absolute; inset: 0; margin: 0; }
.rt-gallery__slide[hidden] { display: none; }
.rt-gallery__zoom { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.rt-gallery__slide img { width: 100%; height: 100%; object-fit: cover; }
.rt-gallery__slide figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 16px 12px; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); color: #fff; font-size: 14px; }
.rt-gallery__nav { position: absolute; top: 50%; translate: 0 -50%; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .88); color: #111; font-size: 26px; line-height: 1; cursor: pointer; }
.rt-gallery__nav--prev { left: 12px; } .rt-gallery__nav--next { right: 12px; }
.rt-gallery__count { position: absolute; right: 12px; top: 12px; padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 13px; }
.rt-gallery__thumbs { display: flex; gap: 8px; margin: 10px 0 0; padding: 0 0 4px; list-style: none; overflow-x: auto; scrollbar-width: thin; }
.rt-gallery__thumbs button { display: block; width: 84px; height: 63px; padding: 0; border: 2px solid transparent; border-radius: 4px; overflow: hidden; background: none; cursor: pointer; opacity: .65; }
.rt-gallery__thumbs button[aria-current="true"] { border-color: var(--gw-primary, #111); opacity: 1; }
.rt-gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }

.rt-summary__title { font-family: var(--gw-font-head, inherit); font-size: clamp(22px, 2.6vw, 30px); font-weight: 600; line-height: 1.35; color: var(--gw-ink, #111); }
.rt-summary__price { margin: 14px 0; font-size: clamp(26px, 3.2vw, 36px); font-weight: 800; color: var(--gw-primary, #111); letter-spacing: -.02em; }
.rt-summary__price small { margin-left: 8px; font-size: 14px; font-weight: 500; color: var(--gw-muted, #777); }
.rt-summary__text { color: var(--gw-muted, #555); }
.rt-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 20px 0; background: var(--gw-line, #e5e7eb); border: 1px solid var(--gw-line, #e5e7eb); }
.rt-keys div { padding: 12px 14px; background: var(--gw-bg, #fff); }
.rt-keys dt { font-size: 12px; color: var(--gw-muted, #777); }
.rt-keys dd { margin: 2px 0 0; font-weight: 700; color: var(--gw-ink, #111); }
.rt-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.rt-tags span { padding: 4px 10px; border-radius: 999px; background: var(--gw-surface, #f3f4f6); font-size: 13px; }
.rt-summary__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.rt-summary__actions .gw-btn { flex: 1 1 160px; }
.rt-summary__meta { margin-top: 14px; font-size: 12px; color: var(--gw-muted, #888); }

.rt-view__body { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(24px, 4vw, 56px); margin-top: clamp(36px, 5vw, 64px); align-items: start; }
@media (max-width: 1024px) { .rt-view__body { grid-template-columns: 1fr; } }
.rt-block + .rt-block { margin-top: 44px; }
.rt-block h2, .rt-inquiry h2, .rt-related h2 { margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--gw-ink, #111); font-size: 19px; font-weight: 700; color: var(--gw-ink, #111); }
.rt-spec { width: 100%; border-collapse: collapse; font-size: 15px; }
.rt-spec th, .rt-spec td { padding: 12px 14px; border-bottom: 1px solid var(--gw-line, #e5e7eb); text-align: left; vertical-align: top; }
.rt-spec th { width: 18%; background: var(--gw-surface, #f8f8f7); font-weight: 600; color: var(--gw-muted, #555); white-space: nowrap; }
@media (max-width: 640px) {
  .rt-spec, .rt-spec tbody, .rt-spec tr { display: block; }
  .rt-spec tr { display: grid; grid-template-columns: 110px 1fr; }
  .rt-spec th, .rt-spec td { width: auto; }
}
.rt-desc { line-height: 1.85; }
.rt-photos { display: grid; gap: 14px; list-style: none; margin: 0; padding: 0; }
.rt-photos figure { margin: 0; }
.rt-photos img { width: 100%; border-radius: var(--gw-radius, 6px); }
.rt-photos figcaption { margin-top: 6px; font-size: 13px; color: var(--gw-muted, #666); }
.rt-map { width: 100%; height: 340px; margin: 12px 0; border: 0; border-radius: var(--gw-radius, 6px); }
.rt-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 6px; }
.rt-links a { padding: 8px 14px; border: 1px solid var(--gw-line, #d1d5db); border-radius: 999px; font-size: 14px; color: var(--gw-ink, #111); text-decoration: none; }
.rt-links__naver { border-color: #03c75a !important; color: #03a14a !important; font-weight: 700; }

.rt-view__side { position: sticky; top: calc(var(--rf-hh, 0px) + 20px); display: grid; gap: 20px; }
@media (max-width: 1024px) { .rt-view__side { position: static; } }
.rt-inquiry, .rt-agent { padding: 22px; border: 1px solid var(--gw-line, #e5e7eb); border-radius: var(--gw-radius, 8px); background: var(--gw-bg, #fff); }
.rt-inquiry h2 { font-size: 18px; }
.rt-form { gap: 14px; margin-top: 14px; }
.rt-form .gw-input { min-height: 44px; font-size: 15px; }
.rt-agent__head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.rt-agent__head img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.rt-agent__head b { display: block; font-size: 16px; }
.rt-agent__head span { font-size: 13px; color: var(--gw-muted, #666); }
.rt-agent dl { display: grid; gap: 6px; margin: 0; font-size: 14px; }
.rt-agent dl div { display: grid; grid-template-columns: 82px 1fr; gap: 8px; }
.rt-agent dt { color: var(--gw-muted, #777); }
.rt-agent dd { margin: 0; }
.rt-related { margin-top: clamp(48px, 7vw, 88px); }

.rt-lightbox { width: min(1200px, 96vw); max-height: 94vh; padding: 0; border: 0; background: transparent; overflow: visible; }
.rt-lightbox::backdrop { background: rgba(0, 0, 0, .88); }
.rt-lightbox img { display: block; max-width: 100%; max-height: 90vh; margin: auto; object-fit: contain; }
.rt-lightbox__close { position: fixed; right: 18px; top: 14px; width: 44px; height: 44px; border: 0; background: none; color: #fff; font-size: 38px; cursor: pointer; }
.rt-lightbox__nav { position: fixed; top: 50%; translate: 0 -50%; width: 52px; height: 52px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .15); color: #fff; font-size: 30px; cursor: pointer; }
.rt-lightbox__nav--prev { left: 16px; } .rt-lightbox__nav--next { right: 16px; }

.rt-mobilebar { display: none; }
@media (max-width: 767px) {
  .rt-mobilebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: 1fr 1fr; background: var(--gw-primary, #111); box-shadow: 0 -4px 16px rgba(0, 0, 0, .12); }
  .rt-mobilebar a { padding: 15px 0 calc(15px + env(safe-area-inset-bottom)); text-align: center; font-weight: 700; color: var(--gw-primary-ink, #fff); text-decoration: none; }
  .rt-mobilebar a + a { border-left: 1px solid rgba(255, 255, 255, .2); }
  .rt-view { padding-bottom: 120px; }
}
