.bsuc-vehicle-page,
.bsuc-vehicle{
  color:var(--ehn-cars-color-text,#151515);
  --bsuc-detail-border:var(--ehn-cars-color-border,#e5e5e5);
  --bsuc-detail-radius:var(--ehn-cars-radius-md,14px);
}

.bsuc-vehicle-page{padding:16px}
.bsuc-vehicle{padding:16px}

.bsuc-gallery{
  display:grid;
  gap:10px;
}

.bsuc-gallery--cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}
.bsuc-gallery--cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.bsuc-gallery--cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.bsuc-gallery--cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.bsuc-gallery--cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}
.bsuc-gallery--cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}

.bsuc-gallery__item{
  display:block;
  overflow:hidden;
  background:rgba(0,0,0,.04);
}

.bsuc-gallery__img{
  width:100%;
  height: var(--bsuc-gallery-thumb-h, 140px);
  display:block;
  object-fit: var(--bsuc-gallery-thumb-fit, cover);
}

/* Model image (single) */
.bsuc-model-image{
  /* IMPORTANT: force consistent layout and allow upscaling of small uploads */
  width:100% !important;
  max-width: var(--bsuc-model-img-w, 1704px);
  aspect-ratio: var(--bsuc-model-img-ar, 1.33125);
  object-fit: var(--bsuc-model-img-fit, cover);
  display:block;
  background:rgba(0,0,0,.04);
}

/* Lightbox */
.bsuc-lightbox{
  position:fixed;
  inset:0;
  z-index:99999;
  display:none;
  align-items:center;
  justify-content:center;
}

.bsuc-lightbox.is-open{display:flex}

.bsuc-lightbox__backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.90);
}

.bsuc-lightbox__content{
  position:relative;
  z-index:2;
  /* Respect backend max size, but never exceed viewport */
  width:min(var(--bsuc-lb-maxw, 1704px), 92vw);
  height:min(var(--bsuc-lb-maxh, 1280px), 92vh);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
}

.bsuc-lightbox__stage{
  position:relative;
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
}

.bsuc-lightbox__img{
  /* Force the image to fill the stage (upscale if needed) */
  width:100%;
  height:100%;
  object-fit:var(--bsuc-lb-fit, contain);
  display:block;
}

.bsuc-lightbox__btn{
  position:absolute;
  border:none;
  background:none !important;
  color:#fff;
  width:44px;
  height:44px;
  border-radius:var(--ehn-cars-radius-pill,999px);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:78px;
  line-height:1;
}

.bsuc-lightbox__btn:hover{
  color:#32f6b1;
}

.bsuc-lightbox__close{top:18px;right:-70px;font-size:78px}
.bsuc-lightbox__prev{left:-70px;top:50%;transform:translateY(-50%)}
.bsuc-lightbox__next{right:-70px;top:50%;transform:translateY(-50%)}

body.bsuc-lightbox-open{overflow:hidden}

/* Utility outputs (debug / all properties) */
.bsuc-json,
.bsuc-props-json{
  background:rgba(0,0,0,.04);
  padding:12px;
  border-radius:var(--ehn-cars-radius-md,14px);
  overflow:auto;
  max-width:100%;
}

.bsuc-props-table-wrap{overflow:auto;max-width:100%}
.bsuc-props-table{width:100%;border-collapse:collapse;font-size:14px}
.bsuc-props-table th,
.bsuc-props-table td{padding:10px 12px;border-bottom:1px solid rgba(0,0,0,.08);text-align:left;vertical-align:top}
.bsuc-props-table th{font-weight:900}


/* -------------------------------------------------------------------------
   Bilinfo: Global sektioner (API)
------------------------------------------------------------------------- */

.bsuc-vehicle-sections{margin-top:16px}
.bsuc-vehicle-sections__item {
  position: relative;
  border-bottom: 3px solid #dddddd; /* Den grå basis-streg */
  margin: 0px 0;
  cursor: pointer;
}

