/* ─────────────────────────────────────────────────────────────────
   Comfort+ Deurenshop — Heesch
   Restyled after the original site, lost when the previous host was
   compromised. Recovered via the Wayback Machine.
   ───────────────────────────────────────────────────────────────── */

:root {
  --color-bg:          #0c0c0c;
  --color-bg-alt:      #161513;
  --color-orange:      #f0a830;
  --color-orange-dk:   #d18f1e;
  --color-yellow:      #ffcc00;
  --color-text:        #cfcbc4;
  --color-text-dim:    #9a958c;
  --color-white:       #ffffff;
  --color-border:      #2c2a26;

  --font-body: 'Inter', system-ui, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;

  --sidebar-w: 220px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  height: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  font-size: 1rem;
  min-height: 100%;
}

#allwrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#wrap {
  flex: 1 0 auto;
}

#footer {
  flex-shrink: 0;
}

a { color: var(--color-orange); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

.container {
  width: min(100%, 1140px);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

/* ── Header ───────────────────────────────────────────────────── */
#header {
  padding-block: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

#logo a { display: block; }

#logo h1 {
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 700;
  color: var(--color-orange);
  letter-spacing: 0.01em;
}

#logo .accent { color: var(--color-yellow); }

#logo h2 {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--color-orange);
  opacity: 0.85;
  margin-top: 0.2rem;
}

/* ── Slideshow strip ──────────────────────────────────────────── */
#slideshow {
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}

.slideshow-placeholder {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-dim);
  font-size: 0.85rem;
  border: 1px dashed var(--color-border);
  margin-block: var(--space-md);
}

/* ── Hero slideshow (populated from a linked gallery, see js/slideshow.js)
   Sits inside the same .container as the rest of the page, so it lines
   up with the content column instead of spanning the full page width. */
.hero-slideshow {
  position: relative;
  height: clamp(220px, 34vw, 420px);
  margin-block: var(--space-md);
  border-radius: 6px;
  overflow: hidden;
  background: var(--color-bg);
}

.hero-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(12, 12, 12, 0.45);
  border: none;
  color: var(--color-white);
  font-size: 1.2rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-nav:hover { background: rgba(12, 12, 12, 0.7); color: var(--color-orange); }
.hero-prev { left: var(--space-sm); }
.hero-next { right: var(--space-sm); }

.hero-dots {
  position: absolute;
  bottom: var(--space-sm);
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid var(--color-white);
  background: rgba(255, 255, 255, 0.3);
  padding: 0;
  cursor: pointer;
}
.hero-dot.active { background: var(--color-orange); border-color: var(--color-orange); }

@media (max-width: 800px) {
  .hero-nav { width: 2rem; height: 2rem; font-size: 1rem; }
}

/* ── Breadcrumb ───────────────────────────────────────────────── */
#pathway {
  padding-block: var(--space-sm);
  font-size: 0.85rem;
  color: var(--color-text-dim);
  border-bottom: 1px solid var(--color-border);
}

#crumb-current { color: var(--color-orange); }

/* ── Layout ───────────────────────────────────────────────────── */
#cbody {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: var(--space-xl);
  padding-block: var(--space-lg);
  align-items: start;
}

/* ── Sidebar nav ──────────────────────────────────────────────── */
#sidebar {
  position: sticky;
  top: var(--space-lg);
}

.nav-toggle { display: none; }

.nav-menu > li {
  border-bottom: 1px solid var(--color-border);
}

.nav-menu > li > a {
  display: block;
  padding: 0.7rem 0;
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
  color: var(--color-orange);
  text-decoration: none;
}

.nav-heading {
  display: block;
  padding: 0.7rem 0;
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-sub {
  padding-bottom: 0.6rem;
}

.nav-sub li a {
  display: block;
  padding: 0.3rem 0 0.3rem 1rem;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-text-dim);
}

.nav-sub li a:hover,
.nav-sub li a.active {
  color: var(--color-orange);
  text-decoration: none;
}

/* ── Content ──────────────────────────────────────────────────── */
#content {
  min-width: 0;
}

.item-page {
  padding-bottom: var(--space-xl);
  margin-bottom: var(--space-xl);
  border-bottom: 1px solid var(--color-border);
  scroll-margin-top: var(--space-lg);
}

.item-page:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.page-header {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: var(--space-md);
}

.subheading {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-orange);
  margin-bottom: var(--space-sm);
}

.item-page p {
  margin-bottom: var(--space-sm);
  max-width: 68ch;
}

.item-page small { color: var(--color-text-dim); }

.item-page h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-white);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xs);
}

.highlight {
  color: var(--color-yellow);
  font-weight: 600;
}

/* ── Contact ──────────────────────────────────────────────────── */
.contact-list {
  margin-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.contact-row {
  display: flex;
  gap: var(--space-sm);
  align-items: baseline;
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}

.contact-row dt {
  flex: 0 0 130px;
  font-weight: 600;
  color: var(--color-orange);
  font-size: 0.9rem;
}

.contact-row dt i {
  font-style: normal;
  font-size: 0.5rem;
  color: var(--color-orange);
  margin-right: 0.4rem;
  vertical-align: middle;
}

.contact-row dd a { color: var(--color-text); }
.contact-row dd a:hover { color: var(--color-orange); }

/* ── Footer ───────────────────────────────────────────────────── */
#footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-md);
}

#footer p {
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-text-dim);
}

/* ── Single gallery photo grid ────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.gallery-thumb {
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-bg-alt);
  cursor: zoom-in;
}
.gallery-thumb:hover { border-color: var(--color-orange); }

.gallery-thumb img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

/* ── Lightbox ─────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  z-index: 100;
}

/* The [hidden] attribute selector needs to beat the class above so the
   overlay actually disappears (and stops blocking clicks on the rest of
   the page) when JS sets lightbox.hidden = true / it starts hidden. */
.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: min(90vw, 1100px);
  max-height: 78vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-caption {
  color: var(--color-text);
  margin-top: var(--space-sm);
  font-size: 0.9rem;
  text-align: center;
  min-height: 1.2em;
}

.lightbox-close {
  position: absolute;
  top: var(--space-md);
  right: clamp(1rem, 4vw, 2rem);
  background: transparent;
  border: none;
  color: var(--color-white);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { color: var(--color-orange); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--color-white);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 0.75rem;
}
.lightbox-nav:hover { color: var(--color-orange); }
.lightbox-prev { left: clamp(0.5rem, 3vw, 1.5rem); }
.lightbox-next { right: clamp(0.5rem, 3vw, 1.5rem); }

@media (max-width: 640px) {
  .gallery-thumb img { height: 120px; }
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 800px) {
  #cbody {
    display: block;
  }

  #sidebar {
    position: static;
    margin-bottom: var(--space-lg);
    border: 1px solid var(--color-border);
    border-radius: 4px;
  }

  .nav-toggle {
    display: block;
    width: 100%;
    text-align: left;
    background: var(--color-bg-alt);
    color: var(--color-orange);
    border: none;
    padding: 0.8rem 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
  }

  .nav-menu {
    padding: 0 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .nav-menu.open {
    max-height: 600px;
    padding-bottom: 0.5rem;
  }

  .slideshow-placeholder { height: 110px; }
}
