/* ---------- Design tokens ---------- */
:root {
  --color-black: #151515;
  --color-banner-black: #000000;
  --color-red: #d32027;
  --color-red-dark: #a3181d;
  --color-cream: #fdfaf6;
  --color-white: #ffffff;
  --color-gray: #6b6b6b;
  --color-border: #e7e0d6;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;

  --radius: 10px;
  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1140px;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-base);
  background: var(--color-cream);
  color: var(--color-black);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0 0 var(--space-2) 0; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-2);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--color-red);
  color: var(--color-white);
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}
.btn:hover { background: var(--color-red-dark); }

/* ---------- Top bar (social links) ---------- */
.topbar {
  background: var(--color-banner-black);
  color: var(--color-white);
  padding: 0.5rem var(--space-2);
}
.topbar-inner {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-3);
}
.topbar a {
  color: var(--color-white);
  display: inline-flex;
  align-items: center;
  opacity: 0.85;
}
.topbar a:hover,
.topbar a:focus-visible { opacity: 1; }
.topbar svg { width: 26px; height: 26px; }
.topbar { border-bottom: 1px solid rgba(255, 255, 255, 0.12); }

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--color-banner-black);
  border-bottom: 3px solid var(--color-red);
  position: sticky;
  top: 0;
  z-index: 50;
  overflow-x: hidden;
}
.site-header .container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  padding-top: var(--space-1);
  padding-bottom: var(--space-1);
}
.site-header .header-right {
  order: 1;
  align-self: stretch;
  justify-content: flex-end;
}
.site-header .logo {
  order: 2;
  display: block;
}
.site-header .logo-stack {
  position: relative;
  display: block;
  height: 48px;
  aspect-ratio: 2 / 1;
}
.site-header .logo-img {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  display: block;
}
.site-header .logo-cart.logo-cart--start {
  transform: translateX(100vw);
}
.site-header .logo-cart.logo-cart--drive {
  animation: logo-cart-drive-in 1400ms cubic-bezier(0.3, 0.68, 0.35, 1) forwards;
}
@keyframes logo-cart-drive-in {
  0% { transform: translateX(100vw); }
  70% { transform: translateX(-16px); }
  85% { transform: translateX(6px); }
  100% { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .site-header .logo-cart.logo-cart--start {
    transform: none;
  }
  .site-header .logo-cart.logo-cart--drive {
    animation: none;
  }
}
@media (min-width: 720px) {
  .site-header .container {
    flex-direction: row;
    justify-content: flex-end;
    min-height: 75px;
    gap: 0;
  }
  .site-header .header-right { order: initial; align-self: auto; }
  .site-header .logo {
    order: initial;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }
  .site-header .logo-stack { height: 80px; }
}
.nav-toggle {
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  display: block;
  color: var(--color-white);
}
.nav {
  display: none;
  flex-direction: column;
  width: 100%;
  background: var(--color-banner-black);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.nav.is-open { display: flex; }
.nav a {
  display: block;
  padding: var(--space-2);
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.9rem;
  color: var(--color-white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.nav a:hover { color: var(--color-red); }
.nav a[aria-current="page"] { color: var(--color-red); }

.lang-switch {
  display: flex;
  gap: var(--space-1);
}
.lang-switch button {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--color-white);
}
.lang-switch button:hover { border-color: var(--color-red); }
.lang-switch button[aria-pressed="true"] {
  background: var(--color-red);
  border-color: var(--color-red);
  color: var(--color-white);
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* ---------- Hero ---------- */
.hero img {
  width: 100%;
  height: auto;
}
.hero-copy {
  text-align: center;
  padding: var(--space-5) var(--space-2);
  background: var(--color-white);
}
.hero-copy h1 {
  font-size: 1.75rem;
  margin-bottom: var(--space-1);
}
.hero-copy p {
  color: var(--color-gray);
  max-width: 640px;
  margin: 0 auto var(--space-3) auto;
}

/* ---------- Opening hours bar ---------- */
.hours-bar {
  background: var(--color-black);
  color: var(--color-white);
  text-align: center;
  padding: var(--space-2);
  font-weight: 600;
  font-size: 0.95rem;
}
.hours-bar .status-open { color: #7ddc7d; }
.hours-bar .status-closed { color: #ff8a8a; }

/* ---------- Temporary announcement banner ---------- */
.announcement-bar {
  background: var(--color-banner-black);
  text-align: center;
  padding: var(--space-2);
}
.announcement-bar img {
  max-width: 100%;
  max-height: 360px;
  margin: 0 auto;
  border-radius: var(--radius);
}

/* ---------- USP grid ---------- */
.usp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  padding: var(--space-5) 0;
}
.usp-card {
  text-align: center;
  padding: var(--space-3);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}
.usp-card h3 {
  color: var(--color-red);
  font-size: 1.1rem;
}
.usp-card p { color: var(--color-gray); margin: 0; }

/* ---------- Section titles ---------- */
.section-title {
  text-align: center;
  font-size: 1.5rem;
  padding: 0 var(--space-2);
}
.section-intro {
  text-align: center;
  color: var(--color-gray);
  max-width: 640px;
  margin: 0 auto var(--space-4) auto;
  padding: 0 var(--space-2);
}

/* ---------- Offer cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  padding: 0 0 var(--space-5) 0;
}
.offer-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.folder-grid {
  gap: var(--space-2);
}
.folder-grid .offer-card {
  border-radius: 6px;
}
.offer-card:hover,
.offer-card:focus-visible {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
  outline: none;
}
.offer-card:focus-visible {
  outline: 2px solid var(--color-red);
  outline-offset: 2px;
}
.offer-card-media {
  position: relative;
}
.offer-card-media img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 100%;
  display: block;
}
.offer-price-ribbon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(211, 32, 39, 0.94);
  color: var(--color-white);
  padding: 0.4rem 0.75rem;
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}
.offer-price-ribbon .old {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: line-through;
}
.offer-card-body { padding: var(--space-2); }
.offer-card h3 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.offer-unit { color: var(--color-gray); font-size: 0.85rem; }
.offer-note { font-size: 0.85rem; color: var(--color-black); margin-top: 0.35rem; }
.offer-valid { font-size: 0.75rem; color: var(--color-gray); margin-top: 0.5rem; }

/* ---------- Category (assortiment) grid ---------- */
.category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  padding: var(--space-4) 0 var(--space-5) 0;
}
.category-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-white);
}
.category-photo {
  width: 100%;
  height: 140px;
  object-fit: cover;
}
.category-card-body { padding: var(--space-2); }
.category-card h3 { color: var(--color-red); font-size: 1.05rem; }
.category-card p { color: var(--color-gray); margin: 0; }

/* ---------- Content pages (over ons / contact) ---------- */
.prose {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-5) var(--space-2);
}
.prose p { margin-bottom: var(--space-2); }
.prose-title {
  text-align: center;
}

/* ---------- Scroll reveal ---------- */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 800ms ease, transform 800ms ease;
}
.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
.usp-grid .reveal-on-scroll:nth-child(2),
.category-grid .reveal-on-scroll:nth-child(2) { transition-delay: 90ms; }
.usp-grid .reveal-on-scroll:nth-child(3),
.category-grid .reveal-on-scroll:nth-child(3) { transition-delay: 180ms; }
.usp-grid .reveal-on-scroll:nth-child(4),
.category-grid .reveal-on-scroll:nth-child(4) { transition-delay: 270ms; }
.category-grid .reveal-on-scroll:nth-child(5) { transition-delay: 360ms; }
.category-grid .reveal-on-scroll:nth-child(6) { transition-delay: 450ms; }
.contact-grid .reveal-on-scroll:nth-child(2) { transition-delay: 120ms; }
.hero-copy .reveal-on-scroll:nth-child(2),
.prose .reveal-on-scroll:nth-child(2) { transition-delay: 120ms; }
.hero-copy .reveal-on-scroll:nth-child(3),
.prose .reveal-on-scroll:nth-child(3) { transition-delay: 240ms; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  padding: var(--space-5) 0;
}
.contact-block h2 { font-size: 1.1rem; color: var(--color-red); }
.contact-block a {
  color: var(--color-black);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.contact-block a:hover { color: var(--color-red); }
.contact-map iframe {
  width: 100%;
  height: 320px;
  border: 0;
  border-radius: var(--radius);
}

/* ---------- Lightbox ---------- */
body.lightbox-active { overflow: hidden; }
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(21, 21, 21, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-2);
  z-index: 100;
}
.lightbox-overlay.is-open { display: flex; }
.lightbox-content {
  background: var(--color-white);
  border-radius: var(--radius);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.lightbox-close {
  position: absolute;
  top: var(--space-1);
  right: var(--space-1);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}
.lightbox-image {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  background: var(--color-black);
}
.lightbox-body { padding: var(--space-3); }
.lightbox-title { font-size: 1.2rem; }
.lightbox-price {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-red);
}
.lightbox-price .old {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-gray);
  text-decoration: line-through;
  margin-right: 0.5rem;
}
.lightbox-unit { color: var(--color-gray); }
.lightbox-note { margin-top: 0.35rem; }
.lightbox-valid { font-size: 0.85rem; color: var(--color-gray); margin-top: 0.5rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-black);
  color: var(--color-white);
  text-align: center;
  padding: var(--space-3) var(--space-2);
  font-size: 0.85rem;
}

