/* ── Variables ─────────────────────────────────────────── */
:root {
  --navy:      #0e3348;
  --navy-dark: #0a2535;
  --red:       #dc3232;
  --white:     #ffffff;
  --bg:        #f5f5f5;
  --text:      #222222;
  --text-muted:#666666;
  --border:    #e0e0e0;
  --shadow:    0 2px 10px rgba(0,0,0,.10);
  --radius:    4px;
  --font:      'DM Sans', sans-serif;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.5; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

/* ── Header ────────────────────────────────────────────── */
.site-header {
  background: var(--navy);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-logo { display: flex; align-items: center; }
.site-logo img { display: block; height: 48px; width: auto; background: transparent; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a {
  font-size: .875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: rgba(255,255,255,.85);
  transition: color .2s;
}
.site-nav a:hover { color: var(--white); }
.lang-switcher { display: flex; gap: 6px; margin-left: 8px; }
.lang-btn {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: rgba(255,255,255,.6);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 3px;
  padding: 2px 7px;
  transition: color .2s, border-color .2s;
}
.lang-btn:hover, .lang-btn.active { color: var(--white); border-color: rgba(255,255,255,.7); }
.nav-cta {
  background: var(--red);
  color: var(--white) !important;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-weight: 600 !important;
}
.nav-cta:hover { background: #c62828 !important; }

/* ── Page wrapper ──────────────────────────────────────── */
.page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* ── Page heading ──────────────────────────────────────── */
.page-heading {
  margin-bottom: 32px;
}
.page-heading h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  padding-bottom: 10px;
  border-bottom: 3px solid var(--red);
  display: inline-block;
}

/* ── Toolbar (sort + filters + toggle) ─────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
}
.toolbar-label {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  white-space: nowrap;
  margin-right: 4px;
}
.sort-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}
.sort-list li { display: flex; align-items: center; }
.sort-list li + li::before {
  content: '/';
  color: var(--border);
  padding: 0 8px;
}
.sort-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 4px 0;
  transition: color .2s;
}
.sort-btn:hover { color: var(--navy); }
.sort-btn.active {
  color: var(--navy);
  font-weight: 700;
  border-bottom: 2px solid var(--red);
}
.sort-btn.active.desc::after { content: ' ↓'; font-size: .75rem; }
.sort-btn.active.asc::after  { content: ' ↑'; font-size: .75rem; }

.toolbar-spacer { flex: 1; }

.view-toggle { display: flex; gap: 6px; }
.view-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all .2s;
}
.view-btn:hover { border-color: var(--navy); color: var(--navy); }
.view-btn.active { background: var(--navy); border-color: var(--navy); color: var(--white); }
.view-btn svg { width: 16px; height: 16px; }

/* ── Filter bar ────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.filter-bar select {
  font-family: var(--font);
  font-size: .875rem;
  padding: 7px 28px 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.filter-bar select:focus { outline: none; border-color: var(--navy); }
.filter-reset {
  font-family: var(--font);
  font-size: .875rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 14px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all .2s;
}
.filter-reset:hover { border-color: var(--red); color: var(--red); }
.result-count {
  margin-left: auto;
  font-size: .875rem;
  color: var(--text-muted);
}

/* ── Card grid ─────────────────────────────────────────── */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 960px) {
  .listings-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .listings-grid { grid-template-columns: 1fr; }
  .site-nav { display: none; }
}

/* ── List view override ────────────────────────────────── */
.listings-grid.list-view {
  grid-template-columns: 1fr;
}
.listings-grid.list-view .card {
  display: grid;
  grid-template-columns: 280px 1fr;
  grid-template-rows: auto auto;
}
.listings-grid.list-view .card-top {
  grid-row: 1 / 3;
  height: 100%;
  min-height: 180px;
}
.listings-grid.list-view .card-top img { height: 100%; }
.listings-grid.list-view .price-box {
  grid-column: 2;
}

/* ── Card ──────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow .25s, transform .25s;
}
.card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,.16);
  transform: translateY(-3px);
}

/* Image area with hover overlay */
.card-top {
  position: relative;
  overflow: hidden;
  height: 200px;
  background: var(--navy);
}
.card-top img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.card:hover .card-top img {
  transform: scale(1.06);
}

/* "More Details" overlay */
.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(14, 51, 72, 0.80);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .3s;
}
.card:hover .card-overlay { opacity: 1; }
.card-overlay-link {
  display: inline-block;
  border: 2px solid var(--white);
  color: var(--white);
  padding: 10px 24px;
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: background .2s, color .2s;
}
.card-overlay-link:hover {
  background: var(--white);
  color: var(--navy);
}

/* Status badge */
.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--red);
  color: var(--white);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius);
  z-index: 1;
}