.bsuc-vehicle-sections__item::after {
  content: "";
  position: absolute;
  bottom: -3px; /* Lægges præcis oven på den grå border */
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(65deg, #8224e3 0%, #112492 50%, #bf82fd 100%);
  
  /* Start-tilstand: Skaleret ned til 0% bredde */
  transform: scaleX(0);
  /* Sætter ankerpunktet til venstre, så den vokser derfra */
  transform-origin: left;
  
  transition: transform 0.4s ease-in-out;
}

/* Her er magien: Trigger animationen på både hover OG hvis klassen 'active' findes */
.bsuc-vehicle-sections__item:hover::after,
.bsuc-vehicle-sections__item.active::after {
  transform: scaleX(1);
}

/* Accordion */
.bsuc-vehicle-sections__summary{cursor:pointer;list-style:none;padding:14px 0px;font-weight:800}
.bsuc-vehicle-sections__summary::-webkit-details-marker{display:none}
.bsuc-vehicle-sections__content {
  padding: 16px 16px 16px;
  /* Vi kombinerer støj (øverst) og gradient (nederst) med et komma */
  background: 
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E"),
    #f9f9f9;
  background-blend-mode: overlay;
  box-shadow: #8224e3;
}


/* Stack */
.bsuc-vehicle-sections--stack .bsuc-vehicle-sections__title{margin:0;padding:14px 16px;font-weight:800;font-size:16px}
.bsuc-vehicle-sections--stack .bsuc-vehicle-sections__content{padding:0 16px 16px 16px}

/* Equipment list */
.bsuc-equipment__list{margin:0;padding-left:18px;column-gap:28px}
.bsuc-equipment[data-cols="2"] .bsuc-equipment__list{columns:2}
.bsuc-equipment[data-cols="3"] .bsuc-equipment__list{columns:3}
.bsuc-equipment[data-cols="4"] .bsuc-equipment__list{columns:4}
.bsuc-equipment__item{break-inside:avoid}

/* Specs grid (closer to biltorvet.dk) */
.bsuc-specgrid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px 60px;
  padding:6px 0;
}
.bsuc-specgrid__row{min-width:0}
.bsuc-specgrid__label{font-size:12px;font-weight:700;opacity:.75;margin-bottom:4px}
.bsuc-specgrid__value{font-size:16px;font-weight:500;word-break:break-word}

@media (max-width: 720px){
  .bsuc-specgrid{grid-template-columns:1fr;gap:14px}
}


/* Checklist (Sikkerhed og komfort / Udseende) */
.bsuc-checklist__list{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px 60px;
  padding:6px 0;
}
.bsuc-checklist__item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-width:0;
}
.bsuc-checklist__label{font-size:16px;font-weight:500;word-break:break-word}
.bsuc-checklist__mark{
  width:22px;
  height:22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}
.bsuc-checklist__item.is-ok .bsuc-checklist__mark::before{
  content:"✓";
  font-size:22px;
  font-weight:800;
  line-height:1;
}
@media (max-width: 720px){
  .bsuc-checklist__list{grid-template-columns:1fr;gap:14px}
}

.ElectricLabelCar {
	background: #4af2a1 !important;
  display: inline-block !important;
	width: 40% !important;
	font-weight: 700;
	margin-bottom: 10px !important;
	align-content: center !important;
	text-align: center !important;
}

.StickItOn{
  position: sticky;
  top: 0;          /* hvor den skal “klistre” fast */
  z-index: 1000;   /* så den ligger over indholdet */
}

.car-spec .label{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
}

.car-spec .label .ti{
  font-size: 28px;
  line-height: 1;
  color: var(--ehn-cars-color-ink,#050607);
}


/* ------------------------------------------------------------
   Mobile gallery: carousel (horizontal scroll + snap), no links
   ------------------------------------------------------------ */
@media (max-width: 768px){
  .bsuc-gallery{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;gap:10px;width:100vw;margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw);padding-left:10px;padding-right:10px;}
  .bsuc-gallery__item{flex:0 0 100%!important;scroll-snap-align:start;width:100%!important;}
  .bsuc-gallery__img{width:100%!important;height:auto!important;object-fit:contain;display:block;}
  .bsuc-gallery a,.bsuc-gallery a.bsuc-lightbox-trigger{pointer-events:none!important;cursor:default!important;text-decoration:none!important;}
  .bsuc-gallery::-webkit-scrollbar{display:none;}
}


.btn-book{
  background: #3b52fa;
  border: none;
  padding: 10px;
  border-radius: 5px !important;
  color: #fff;
  text-decoration: none;
  display: inline;
  gap: .15rem;              /* afstand mellem ikon og tekst */
  width: 30%;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  margin: 2px;
  overflow: hidden;
  transform: translateZ(0);
  transition:
    background-color .20s ease,
    transform .20s ease,
    box-shadow .5s ease,
    filter .20s ease;
}

/* Mobil: fuld bredde */
@media (max-width: 767px){
  .btn-book{
    width: 30%;
    display: inline;
    font-size: 12px !important;
    gap: .15rem !important;
    text-align: center !important;
    align-items: center;
    justify-content: center;
  }
}

/* Hover / fokus */
.btn-book:hover,
.btn-book:focus-visible{
  background: #0d1135;
  outline: none;
  color: #fff !important;
}
/* unified radius */
.bsuc-vehicle :is(
  .bsuc-gallery__item,
  .bsuc-vehicle-sections__section,
  .bsuc-pill,
  .bsuc-btn,
  .bsuc-contact-card,
  .bsuc-vehicle-hero,
  .bsuc-box,
  .bsuc-lightbox__nav,
  .bsuc-lightbox__close,
  .bsuc-gallery img,
  .bsuc-gallery__thumb,
  .bsuc-card,
  .bsuc-gallery__viewport
){border-radius:10px !important;}
