/*
 * Custom code goes here.
 * A template should always ship with an empty custom.css
 */
details.gm-collapsible {
    display: none;
}
.table {
--bs-table-striped-bg: #fff;
}
.input-group.bootstrap-touchspin {
    width: 100%;
    height: 100%;
}
.input-group2.bootstrap-touchspin {
    width: 50%;
    height: 100%;
}
.product-additional-info-linia {
    border-top: 1px solid rgba(160, 160, 160, .25);
    padding-top: 1rem;
}
.col.col-12.col-sm-3.col-add-qty {
    width: 30%;
    margin-right: -100px;
}
.col.col-12.col-sm-3.col-txtqty {
    width: 10%;
    display: flex;
    align-items: center;
}
/* Ramka w koło obrazku miniatury na liscie produktow */
a.thumbnail.product-thumbnail {
    border: 0.05rem solid #f0f0f0;
}
/* --- MINIATURA: bezpieczny bufor na belkę --- */
article.product-miniature.product-miniature-default.product-miniature-grid.product-miniature-layout-2.js-product-miniature {
    height: 480px;
}
/* --- RESET mojej poprzedniej belki --- */
.product-miniature .product-description::after { display:none !important; }

/* --- Biały layout, nic nie zmieniamy wizualnie: tylko ułożenie --- */
.product-miniature .product-description{
  position: relative;
  padding-bottom: 140px;
}

/* Cena w lewym dolnym rogu; w osi pionowej z przyciskiem */
.product-miniature .product-price-and-shipping{
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
}

/* Zero zmiany kolorów – tylko czytelność */
.product-miniature .product-price{
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1;
}
.product-miniature .regular-price{
  text-decoration: line-through;
  opacity: .7;
  font-size: .9rem;
}

/* Przyciski po prawej – bez zmiany stylu */
.product-miniature .product-add-cart{
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
}
.product-miniature .product-add-cart .input-qty{ display:none; }
.product-miniature .btn.add-to-cart{
  height: 44px;
  padding: 10px 14px;
}

/* Tytuł – dwie linie, by nie „wpadał” w dół */
.product-miniature .product-title a{
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.5em;
}

/* [LISTING] Regularna CENA POD promocyjną – tylko gdy istnieje regular-price */
@supports (selector(:has(*))) {
  .product-miniature .product-price-and-shipping:has(.regular-price){
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    height: auto;
  }
  .product-miniature .product-price-and-shipping:has(.regular-price) .product-price{ line-height: 1; }
  .product-miniature .product-price-and-shipping:has(.regular-price) .regular-price{
    margin: 0;
    font-size: 12px;
  }
}

/* Mobile: GRID view */
@media (max-width: 575.98px){
  .product-miniature .product-description{ padding-bottom: 156px; }
  .homepage.article.product-miniature.product-miniature-default.product-miniature-grid.product-miniature-layout-2.js-product-miniature {
      height: 400px;
  }

  article.product-miniature.product-miniature-default.product-miniature-grid.product-miniature-layout-2.js-product-miniature {
      height: 380px;
  }

  .homepage .products-grid .product-miniature-layout-2 .product-description {
      margin-top: 20px;
  }
.homepage .swiper-dots-outside {
    margin-top: 10px;
}
  .products-grid .product-miniature-layout-2 .product-description { padding: 1rem; margin-top: 0px; }
  h2.h3.product-title {max-width: 100%;}
  .homepage.product-miniature .homepage.product-price-and-shipping {bottom: 84px !important;z-index: 3;}
.homepage h2.h3.product-title {max-width: 50%;}
.product-price-and-shipping.homepage {bottom: 84px !important;}
  .product-miniature .btn.add-to-cart{ height: 45px; padding: 5px 15px; }
  .homepage .product-miniature .product-price {
      padding-bottom: 25px;
  }
  .col.col-12.col-sm-3.col-txtqty{ width: 20%; display: flex; align-items: center; }
  .col.col-12.col-sm-3.col-add-qty{ width: 50%; margin-right: -100px; }
.elementor-widget-wrap {
    margin-bottom: 5px;
}
a.btn.btn-product-list {
    width: 100%;
    margin-top: -20px;
}
  .product-miniature .product-add-cart{ bottom: 24px; }
  .product-miniature .product-price-and-shipping{ bottom: 69px !important; z-index: 3; }

  /* LIST view mobile – układ sekcji */
  .product-miniature-list .product-miniature-list-row{
    grid-template-columns: 120px 1fr;
    grid-template-areas:
      "thumb desc"
      "thumb buy";
    row-gap:8px;
  }
  .product-miniature-list .product-miniature-list-row > .col-12.col-sm-3{ grid-area: thumb; }
  .product-miniature-list .product-miniature-list-row > .col.col-description{ grid-area: desc; }
  .product-miniature-list .product-miniature-list-row > .col-12.col-sm-auto.col-buy{
    grid-area: buy;
  }
  .product-miniature-list .btn.add-to-cart{ width:auto; min-width:200px; }
}

