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

:root {
  --green: #2d8a4e;
  --green-light: #e8f5ee;
  --orange: #e07b20;
  --gray: #6b7280;
  --border: #e5e7eb;
  --bg: #f9fafb;
  --white: #ffffff;
  --text: #111827;
}

body { font-family: system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 15px; }

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

/* Nav */
header { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.nav-top { max-width: 1200px; margin: 0 auto; padding: 0 1rem; height: 56px; display: flex; align-items: center; gap: 1rem; }
.nav-sub { max-width: 1200px; margin: 0 auto; padding: .4rem 1rem; display: flex; gap: .5rem; flex-wrap: wrap; border-top: 1px solid var(--border); font-size: 13px; }
.nav-sub a { padding: .25rem .6rem; border-radius: 12px; color: var(--gray); transition: all .15s; }
.nav-sub a:hover, .nav-sub a.active { background: var(--green-light); color: var(--green); font-weight: 600; }
.nav-lijstje { white-space: nowrap; font-size: 14px; font-weight: 600; color: var(--green); }
.nav-icon-link { white-space: nowrap; font-size: 14px; font-weight: 600; color: var(--gray); transition: color .15s; }
.nav-icon-link:hover, .nav-icon-link.active { color: #e53e3e; }
.lijstje-count { background: var(--orange); color: #fff; border-radius: 10px; padding: 1px 6px; font-size: 11px; margin-left: 3px; }
.logo { font-weight: 700; font-size: 1.1rem; white-space: nowrap; }
.nav-search { display: flex; flex: 1; gap: .5rem; }
.nav-search input { flex: 1; padding: .45rem .75rem; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; }
.nav-search button, .hero-search button, .filter-bar button, .btn-retailer {
  padding: .45rem 1rem; background: var(--green); color: #fff; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 600; white-space: nowrap;
}
.nav-search button:hover, .hero-search button:hover, .filter-bar button:hover { background: #236b3d; }

/* Hero */
.hero { max-width: 800px; margin: 2.5rem auto 1rem; padding: 0 1rem; text-align: center; }
.hero h1 { font-size: 2rem; margin-bottom: .5rem; }
.hero p { color: var(--gray); margin-bottom: 1.25rem; }
.hero-search { display: flex; gap: .5rem; justify-content: center; }
.hero-search input { padding: .6rem 1rem; border: 1px solid var(--border); border-radius: 6px; font-size: 15px; width: 380px; }
.summary-bar { margin-top: 1rem; display: flex; gap: 1.5rem; justify-content: center; color: var(--gray); font-size: 13px; }
.summary-bar span::before { content: "✓ "; color: var(--green); }

/* Deals sections */
.deals-section { max-width: 1200px; margin: 2rem auto; padding: 0 1rem; }
.deals-section h2, .quick-links h2 { font-size: 1.25rem; margin-bottom: 1rem; }

.deal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }

.deal-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s;
}
.deal-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.deal-card img { width: 100%; height: 140px; object-fit: contain; padding: .5rem; background: #fafafa; }
.no-img { height: 140px; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; background: #f3f4f6; }
.deal-info { padding: .75rem; display: flex; flex-direction: column; gap: .25rem; }
.deal-name { font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.deal-retailer { font-size: 12px; color: var(--gray); }
.deal-price { font-size: 15px; font-weight: 700; }
.deal-price s { font-weight: 400; color: var(--gray); font-size: 13px; margin-left: .25rem; }
.deal-until { font-size: 11px; color: var(--gray); }

/* Badges */
.badge { display: inline-block; padding: 2px 7px; border-radius: 12px; font-size: 11px; font-weight: 700; background: var(--orange); color: #fff; }
.badge.green { background: var(--green); }
.badge.large { font-size: 14px; padding: 3px 10px; }
.badge.small { font-size: 10px; }

/* Tags */
.tag { display: inline-block; padding: 2px 7px; border-radius: 12px; font-size: 11px; background: var(--border); color: var(--gray); }
.tag.upcoming { background: #fef3c7; color: #92400e; }
.tag.active { background: var(--green-light); color: var(--green); }

/* Quick links */
.quick-links { max-width: 1200px; margin: 1.5rem auto 3rem; padding: 0 1rem; }
.retailer-grid { display: flex; flex-wrap: wrap; gap: .5rem; }
.retailer-btn { padding: .4rem 1rem; border: 1px solid var(--border); border-radius: 20px; background: var(--white); font-size: 13px; transition: all .15s; }
.retailer-btn:hover { background: var(--green); color: #fff; border-color: var(--green); }

/* Search page */
.search-page { max-width: 1200px; margin: 1.5rem auto; padding: 0 1rem; }
.filter-bar { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.filter-bar input { padding: .45rem .75rem; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; flex: 1; min-width: 160px; }
.filter-bar select { padding: .45rem .75rem; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; background: var(--white); }
.result-count { color: var(--gray); font-size: 14px; margin-bottom: 1rem; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.product-card { background: var(--white); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s; }
.product-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.product-card img { width: 100%; height: 140px; object-fit: contain; padding: .5rem; background: #fafafa; }
.product-info { padding: .75rem; display: flex; flex-direction: column; gap: .25rem; }
.product-name { font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-retailer { font-size: 12px; color: var(--gray); }
.product-price { font-size: 15px; font-weight: 700; }
.product-price s { font-weight: 400; color: var(--gray); font-size: 13px; margin-left: .25rem; }
.product-qty { font-size: 11px; color: var(--gray); }
.card-price-label { font-size: 11px; color: var(--gray); font-weight: 400; }
.card-deal-label { font-size: 11px; font-weight: 700; color: #92400e; background: #fff8ed; border-radius: 4px; padding: 1px 5px; display: inline-block; }
.card-effectief { font-size: 11px; color: var(--gray); }

.pagination { display: flex; gap: 1rem; align-items: center; justify-content: center; margin-top: 2rem; }
.pagination a { padding: .4rem 1rem; border: 1px solid var(--border); border-radius: 6px; background: var(--white); }
.pagination a:hover { background: var(--green); color: #fff; border-color: var(--green); }

.no-results, .hint, .error { text-align: center; color: var(--gray); margin-top: 3rem; }

/* Product page */
.product-page { max-width: 960px; margin: 1.5rem auto; padding: 0 1rem; }
.product-header { display: flex; gap: 2rem; margin-bottom: 2rem; }
.product-img { width: 240px; height: 240px; object-fit: contain; border: 1px solid var(--border); border-radius: 10px; padding: 1rem; background: #fafafa; flex-shrink: 0; }
.product-meta { flex: 1; display: flex; flex-direction: column; gap: .5rem; }
.breadcrumb { font-size: 13px; color: var(--gray); }
.breadcrumb a { color: var(--green); }
.product-meta h1 { font-size: 1.4rem; line-height: 1.3; }
.brand { color: var(--gray); }
.qty { color: var(--gray); font-size: 13px; }
.price-block { display: flex; align-items: baseline; gap: .5rem; margin-top: .25rem; }
.current-price { font-size: 1.75rem; font-weight: 700; }
.old-price { color: var(--gray); font-size: 1.1rem; }
.promo-type, .validity, .unit-price, .nutriscore { font-size: 14px; }
.price-label { font-size: 13px; color: var(--gray); margin-left: .25rem; }
.promo-deal-box { display: inline-flex; align-items: center; gap: .75rem; background: #fff8ed; border: 1px solid #f59e0b; border-radius: 8px; padding: .4rem .9rem; margin-top: .35rem; }
.promo-deal-label { font-weight: 700; color: #92400e; font-size: 14px; }
.promo-deal-effectief { font-size: 13px; color: var(--gray); }
.dietary { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .25rem; }
.btn-retailer { display: inline-block; margin-top: .5rem; font-size: 14px; }

.ns-a { color: #1a7a3c; } .ns-b { color: #5fa929; } .ns-c { color: #f0c300; }
.ns-d { color: #e07b20; } .ns-e { color: #c0392b; }

/* Comparison table */
.comparison, .forecast { margin-top: 2rem; }
.comparison h2, .forecast h2 { font-size: 1.15rem; margin-bottom: 1rem; }
.ean { font-size: 12px; color: var(--gray); margin-bottom: .75rem; }
.price-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.price-table th { background: var(--bg); padding: .6rem .75rem; text-align: left; font-weight: 600; border-bottom: 2px solid var(--border); }
.price-table td { padding: .6rem .75rem; border-bottom: 1px solid var(--border); }
.price-table tr.best-deal td { background: var(--green-light); }
.price-table tr.not-current td { opacity: .65; }
.price-cell { font-weight: 700; }
.disclaimer { font-size: 12px; color: var(--gray); margin-top: .75rem; }

/* Footer */
footer { text-align: center; padding: 2rem 1rem; color: var(--gray); font-size: 12px; border-top: 1px solid var(--border); margin-top: 3rem; }
footer a { color: var(--green); }

/* Quickfilters */
.quickfilter-section { max-width: 1200px; margin: 1rem auto; padding: 0 1rem; display: flex; flex-direction: column; gap: .5rem; }
.quickfilter-row { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.quickfilter-label { font-size: 12px; font-weight: 600; color: var(--gray); white-space: nowrap; min-width: 40px; }
.qf-btn { padding: .3rem .8rem; border: 1px solid var(--border); border-radius: 20px; background: var(--white); font-size: 13px; transition: all .15s; }
.qf-btn:hover, .qf-btn.active { background: var(--green); color: #fff; border-color: var(--green); }
.qf-btn.accent { border-color: var(--orange); color: var(--orange); }
.qf-btn.accent:hover { background: var(--orange); color: #fff; }

/* Page header */
.page-header { margin-bottom: 1.25rem; }
.page-header h1 { font-size: 1.5rem; }
.page-sub { color: var(--gray); margin-top: .25rem; font-size: 14px; }

/* Promo nav */
.promo-nav { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }

/* Product acties (favoriet + lijstje) */
.product-acties { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-top: .5rem; }
.btn-favoriet { padding: .5rem 1.25rem; background: var(--white); border: 2px solid #e53e3e; color: #e53e3e; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 600; transition: all .15s; }
.btn-favoriet:hover, .btn-favoriet.actief { background: #e53e3e; color: #fff; }
.btn-lijstje { padding: .5rem 1.25rem; background: var(--white); border: 2px solid var(--green); color: var(--green); border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 600; transition: all .15s; }
.btn-lijstje:hover { background: var(--green); color: #fff; }
.lijstje-feedback { color: var(--green); font-weight: 600; font-size: 14px; }

/* Favorieten pagina */
.favorieten-page { max-width: 1200px; margin: 1.5rem auto; padding: 0 1rem; }
.favorieten-page h1 { font-size: 1.5rem; margin-bottom: 1.5rem; }
.favorieten-blokken { display: flex; flex-direction: column; gap: 2.5rem; }
.fav-sectie h2 { font-size: 1.15rem; margin-bottom: 1rem; }
.fav-card { position: relative; }
.fav-datum { font-size: 11px; color: var(--gray); }
.btn-verwijder-fav { position: absolute; top: .4rem; right: .4rem; background: none; border: none; color: var(--gray); font-size: 14px; cursor: pointer; padding: 2px 6px; border-radius: 4px; }
.btn-verwijder-fav:hover { background: #fee2e2; color: #e53e3e; }
.fav-verwijder-form { margin: 0; }

/* Favoriete winkels toggle */
.winkel-keuze { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.winkel-toggle { padding: .4rem 1rem; border: 1px solid var(--border); border-radius: 20px; background: var(--white); font-size: 13px; cursor: pointer; transition: all .15s; }
.winkel-toggle:hover { border-color: var(--green); color: var(--green); }
.winkel-toggle.actief { background: var(--green); color: #fff; border-color: var(--green); }

/* Favoriete winkels op homepage */
.retailer-btn.favoriet { background: var(--green-light); border-color: var(--green); color: var(--green); font-weight: 600; }
.hint-small { font-size: 12px; color: var(--gray); margin-top: .75rem; }
.hint-small a { color: var(--green); }
.filter-label { font-size: 13px; font-weight: 400; color: var(--green); background: var(--green-light); padding: 2px 8px; border-radius: 10px; margin-left: .4rem; vertical-align: middle; }

/* Lijstje pagina */
.lijstje-page { max-width: 960px; margin: 1.5rem auto; padding: 0 1rem; }
.lijstje-page h1 { font-size: 1.5rem; margin-bottom: 1.25rem; }
.lijstje-acties { margin-bottom: 1rem; }
.btn-danger { padding: .4rem 1rem; background: #fff; border: 1px solid #e53e3e; color: #e53e3e; border-radius: 6px; cursor: pointer; font-size: 13px; }
.btn-danger:hover { background: #e53e3e; color: #fff; }
.lijstje-tabel { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 2rem; }
.lijstje-tabel th { background: var(--bg); padding: .6rem .75rem; text-align: left; border-bottom: 2px solid var(--border); font-weight: 600; }
.lijstje-tabel td { padding: .6rem .75rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.qty-control { display: flex; align-items: center; gap: .4rem; }
.qty-btn { width: 28px; height: 28px; border: 1px solid var(--border); background: var(--white); border-radius: 4px; cursor: pointer; font-size: 16px; line-height: 1; }
.qty-btn:hover { background: var(--green); color: #fff; border-color: var(--green); }
.verwijder-btn { background: none; border: none; color: var(--gray); cursor: pointer; font-size: 16px; padding: 4px 8px; }
.verwijder-btn:hover { color: #e53e3e; }
.totalen { margin-top: 1rem; }
.totalen h2 { font-size: 1.1rem; margin-bottom: .75rem; }
.totalen-grid { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.totaal-kaart { background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: .75rem 1.25rem; display: flex; flex-direction: column; gap: .25rem; min-width: 140px; }
.totaal-kaart strong { font-size: 13px; color: var(--gray); }
.totaal-kaart span { font-size: 1.15rem; font-weight: 700; }
.goedkoopste-banner { background: var(--green-light); border: 1px solid var(--green); border-radius: 8px; padding: .75rem 1rem; font-size: 15px; color: var(--green); }

@media (max-width: 640px) {
  .product-header { flex-direction: column; }
  .product-img { width: 100%; height: 200px; }
  .hero-search { flex-direction: column; }
  .hero-search input { width: 100%; }
  .filter-bar { flex-direction: column; }
  .nav-sub { display: none; }
  .lijstje-tabel { font-size: 12px; }
}
