
/* =================================
   SLIM BOODSCHAPPEN
   Live 1.3.1 - Slimmer in de buurt
   ================================= */

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  padding: 20px;
  background: #eef6ef;
  color: #243b2c;
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

main {
  max-width: 750px;
  margin: auto;
}

/* 1. BOVENKANT */

header {
  background: #218838;
  color: white;
  padding: 24px;
  border-radius: 16px;
  margin-bottom: 20px;
}

header h1 {
  margin: 0 0 10px;
  font-size: 28px;
}

header p {
  margin: 0 0 15px;
}

.live-label {
  display: inline-block;
  background: white;
  color: #176b2c;
  padding: 7px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
}

/* 2. MIJN OMGEVING */

.location-panel {
  background: white;
  padding: 18px;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid #c5dbc9;
}

.location-panel h2 {
  margin: 0 0 10px;
}

#locationSummary {
  color: #176b2c;
  font-weight: bold;
  margin: 8px 0;
  overflow-wrap: anywhere;
}

#locationSettings {
  border-top: 1px solid #dceedd;
  margin-top: 12px;
  padding-top: 18px;
}

#locationSettings label {
  margin-top: 15px;
}

#locationSettings label:first-child {
  margin-top: 0;
}

#postcodeInput {
  width: 100%;
  max-width: 220px;
  font-size: 20px;
  letter-spacing: 2px;
}

#distanceSelect,
#transportSelect {
  margin-bottom: 10px;
}

#saveLocationButton {
  margin-top: 20px;
}

#locationStatus {
  overflow-wrap: anywhere;
}

#locationStatus:empty {
  display: none;
}

.location-success {
  background: #e1f3e5;
  color: #176b2c;
  padding: 12px;
  border-radius: 8px;
  font-weight: bold;
}

.location-error {
  background: #fff0ed;
  color: #922f24;
  padding: 12px;
  border-radius: 8px;
}

.location-loading {
  background: #f1f1f1;
  color: #555;
  padding: 12px;
  border-radius: 8px;
}

/* 3. ZOEKEN EN SORTEREN */

.search-panel,
.sort-panel {
  background: white;
  padding: 18px;
  border-radius: 12px;
}

.sort-panel {
  margin-bottom: 20px;
  border: 1px solid #c5dbc9;
}

.sort-panel .details {
  margin-bottom: 0;
}

label {
  display: block;
  font-weight: bold;
  margin-bottom: 10px;
}

.search {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

input,
select {
  padding: 14px;
  font-size: 17px;
  font-family: inherit;
  color: #243b2c;
  background: white;
  border: 1px solid #aabbaa;
  border-radius: 8px;
  min-height: 48px;
}

input {
  flex: 1;
  min-width: 0;
}

select {
  width: 100%;
  cursor: pointer;
}

/* 4. KNOPPEN */

button {
  background: #218838;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 14px 18px;
  min-height: 48px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}

button:hover {
  background: #176b2c;
}

button:disabled {
  opacity: 0.5;
  cursor: wait;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid #125c26;
  outline-offset: 3px;
}

.wide {
  width: 100%;
  margin: 10px 0;
}

.secondary {
  background: white;
  color: #176b2c;
  border: 2px solid #218838;
}

.secondary:hover {
  background: #dceedd;
}

/* 5. ZOEKSTATUS */

#status {
  padding: 8px 2px;
  overflow-wrap: anywhere;
}

#sortInfo {
  line-height: 1.5;
}

h2 {
  font-size: 21px;
  margin: 18px 0 12px;
}

/* 6. PRODUCTKAARTEN */

.product-card {
  background: white;
  padding: 18px;
  margin-bottom: 15px;
  border-radius: 12px;
  box-shadow: 0 2px 6px #00000012;
}

