/**
 * ┌─────────────────────────────────────────────────────────────────────┐
 * │  FILE INDEX — 여수뉴스포털                                          │
 * ├──────────────┬──────────────────────────────────────────────────────┤
 * │  파일명      │  realestate.css                                           │
 * │  위치        │  /deal/assets/css/realestate.css                                        │
 * │  생성일      │  2026-05-16                                           │
 * │  수정일      │  2026-05-16                                           │
 * │  버전        │  v1.0                                                 │
 * ├──────────────┼──────────────────────────────────────────────────────┤
 * │  기능/역할   │  스타일시트 — 포털·컴포넌트별 규칙 적용               │
 * ├──────────────┼──────────────────────────────────────────────────────┤
 * │  레이아웃    │  기준 너비: 1200px (전역·포털 변수와 연동)            │
 * │  섹터 구조   │  .sector-wrap width:100% — 다열은 .sector-inner (원칙2) │
 * │  폰트 기준   │  최소 14px (--fs-base 등 변수 연동)                 │
 * ├──────────────┼──────────────────────────────────────────────────────┤
 * │  연관 파일   │  load-by  : header.php·포털 레이아웃 (상이)            │
 * │              │  변수 주입: echoLayoutVars()·포털 CSS (해당 시)       │
 * ├──────────────┼──────────────────────────────────────────────────────┤
 * │  참조 사항   │  /docs/PROJECT_RULES.md 원칙8·포털 CSS 접두 규칙       │
 * ├──────────────┼──────────────────────────────────────────────────────┤
 * │  변경 이력   │  2026-05-16 v1.0 - FILE INDEX 일괄 부여                     │
 * └──────────────┴──────────────────────────────────────────────────────┘
 */