/* === Product page: układ cen === */
.product_p_price_container .product-prices{
  display:flex; align-items:baseline; gap:10px; flex-wrap:wrap;
}
.product_p_price_container .product-price{ display:flex; align-items:baseline; gap:10px; }
.product_p_price_container .product-price .product-discount{ order:1; }
.product_p_price_container .product-price .current-price{   order:2; }
.product_p_price_container .product-price .discount{        order:3; margin-left:6px; }
.product_p_price_container .product-price .regular-price{
  text-decoration:line-through; opacity:0.8; font-size:1rem; color:#000; font-weight:400;
}
.product_p_price_container .product-price .current-price .current-price-value{
  font-size:2rem; font-weight:800; line-height:1;
}

/* [PDP] TTC + omniprice */
.product_p_price_container .tax-shipping-delivery-label{
  order:4; color:#888; font-size:.95rem;
  display:grid; grid-template-columns:max-content 1fr; column-gap:8px; align-items:baseline; margin-left:0 !important;
}
.product_p_price_container .tax-shipping-delivery-label .gm_omniprice{
  grid-column:1 / -1; margin-top:6px; display:block; color:#666;
}
.product_p_price_container .tax-shipping-delivery-label .gm-collapsible{
  grid-column:1 / -1; margin-left:0 !important;
}
@supports not (display:grid){
  .product_p_price_container .tax-shipping-delivery-label{
    display:flex; flex-wrap:wrap; align-items:baseline; gap:8px; margin-left:0 !important;
  }
  .product_p_price_container .tax-shipping-delivery-label .gm_omniprice,
  .product_p_price_container .tax-shipping-delivery-label .gm-collapsible{
    flex-basis:100%; margin-left:0 !important; margin-top:6px !important;
  }
}