.product-content {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.product-image {
  width: 100px;
  height: 120px;
  object-fit: contain;
}

.product-info {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.product-info h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.product-info p {
  margin: 6px 0;
}

.shop {
  font-weight: bold;
  color: #176b2c;
}

/* 7. PRIJZEN */

.price {
  font-size: 27px;
  font-weight: bold;
  color: #176b2c;
}

.details {
  color: #555;
  font-size: 14px;
  line-height: 1.5;
}

.unit-price {
  color: #555;
  font-size: 15px;
}

.original-price {
  color: #555;
  font-size: 14px;
}

/* 8. BESPARINGEN */

.savings {
  display: inline-block;
  background: #e1f3e5;
  color: #176b2c;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: bold;
}

.no-savings {
  background: #f1f1f1;
  color: #555;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
}

.unknown-savings {
  color: #555;
  font-size: 14px;
}

.comparison-group {
  background: #dceedd;
  color: #243b2c;
  padding: 12px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  margin: 20px 0 12px;
}

/* 9. ACTIEVOORWAARDEN */

.conditions {
  background: #fff5d9;
  color: #594719;
  padding: 10px;
  border-radius: 8px;
  font-size: 14px;
}

.product-link {
  display: inline-block;
  margin-top: 8px;
  color: #176b2c;
  font-weight: bold;
}

.empty-message {
  background: white;
  padding: 20px;
  border-radius: 12px;
  color: #555;
}

/* 10. AANVERWANTE AANBIEDINGEN */

#relatedSection {
  margin-top: 20px;
}

/* 11. BRONVERMELDING */

a {
  color: #176b2c;
}

footer {
  margin-top: 25px;
  padding: 15px;
  color: #555;
  font-size: 14px;
  text-align: center;
}

footer a {
  color: #176b2c;
  font-weight: bold;
}

/* 12. MOBIELE WEERGAVE */

@media (max-width: 480px) {

  body {
    padding: 12px;
  }

  header {
    padding: 18px;
  }

  header h1 {
    font-size: 25px;
  }

  .product-image {
    width: 75px;
    height: 95px;
  }

  .product-content {
    gap: 12px;
  }

  .search {
    flex-wrap: wrap;
  }

  .search button {
    width: 100%;
  }

  .location-panel,
  .search-panel,
  .sort-panel,
  .product-card {
    padding: 15px;
  }

  #postcodeInput {
    max-width: none;
  }

  .price {
    font-size: 25px;
  }

}

/* EINDE CSS LIVE 1.3.1 */

.local-offer { border-top: 1px solid #cbded0; margin-top: 12px; padding-top: 8px; overflow-wrap: anywhere; }
#localOnly { width: auto; min-height: 20px; margin-right: 8px; }
#localPanel summary { cursor: pointer; padding: 12px 0; }

/* Live 1.3.1 – mobile-first spacing */
.category-options summary, .nearby-options summary { cursor:pointer; color:#176b2c; font-weight:bold; padding:12px 0; min-height:48px; }
.category-options label { margin-top:8px; }
#localStatus { overflow-wrap:anywhere; }
@media (max-width:600px) {
 body {padding:8px; line-height:1.4;}
 header {padding:12px; margin-bottom:8px; border-radius:12px;}
 header h1 {font-size:23px; margin:0 0 3px;}
 header p {display:none;}
 .live-label {padding:2px 8px; font-size:12px;}
 .location-panel,.search-panel,.sort-panel,.product-card {padding:12px; margin-bottom:8px;}
 .location-heading {display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:4px 8px;}
 .location-heading h2 {font-size:16px; margin:0; grid-column:1;}
 #locationSummary {font-size:15px; margin:0; grid-column:1;}
 #locationToggle {grid-column:2;grid-row:1 / 3; width:auto; max-width:145px; margin:0; padding:8px; font-size:14px;}
 #locationSettings {padding-top:8px; margin-top:8px;}
 #locationSettings label {margin:8px 0 4px;}
 #locationSettings input,#locationSettings select {width:100%; max-width:none; margin-bottom:0;}
 #locationSettings .details {margin:5px 0;}
 #saveLocationButton {margin-top:10px;}
 label {margin-bottom:5px;}
 input,select {padding:9px; font-size:16px; min-height:48px;}
 .search {flex-wrap:nowrap; gap:6px; margin-bottom:2px;}
 .search input {width:0; flex:1; min-width:0;}
 .search button {width:auto; padding:8px 12px; flex-shrink:0;}
 .category-options summary,.nearby-options summary {padding:12px 0;}
 #categoryInfo,#localStatus,#sortInfo {margin:4px 0;}
 #localPanel > .details {margin:4px 0;}
 #status {margin:6px 0; padding:2px;}
 h2 {font-size:19px; margin:10px 0 6px;}
 .product-content {gap:10px;}
 .product-info h3 {font-size:18px; margin-bottom:4px;}
 .product-info p {margin:4px 0;}
 .product-card {margin-bottom:10px;}
 .product-image {width:75px;height:95px;}
 .price {font-size:25px;}
 .conditions,.savings,.no-savings {padding:6px 8px;}
 .local-offer {margin-top:8px;padding-top:6px;}
 footer {margin-top:12px;padding:8px;}
}
