/* Muizels.nl - Mobile-first webshop */

:root {
  --kleur-primair: #8B6F5A;
  --kleur-primair-donker: #6B5342;
  --kleur-accent: #D4A574;
  --kleur-achtergrond: #FDF8F3;
  --kleur-kaart: #FFFFFF;
  --kleur-tekst: #3A3A3A;
  --kleur-tekst-licht: #777;
  --kleur-rand: #E8DDD3;
  --kleur-succes: #5A8F6B;
  --kleur-fout: #C0392B;
  --kleur-actie: #C0392B;
  --schaduw: 0 2px 8px rgba(0, 0, 0, 0.08);
  --radius: 8px;
  --max-breedte: 1200px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--kleur-achtergrond);
  color: var(--kleur-tekst);
  line-height: 1.6;
}

a { color: var(--kleur-primair); text-decoration: none; }
a:hover { color: var(--kleur-primair-donker); }

img { max-width: 100%; height: auto; }

/* Header */
.header {
  background: var(--kleur-kaart);
  border-bottom: 2px solid var(--kleur-rand);
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-breedte);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--kleur-primair);
}

.logo small {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--kleur-tekst-licht);
}

.header-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.header-nav a {
  color: var(--kleur-tekst);
  font-size: 0.9rem;
}

.winkelwagen-link {
  position: relative;
  font-size: 1.3rem;
}

.winkelwagen-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  background: var(--kleur-actie);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.winkelwagen-badge:empty { display: none; }

/* Zoekbalk */
.zoekbalk {
  max-width: var(--max-breedte);
  margin: 1rem auto;
  padding: 0 1rem;
}

.zoekbalk input {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius);
  font-size: 0.95rem;
  background: var(--kleur-kaart);
}

.zoekbalk input:focus {
  outline: none;
  border-color: var(--kleur-primair);
}

/* Container */
.container {
  max-width: var(--max-breedte);
  margin: 0 auto;
  padding: 1rem;
}

/* Categorie filter */
.categorie-filter {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 0 1rem;
  -webkit-overflow-scrolling: touch;
}

.categorie-btn {
  white-space: nowrap;
  padding: 0.5rem 1rem;
  border: 1px solid var(--kleur-rand);
  border-radius: 20px;
  background: var(--kleur-kaart);
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--kleur-tekst);
  transition: all 0.2s;
}

.categorie-btn:hover,
.categorie-btn.actief {
  background: var(--kleur-primair);
  color: white;
  border-color: var(--kleur-primair);
}

/* Productgrid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}

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

.product-kaart {
  background: var(--kleur-kaart);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--schaduw);
  transition: transform 0.2s;
  cursor: pointer;
}

.product-kaart:hover { transform: translateY(-2px); }

.product-kaart-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--kleur-rand);
}

.product-kaart-info {
  padding: 0.75rem;
}

.product-kaart-naam {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-kaart-prijs {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--kleur-primair);
}

.product-kaart-prijs .oud {
  text-decoration: line-through;
  color: var(--kleur-tekst-licht);
  font-weight: 400;
  font-size: 0.8rem;
  margin-left: 0.3rem;
}

.product-kaart-prijs .actie {
  color: var(--kleur-actie);
}

.niet-op-voorraad {
  color: var(--kleur-tekst-licht);
  font-size: 0.8rem;
  font-style: italic;
}

/* Productdetail */
.product-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 1rem 0;
}

@media (min-width: 768px) {
  .product-detail { grid-template-columns: 1fr 1fr; }
}

.product-afbeeldingen {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.product-hoofdafbeelding {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--kleur-rand);
}

.product-thumbnails {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
}

.product-thumbnail {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  flex-shrink: 0;
}

.product-thumbnail.actief {
  border-color: var(--kleur-primair);
}

.product-info h1 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.product-prijs-groot {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--kleur-primair);
  margin-bottom: 1rem;
}

.product-prijs-groot .actie { color: var(--kleur-actie); }
.product-prijs-groot .oud {
  text-decoration: line-through;
  color: var(--kleur-tekst-licht);
  font-size: 1rem;
  font-weight: 400;
}

.product-beschrijving {
  color: var(--kleur-tekst);
  margin-bottom: 1.5rem;
  white-space: pre-line;
  font-size: 0.95rem;
}

.product-categorie {
  font-size: 0.85rem;
  color: var(--kleur-tekst-licht);
  margin-bottom: 1rem;
}

/* Knoppen */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primair {
  background: var(--kleur-primair);
  color: white;
}

.btn-primair:hover { background: var(--kleur-primair-donker); }