/* ── CSS 변수 (포털 accent SSOT — 하드코딩 주황 폐기) ── */
:root {
  --re-primary:      var(--pls-accent, var(--pub-accent, #e67e22));
  --re-primary-dark: var(--pls-accent, #c0392b);
  --re-blue:         #2563eb;
  --re-green:        #16a34a;
  --re-red:          #dc2626;
  --re-purple:       #7c3aed;
  --re-gray:         #64748b;
  --re-bg:           #f8fafc;
  --re-white:        #ffffff;
  --re-border:       #e2e8f0;
  --re-text:         #1e293b;
  --re-muted:        #64748b;
  --re-radius:       10px;
  --re-shadow:       0 2px 8px rgba(0,0,0,.08);
  --re-shadow-lg:    0 6px 24px rgba(0,0,0,.12);
}

/* 레거시 re-subnav / re-page-header / re-type-tabs / re-filter / red-* / rew-* 폐기
   — list=deal-ssot+pls · write=deal-write-ssot+pw · detail=mkt-* 상세 스킨 */

/* ══ 콘텐츠 (목록 — 우측 .pub-sidebar 는 shell SSOT, 본문 1열) ══ */
.re-list-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.re-list-total { font-size:15px; color:#64748b; }
.re-sort-sel { padding:5px 10px; border:1.5px solid #e2e8f0; border-radius:8px; font-size:15px; background:#fff; }

/* ── 카드 그리드 (3열) ── */
.re-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.re-card { display:flex; flex-direction:column; background:#fff; border-radius:12px; border:1.5px solid #f1f5f9; overflow:hidden; box-shadow:0 1px 4px rgba(0,0,0,.06); text-decoration:none; color:#1e293b; transition:all .18s; }
.re-card:hover { border-color:#fed7aa; box-shadow:0 4px 14px rgba(230,126,34,.12); transform:translateY(-2px); }

/* 썸네일 */
.re-card-thumb { position:relative; width:100%; padding-top:70%; background:#f8fafc; overflow:hidden; }
.re-card-thumb img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; transition:transform .3s; }
.re-card:hover .re-card-thumb img { transform:scale(1.04); }
.re-thumb-blank { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:32px; color:#cbd5e1; }
.re-sold-overlay { position:absolute; inset:0; background:rgba(0,0,0,.55); display:flex; align-items:center; justify-content:center; color:#fff; font-size:14px; font-weight:700; }

/* 뱃지 */
.re-deal-badge { position:absolute; top:8px; left:8px; padding:3px 9px; border-radius:6px; font-size:14px; font-weight:700; z-index:3; }
.re-prop-badge { position:absolute; top:8px; right:8px; padding:3px 9px; border-radius:6px; font-size:14px; font-weight:700; background:rgba(0,0,0,.45); color:#fff; z-index:3; }
.re-badge-sale  { background:#fee2e2; color:#dc2626; }
.re-badge-rent  { background:#dbeafe; color:#2563eb; }
.re-badge-lease { background:#d1fae5; color:#059669; }
.re-badge-short { background:#ede9fe; color:#7c3aed; }
.re-badge-new   { background:#fff3cd; color:#b45309; }

/* 카드 본문 */
.re-card-body { padding:12px 13px 14px; }
.re-card-region { font-size:14px; color:#94a3b8; margin-bottom:3px; }
.re-card-title { font-size:15px; font-weight:700; margin-bottom:6px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.re-card-price { font-size:17px; font-weight:800; color:var(--re-primary); margin-bottom:5px; }
.re-card-area { font-size:14px; color:#94a3b8; display:flex; flex-wrap:wrap; gap:6px; margin-bottom:4px; }
.re-card-features { display:flex; flex-wrap:wrap; gap:4px; margin-bottom:4px; }
.re-feat-tag { display:inline-block; padding:2px 7px; background:#f1f5f9; color:#64748b; border-radius:4px; font-size:14px; }
.re-card-meta { font-size:14px; color:#94a3b8; display:flex; flex-wrap:wrap; gap:8px; padding-top:8px; border-top:1px solid #f1f5f9; }

/* ── 사이드바 ── */
.re-sb-box { background:#fff; border:1.5px solid #f1f5f9; border-radius:14px; padding:18px; margin-bottom:16px; box-shadow:0 1px 4px rgba(0,0,0,.05); }
.re-sb-title { font-size:14px; font-weight:700; color:#1e293b; margin-bottom:14px; }

/* ── 거래완료 뱃지 ── */
.re-badge-sold { background:#e2e8f0; color:#64748b; }

/* ── 빈 상태 (pl-empty SSOT 동형) ── */
.pl-empty.re-empty,
.re-empty { grid-column:1/-1; text-align:center; padding:60px 24px; background:#f8fafc; border-radius:14px; color:#94a3b8; }
.pl-empty.re-empty i,
.re-empty i { font-size:32px; display:block; margin-bottom:10px; }

/* ── 페이지네이션 ── */
.re-pagination { display:flex; align-items:center; justify-content:center; gap:4px; margin-top:28px; grid-column:1/-1; }
.re-pag-btn { display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; border-radius:8px; font-size:15px; text-decoration:none; font-weight:500; background:#fff; color:#475569; border:1.5px solid #e2e8f0; transition:all .15s; }
.re-pag-btn:hover  { border-color:var(--re-primary); color:var(--re-primary); }
.re-pag-btn.active { background:var(--re-primary); color:#fff; border-color:var(--re-primary); }
.re-pag-btn.disabled { opacity:.4; pointer-events:none; }

@media (max-width:860px) { .re-sidebar{display:none;} }
@media (max-width:600px) { .re-grid{grid-template-columns:repeat(2,1fr);} }
@media (max-width:400px) {
  .re-grid { grid-template-columns: 1fr; }
  .deal-ssot-shell .re-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ═══════════════════════════════
   상세보기 공통 – 마켓 구조 통일
═══════════════════════════════ */

/* mkt-detail-wrap 폐기 — shell .pub-content-wrap 그리드 SSOT */
.mkt-gallery-main { width:100%; border-radius:14px; overflow:hidden; background:#1e293b; }
.mkt-gallery-main img { width:100%; aspect-ratio:4/3; object-fit:cover; display:block; cursor:zoom-in; }
.mkt-gallery-blank { width:100%; aspect-ratio:4/3; display:flex; align-items:center; justify-content:center; font-size:32px; color:#4b5563; background:#f8fafc; border-radius:14px; }
.mkt-detail-h1 { font-size:20px; font-weight:800; color:#1e293b; margin:16px 0 10px; }
.mkt-price-box { background:var(--re-bg); border:1.5px solid #fed7aa; border-radius:12px; padding:14px 18px; margin-bottom:16px; }
.mkt-price-main { font-size:24px; font-weight:800; color:var(--re-primary); }
.mkt-info-table { width:100%; border-collapse:collapse; margin-bottom:18px; }
.mkt-info-table th, .mkt-info-table td { padding:8px 12px; border-bottom:1px solid #f1f5f9; font-size:15px; text-align:left; }
.mkt-info-table th { color:#64748b; font-weight:600; width:80px; background:#f8fafc; }
.mkt-desc-box { background:#fff; border:1.5px solid #f1f5f9; border-radius:12px; padding:16px; margin-bottom:16px; }
.mkt-desc-box h3 { font-size:15px; font-weight:700; margin:0 0 10px; }
.mkt-desc-box p  { font-size:14px; line-height:1.8; color:#374151; white-space:pre-wrap; margin:0; }
.mkt-nav-row { display:flex; gap:8px; margin-top:20px; flex-wrap:wrap; }
.mkt-nav-btn { flex:1; padding:10px 14px; border-radius:9px; font-size:15px; font-weight:600; border:1.5px solid #e2e8f0; background:#fff; color:#475569; cursor:pointer; text-decoration:none; text-align:center; transition:all .15s; white-space:nowrap; }
.mkt-nav-btn:hover { border-color:var(--re-primary); color:var(--re-primary); }
.mkt-nav-btn.danger { border-color:#dc2626; color:#dc2626; }
.mkt-nav-btn.danger:hover { background:#dc2626; color:#fff; }
.mkt-contact-card { background:#fff; border:1.5px solid #f1f5f9; border-radius:14px; padding:18px; box-shadow:0 1px 4px rgba(0,0,0,.05); }
.mkt-contact-card h3 { font-size:14px; font-weight:700; margin:0 0 12px; }
.mkt-contact-phone { font-size:18px; font-weight:800; color:var(--re-primary); margin-bottom:12px; }
.mkt-call-btn { display:block; width:100%; padding:10px; border-radius:9px; background:var(--re-primary); color:#fff; font-size:14px; font-weight:700; text-align:center; text-decoration:none; box-sizing:border-box; transition:background .15s; }
.mkt-call-btn:hover { background:var(--re-primary-dark); }


/* 반응형 — re-grid 2/3열 유지 */
@media (max-width:860px) { .re-sidebar{display:none;} }
@media (max-width:600px) { .re-grid{grid-template-columns:repeat(2,1fr);} }
@media (max-width:640px) {
  .re-grid { grid-template-columns: 1fr; }
  .deal-ssot-shell .re-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ── Mobile-First 보정 — SSOT 셸·re-grid 는 1열 강제 제외 ── */
@media (max-width: 768px) {
  [class*="-page-header"],[class*="-hd"],[class*="-header-inner"] { flex-wrap: wrap !important; }
  [class*="-sidebar"]:not(.pub-sidebar):not(.ct-tree--sidebar),[class*="-side-col"] { display: none !important; }
  [class*="-content-wrap"]:not(.pub-content-wrap),[class*="-detail-wrap"],[class*="-body-wrap"] { grid-template-columns: 1fr !important; }
  [class*="-grid"]:not([class*="-1"]):not(.re-grid):not(.deal-submenu-grid):not(.pls-nav-grid):not(.pls-chips--type):not(.deal-ssot-chips--type) {
    grid-template-columns: repeat(auto-fill, minmax(280px,1fr)) !important;
  }
  [class*="-search"] input, [class*="-filter"] input, [class*="-filter"] select { font-size: 16px !important; min-height: 44px !important; }
  [class*="-btn"]:not([class*="-icon"]):not([class*="-sm-icon"]) { min-height: 44px; }
  [class*="-list-item"],[class*="-card"] { flex-wrap: wrap !important; }
  [class*="-list-thumb"],[class*="-card-img"] { width: 100% !important; max-height: 200px !important; object-fit: cover; }
  [class*="-meta"],[class*="-tags"] { flex-wrap: wrap !important; }
}
@media (max-width: 480px) {
  [class*="-grid"]:not(.re-grid):not(.deal-submenu-grid):not(.pls-nav-grid):not(.pls-chips--type):not(.deal-ssot-chips--type) { grid-template-columns: 1fr !important; }
  .deal-ssot-shell .pls-nav-grid,
  .deal-ssot-shell .deal-ssot-nav-row { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .deal-ssot-shell .pls-chips--type,
  .deal-ssot-shell .deal-ssot-chips--type { grid-template-columns: repeat(var(--pls-chip-cols-m, var(--pls-chip-cols, 2)), minmax(0, 1fr)) !important; }
  [class*="-card-grid"],[class*="-view-card"] { grid-template-columns: 1fr !important; }
  .deal-ssot-shell .re-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
