/* ============================================================
   YG-1 — karta produktu w sklepie B2B (abStore)
   Wersja zwarta v3. WKLEJ TO W CAŁOŚCI zamiast dotychczasowej
   zawartości pola: CMS → Układ i wygląd → Własny CSS.
   (Najpierw ZAZNACZ WSZYSTKO w polu i USUŃ, potem wklej to.)
   ============================================================ */

/* --- KARUZELA: nie rozciągaj kart do wysokości najwyższej ---
   (to jest klucz — 611px wpisuje JS jako styl inline na .item,
   a !important w CSS bije style inline) */
.slick-slider .item{ height:auto !important; }
.slick-track{ display:flex !important; align-items:flex-start !important; }
.slick-slide{ height:auto !important; }
.slick-slide > div{ height:auto !important; }

/* --- KARTA --- */
.abs-layout-product-slide{
  height:auto !important;
  border:1px solid #e4e6e9 !important; background:#fff !important;
  padding:14px !important; margin-bottom:16px !important;
  justify-content:flex-start !important;
  transition:box-shadow .16s, border-color .16s !important;
}
.abs-layout-product-slide:hover{
  box-shadow:0 8px 24px rgba(20,25,35,.12) !important; border-color:#b4b8bd !important;
}
.abs-layout-product-slide .abs-col-header,
.abs-layout-product-slide .abs-col-content,
.abs-layout-product-slide .abs-col-img,
.abs-layout-product-slide .abs-col-desc,
.abs-layout-product-slide .abs-col-footer{ border:0 !important; box-shadow:none !important; }

/* --- TREŚĆ: zdjęcie na górze, bez rozpychania w pionie --- */
.abs-layout-product-slide .abs-col-content{
  display:flex !important; flex-direction:column !important;
  justify-content:flex-start !important; flex:0 0 auto !important;
}

/* --- ZDJĘCIE --- */
.abs-layout-product-slide .abs-col-img{
  order:1 !important; width:100% !important; max-width:100% !important; min-height:100px !important;
  display:flex !important; align-items:center !important; justify-content:center !important;
  border-bottom:1px solid #eef0f2 !important;
  margin:0 0 10px 0 !important; padding:0 0 10px 0 !important;
}
/* Wyrównanie paneli "innego typu": zdjęcie na całą szerokość i wyśrodkowane */
.abs-layout-product-slide .abs-col-img .abs-img-wrapper{
  width:100% !important; max-width:100% !important;
  display:flex !important; justify-content:center !important;
}
.abs-layout-product-slide .abs-col-img a{ margin:0 auto !important; }
.abs-layout-product-slide .abs-col-img img{
  max-height:120px !important; width:auto !important; object-fit:contain !important;
}

/* --- KOLEJNOŚĆ: EDP → nazwa + wymiary --- */
.abs-layout-product-slide .abs-col-desc{
  order:2 !important; width:100% !important;
  display:flex !important; flex-direction:column !important;
}
.abs-layout-product-slide .abs-col-desc .abs-catalog-index{ order:1 !important; }
.abs-layout-product-slide .abs-col-desc .product-header{ order:2 !important; }
.abs-layout-product-slide .abs-col-desc .abs-short-desc{ display:none !important; }

/* --- WIERSZ 1 — EDP: sam numer, prefiks "-:" ukryty --- */
.abs-layout-product-slide .abs-catalog-index{
  font-size:0 !important; line-height:0 !important;
  margin:0 0 3px 0 !important; padding:0 !important;
}
.abs-layout-product-slide .abs-catalog-index span{ font-size:0 !important; }
.abs-layout-product-slide .abs-catalog-index span span{
  font-size:14px !important; line-height:1.3 !important;
  color:#23262b !important; font-weight:800 !important;
}