/* ---------- Breakpoints (mobile-first: base styles above are for phones) ---------- */
@media (min-width: 720px) {
  .nav-toggle { display: none; }
  .nav {
    display: flex;
    flex-direction: row;
    width: auto;
    border-top: none;
    background: none;
  }
  .nav a { border-bottom: none; padding: 0.5rem var(--space-2); }
  .usp-grid { grid-template-columns: repeat(4, 1fr); }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .hero-copy h1 { font-size: 2.25rem; }
}

@media (min-width: 1024px) {
  .card-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- "Nieuw in het assortiment" / "Onze aanrader" carousel ---------- */
.carousel-title {
  background: var(--color-banner-black);
  color: var(--color-white);
  padding: var(--space-2);
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}
.carousel-title-icon {
  width: 1.4em;
  height: 1.4em;
  object-fit: contain;
}
.new-carousel {
  --carousel-item-size: 160px;
  /* Clip the horizontally-infinite scroll track, but allow a margin of
     unclipped overflow so the hover-zoom (scale(1.5)) isn't cut off
     top/bottom, and can paint over the banner above it instead of
     disappearing behind it. */
  overflow: clip;
  overflow-clip-margin: 80px;
  padding: 0 0 var(--space-5) 0;
}
.new-carousel-track {
  display: flex;
  gap: var(--space-3);
}
.new-carousel-track.is-auto {
  width: max-content;
  cursor: grab;
  touch-action: pan-y;
}
.new-carousel-track.is-auto.is-dragging {
  cursor: grabbing;
  user-select: none;
}
.new-carousel-track.is-static {
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  cursor: grab;
}
.new-carousel-track.is-static.is-dragging {
  cursor: grabbing;
  user-select: none;
  scroll-snap-type: none;
}
.new-carousel-track.is-static .new-carousel-item {
  scroll-snap-align: start;
}
.new-carousel-item {
  flex: 0 0 auto;
  width: var(--carousel-item-size);
  margin: 0;
  position: relative;
  z-index: 1;
}
.new-carousel-item:hover,
.new-carousel-item:focus-within {
  z-index: 2;
}
.new-carousel-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  /* contain (not cover): these photos often have a price burned into the
     bottom of the frame. cover crops to fill the square and clips that
     price on portrait/off-ratio images; contain always shows the full
     photo regardless of the source image's aspect ratio, so any new image
     dropped into the ITEMS list stays uncropped without per-image tuning. */
  object-fit: contain;
  background: var(--color-banner-black);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  display: block;
  -webkit-user-drag: none;
}
@media (prefers-reduced-motion: no-preference) {
  .new-carousel-item img {
    transition: transform 0.25s ease;
  }
}
.new-carousel-item:hover img,
.new-carousel-item:focus-within img {
  transform: scale(1.5);
}
.new-carousel-track.is-dragging .new-carousel-item:hover img {
  transform: none;
}
@media (min-width: 720px) {
  .new-carousel { --carousel-item-size: 200px; }
}
@media (min-width: 1024px) {
  .new-carousel { --carousel-item-size: 240px; }
}
