/* =====================================================================
   Roedeshop webshop - responsive aanvullingen (telefoon, tablet, desktop)
   Wordt als laatste stylesheet geladen (index.php). Alleen opmaak, geen functies.
   Breekpunten sluiten aan op de bestaande: 675px (telefoon) en 1025px (tablet).
   Getest op demo.rieswebsolutions.nl op 375, 800, 1024, 1440 en 1920 px breed.
   ===================================================================== */

/* ---------- Alle schermen ---------- */
html body img { max-width: 100%; }
html body #logo-desktop img#logo, html body #logo-mobiel img#logo { height: auto; }

/* ---------- Telefoon (t/m 675px) ---------- */
@media only screen and (max-width: 675px) {
  /* nooit meer horizontaal scrollen */
  html, html body { overflow-x: hidden; }
  html body #content { overflow: visible !important; }      /* geen tweede scrollbalk in de pagina */

  /* logo past altijd tussen menuknop en winkelwagen (was 400px breed en viel buiten beeld) */
  html body #logo-mobiel > div:nth-child(2) { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center; }
  html body #logo-mobiel a#logo { width: auto !important; height: auto !important; max-width: 100%; }
  html body #logo-mobiel a#logo img#logo { width: 100% !important; max-width: 260px; height: auto !important; object-fit: contain; }
  html body #header-bg, html body #header { height: auto !important; min-height: 0; }
  html body #logo-mobiel { height: auto !important; align-items: center; padding-bottom: 6px; }

  /* vaste breedtes op de productpagina begrenzen */
  html body .tr, html body .td { max-width: 100% !important; box-sizing: border-box; }
  html body #content .tr { width: auto !important; }
  html body .USP-element-block { max-width: 100%; box-sizing: border-box; }

  /* formulieren (winkelwagen, bestellen) */
  html body #content input.input, html body #content input[type=text], html body #content input[type=email],
  html body #content input[type=tel], html body #content select, html body #content textarea { max-width: 100% !important; box-sizing: border-box; }
  html body #content input, html body #content select, html body #content textarea { font-size: 16px; }   /* geen inzoomen op iPhone */
  html body #content button, html body #content input[type=submit], html body #content .button { min-height: 44px; }  /* goed aan te tikken */
}

/* ---------- Telefoon en tablet (t/m 1025px) ---------- */
@media only screen and (max-width: 1025px) {
  html body #pagehead:empty { display: none; }               /* lege witruimte boven de pagina */
  html body #laatst_bekeken_mobiel { max-width: 100%; box-sizing: border-box; }
  html body #content table { max-width: 100%; box-sizing: border-box; }
  html body #cart-form > table { max-width: calc(100% - 20px); }
  html body #product-right-container .tr, html body #product-right-container .td { width: auto !important; max-width: 100% !important; box-sizing: border-box; }
}

/* ---------- Tablet: producten in 2 kolommen (600-899px) en 3 kolommen (900-1025px) ---------- */
@media only screen and (min-width: 600px) and (max-width: 1025px) {
  html body #producten { display: flex; flex-wrap: wrap; gap: 12px; }
  html body #producten > .product-wrapper { width: calc(50% - 6px) !important; margin: 0 !important; float: none !important; box-sizing: border-box; }
  html body #producten > .product-wrapper .product { width: 100% !important; box-sizing: border-box; }
  html body #producten > :not(.product-wrapper) { flex: 1 1 100%; }
}
@media only screen and (min-width: 900px) and (max-width: 1025px) {
  html body #producten > .product-wrapper { width: calc(33.333% - 8px) !important; }
}

/* ---------- Tablet: productpagina met foto's links en keuzes rechts ---------- */
@media only screen and (min-width: 700px) and (max-width: 1025px) {
  html body form#product-form.layout-roedeshop-nieuw { display: grid !important; grid-template-columns: minmax(0, 45fr) minmax(0, 55fr); column-gap: 18px; align-items: start; padding: 0 12px; box-sizing: border-box; }
  html body form#product-form.layout-roedeshop-nieuw > * { grid-column: 1 / -1; min-width: 0; }
  html body form#product-form.layout-roedeshop-nieuw > #product-left-container { grid-column: 1; width: auto !important; }
  html body form#product-form.layout-roedeshop-nieuw > #product-right-container { grid-column: 2; width: auto !important; }
  html body form#product-form.layout-roedeshop-nieuw #product-left-container * { max-width: 100%; }
  html body form#product-form.layout-roedeshop-nieuw .right-bottom-container { height: auto !important; }
}

/* ---------- Desktop: bredere winkel met meer producten naast elkaar ---------- */
/* Alleen op overzichtspagina's met producten (pagina's met #filter-producten-container). */
@media only screen and (min-width: 1300px) {
  html body #navigation-container, html body #content-top, html body #content:has(#filter-producten-container) {
    width: auto !important; max-width: 1400px; margin-left: auto !important; margin-right: auto !important;
    padding-left: 16px; padding-right: 16px; box-sizing: border-box;
  }
  html body #content:has(#filter-producten-container) #filter-producten-container { width: calc(100% - 252px) !important; }
  html body #content:has(#filter-producten-container) .producten-home,
  html body #content:has(#filter-producten-container) #uitgelicht-wrapper { width: auto !important; }
  html body #content:has(#filter-producten-container) #producten > .product-wrapper { margin: 0 12px 12px 0 !important; }
}
@media only screen and (min-width: 1760px) {
  html body #navigation-container, html body #content-top, html body #content:has(#filter-producten-container) { max-width: 1780px; }
}
