/* ═══ /homes/{slug} — property detail (antique design system from styles.css + guide.css) ═══ */
.home-main { min-height: 60vh; }
.home-loading { padding: 200px 0 120px; text-align: center; }
.home-loading svg { width: 72px; height: 72px; color: var(--gold); opacity: 0.5; animation: homePulse 1.6s ease-in-out infinite; }
@keyframes homePulse { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.7; } }

/* ── Hero ── */
.home-hero { position: relative; overflow: hidden; padding: 112px 0 32px; background: var(--bg-light); }
.home-crumbs { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 18px; }
.home-crumbs a { color: var(--lacquer); }
.home-crumbs a:hover { text-decoration: underline; }
.home-title-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 24px; position: relative; z-index: 1; }
.home-title-row .section-pre { margin-bottom: 8px; }
.home-title { font-family: var(--font-heading); font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; line-height: 1.1; color: var(--text-dark); }
.home-tagline { font-family: var(--font-heading); font-style: italic; font-size: 1.3rem; color: var(--text-muted); margin-top: 8px; }
.home-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.home-tags .property-tag { position: static; border: 1px solid var(--line); }
.home-price-box { background: var(--bg-card); border: 1px solid var(--gold); outline: 1px solid var(--gold); outline-offset: -5px; padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; min-width: 260px; text-align: center; }
.home-price { font-family: var(--font-heading); font-size: 2rem; font-weight: 600; color: var(--lacquer); line-height: 1; margin-bottom: 6px; }
.home-price span { font-family: var(--font-body); font-size: 0.8rem; color: var(--text-muted); margin-left: 6px; }
.home-price-box .btn { justify-content: center; padding: 12px 20px; font-size: 0.9rem; }
.btn-outline-dark { background: transparent; color: var(--text-dark); border-color: var(--gold); }
.btn-outline-dark:hover { background: var(--bg-cream); border-color: var(--lacquer); }
.home-ota { font-size: 0.75rem; color: var(--text-muted); }
.home-ota a { color: var(--lacquer); border-bottom: 1px solid var(--lacquer); }

.home-gallery { display: grid; gap: 8px; height: 460px; position: relative; z-index: 1; }
.home-gallery.g0 { height: 300px; background: var(--bg-cream); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.home-gallery.g0 svg { width: 120px; height: 120px; color: var(--gold); opacity: 0.5; }
.home-gallery.g1 { grid-template-columns: 1fr; }
.home-gallery.g2 { grid-template-columns: 2fr 1fr; }
.home-gallery.g3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.home-gallery.g3 .home-photo:first-child { grid-row: span 2; }
.home-gallery.g4 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.home-gallery.g4 .home-photo:first-child { grid-row: span 2; }
.home-gallery.g4 .home-photo:nth-child(2) { grid-column: span 2; }
.home-gallery.g5 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.home-gallery.g5 .home-photo:first-child { grid-row: span 2; }
.home-photo { border: 1px solid var(--gold); padding: 0; background: var(--bg-cream); overflow: hidden; cursor: zoom-in; }
.home-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.home-photo:hover img { transform: scale(1.04); }
.home-photos-more { position: absolute; right: 12px; bottom: 12px; background: var(--bg-dark); color: var(--text-light); border: 1px solid var(--gold); padding: 8px 14px; font-family: var(--font-body); font-size: 0.8rem; font-weight: 600; cursor: pointer; }

/* ── Facts strip ── */
.home-facts { display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 22px 24px; margin-top: 8px; border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold); font-size: 0.9rem; }
.home-fact { display: flex; align-items: center; gap: 8px; }
.home-fact span { font-size: 1.05rem; }

/* ── Sections ── */
.home-section { padding: 56px 24px 8px; }
.home-h2 { font-family: var(--font-heading); font-size: 1.9rem; font-weight: 600; line-height: 1.2; margin-bottom: 10px; }
.home-sub { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 22px; max-width: 640px; }
.home-desc { font-size: 1rem; max-width: 760px; }
.home-section-dark { background: var(--bg-dark); border-top: 3px double var(--gold); border-bottom: 3px double var(--gold); padding: 64px 0; margin-top: 56px; position: relative; overflow: hidden; }
.home-section-dark .section-header { margin-bottom: 32px; }
.home-section-dark .section-pre { font-size: 1.3rem; letter-spacing: 1px; font-family: var(--font-heading); text-transform: none; }

