/* Mobil (<768 px): kortene højere op. Tablet og desktop er uændrede. kbc_mobile_mode = test (?kbc_mobil=1) | live */
@media (max-width:767px){
  /* 5) Mindre luft omkring overskriften */
  .kbc-modern .kbc-hero{padding:18px 0 16px!important;margin-bottom:16px!important}
  .kbc-modern .kbc-hero header{margin-bottom:14px!important}
  .kbc-modern .kbc-hero-grid{gap:12px!important}
  .kbc-modern .ga-main-title{margin:0!important}
  .kbc-modern .ga-title-sub{margin-top:2px!important}

  /* 3) Tillidslinjerne på én linje */
  .kbc-modern .kbc-hero-grid .kbc-trust{flex-direction:row!important;flex-wrap:wrap;justify-content:center;gap:2px 0!important;margin-top:8px!important;font-size:11.5px!important;line-height:1.5}
  .kbc-modern .kbc-trust li{gap:0!important}
  .kbc-modern .kbc-trust svg{display:none!important}
  .kbc-modern .kbc-hero-grid .kbc-trust{gap:2px 12px!important}
  .kbc-modern .kbc-trust li::before{content:"✓";margin-right:4px;color:#805532;font-weight:700}

  /* 4) Testfotos som smal stribe */
  .kbc-modern .kbc-hero-photos{grid-template-rows:64px!important;gap:6px!important}
  .kbc-modern .kbc-photo{border-radius:10px!important}

  /* 2) Tilbudsboksen på forsiden: logo + beløb + lille knap */
  .kbc-modern .ga-offers-heading{margin:4px 0 8px!important;font-size:13px!important}
  .kbc-modern .ga-top-offer{display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"name btn" "offer btn";align-items:center;gap:2px 10px!important;padding:10px 12px!important;min-height:0!important}
  .kbc-modern .ga-top-offer>.ga-top-name{grid-area:name;display:flex;align-items:center;gap:8px;margin:0!important}
  .kbc-modern .ga-top-offer>.ga-top-name img{width:52px!important;height:auto!important;max-height:26px;object-fit:contain}
  .kbc-modern .ga-top-offer>.ga-top-name strong{font-size:14px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .kbc-modern .ga-top-offer>.ga-top-name{min-width:0}
  .kbc-modern .ga-top-offer>div:not(.ga-top-name){grid-area:offer;margin:0!important;font-size:12px;line-height:1.35}
  .kbc-modern .ga-top-offer>div:not(.ga-top-name) strong{display:block;font-size:15px!important;white-space:nowrap}
  .kbc-modern .ga-top-offer>div:not(.ga-top-name) .ga-offer-note{display:block;font-size:12px;margin-top:1px}
  .kbc-modern .ga-top-offer>a{grid-area:btn;padding:9px 12px!important;font-size:13px!important;white-space:nowrap;margin:0!important;width:auto!important}
  .kbc-modern .ga-offer-dots{margin-top:6px!important}


  /* 5) Korttekst højst 3 linjer, hele teksten ved "Mehr lesen" */
  .kbc-modern .ga-modern-card .ga-description p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
  .kbc-modern .ga-modern-card.kbc-open .ga-description p{display:block;-webkit-line-clamp:unset;overflow:visible}
}
@media (max-width:767px){
  /* 1) Filter + Sortieren: to lige store knapper lige over listen */
  .kbc-modern .kbc-toolbar{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:4px 0 8px}
  .kbc-modern .kbc-tool{position:relative;display:flex;align-items:center;justify-content:center;gap:8px;height:44px;padding:0 12px;border:1px solid #e3d3bb;border-radius:12px;background:#fff;color:#2c231b;font:600 14px/1 Montserrat,sans-serif;cursor:pointer;box-sizing:border-box;margin:0}
  .kbc-modern .kbc-tool svg{width:18px;height:18px;flex:none;color:#805532}
  .kbc-modern .kbc-tool:active{background:#faf6ed}
  .kbc-modern .kbc-tool-n{display:inline-block;min-width:20px;padding:0 6px;border-radius:10px;background:#805532;color:#fff;font-size:11px;line-height:20px;text-align:center}
  .kbc-modern .kbc-tool-n[hidden]{display:none}
  /* Telefonens egen vælger ligger usynligt over Sortieren-knappen */
  .kbc-modern .kbc-tool-sort select{position:absolute!important;inset:0;width:100%!important;height:100%!important;opacity:0;cursor:pointer;font-size:16px;margin:0!important;border:0!important}
  .kbc-modern .kbc-tool-sort:focus-within{outline:2px solid #805532;outline-offset:2px}
  /* Antal-linjen: lille; "Filter zurücksetzen" kun når der er aktive filtre */
  .kbc-modern.kbc-mobile-tools .ga-result-bar{margin:0 2px 26px!important;font-size:12px}
  .kbc-modern.kbc-mobile-tools .ga-result-bar .ga-filter-count{margin:0!important;font-size:12px!important;color:#7a6a58}
  .kbc-modern.kbc-mobile-tools:not(.kbc-has-filters) .ga-box-reset{display:none!important}

  /* Filterark nedefra */
  .kbc-sheet[hidden]{display:none!important}
  .kbc-sheet{position:fixed;inset:0;z-index:100000}
  .kbc-sheet-backdrop{position:absolute;inset:0;background:rgba(30,22,14,.45)}
  .kbc-sheet-panel{position:absolute;left:0;right:0;bottom:0;max-height:86vh;display:flex;flex-direction:column;background:#fff;border-radius:18px 18px 0 0;box-shadow:0 -8px 30px rgba(0,0,0,.18);animation:kbcSheetIn .22s ease-out}
  @keyframes kbcSheetIn{from{transform:translateY(100%)}to{transform:none}}
  .kbc-sheet-head{display:flex;align-items:center;justify-content:space-between;padding:16px 18px 10px;border-bottom:1px solid #f0e6d6}
  .kbc-sheet-head strong{font:700 17px/1.2 Montserrat,sans-serif;color:#18140f}
  .kbc-sheet-close{display:grid;place-items:center;flex:none;width:36px!important;height:36px!important;min-width:0;padding:0!important;border:0;border-radius:50%!important;background:#f4eadb;color:#4b3d30;font-size:22px;line-height:1;cursor:pointer}
  .kbc-sheet-body{overflow:auto;padding:14px 18px;-webkit-overflow-scrolling:touch}
  .kbc-sheet-body .ga-modern-filters{display:grid!important;grid-template-columns:1fr!important;gap:14px!important;margin:0!important;padding:0!important;border:0!important;box-shadow:none!important;background:none!important}
  .kbc-sheet-body .ga-filter-field{display:grid!important;grid-template-columns:28px 1fr;grid-template-rows:auto auto;align-items:center;column-gap:8px;padding:0!important;border:0!important;margin:0!important;width:auto!important}
  .kbc-sheet-body .ga-filter-field .ga-filter-icon{grid-row:1/3}
  .kbc-sheet-body .ga-filter-field select{width:100%!important;height:44px;font-size:16px!important}
  .kbc-sheet-body .ga-filter-sort{display:none!important}
  .kbc-sheet-body .ga-extra{display:block!important;margin:14px 0 0!important;padding:12px 0 0;border-top:1px solid #f0e6d6}
  .kbc-sheet-body .ga-extra summary{font-weight:600}
  .kbc-sheet-foot{display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:center;padding:12px 18px calc(12px + env(safe-area-inset-bottom));border-top:1px solid #f0e6d6}
  .kbc-sheet-reset{background:none;border:0;padding:10px 4px;color:#684326;text-decoration:underline;font:500 14px Montserrat,sans-serif;cursor:pointer}
  .kbc-sheet-apply{height:48px;border:0;border-radius:12px;background:#805532;color:#fff;font:700 15px Montserrat,sans-serif;cursor:pointer}
  html.kbc-sheet-open,html.kbc-sheet-open body{overflow:hidden}

}
@media (max-width:379px){.kbc-modern .ga-top-offer>.ga-top-name strong{display:none!important}.kbc-modern .ga-top-offer>.ga-top-name img{width:60px!important;max-height:30px}}
