/* same tokens as the homepage */
:root {
  --white: #ffffff; --light: #f7f4f2; --pill: #f3efec; --ink: #282420; --ink-2: #18181b;
  --yellow: #f4e75a; --line: #ece7e1; --sub: #8a8178;
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--light); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.4; word-break: keep-all; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.045em; }
[hidden] { display: none !important; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 14px 22px; border-radius: 23px; font-size: 14px; line-height: 14px; letter-spacing: -0.5px; background: var(--pill); color: var(--ink); white-space: nowrap; border: 0; cursor: pointer; font-family: inherit; }
.btn.y { background: var(--yellow); }

nav { height: 64px; padding: 16px; display: flex; align-items: center; justify-content: space-between; background: var(--white); }
.brand { font-size: 18px; font-weight: 500; letter-spacing: -0.72px; }
.nav-r { display: flex; gap: 8px; }
nav .btn { padding: 10px 18px; }
nav .btn.ghost { background: transparent; }
@media (max-width: 420px) { nav .btn { padding: 10px 12px; font-size: 13px; } nav .btn.ghost { display: none; } }

main { padding: 32px 16px 80px; max-width: 1320px; margin: 0 auto; }
.head h1 { font-size: 34px; line-height: 1.2; }
.head p { margin-top: 10px; color: #6f675f; font-size: 15px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 28px; }
.group { display: flex; flex-wrap: wrap; gap: 6px; }
.group button { padding: 9px 16px; border-radius: 20px; border: 1px solid #e3ddd7; background: var(--white); font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; }
.group button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.count { margin-top: 20px; font-size: 14px; color: var(--sub); }

/* cards (same look as the homepage) */
.cards { display: grid; gap: 10px; margin-top: 14px; }
.card { background: var(--white); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; gap: 20px; padding-bottom: 24px; transition: transform .2s ease, box-shadow .2s ease; }
a.card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(40,36,32,.08); }
.card .ph { position: relative; aspect-ratio: 433 / 311; background: #e9e4de; display: flex; align-items: center; justify-content: center; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; }
.noimg { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #a39a90; font-size: 14px; }
.noimg svg { width: 32px; height: 32px; }
.chips { position: absolute; right: 16px; bottom: 16px; display: flex; gap: 8px; }
.chips span { padding: 8px 12px; border-radius: 28px; background: rgba(40,36,32,.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; font-size: 13px; line-height: 15.6px; letter-spacing: -0.5px; border: 1px solid rgba(255,255,255,.15); }
.card .body { padding: 0 16px; display: flex; flex-direction: column; gap: 6px; }
.card .price { font-size: 20px; font-weight: 600; letter-spacing: -0.4px; }
.card h3 { font-size: 22px; line-height: 1.25; color: var(--ink-2); }
.where { font-size: 14px; color: var(--sub); }
.spec { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 10px; font-size: 15px; font-weight: 500; }
.spec > span { display: inline-flex; align-items: center; gap: 6px; }
.spec .ic { display: inline-flex; }
.spec svg { width: 20px; height: 20px; }

.empty, .gone { background: var(--white); border-radius: 16px; padding: 48px 24px; text-align: center; margin-top: 24px; }
.empty h2, .gone h1 { font-size: 24px; }
.empty p, .gone p { margin: 12px auto 24px; max-width: 420px; color: #6f675f; font-size: 15px; }

/* detail */
.back { display: inline-block; font-size: 14px; color: var(--sub); margin-bottom: 16px; }
#detail { display: grid; gap: 24px; }
.gallery { display: flex; flex-direction: column; gap: 8px; }
.main-ph { aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: #e9e4de; display: flex; align-items: center; justify-content: center; }
.main-ph img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.thumbs button { flex: 0 0 auto; width: 76px; height: 57px; border-radius: 8px; overflow: hidden; padding: 0; border: 2px solid transparent; background: none; cursor: pointer; }
.thumbs button[aria-current="true"] { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.info { background: var(--white); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.info .top { display: flex; flex-direction: column; gap: 8px; }
.info .chips { position: static; }
.info .chips span { background: var(--light); color: var(--ink); border: 0; backdrop-filter: none; }
.info .price { font-size: 26px; font-weight: 700; letter-spacing: -0.6px; }
.info h1 { font-size: 22px; line-height: 1.3; color: var(--ink-2); }
.info h2 { font-size: 18px; }
.video { position: relative; border-radius: 12px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.video { margin-top: 8px; }
.video.vert { aspect-ratio: 9 / 16; width: min(100%, 380px); align-self: center; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.desc { font-size: 15px; line-height: 1.6; color: #4b443d; white-space: pre-line; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0; font-size: 14px; line-height: 1.4; }
.facts dt { color: var(--sub); white-space: nowrap; }
.facts dd { margin: 0; color: var(--ink-2); }
.office { border-top: 1px solid var(--line); padding-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.office a[href^="tel:"] { text-decoration: underline; text-underline-offset: 2px; }
.office .btn.call { text-decoration: none; align-self: flex-start; }
.upd { font-size: 12px; color: var(--sub); }

footer { padding: 32px 16px 40px; font-size: 12px; line-height: 1.6; color: #6f675f; text-align: center; }

@media (min-width: 900px) {
  nav { height: 66px; padding: 16px 48px; }
  main { padding: 56px 60px 120px; }
  .head h1 { font-size: 48px; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  #detail { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; }
  #detail .back { grid-column: 1 / -1; margin-bottom: 0; }
  .info { position: sticky; top: 24px; padding: 32px; }
  .info .price { font-size: 30px; }
  .info h1 { font-size: 26px; }
}

/* phone: price and facts right after the photos, the video below them */
@media (max-width: 899px) {
  #detail { gap: 8px; }
  .gallery { display: contents; }
  .main-ph { order: 1; } .thumbs { order: 2; } .info { order: 3; margin-top: 16px; } .video { order: 4; margin-top: 16px; }
  #detail .back { order: 0; }
}
