:root{
  --bg:#6a1b2e;
  --text:#e6dfe2;
  --muted:#c9b7be;
  --accent:#6d0f2a;
  --accent2:#a86a7a;
  --radius:16px;
  --maxw:1120px;
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color:var(--text);
  line-height:1.55;
  background:
    radial-gradient(1200px 800px at 20% 10%, rgba(109,15,42,.28), transparent 60%),
    radial-gradient(1200px 800px at 90% 30%, rgba(168,106,122,.18), transparent 55%),
    var(--bg);
}

a{color:inherit;text-decoration:none}
a:hover{text-decoration:underline}

.wrap{max-width:var(--maxw);margin:0 auto;padding:32px 18px 60px}

.site-header{
  position:sticky;top:0;z-index:10;
  backdrop-filter:saturate(1.2) blur(10px);
  background: rgba(75,15,31,.85);
  border-bottom:1px solid rgba(168,106,122,.35);
}

.nav{max-width:var(--maxw);margin:0 auto;padding:14px 18px;display:flex;gap:14px;align-items:center;flex-wrap:wrap}
.nav a{padding:8px 10px;border-radius:999px;color:var(--muted)}
.nav a.active,.nav a:hover{color:var(--text);background: rgba(109,15,42,.35);text-decoration:none}

h1{font-size:clamp(28px,4vw,44px);margin:12px 0 10px}
h2{font-size:20px;margin:0 0 8px}
.subtitle{color:var(--muted);margin:0 0 22px;max-width:70ch}

.hero{display:grid;grid-template-columns:1.3fr 1fr;gap:22px;align-items:stretch;margin:10px 0 26px}
.hero-card,.hero-text{border:1px solid rgba(168,106,122,.35);border-radius:var(--radius);overflow:hidden}
.hero-card img{width:100%;height:100%;object-fit:cover;display:block;min-height:260px}
.hero-text{background: rgba(20,20,22,.85);padding:18px}
.hero-text p{margin:0 0 10px;color:var(--muted)}
.badge{display:inline-block;padding:6px 10px;border-radius:999px;background: rgba(109,15,42,.35);border:1px solid rgba(168,106,122,.45);font-size:13px;margin-bottom:10px}

.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
@media (max-width:980px){.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hero{grid-template-columns:1fr}}
@media (max-width:620px){.grid{grid-template-columns:1fr}.wrap{padding-top:22px}}

.card{border:1px solid rgba(168,106,122,.35);background: rgba(20,20,22,.85);border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column}
.card-media img{width:100%;height:240px;object-fit:cover;display:block;background:#111}
.card-body{padding:14px 14px 16px}
.card-desc{margin:0 0 10px;color:var(--muted)}
.card-meta{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:10px 0 12px}
.price{font-weight:700}
.status{font-size:13px;color:var(--muted);padding:5px 9px;border-radius:999px;border:1px solid rgba(168,106,122,.35);background: rgba(75,15,31,.35)}

/* Buttons */
.btn,a.btn,button.btn{
  display:inline-block;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(168,106,122,.45);
  background: rgba(109,15,42,.28);
  color:var(--text);
  text-decoration:none;
}
.btn:hover,a.btn:hover,button.btn:hover{background: rgba(109,15,42,.42);text-decoration:none}
.btn.primary{background: rgba(109,15,42,.55);border-color: rgba(200,150,165,.6)}
.btn.primary:hover{background: rgba(109,15,42,.70)}

.back{color:var(--muted);display:inline-block;margin:10px 0 18px}

.two-col{display:grid;grid-template-columns:1.2fr 1fr;gap:22px;align-items:start;margin-top:18px}
@media (max-width:980px){.two-col{grid-template-columns:1fr}}

.figure{margin:0 0 14px;border-radius:var(--radius);overflow:hidden;border:1px solid rgba(168,106,122,.35);background: rgba(20,20,22,.85)}
.figure img{width:100%;height:auto;display:block}

.panel{border:1px solid rgba(168,106,122,.35);border-radius:var(--radius);background: rgba(20,20,22,.85);padding:18px}
.price.big{font-size:28px;margin-bottom:10px}
.details{color:var(--muted)}
.hint{color:var(--muted);font-size:13px;margin-top:12px}

.site-footer{border-top:1px solid rgba(168,106,122,.35);color:var(--muted);padding:22px 18px;text-align:center;background: rgba(75,15,31,.85)}

/* ===== Item detail gallery layout (patch) ===== */
.item-hero{margin:10px 0 18px;}
.item-hero img{display:block;width:100%;height:auto;border-radius:16px;border:1px solid rgba(255,255,255,.12);}

/* thumbnails grid */
.gallery{margin:8px 0 22px;}
.gallery-grid{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.thumb{
  appearance:none;
  -webkit-appearance:none;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.08);
  padding:0;
  border-radius:12px;
  overflow:hidden;
  width:84px;
  height:84px;
  cursor:pointer;
}
.thumb img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}
.thumb.is-active{outline:2px solid rgba(255,255,255,.55); outline-offset:2px;}
@media (max-width: 640px){
  .thumb{width:72px;height:72px;}
}
/* ===== Finishing touches: subtle UX polish ===== */
.item-hero img#mainPhoto{ transition: opacity 140ms ease; }
.thumb:hover{ transform: translateY(-1px); }
.thumb{ transition: transform 120ms ease, outline-color 120ms ease; }

/* ===== UX fix: hero image fits viewport (added) ===== */
.item-hero{
  max-height: calc(100vh - 140px); /* header + margins */
}
.item-hero img{
  max-height: calc(100vh - 140px);
}
@media (max-width: 768px){
  .item-hero,
  .item-hero img{
    max-height: calc(100vh - 120px);
  }
}
/* ===== Fix: hoofdfoto nooit vervormen ===== */
.item-hero img#mainPhoto{
  width: 100% !important;
  height: auto !important;          /* dit voorkomt vervorming */
  max-height: calc(100vh - 140px) !important;
  object-fit: contain !important;   /* binnen het vlak blijven, niet croppen */
}

/* iets minder marge op kleinere schermen */
@media (max-width: 768px){
  .item-hero img#mainPhoto{
    max-height: calc(100vh - 120px) !important;
  }
}