/* =========================================================
   FoodSync — compacte shop promoties
   Geen mega banners. Alleen subtiele teasers + klik-popup.
========================================================= */

.fs-order-promos{
  margin: 16px 0 18px;
}

.fs-order-promos-row{
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding: 16px 12px 10px 2px;
  scrollbar-width: thin;
}

.fs-order-promo-card{
  appearance: none;
  position: relative;
  overflow: visible;

  border-width: var(--fs-order-promo-border-width, 1px);
  border-style: var(--fs-order-promo-border-style, solid);
  border-color: var(--fs-order-promo-border-color, var(--fs-border, rgba(17,24,39,.10)));

  background: var(--fs-order-promo-bg, var(--fs-surface, #fff));
  color: var(--fs-order-promo-title-color, var(--fs-text, #121212));
  border-radius: var(--fs-radius-card, 16px);

  min-height: 76px;
  min-width: min(340px, 88vw);
  max-width: 390px;
  flex: 0 0 auto;

  display: grid;
  grid-template-columns: auto minmax(0,1fr) 24px;
  align-items: center;
  gap: 12px;

  padding: 13px 14px;
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;

  box-shadow: 0 10px 24px rgba(15,23,42,.06);
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease,
    background-color .18s ease;
}

.fs-order-promo-card:hover{
  transform: translateY(-1px);
  border-color: var(
    --fs-order-promo-border-color,
    color-mix(in srgb, var(--fs-primary, #f72828) 30%, var(--fs-border, rgba(17,24,39,.10)))
  );
  box-shadow: 0 14px 30px rgba(15,23,42,.10);
}

/* =========================================================
   Border stijl opties
   Deze classes kunnen vanuit Blade/backoffice worden meegegeven:
   fs-order-promo-border-normal
   fs-order-promo-border-dashed
   fs-order-promo-border-dotted
   fs-order-promo-border-none
   fs-order-promo-border-left
   fs-order-promo-border-top
========================================================= */

.fs-order-promo-card.fs-order-promo-border-normal{
  border-style: solid;
}

.fs-order-promo-card.fs-order-promo-border-dashed{
  border-style: dashed;
}

.fs-order-promo-card.fs-order-promo-border-dotted{
  border-style: dotted;
}

.fs-order-promo-card.fs-order-promo-border-none{
  border-color: transparent;
}

.fs-order-promo-card.fs-order-promo-border-left{
  border: 1px solid transparent;
  border-left-width: var(--fs-order-promo-border-width, 4px);
  border-left-style: solid;
  border-left-color: var(--fs-order-promo-border-color, var(--fs-primary, #f72828));
}

.fs-order-promo-card.fs-order-promo-border-top{
  border: 1px solid transparent;
  border-top-width: var(--fs-order-promo-border-width, 4px);
  border-top-style: solid;
  border-top-color: var(--fs-order-promo-border-color, var(--fs-primary, #f72828));
}

.fs-order-promo-icon{
  width: 44px;
  height: 44px;
  border-radius: 0;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: transparent !important;
  color: var(--fs-primary, #f72828);
  font-size: 23px;
  line-height: 1;

  flex: 0 0 44px;
  overflow: visible;
}

.fs-order-promo-icon .fs-order-promo-icon-set{
  display: block;
  width: 30px;
  height: 30px;
  background: var(--fs-order-promo-icon-color, #ffffff);
  -webkit-mask: var(--fs-ann-icon) center / contain no-repeat;
  mask: var(--fs-ann-icon) center / contain no-repeat;
}

.fs-order-promo-icon img{
  width: 31px;
  height: 31px;
  object-fit: contain;
  display: block;

  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.fs-order-promo-copy{
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.fs-order-promo-badge{
  position: absolute;
  top: -11px;
  right: -7px;
  z-index: 20;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 23px;
  padding: 0 10px;

  border-radius: 999px;
  background: var(--fs-order-promo-badge-bg, var(--fs-primary, #f72828));
  color: var(--fs-order-promo-badge-color, var(--fs-primary-contrast, #ffffff));

  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;

  /* Hier stond een rand van 2px in de kaartkleur. Bedoeling was dat de badge
     uit de kaart leek te zijn gestanst. Maar de badge hangt met top:-11px voor
     ruim de helft buiten de kaart, dus die rand lag daar op de paginakleur en
     werd gezien als een losse blauwe omlijning om de tekst -- precies de kleur
     die als teaser-achtergrond is ingesteld. Geen rand: de pil staat gewoon
     op zichzelf. */
  border: 0;
  box-shadow: none;
  pointer-events: none;
}

.fs-order-promo-title{
  color: var(--fs-order-promo-title-color, var(--fs-heading, #121212));
  font-size: 14px;
  font-weight: 900;
  line-height: 1.22;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fs-order-promo-subtitle{
  color: var(--fs-order-promo-muted-color, var(--fs-muted, #6b7280));
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.28;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fs-order-promo-arrow{
  width: 16px;
  height: 16px;
  min-width: 16px;

  border-radius: 999px;
  /* Kleur van het info-rondje is per promoblok in te stellen. Staat er niets
     ingevuld, dan blijft het de merkkleur zoals het altijd was. */
  border: 1.5px solid var(--fs-order-promo-arrow-color, var(--fs-primary, #f72828));
  background: transparent;
  color: var(--fs-order-promo-arrow-color, var(--fs-primary, #f72828));

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 12px;
  font-weight: 900;
  font-family: Arial, system-ui, sans-serif;
  font-style: normal;
  line-height: 1;

  box-shadow: none;
  transform: none;
}

.fs-order-promo-card:hover .fs-order-promo-arrow{
  background: transparent;
  border-color: var(--fs-order-promo-arrow-color, var(--fs-primary-hover, var(--fs-primary, #f72828)));
  color: var(--fs-order-promo-arrow-color, var(--fs-primary-hover, var(--fs-primary, #f72828)));
}

/* =========================================================
   Modal / popup
========================================================= */

.fs-order-promo-modal{
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
}

.fs-order-promo-modal.is-open{
  display: block;
}

.fs-order-promo-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.72) !important;
  backdrop-filter: blur(6px);
}

.fs-order-promo-dialog{
  position: absolute;
  left: 50%;
  top: 50%;

  width: min(620px, calc(100vw - 28px));
  max-height: min(780px, calc(100vh - 34px));
  transform: translate(-50%, -50%);

  background: var(--fs-order-promo-modal-bg, var(--fs-surface, #fff));
  color: var(--fs-text, #121212);

  --fs-order-promo-popup-title-fallback: #ffffff;

  border-radius: var(--fs-radius-panel, 24px);
  overflow: hidden;

  box-shadow: 0 30px 80px rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.24);
}

.fs-order-promo-modal.is-image-only .fs-order-promo-dialog{
  width: min(800px, calc(100vw - 28px));
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: var(--fs-radius-panel, 24px);
  overflow: hidden;
}

.fs-order-promo-close{
  display: none !important;
}

.fs-order-promo-image{
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8.5;
  background: #f3f4f6;
  overflow: hidden;
}

.fs-order-promo-modal.is-image-only .fs-order-promo-image{
  aspect-ratio: auto;
  background: transparent;
}

.fs-order-promo-image img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fs-order-promo-modal.is-image-only .fs-order-promo-image img{
  height: auto;
  max-height: calc(100vh - 60px);
  object-fit: contain;
  border-radius: var(--fs-radius-panel, 24px);
}

.fs-order-promo-overlay-btn{
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 2;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 42px;
  padding: 0 16px;

  border-radius: var(--fs-radius-btn, 12px);
  background: var(--fs-primary, #f72828);
  color: var(--fs-primary-contrast, #fff);

  text-decoration: none;
  font-size: 13px;
  font-weight: 900;

  box-shadow: 0 14px 34px rgba(0,0,0,.25);
}

.fs-order-promo-dialog-body{
  padding: 26px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* Badge in popup bewust verbergen.
   Badge hoort alleen op de compacte promo-card. */
.fs-order-promo-dialog-badge{
  display: none !important;
}

.fs-order-promo-dialog-title{
  margin: 0;
  color: var(--fs-order-promo-modal-title-color, var(--fs-order-promo-popup-title-fallback, #ffffff));
  font-size: 23px;
  line-height: 1.34;
  font-weight: 680;
  letter-spacing: -.02em;
}

.fs-order-promo-dialog-text{
  margin: 12px 0 0;
  color: var(--fs-order-promo-modal-muted-color, var(--fs-muted, #d1d5db));
  font-size: 14px;
  line-height: 1.58;
  font-weight: 350;
}

.fs-order-promo-btn{
  margin-top: 18px;
  margin-left: auto;
  align-self: flex-end;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 44px;
  padding: 0 18px;

  border-radius: var(--fs-radius-btn, 12px);
  background: var(--fs-primary, #f72828);
  color: var(--fs-primary-contrast, #fff);

  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
}

body.fs-order-promo-lock{
  overflow: hidden;
}

/* =========================================================
   Mobiel — horizontale scroll met 2 rijen
========================================================= */

@media (max-width: 760px){
  .fs-order-promos{
    margin: 14px 0 16px;
  }

  .fs-order-promos-row{
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(2, minmax(72px, auto));
    grid-auto-columns: minmax(280px, calc(92vw - 18px));

    gap: 12px 12px;

    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;

    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;

    padding: 16px 10px 10px 2px;
    scrollbar-width: thin;
  }

  .fs-order-promo-card{
    min-height: 72px;
    min-width: 0;
    width: 100%;
    max-width: none;

    grid-template-columns: auto minmax(0,1fr) 24px;
    gap: 11px;
    padding: 12px 13px;

    border-radius: var(--fs-radius-card, 15px);
    scroll-snap-align: start;
  }

  .fs-order-promo-icon{
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    font-size: 22px;
  }

  .fs-order-promo-icon img{
    width: 30px;
    height: 30px;
  }

  .fs-order-promo-title{
    font-size: 13.5px;
    line-height: 1.22;
  }

  .fs-order-promo-subtitle{
    font-size: 12px;
    line-height: 1.26;
  }

  .fs-order-promo-badge{
    top: -9px;
    right: -2px;
    min-height: 22px;
    padding: 0 11px;
    font-size: 11px;
  }

  .fs-order-promo-dialog{
    left: 50%;
    right: auto;
    bottom: auto;
    top: 50%;

    width: min(94vw, 620px);
    max-height: calc(100vh - 40px);
    transform: translate(-50%, -50%);

    border-radius: var(--fs-radius-panel, 24px);
  }

  .fs-order-promo-modal.is-image-only .fs-order-promo-dialog{
    left: 50%;
    right: auto;
    bottom: auto;
    top: 50%;

    width: min(94vw, 760px);
    max-height: calc(100vh - 40px);
    transform: translate(-50%, -50%);

    border-radius: var(--fs-radius-panel, 24px);
  }

  .fs-order-promo-image{
    aspect-ratio: 16 / 9;
  }

  .fs-order-promo-dialog-body{
    padding: 22px 20px 26px;
  }

  .fs-order-promo-dialog-title{
    font-size: 20px;
    line-height: 1.34;
  }

  .fs-order-promo-dialog-text{
    font-size: 14px;
    line-height: 1.56;
    font-weight: 350;
  }

  .fs-order-promo-overlay-btn{
    right: 14px;
    bottom: 14px;
    min-height: 40px;
  }
}

/* =========================================================
   Kleine mobiel — iets compacter, maar nog steeds premium
========================================================= */

@media (max-width: 420px){
  .fs-order-promos-row{
    grid-auto-columns: minmax(380px, calc(94vw - 20px));
    gap: 11px 11px;
    padding-right: 8px;
  }

  .fs-order-promo-card{
    min-height: 70px;
    padding: 11px 12px;
  }

  .fs-order-promo-icon{
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .fs-order-promo-title{
    font-size: 13px;
  }

  .fs-order-promo-subtitle{
    font-size: 11.8px;
  }
}

/* =========================================================
   FINAL OVERRIDE — popup knop rechts + titelkleur correct
========================================================= */

.fs-order-promo-dialog-body{
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
}

.fs-order-promo-dialog-title{
  color: var(--fs-order-promo-modal-title-color, #ffffff) !important;
}

.fs-order-promo-dialog-text{
  font-weight: 350 !important;
}

.fs-order-promo-btn{
  margin-top: 18px !important;
  margin-left: auto !important;
  margin-right: 0 !important;
  align-self: flex-end !important;

  display: inline-flex !important;
  width: auto !important;
  max-width: max-content !important;
}

/* =========================================================
   FINAL HARD FIX — popup button altijd rechts onderin
========================================================= */

.fs-order-promo-dialog-body{
  position: relative !important;
  display: block !important;
  padding: 26px !important;
  padding-bottom: 94px !important;
  box-sizing: border-box !important;
}

.fs-order-promo-dialog-body .fs-order-promo-btn{
  position: absolute !important;
  right: 26px !important;
  bottom: 26px !important;
  left: auto !important;

  margin: 0 !important;
  float: none !important;
  align-self: auto !important;

  display: inline-flex !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: max-content !important;

  align-items: center !important;
  justify-content: center !important;
}

@media (max-width: 760px){
  .fs-order-promo-dialog-body{
    padding: 22px 20px 88px !important;
  }

  .fs-order-promo-dialog-body .fs-order-promo-btn{
    right: 20px !important;
    bottom: 22px !important;
  }
}

/* =========================================================
   DESKTOP FIX — promo cards netjes gelijk met productgrid
   Mobiel blijft ongemoeid
========================================================= */

@media (min-width: 761px){
  .fs-order-promos{
    width:100%;
    margin: 16px 0 34px;
  }

  .fs-order-promos-row{
    display:flex;
    width:100%;
    gap:16px;

    overflow-x:visible;
    overflow-y:visible;
    scroll-snap-type:none;

    padding:16px 0 10px;
    box-sizing:border-box;
    scrollbar-width:none;
  }

  .fs-order-promos-row::-webkit-scrollbar{
    display:none;
  }

  .fs-order-promo-card{
    flex:1 1 0;
    min-width:0;
    max-width:none;
    width:auto;

    min-height:80px;
    padding:14px 16px;

    box-sizing:border-box;
  }

  .fs-order-promo-title{
    font-size:14px;
  }

  .fs-order-promo-subtitle{
    font-size:12.5px;
  }
}


/* =========================================================
   MOBILE LANDSCAPE FIX — Android horizontaal
   2x2 promo grid + groene winkelmandbalk afdwingen
========================================================= */

@media (orientation: landscape) and (max-width: 980px){
  .fs-order-promos{
    margin: 14px 0 18px !important;
  }

  .fs-order-promos-row{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    grid-auto-columns: initial !important;
    grid-template-rows: auto !important;

    gap: 12px !important;

    width: 100% !important;
    max-width: 100% !important;

    overflow-x: visible !important;
    overflow-y: visible !important;
    scroll-snap-type: none !important;

    padding: 14px 0 8px !important;
    box-sizing: border-box !important;
  }

  .fs-order-promo-card{
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 68px !important;

    grid-template-columns: 42px minmax(0, 1fr) 22px !important;
    gap: 10px !important;
    padding: 11px 12px !important;

    scroll-snap-align: unset !important;
  }

  .fs-order-promo-icon{
    width: 38px !important;
    height: 38px !important;
    flex-basis: 38px !important;
    font-size: 21px !important;
  }

  .fs-order-promo-icon img{
    width: 28px !important;
    height: 28px !important;
  }

  .fs-order-promo-title{
    font-size: 13px !important;
    line-height: 1.18 !important;
  }

  .fs-order-promo-subtitle{
    font-size: 11.5px !important;
    line-height: 1.22 !important;
  }

  .fs-order-promo-badge{
    top: -9px !important;
    right: -4px !important;
    min-height: 21px !important;
    padding: 0 10px !important;
    font-size: 10.5px !important;
  }

  .fs-order-promo-arrow{
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    font-size: 12px !important;
  }

  /* Winkelmandbalk in landscape ook groen houden */
  body .fs-mobile-cart-bar,
  body .fs-mobile-cart-button,
  body .fs-cart-mobile-bar,
  body .fs-cart-sticky-bar,
  body .fs-sticky-cart,
  body [data-fs-mobile-cart],
  body [data-fs-cart-bar]{
    background: #22C55E !important;
    background-color: #22C55E !important;
    color: #ffffff !important;
    border-color: #1DA750 !important;
  }

  body .fs-mobile-cart-bar *,
  body .fs-mobile-cart-button *,
  body .fs-cart-mobile-bar *,
  body .fs-cart-sticky-bar *,
  body .fs-sticky-cart *,
  body [data-fs-mobile-cart] *,
  body [data-fs-cart-bar] *{
    color: #ffffff !important;
  }
}

/* =========================================================
   FIX — mobiele winkelmandbalk altijd brandingkleur
   Ook in landscape Android
========================================================= */

.fs-cart-sticky{
  background: var(--fs-mobile-cart-bar-bg, #22C55E) !important;
  background-color: var(--fs-mobile-cart-bar-bg, #22C55E) !important;
  color: var(--fs-mobile-cart-bar-text, #ffffff) !important;
  border-color: var(--fs-mobile-cart-bar-border-color, #1DA750) !important;
  border-width: var(--fs-mobile-cart-bar-border-width, 1px) !important;
}

.fs-cart-sticky *,
.fs-cart-sticky-left,
.fs-cart-sticky-label,
.fs-cart-sticky-arrow,
.fs-cart-sticky-badge{
  color: var(--fs-mobile-cart-bar-text, #ffffff) !important;
}

.fs-cart-sticky-badge{
  background: rgba(255,255,255,.16) !important;
  border-color: rgba(255,255,255,.16) !important;
}