*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --blue: #0c4da2; --blue-dark: #093a7a; --blue-light: #e8f0fe; --blue-50: #f0f5ff;
  --orange: #ff6b35; --orange-dark: #e55a28; --orange-light: #fff3ee;
  --gray-50: #f9fafb; --gray-100: #f3f4f6; --gray-200: #e5e7eb; --gray-300: #d1d5db;
  --gray-400: #9ca3af; --gray-500: #6b7280; --gray-600: #4b5563;
  --gray-700: #374151; --gray-800: #1f2937; --gray-900: #111827;
  --radius: 12px; --radius-sm: 8px; --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,.08); --shadow-md: 0 4px 12px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.12);
  --container: 880px;
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--gray-800); line-height: 1.6; background: #fff;
  -webkit-font-smoothing: antialiased; padding-bottom: 80px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ===== NAV ===== */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.95); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-200); height: 56px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 20px;
}
.nav-back {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--gray-600); transition: color 0.2s;
}
.nav-back:hover { color: var(--blue); }
.nav-back svg { width: 18px; height: 18px; stroke: currentColor; }
.nav-logo { font-size: 16px; font-weight: 800; color: var(--blue); }
.nav-logo span { color: var(--gray-800); }
.nav-cta {
  padding: 7px 16px; border-radius: 20px; background: var(--orange);
  color: #fff; font-size: 12px; font-weight: 700; transition: background 0.2s;
}
.nav-cta:hover { background: var(--orange-dark); }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  display: flex; align-items: center; gap: 6px; padding: 14px 0;
  font-size: 13px; color: var(--gray-400); flex-wrap: wrap;
}
.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb .current { color: var(--gray-700); font-weight: 600; }

