/*
* ===================================================
*  CUSTOM CSS – ELEKTRONIKSPECIALISTEN (FULL FIL)
*  – Grön prisbricka med tunn svart kant
*  – Priset i botten på alla kort (PDP-sliders med absolut placering)
*  – Enhetlig typografi i produkt-sidans sliders
*  – Behåller ”Läs mer”-funktionen och övriga temastilar
* ===================================================
*/

/* ---------------------------
   BAS / TEMA (från din tidigare fil)
----------------------------*/

.product-border {
  border:1px solid #ccc;
  display:flex;
  flex-wrap:wrap;
  flex-direction:column;
  height:100%;
  padding:0.5rem;
}
.product-border:hover {
  -moz-box-shadow: 0 0 10px #868e96;
  -webkit-box-shadow: 0 0 10px #868e96;
  box-shadow: 0 0 10px #868e96;
}
.product.swiper-slide, .similar-slider .swiper-slide {
  display:flex;
  height:unset;
}
.similar-slider .swiper-slide .product { margin-bottom:0.5rem; }

.product .producttitle-font-size a,
#product h1.h2,
.similar-slider h3 a { font-weight:400; }

/* Innehåll i flikar */
.tab-content img { max-width:100%; height:auto; display:block; margin:20px auto; }
.tab-content h3 { color:#333; margin-bottom:10px; }
.tab-content p  { color:#555; margin-bottom:15px; }
.tab-content { max-width:95%; margin:0 auto; padding:0 10px; box-sizing:border-box; }
@media (max-width:768px){
  .tab-content{ max-width:98%; padding:0 5px; }
}

/* Nav sista meny */
.navbar-nav>.nav-item:last-child { position:unset!important; }
.navbar-nav>.nav-item:last-child>.dropdown-menu { left:0; width:100%; }
.last-menu{ padding-top:0; padding-bottom:0; }
.last-menu .brands-heads{ padding-top:1rem; font-size:1.5rem; line-height:1; }
.last-menu .sel-col ul, .last-menu .brands-heads ul { list-style:none; padding-inline-start:0; }
.last-menu .sel-col ul li{
  padding:20px 15px; font-size:20px; text-align:center;
  background-color: #323131;
  color: #ffffff;
}
.last-menu .sel-col ul li:hover{
  cursor:pointer;
  background-color: #ffffff;
  color: #323131;
}
.last-menu .brands-heads ul{ margin-top:0.5rem; }
.last-menu .brands-heads a{ padding-left:0; font-size:0.875rem; }

/* Läs mer */
.read-short{ overflow:hidden; height:240px; }
.readmore-fade{
  background:linear-gradient(0deg,#fff,#ffffff1c)!important;
  position:absolute; bottom:0; left:0; width:100%; height:40%; text-align:center;
}
.read-btn{ padding:8px 16px; border:1px solid; display:inline-block; border-radius:5px; }
.read-btn:hover{ cursor:pointer; opacity:0.7; }

/* ---------------------------
   PRISBRICKA + KORTHÖJD (GLOBAL)
----------------------------*/

/* Variabler – finjustera här vid behov */
:root{
  --price-green:#4cc75a;   /* brickans gröna */
  --price-border:#000000;  /* tunn svart kant */
  --price-radius:12px;
  --price-pad-y:10px;
  --price-pad-x:18px;
  --price-font:700;
  --price-size:18px;

  /* titel-kläm för lika höjd, 3 rader standard */
  --title-lines:3;
  --title-line-height:1.3;
}

/* Prisbrickan (alla vyer) */
.product .product-price,
.product .product-price.disc-price,
#product .product-price,
#product .product-price.disc-price{
  display:inline-block;
  background:var(--price-green);
  color:#fff;
  border:1px solid var(--price-border);
  border-radius:var(--price-radius);
  padding:var(--price-pad-y) var(--price-pad-x);
  font-weight:var(--price-font);
  font-size:var(--price-size);
  line-height:1;
  white-space:nowrap;
  align-self:center;
  text-align:center;
  color:#fff !important;
  background:var(--price-green) !important;
  border-color:var(--price-border) !important;
}

/* Kort = flex-kolumn (globalt) */
.product,
.similar-slider .product{ display:flex; flex-direction:column; height:100%; }

/* Om temat har .caption / .product-content: gör dem flex också */
.product .caption,
.product .product-content{ display:flex; flex-direction:column; height:100%; }

/* Bildsektion låses inte */
.product .image,
.product .product-image,
.similar-slider .product .image{ flex:0 0 auto; }

/* Titel – begränsa rader för lika höjd */
.product .producttitle-font-size,
.similar-slider h3{
  flex:0 0 auto;
  margin-top:10px;
  line-height:var(--title-line-height);
}
.product .producttitle-font-size a,
.similar-slider h3 a{
  display:-webkit-box;
  -webkit-line-clamp:var(--title-lines);
  -webkit-box-orient:vertical;
  overflow:hidden;
  line-height:var(--title-line-height);
  min-height:calc(var(--title-lines) * 1em * var(--title-line-height));
  font-size:1rem;             /* normalisera storlek */
  font-family:inherit;        /* samma typsnitt som övrigt */
  font-weight:400;
}

/* Pris i slutet (globalt – funkar på de flesta sidor) */
.product .product-price,
.similar-slider .product .product-price{ margin-top:auto; margin-bottom:0.25rem; }

/* Förepris */
.product .before,
.similar-slider .before{ opacity:.7; }

/* PDP: bricka under huvudpriset */
#product .product-price{ margin-top:6px; display:inline-block; }

#product .similar-slider .similar-pricing {
    margin-top:auto;
}

#product .similar-slider .similar-pricing .product-before-price {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}