span.badge.badge-discount.discount.discount-amount { display: none; }
span.regular-price-prix { text-decoration: none; opacity: 1; font-size: 1rem; color: #2e2323; font-weight: 400; padding-right: 25px;}
/* Uwolnij dzieci z kontenera TTC */
.product_p_price_container .tax-shipping-delivery-label{ display: contents !important; margin-left: 0 !important; }
.product_p_price_container .gm_omniprice,
.product_p_price_container .gm-collapsible{
  order: 5; flex-basis: 100%; margin-top: 6px !important; margin-left: 0 !important;
}
.custlinia { border-top: 1px solid rgba(160, 160, 160, .25); margin-top: 2rem; padding-top: 1rem; }
form#add-to-cart-or-refresh { margin-bottom: -25px; }

/* ===== LIST VIEW – FINAL: ikony PION w prawym GÓRNYM, a w prawym DOLNYM: CENA → PRZYCISK ===== */

/* rząd listy jako siatka: [miniatura][opis][prawa kolumna] */
.product-miniature-list .product-miniature-list-row{
  display:grid;
  grid-template-columns: 160px 1fr auto;   /* miniatura / opis / kolumna prawa o szer. wg treści */
  column-gap:24px;
  align-items:stretch;                      /* pełna wysokość kolumn */
  margin-bottom:24px;
}

/* miniatura – pełna szerokość kolumny */
.product-miniature-list .product-miniature-list-row > .col-12.col-sm-3{ grid-column:1; width:100%; }
.product-miniature-list .thumbnail-container{ width:100%; }
.product-miniature-list .thumbnail.product-thumbnail{ display:block; width:100%; }
.product-miniature-list .thumbnail.product-thumbnail img{ display:block; width:100%; height:auto; }
.product-miniature-list .product-flags{ display:none; }

/* opis – pełen środek */
.product-miniature-list .col.col-description{
  grid-column:2;
  min-width:0;
  padding-right:0;
  margin: auto;
}
.product-miniature-list .product-title a{ display:block; }

/* PRAWA kolumna: siatka 2 kolumny x 3 wiersze (góra / filler / dół) */
.product-miniature-list .col-12.col-sm-auto.col-buy{
    grid-column: 3;
    display: grid;
    grid-template-columns: max-content max-content;
    grid-template-rows: auto 1fr auto;
    column-gap: 16px;
    row-gap: 0px;
    align-items: start;
    justify-items: end;
    margin: auto;                              /* wyrównanie do prawej krawędzi */
}

/* IKONKI – pionowo w prawym GÓRNYM rogu */
.product-miniature-list .product-functional-buttons{
  grid-column: 2;            /* prawa kolumna */
  grid-row: 1;               /* górny rząd */
  position: static !important;
  margin: 0;
}
.product-miniature-list .product-functional-buttons-links{
  display:flex;
  flex-direction:column;     /* PION */
  align-items:flex-end;      /* do prawej */
  gap:8px;
}
.product-miniature-list .product-functional-buttons-links > *{
  position: static !important;
  margin: 0 !important;
}

/* DOLNY rząd: CENA (lewa) → PRZYCISK (prawa) */
.product-miniature-list .product-price-and-shipping{
  grid-column: 1;            /* lewa komórka dolnego rzędu */
  grid-row: 3;               /* dolny rząd */
  position: static !important;
  display:flex;
  align-items:center;        /* wyśrodkowanie do przycisku */
  gap:8px;
  margin:0;
}
.product-miniature-list .product-price{ font-weight:800; font-size:1.35rem; line-height:1; }
.product-miniature-list .regular-price{ text-decoration:line-through; opacity:.65; font-size:.95rem; }

.product-miniature-list .product-add-cart{
  grid-column: 2;            /* prawa komórka dolnego rzędu */
  grid-row: 3;               /* dolny rząd */
  position: static !important;
}
.product-miniature-list .btn.add-to-cart{
  min-width: 200px;          /* szeroki przycisk */
  height: 44px;
  padding: 10px 16px;
}
.product-miniature-list .product-brand, .product-miniature-list .product-reference, .product-miniature-list .product-title {
    margin-bottom: .8rem;
    width: 430px;
}

/* MOBILE (≤768): prawa kolumna pod opisem, ale układ w niej zostaje taki sam:
   ikony w górnym prawym rogu kol-buy, a na dole cena → przycisk */
@media (max-width: 767.98px){
  .product-miniature-list .product-miniature-list-row{
    grid-template-columns: 120px 1fr;
    grid-template-areas:
      "thumb desc"
      "thumb buy";
    row-gap:10px;
  }
  span.regular-price-prix { text-decoration: none; opacity: 1; font-size: 1rem; color: #2e2323; font-weight: 400; padding-right: 40px;}
  .product-miniature-list .product-miniature-list-row > .col-12.col-sm-3{ grid-area: thumb; }
  .product-miniature-list .product-miniature-list-row > .col.col-description{ grid-area: desc; }
  .product-miniature-list .product-miniature-list-row > .col-12.col-sm-auto.col-buy{ grid-area: buy; }

  .product-miniature-list .btn.add-to-cart{ min-width: 200px; }
}
/* Gdy jest promocja (jest .product-discount): */
.page-product .product-prices .product-price:has(> .product-discount) .current-price .regular-price-prix{
  display: none !important;            /* ukryj "Prix:" przy czerwonej cenie */
}
.page-product .product-prices .product-price:has(> .product-discount) > .product-discount .regular-price-prix{
  display: inline !important;          /* pokaż "Prix:" przy przekreślonej */
}
#js-product-list .products-list .product-functional-buttons-links { display: none !important; }
#js-product-list .products-grid .product-functional-buttons-links { display: flex !important; }
.page-product .product-functional-buttons-links { display: flex !important; }