/* --- WIERSZ 2 — nazwa --- */
.abs-layout-product-slide .abs-product-name{ margin:0 0 8px 0 !important; padding:0 !important; }
.abs-layout-product-slide .abs-product-name a{
  font-weight:800 !important; color:#23262b !important; font-size:16px !important;
  line-height:1.25 !important; text-decoration:none !important; letter-spacing:-.2px !important;
}
.abs-layout-product-slide .abs-product-name a:hover{ color:#EC262A !important; }

/* --- WIERSZ 3 — wymiary (ciemny grafit, nie szary) --- */
.abs-layout-product-slide .product-header .product-subname,
.abs-layout-product-slide p.product-subname{
  margin:0 !important; padding:0 !important;
  color:#3a3e44 !important; font-size:14px !important;
  font-weight:600 !important; line-height:1.3 !important;
}

/* --- PRZYCISK "Do koszyka" — czerwień marki YG-1 --- */
.cart-btn, .cart-btn.btn-success, button.cart-btn{
  background-color:#EC262A !important; border-color:#C81E22 !important; color:#fff !important;
}
.cart-btn:hover, .cart-btn:focus, .cart-btn:active{
  background-color:#C81E22 !important; border-color:#C81E22 !important;
}
.cart-btn .abs-icon-cart, .cart-btn .abs-btn-msg{ color:#fff !important; }


/* ============================================================
   KAFEL PRODUKTU (gallery) — wyrównanie wszystkich do jednego wyglądu
   Dotyczy modułów typu "Kolumnowy" i siatki kategorii
   (.abs-layout-product-gallery). Sprawia, że zdjęcie, nazwa,
   cena i przycisk trzymają jedną linię w każdym kaflu.
   ============================================================ */
.abs-layout-product-gallery{
  display:flex !important; flex-direction:column !important; justify-content:flex-start !important;
}

/* Zdjęcie: stałe pudełko, wyśrodkowane */
.abs-layout-product-gallery .abs-col-img{ min-height:140px !important; height:140px !important; }
.abs-layout-product-gallery .abs-col-img img{
  max-height:120px !important; width:auto !important; object-fit:contain !important;
}

/* Nazwa: zawsze 2 wiersze (stała wysokość) — wszystko poniżej trzyma linię.
   Długie nazwy z doklejonymi wymiarami są przycinane do 2 wierszy. */
.abs-layout-product-gallery .abs-product-name{
  min-height:52px !important; max-height:52px !important; margin:6px 0 8px 0 !important;
  display:-webkit-box !important; -webkit-line-clamp:2 !important; -webkit-box-orient:vertical !important;
  overflow:hidden !important; line-height:1.25 !important;
}

/* Blok ceny/przycisku: wyrównany do góry, nie przyklejony do dołu
   (to on skakał, gdy produkt miał linię "Realizacja 2-3 dni") */
.abs-layout-product-gallery .abs-col-img-name{ margin-bottom:0 !important; }
.abs-layout-product-gallery .abs-col-info{ margin-top:0 !important; justify-content:flex-start !important; }
.abs-layout-product-gallery .abs-purchase-details{ margin-top:0 !important; justify-content:flex-start !important; }

/* POKAŻ numer EDP w kaflu (szablon domyślnie ukrywa go przez display:none) */
.abs-layout-product-gallery .abs-catalog-index{
  display:block !important; font-size:13px !important; color:#23262b !important;
  font-weight:700 !important; margin:4px 0 0 0 !important;
}
.abs-layout-product-gallery .abs-catalog-index span{ font-size:13px !important; color:#23262b !important; }


/* ============================================================
   STRONA PRODUKTU — nagłówek (.product-header)
   Kolejność: EDP -> nazwa -> wymiary, ukryty prefiks "-:",
   poprawione proporcje opisów. Nazwa zostaje czerwona.
   ============================================================ */
/* Zawężone do .abs-product-page-header — dotyczy TYLKO strony produktu,
   nie przecieka na karty produktowe (które też używają .product-header). */
.abs-product-page-header .product-header{ display:flex !important; flex-direction:column !important; }

/* Wiersz 1 — EDP (ukryty prefiks "-:", ciemny, wyraźny) */
.abs-product-page-header .product-header .abs-catalog-index{
  order:1 !important; margin:0 0 4px 0 !important;
  font-size:16px !important; font-weight:700 !important; color:#23262b !important;
}
.abs-product-page-header .product-header .abs-catalog-index span{ font-size:14px !important; }
.abs-product-page-header .product-header .abs-catalog-index .indexCatalogue-text{ display:none !important; }

/* Wiersz 2 — nazwa (zostaje czerwona, ustawiona proporcja) */
.abs-product-page-header .product-header .abs-product-name{ order:2 !important; font-size:20px !important; margin:0 0 4px 0 !important; }

/* Wiersz 3 — wymiary (ciemny grafit, 14px) */
.abs-product-page-header .product-header .product-subname{
  order:3 !important; margin:0 !important;
  font-size:14px !important; color:#3a3e44 !important; font-weight:600 !important;
}