.btn-accent {
  background: var(--kleur-accent);
  color: white;
}

.btn-klein {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

.btn-breed { width: 100%; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Aantal selector */
.aantal-selector {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius);
  overflow: hidden;
}

.aantal-selector button {
  background: var(--kleur-kaart);
  border: none;
  padding: 0.5rem 0.8rem;
  font-size: 1rem;
  cursor: pointer;
}

.aantal-selector button:hover { background: var(--kleur-rand); }

.aantal-selector span {
  padding: 0.5rem 1rem;
  font-weight: 600;
  min-width: 2.5rem;
  text-align: center;
}

/* Winkelwagen */
.winkelwagen-leeg {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--kleur-tekst-licht);
}

.winkelwagen-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--kleur-rand);
  align-items: center;
}

.winkelwagen-item-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.winkelwagen-item-info {
  flex: 1;
}

.winkelwagen-item-naam {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.winkelwagen-item-prijs {
  color: var(--kleur-primair);
  font-weight: 700;
}

.winkelwagen-item-verwijder {
  background: none;
  border: none;
  color: var(--kleur-tekst-licht);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.5rem;
}

.winkelwagen-item-verwijder:hover { color: var(--kleur-fout); }

.winkelwagen-totaal {
  padding: 1.5rem 0;
  border-top: 2px solid var(--kleur-rand);
  margin-top: 1rem;
}

.winkelwagen-totaal-regel {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.winkelwagen-totaal-regel.eindtotaal {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--kleur-rand);
}

/* Formulieren */
.formulier {
  max-width: 500px;
}

.formulier-groep {
  margin-bottom: 1rem;
}

.formulier-groep label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--kleur-tekst);
}

.formulier-groep input,
.formulier-groep textarea,
.formulier-groep select {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
}

.formulier-groep input:focus,
.formulier-groep textarea:focus,
.formulier-groep select:focus {
  outline: none;
  border-color: var(--kleur-primair);
}

.formulier-rij {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1rem;
}

/* Melding */
.melding {
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.melding-succes {
  background: #E8F5E9;
  color: var(--kleur-succes);
  border: 1px solid #C8E6C9;
}

.melding-fout {
  background: #FFEBEE;
  color: var(--kleur-fout);
  border: 1px solid #FFCDD2;
}

.melding-info {
  background: #FFF3E0;
  color: #E65100;
  border: 1px solid #FFE0B2;
}

/* Bestelling bevestiging */
.bestelling-status {
  text-align: center;
  padding: 2rem 0;
}

.bestelling-status h1 { margin-bottom: 1rem; }

.status-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-betaald { background: #E8F5E9; color: var(--kleur-succes); }
.status-open { background: #FFF3E0; color: #E65100; }
.status-verlopen, .status-geannuleerd, .status-mislukt { background: #FFEBEE; color: var(--kleur-fout); }
.status-verzonden { background: #E3F2FD; color: #1565C0; }
.status-afgerond { background: #E8F5E9; color: var(--kleur-succes); }

/* Breadcrumb */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--kleur-tekst-licht);
  padding: 0.5rem 0;
}

.breadcrumb a { color: var(--kleur-tekst-licht); }
.breadcrumb a:hover { color: var(--kleur-primair); }

/* Footer */
.footer {
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 3rem;
  border-top: 1px solid var(--kleur-rand);
  color: var(--kleur-tekst-licht);
  font-size: 0.85rem;
}

/* Laden */
.laden {
  text-align: center;
  padding: 3rem;
  color: var(--kleur-tekst-licht);
}

/* Admin */
.admin-tabel {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-tabel th,
.admin-tabel td {
  padding: 0.6rem;
  text-align: left;
  border-bottom: 1px solid var(--kleur-rand);
}

.admin-tabel th {
  background: var(--kleur-achtergrond);
  font-weight: 600;
  position: sticky;
  top: 0;
}

.admin-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--kleur-rand);
}

.admin-tab {
  padding: 0.7rem 1.2rem;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--kleur-tekst-licht);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.admin-tab.actief {
  color: var(--kleur-primair);
  border-bottom-color: var(--kleur-primair);
}

.admin-acties {
  display: flex;
  gap: 0.3rem;
}

/* Responsive tabel wrapper */
.tabel-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Overlay / Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}

.modal {
  background: var(--kleur-kaart);
  border-radius: var(--radius);
  padding: 1.5rem;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal h2 {
  margin-bottom: 1rem;
}

.modal-sluiten {
  float: right;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--kleur-tekst-licht);
}