/* Card body */
.card-body {
  padding: 14px 16px 12px;
}
.card-title {
  font-size: .975rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-title-link:hover .card-title { color: var(--red); }
.card-location {
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Icon row */
.card-icons {
  display: flex;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.icon-item .icon-pic {
  width: 22px;
  height: 22px;
  color: var(--navy);
}
.icon-item .icon-value {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.icon-item .icon-label {
  font-size: .7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Price box */
.price-box {
  background: var(--navy);
  color: var(--white);
  padding: 10px 16px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .01em;
}

/* ── About page ────────────────────────────────────────── */
.about-bio {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: start;
  margin-bottom: 48px;
}
.about-text p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 1.25rem;
}
.about-photo img {
  width: 260px;
  height: auto;
  border-radius: var(--radius);
  display: block;
}
.about-awards {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.about-awards img {
  max-width: 380px;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}
@media (max-width: 600px) {
  .about-bio { grid-template-columns: 1fr; }
  .about-photo img { width: 100%; }
}

/* ── Broken image fallback ─────────────────────────────── */
img {
  background: var(--bg);
}
img[src=""], img:not([src]) {
  visibility: hidden;
}

/* ── Carousel ──────────────────────────────────────────── */
.carousel {
  position: relative;
  border-radius: var(--radius);
  background: var(--navy);
  margin-bottom: 28px;
  overflow: hidden;
}
.carousel-track {
  display: flex;
  height: 100%;
  transition: transform .4s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
.carousel-slide {
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* TEMP: source images are stretched 2x horizontally */
.ld-carousel .carousel-slide img {
  transform: scaleX(0.5);
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.85);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  transition: background .2s, opacity .2s;
  z-index: 2;
}
.carousel-btn:hover { background: var(--white); }
.carousel-prev { left: 14px; }
.carousel-next { right: 14px; }
.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.5);
  cursor: pointer;
  padding: 0;
  transition: background .2s, transform .2s;
}
.carousel-dot.active {
  background: var(--white);
  transform: scale(1.3);
}

/* ── Listing detail (modern layout) ───────────────────────── */

/* Back nav */
.ld-nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
}
.ld-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .875rem;
  color: var(--text-muted);
  transition: color .2s;
}
.ld-back:hover { color: var(--navy); }
.ld-back svg { width: 16px; height: 16px; }

/* Carousel: full-bleed, taller */
.ld-carousel {
  border-radius: 0;
  height: calc(100vh * 2 / 3);
  position: relative;
}
.ld-sold-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 10;
  background: var(--red);
  color: var(--white);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 4px;
}

/* Hero strip */
.ld-hero {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
}
.ld-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.ld-price-wrap { display: flex; flex-direction: column; gap: 12px; }
.ld-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}
.ld-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.ld-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
}
.ld-stat-icon { width: 20px; height: 20px; flex-shrink: 0; color: var(--text-muted); }
.ld-stat-val { font-weight: 700; font-size: .95rem; color: var(--text); }
.ld-stat-lbl { font-size: .8rem; color: var(--text-muted); }

/* Contact CTA button */
.btn-contact-cta {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: var(--white);
  font-weight: 700;
  font-size: .95rem;
  padding: 13px 28px;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: background .2s, transform .1s;
}
.btn-contact-cta:hover { background: #c0392b; color: var(--white); transform: translateY(-1px); }
.btn-contact-sm { padding: 9px 20px; font-size: .875rem; }

/* Body */
.ld-body {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}
.ld-title {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 6px;
}
.ld-address {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0 0 28px;
}
.ld-desc {
  font-size: .975rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

/* Accordion */
.ld-accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.ld-accordion summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--navy);
  cursor: pointer;
  background: var(--bg);
  list-style: none;
  user-select: none;
  transition: background .15s;
}
.ld-accordion summary::-webkit-details-marker { display: none; }
.ld-accordion summary:hover { background: var(--border); }
.ld-accordion[open] summary { border-bottom: 1px solid var(--border); }
.ld-chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform .2s;
}
.ld-accordion[open] .ld-chevron { transform: rotate(180deg); }
.ld-accordion-body { padding: 0; }

/* Facts table (reused inside accordion) */
.detail-facts {
  width: 100%;
  border-collapse: collapse;
}
.detail-facts th,
.detail-facts td {
  padding: 11px 20px;
  text-align: left;
  font-size: .9rem;
  border-bottom: 1px solid var(--border);
}
.detail-facts th {
  width: 42%;
  color: var(--text-muted);
  font-weight: 500;
}
.detail-facts td {
  font-weight: 600;
  color: var(--text);
}
.detail-facts tr:last-child th,
.detail-facts tr:last-child td { border-bottom: none; }

/* Extras (inclusions etc.) */
.detail-extras {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}
.detail-extras h3 {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  font-weight: 600;
  margin: 0 0 5px;
}
.detail-extras p {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text);
  margin: 0;
  line-height: 1.6;
}

/* Sticky bar */
.ld-sticky {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 99;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
  transform: translateY(-100%);
  transition: transform .25s ease;
}
.ld-sticky.visible { transform: translateY(0); }
.ld-sticky-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.ld-sticky-info { min-width: 0; }
.ld-sticky-price {
  display: block;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--navy);
  line-height: 1.2;
}
.ld-sticky-title {
  display: block;
  font-size: .8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 900px) {
  .ld-hero-inner { flex-direction: column; align-items: stretch; }
  .btn-contact-cta { text-align: center; justify-content: center; }
}
@media (max-width: 640px) {
  .ld-price { font-size: 1.5rem; }
  .ld-stats { gap: 6px; }
  .ld-stat { padding: 7px 10px; }
  .ld-stat-lbl { display: none; }
  .ld-title { font-size: 1.3rem; }
}

/* ── Footer ────────────────────────────────────────────── */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,.6);
  text-align: center;
  padding: 20px 24px;
  font-size: .8rem;
}
.site-footer p { margin: 4px 0; }
.footer-links a {
  color: rgba(255,255,255,.5);
  text-decoration: none;
}
.footer-links a:hover { color: rgba(255,255,255,.9); }

/* ── Terms page ─────────────────────────────────────── */
.terms-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 0 60px;
  line-height: 1.75;
  color: var(--text);
}
.terms-content h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 2rem 0 .5rem;
  color: var(--navy);
}
.terms-content h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.5rem 0 .4rem;
  color: var(--text);
}
.terms-content ul {
  padding-left: 1.4rem;
  margin: .5rem 0 1rem;
}
.terms-content li { margin-bottom: .4rem; }
.terms-contact {
  margin-top: 2rem;
  padding: 20px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.terms-contact a { color: var(--accent); }
.terms-lang-note {
  font-size: .9rem;
  color: var(--text-muted);
  margin-top: .5rem;
}