/* Amenities */
.amenity-group { margin-bottom: 22px; }
.amenity-group h3 { font-size: 0.75rem; letter-spacing: 2px; text-transform: uppercase; color: var(--lacquer); margin-bottom: 10px; }
.amenity-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.amenity-item { background: var(--bg-card); border: 1px solid var(--line); padding: 12px 14px; display: flex; align-items: center; gap: 12px; font-size: 0.9rem; }
.amenity-icon { font-size: 1.15rem; width: 26px; text-align: center; flex-shrink: 0; }
.amenity-name { display: flex; flex-direction: column; flex: 1; }
.amenity-name small { font-size: 0.75rem; color: var(--text-muted); }
details.amenity-item { display: block; padding: 0; }
details.amenity-item summary { list-style: none; cursor: pointer; padding: 12px 14px; display: flex; align-items: center; gap: 12px; }
details.amenity-item summary::-webkit-details-marker { display: none; }
.amenity-more { font-size: 0.72rem; font-weight: 600; color: var(--lacquer); border-bottom: 1px solid var(--lacquer); white-space: nowrap; }
details[open].amenity-item { border-color: var(--gold); grid-column: 1 / -1; }
.amenity-howto { padding: 0 14px 14px 52px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.amenity-howto img { max-width: 320px; border: 1px solid var(--line); }
.amenity-howto .article-rich { font-size: 0.9rem; }

/* House rules */
.rule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.rule-item { background: var(--bg-card); border: 1px solid var(--line); border-left-width: 3px; padding: 14px 16px; display: flex; gap: 12px; font-size: 0.9rem; }
.rule-item.rule-allowed { border-left-color: var(--jade); }
.rule-item.rule-not_allowed { border-left-color: var(--lacquer); }
.rule-item.rule-note { border-left-color: var(--gold); }
.rule-icon { font-size: 1.2rem; flex-shrink: 0; }
.rule-kicker { font-size: 0.68rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); font-weight: 600; margin-bottom: 2px; }
.rule-item p { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; line-height: 1.5; }

/* Nearby */
.nearby-grid .place-card { color: inherit; }
.nearby-grid .place-card:hover .place-name { color: var(--lacquer); }

/* Location */
.home-address { font-size: 0.95rem; margin-bottom: 16px; }
.home-address a { color: var(--lacquer); border-bottom: 1px solid var(--lacquer); }
.home-map { width: 100%; height: 340px; border: 1px solid var(--gold); display: block; filter: sepia(0.35) saturate(0.8); }

/* Handbook teaser */
.home-handbook { background: var(--bg-cream); border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold); padding: 56px 0; margin-top: 56px; position: relative; overflow: hidden; }
.home-handbook-box { display: flex; justify-content: space-between; align-items: center; gap: 32px; position: relative; z-index: 1; }
.home-handbook-box .home-sub { margin-bottom: 14px; }
.handbook-toc { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.88rem; margin-bottom: 10px; }
.handbook-toc a { color: var(--lacquer); border-bottom: 1px solid transparent; }
.handbook-toc a:hover { border-bottom-color: var(--lacquer); }
.handbook-toc li::before { content: '§ '; color: var(--gold); }
.handbook-private { font-size: 0.82rem; color: var(--text-muted); }
.home-handbook-box .btn { flex-shrink: 0; }

/* Siblings */
.sibling-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; padding-bottom: 56px; }
.sibling-card { background: var(--bg-card); border: 1px solid var(--line); display: flex; flex-direction: column; transition: var(--transition); }
.sibling-card:hover { border-color: var(--gold); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.sibling-img { height: 150px; background: var(--bg-cream); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.sibling-img img { width: 100%; height: 100%; object-fit: cover; }
.sibling-img svg { width: 60px; height: 60px; color: var(--gold); opacity: 0.6; }
.sibling-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.sibling-body h3 { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 600; }
.sibling-body p { font-size: 0.85rem; color: var(--text-muted); }
.sibling-price { margin-top: 6px; font-weight: 600; color: var(--lacquer); font-size: 0.9rem; }
.sibling-price small { color: var(--text-muted); font-weight: 400; margin-left: 4px; }

/* Not found */
.home-notfound { padding: 160px 24px 60px; text-align: center; }
.home-notfound svg { width: 80px; height: 80px; color: var(--gold); opacity: 0.6; margin: 0 auto 16px; display: block; }
.home-notfound h1 { font-family: var(--font-heading); font-size: 2.2rem; margin-bottom: 8px; }
.home-notfound p { color: var(--text-muted); margin-bottom: 24px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 3000; background: rgba(42,31,26,0.94); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: var(--transition); }
.lightbox.active { opacity: 1; pointer-events: all; }
.lightbox img { max-width: 92vw; max-height: 84vh; border: 1px solid var(--gold); object-fit: contain; }
.lightbox-close, .lightbox-prev, .lightbox-next { position: absolute; background: var(--bg-dark); color: var(--text-light); border: 1px solid var(--gold); width: 44px; height: 44px; font-size: 1.6rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-caption { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: var(--text-light); font-size: 0.85rem; font-family: var(--font-heading); font-style: italic; }

@media (max-width: 900px) {
  .home-title-row { flex-direction: column; align-items: stretch; }
  .home-price-box { min-width: 0; }
  .home-gallery { height: auto; grid-template-columns: 1fr 1fr !important; grid-template-rows: none !important; }
  .home-gallery .home-photo { height: 160px; }
  .home-gallery .home-photo:first-child { grid-column: span 2; height: 240px; grid-row: auto !important; }
  .home-gallery.g4 .home-photo:nth-child(2) { grid-column: auto; }
  .home-handbook-box { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 768px) {
  .home-hero { padding-top: 96px; }
  .home-facts { gap: 8px 18px; font-size: 0.85rem; padding: 16px 0; }
  .home-section { padding: 40px 24px 8px; }
  .amenity-howto { padding-left: 14px; }
  .lightbox-prev, .lightbox-next { width: 36px; height: 36px; }
}

/* host contact buttons in the price box (js/contact.js) */
.home-contact-title { margin: 14px 0 6px; font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted, #777); }
.home-contacts { justify-content: flex-start; }
