:root {
  --bg: #ffffff;
  --text: #1c1c1a;
  --muted: #5f5e59;
  --line: #d9d7d0;
  --field: #8a8880;
  --accent: #1f5138;
  --accent-dark: #163b29;
  --wa: #25d366;
  --wa-dark: #1da851;
  --s1: .5rem;
  --s2: 1rem;
  --s3: 1.5rem;
  --s4: 2.5rem;
  --radius: 5px;
  --wide: 1040px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 106.25%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding-bottom: 5.5rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
p { margin: 0 0 var(--s2); }

h1, h2 {
  margin: 0 0 var(--s2);
  line-height: 1.15;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.2rem); }
h2 { font-size: clamp(1.15rem, 1.05rem + .5vw, 1.35rem); margin-top: var(--s3); }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: .15em;
}
a:hover { color: var(--accent-dark); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 var(--s2); }
.narrow { max-width: 680px; }

section { padding: var(--s3) 0 var(--s4); }
#contact { border-top: 1px solid var(--line); }
#contact h2 { margin-top: 0; }
#contact { scroll-margin-top: var(--s2); }
.muted { color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 48px;
  padding: .7rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.btn svg { flex: none; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn--secondary { background: transparent; border-color: var(--text); color: var(--text); }
.btn--secondary:hover { background: #f2f1ed; color: var(--text); }
.btn--wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn--wa:hover { background: var(--wa-dark); border-color: var(--wa-dark); color: #fff; }

.actions { display: flex; flex-direction: column; gap: var(--s1); margin: var(--s3) 0; }

/* Listing: carousel + text */
.listing { display: grid; gap: var(--s3); }

.carousel { max-width: 420px; }
.carousel__track {
  display: flex;
  overflow-x: auto;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #eeede8;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
  scroll-margin-top: var(--s2);
}
.carousel__img, .carousel__slide img, .carousel__slide iframe {
  display: block;
  width: 100%;
  height: 100%;
}
.carousel__slide img { object-fit: cover; }

.arrow {
  position: absolute;
  top: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .85);
  color: #555;
}
.arrow--prev { left: .6rem; }
.arrow--next { right: .6rem; }
.arrow:hover { background: #fff; color: var(--text); }

.carousel__dots { display: flex; justify-content: center; gap: .1rem; margin-top: .25rem; }
.carousel__dots a {
  display: grid;
  place-items: center;
  width: 28px;
  height: 44px;
}
.carousel__dots a::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c4c2ba;
}
.carousel__dots a:hover::before { background: var(--muted); }
.carousel:not(:has(.carousel__slide:target)) .dot-1::before,
.carousel:has(#m1:target) .dot-1::before,
.carousel:has(#m2:target) .dot-2::before,
.carousel:has(#m3:target) .dot-3::before,
.carousel:has(#m4:target) .dot-4::before { background: var(--text); }

/* Specificaties */
.specs { margin: var(--s2) 0 0; border-top: 1px solid var(--line); font-size: .95rem; }
.specs div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: .75rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--line);
}
.specs dt { font-weight: 600; }
.specs dd { margin: 0; }

/* Contact */
.contact { display: grid; gap: var(--s3); }
.form { display: grid; gap: var(--s2); }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; }
input, textarea {
  width: 100%;
  padding: .7rem .8rem;
  border: 1px solid var(--field);
  border-radius: var(--radius);
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: #fff;
}
textarea { resize: vertical; min-height: 8.5rem; }
.form .btn { width: 100%; }
.hp { position: absolute; left: -9999px; }

.alt { padding-top: var(--s3); border-top: 1px solid var(--line); }
.alt .btn { margin-bottom: var(--s2); }

/* Fotoviewer */
.lightbox { display: none; }
.lightbox:target {
  display: grid;
  position: fixed;
  inset: 0;
  place-items: center;
  background: rgba(0, 0, 0, .85);
  z-index: 50;
  padding: 1rem;
}
.lightbox__bg { position: absolute; inset: 0; }
.lightbox img {
  position: relative;
  z-index: 1;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 2rem);
  border-radius: var(--radius);
}
.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  text-decoration: none;
}

/* Mobiele balk */
.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: var(--s1);
  padding: .6rem .75rem calc(.6rem + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--line);
  font-size: .95rem;
}
.bar__price { color: var(--muted); font-weight: 600; white-space: nowrap; }
.bar__wa {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--wa);
  color: #fff;
}
.bar__wa:hover { background: var(--wa-dark); color: #fff; }
.bar .btn { flex: 1; min-width: 0; padding-left: .75rem; padding-right: .75rem; }

@media (max-width: 379px) {
  .bar__price { display: none; }
}

@media (min-width: 800px) {
  body { padding-bottom: 0; }
  .bar { display: none; }
  .actions { flex-direction: row; }
  .listing, .contact {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: var(--s4);
    align-items: start;
  }
  .listing { grid-template-columns: 420px minmax(0, 1fr); }
  .listing__text h1 { margin-top: 0; }
  .carousel { position: sticky; top: var(--s2); }
  .form .btn { width: auto; justify-self: start; }
  .alt { padding: 0 0 0 var(--s4); border-top: 0; border-left: 1px solid var(--line); }
}