/* ===== GALLERY ===== */
.gallery-hero {
  width: 100%; aspect-ratio: 16/9; border-radius: var(--radius-lg);
  overflow: hidden; cursor: pointer; position: relative; background: var(--gray-100);
}
.gallery-hero img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.gallery-hero:hover img { transform: scale(1.03); }
.gallery-count {
  position: absolute; bottom: 12px; right: 12px;
  background: rgba(0,0,0,0.55); color: #fff; font-size: 12px; font-weight: 600;
  padding: 4px 12px; border-radius: 20px;
}
.gallery-thumbs {
  display: flex; gap: 8px; margin-top: 8px; overflow-x: auto;
  scrollbar-width: none;
}
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumb {
  flex-shrink: 0; width: 100px; height: 68px; border-radius: var(--radius-sm);
  overflow: hidden; cursor: pointer; border: 2px solid transparent; transition: all 0.2s;
  background: var(--gray-100);
}
.gallery-thumb.active { border-color: var(--blue); }
.gallery-thumb:hover { border-color: var(--blue); opacity: 0.85; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ===== PRICE HERO ===== */
.price-hero { padding: 28px 0 24px; border-bottom: 1px solid var(--gray-200); }
.price-badges { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.price-badge { padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.badge-type { background: var(--blue-light); color: var(--blue); }
.badge-hot { background: var(--orange-light); color: var(--orange); }
.badge-status { background: #dcfce7; color: #16a34a; }
.price-name {
  font-size: clamp(22px, 4vw, 30px); font-weight: 800; color: var(--gray-900);
  margin-bottom: 4px; letter-spacing: -0.03em;
}
.price-address { font-size: 14px; color: var(--gray-500); margin-bottom: 16px; }
.price-main {
  font-size: clamp(28px, 5vw, 38px); font-weight: 900; color: var(--blue);
  letter-spacing: -0.03em; margin-bottom: 4px;
}
.price-main .label {
  font-size: 14px; font-weight: 600; color: #fff; background: var(--blue);
  padding: 3px 10px; border-radius: 4px; margin-right: 10px;
}
.price-sub { font-size: 14px; color: var(--gray-400); }
.price-sub strong { color: var(--gray-600); }

/* ===== SECTION COMMON ===== */
.detail-section { padding: 28px 0; border-bottom: 1px solid var(--gray-100); }
.section-heading {
  font-size: 18px; font-weight: 800; color: var(--gray-900); margin-bottom: 18px;
  display: flex; align-items: center; gap: 8px;
}
.section-heading::before {
  content: ''; width: 4px; height: 18px; background: var(--blue); border-radius: 2px;
}

/* ===== INFO GRID ===== */
.info-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--gray-200); border-radius: var(--radius); overflow: hidden;
}
.info-item { background: #fff; padding: 16px 18px; }
.info-label { font-size: 12px; color: var(--gray-400); font-weight: 500; margin-bottom: 4px; }
.info-value { font-size: 15px; font-weight: 700; color: var(--gray-800); }

/* ===== FLOORPLAN ===== */
.floorplan-img {
  width: 100%; max-width: 500px; margin: 0 auto; aspect-ratio: 4/3;
  background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  gap: 8px; color: var(--gray-400);
}
.floorplan-specs {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 20px;
}
.fp-spec {
  background: var(--gray-50); border-radius: var(--radius-sm); padding: 14px 16px;
  border: 1px solid var(--gray-100);
}
.fp-spec .label { font-size: 12px; color: var(--gray-400); margin-bottom: 2px; }
.fp-spec .value { font-size: 15px; font-weight: 700; color: var(--gray-800); }

/* ===== DESCRIPTION ===== */
.desc-text { font-size: 15px; color: var(--gray-600); line-height: 1.9; }
.desc-text p { margin-bottom: 12px; }

/* ===== PAYMENT TABLE ===== */
.payment-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.payment-table th {
  background: var(--blue); color: #fff; padding: 10px 14px;
  font-weight: 600; text-align: left; font-size: 12px;
}
.payment-table td {
  padding: 10px 14px; border-bottom: 1px solid var(--gray-100); color: var(--gray-700);
}
.payment-table td.amount { font-weight: 700; color: var(--blue); text-align: right; }
.payment-table tbody tr:hover { background: var(--blue-50); }

/* ===== MAP ===== */
.map-placeholder {
  width: 100%; height: 240px; border-radius: var(--radius);
  background: var(--gray-50); border: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 8px; color: var(--gray-400); margin-bottom: 20px;
}
.transport-list { display: flex; flex-direction: column; gap: 10px; }
.transport-item {
  display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--gray-600);
}
.transport-icon {
  width: 32px; height: 32px; border-radius: 8px; display: flex;
  align-items: center; justify-content: center; font-size: 13px; font-weight: 800; flex-shrink: 0;
}
.transport-icon.subway { background: var(--blue-light); color: var(--blue); }
.transport-icon.bus { background: #dcfce7; color: #16a34a; }
.transport-icon.school { background: #fef9c3; color: #a16207; }
.transport-icon.amenity { background: #f3e8ff; color: #7c3aed; }

/* ===== COMPARISON ===== */
.compare-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare-table th {
  background: var(--gray-50); padding: 10px 14px; font-weight: 600;
  color: var(--gray-500); text-align: left; font-size: 12px;
  border-bottom: 2px solid var(--gray-200);
}
.compare-table td {
  padding: 10px 14px; border-bottom: 1px solid var(--gray-100); color: var(--gray-700);
}
.compare-table td.price { font-weight: 700; color: var(--blue); }
.compare-table .highlight { background: var(--blue-50); }

/* ===== AGENT ===== */
.agent-card {
  display: flex; gap: 16px; align-items: center; padding: 20px;
  background: var(--gray-50); border-radius: var(--radius); border: 1px solid var(--gray-200);
  margin-bottom: 16px;
}
.agent-photo {
  width: 60px; height: 60px; border-radius: 50%; background: var(--gray-200);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: var(--gray-400); flex-shrink: 0; overflow: hidden;
}
.agent-photo img { width: 100%; height: 100%; object-fit: cover; }
.agent-name { font-size: 16px; font-weight: 800; color: var(--gray-900); }
.agent-office { font-size: 13px; color: var(--gray-500); margin-top: 2px; }
.agent-phone { font-size: 14px; color: var(--blue); font-weight: 600; margin-top: 4px; }
.agent-hours { font-size: 12px; color: var(--gray-400); margin-top: 2px; }
.agent-btns { display: flex; gap: 10px; }
.agent-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 14px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
}
.agent-btn-call { background: var(--blue); color: #fff; }
.agent-btn-call:hover { background: var(--blue-dark); }
.agent-btn-kakao { background: #fee500; color: #191919; }
.agent-btn-kakao:hover { background: #fdd835; }
.agent-btn-register { background: var(--orange); color: #fff; }
.agent-btn-register:hover { background: var(--orange-dark); }

/* ===== REGISTER CTA ===== */
.register-cta {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  border-radius: var(--radius); padding: 32px; text-align: center; margin-top: 8px;
}
.register-cta h3 { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.register-cta p { font-size: 14px; color: rgba(255,255,255,0.7); margin-bottom: 20px; }
.register-cta .cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: 28px; background: var(--orange);
  color: #fff; font-size: 16px; font-weight: 800; transition: all 0.2s;
  border: none; cursor: pointer;
}
.register-cta .cta-btn:hover { background: var(--orange-dark); transform: translateY(-2px); }

/* ===== LEGAL ===== */
.legal { padding: 24px 0; }
.legal-title { font-size: 13px; font-weight: 700; color: var(--gray-500); margin-bottom: 8px; }
.legal-text { font-size: 12px; color: var(--gray-400); line-height: 1.8; }

/* ===== MOBILE STICKY BAR ===== */
.sticky-bar {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: #fff; border-top: 1px solid var(--gray-200); padding: 10px 16px;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
}
.sticky-bar-inner { display: flex; gap: 8px; max-width: var(--container); margin: 0 auto; }
.sticky-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 12px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all 0.2s; border: none;
}
.sticky-btn-call { background: var(--blue); color: #fff; }
.sticky-btn-kakao { background: #fee500; color: #191919; }
.sticky-btn-register { background: var(--orange); color: #fff; }

/* ===== LIGHTBOX ===== */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.92); align-items: center; justify-content: center;
  flex-direction: column; cursor: pointer;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 90vw; max-height: 80vh; object-fit: contain; border-radius: var(--radius); }
.lightbox-close {
  position: absolute; top: 16px; right: 16px; color: #fff; font-size: 28px;
  cursor: pointer; width: 44px; height: 44px; display: flex;
  align-items: center; justify-content: center; background: rgba(255,255,255,0.1);
  border-radius: 50%;
}
.lightbox-close:hover { background: rgba(255,255,255,0.2); }
.lightbox-nav { display: flex; gap: 16px; margin-top: 16px; }
.lightbox-nav button {
  background: rgba(255,255,255,0.15); color: #fff; border: none;
  width: 44px; height: 44px; border-radius: 50%; font-size: 20px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.lightbox-nav button:hover { background: rgba(255,255,255,0.3); }
.lightbox-counter { color: rgba(255,255,255,0.5); font-size: 13px; margin-top: 8px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .sticky-bar { display: block; }
  body { padding-bottom: 140px; }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .floorplan-specs { grid-template-columns: 1fr; }
  .agent-btns { flex-direction: column; }
  .gallery-hero { border-radius: 0; }
  .container { padding: 0 16px; }
  .register-cta { padding: 24px 16px; }
}
