/* ====== GRID ====== */
.wcs-wrapper.layout-grid{
  display:grid;
  gap:24px;
  grid-template-columns:repeat(var(--wcs-col-d,4),minmax(0,1fr));
}
@media (max-width:1024px){
  .wcs-wrapper.layout-grid{
    grid-template-columns:repeat(var(--wcs-col-t,2),minmax(0,1fr));
  }
}
@media (max-width:767px){
  .wcs-wrapper.layout-grid{
    grid-template-columns:repeat(var(--wcs-col-m,1),minmax(0,1fr));
  }
}

/* Upewnij się, że elementy grida mogą się kurczyć i wypełniają kolumnę */
.wcs-wrapper.layout-grid > .wcs-item{
  min-width:0;         /* zapobiega „rozpychaniu” kolumn przez długie treści */
  height:100%;
}

/* ====== ITEM (kafelek) ====== */
.wcs-item{
  position:relative;
  display:flex;
  flex-direction:column;
  height:100%;
}

/* ====== THUMB ====== */
/* Stała proporcja miniatury — możesz zmienić na 4/3, 3/4 itd. */
.wcs-thumb{
  position:relative;
  overflow:hidden;
  border-radius:14px;
  aspect-ratio:var(--wcs-thumb-ar, 1/1);
}
.wcs-thumb-link{ display:block; position:relative; height:100%; }

.wcs-thumb .wcs-img{
  display:block; width:100%; height:100%;
  object-fit:cover;                       /* równe kafelki niezależnie od zdjęć */
  transition:transform .35s ease;
  backface-visibility:hidden;
}
.wcs-thumb .wcs-img.second{
  position:absolute; inset:0; opacity:0;
  transition:opacity .35s ease;
  object-fit:cover; width:100%; height:100%;
}
.wcs-thumb:hover .wcs-img.first{ transform:scale(1.03); }
.wcs-thumb:hover .wcs-img.second{ opacity:1; }

/* Mniej animacji przy prefer-reduced-motion */
@media (prefers-reduced-motion:reduce){
  .wcs-thumb .wcs-img,
  .wcs-thumb .wcs-img.second,
  .wcs-actions{ transition:none !important; }
}

/* ====== WISHLIST ====== */
.wcs-wishlist{ position:absolute; right:12px; top:12px; z-index:3; }
.wcs-wishlist .wcs-heart{
  display:inline-flex; align-items:center; justify-content:center;
  width:36px; height:36px; border-radius:999px; background:#fff;
  box-shadow:0 6px 18px rgba(0,0,0,.08);
  text-decoration:none; line-height:1;
}
.wcs-wishlist .wcs-heart:hover,
.wcs-wishlist .wcs-heart:focus-visible{
  box-shadow:0 8px 22px rgba(0,0,0,.12);
  outline:none;
}

/* ====== ACTIONS (VIEW / CART) ====== */
.wcs-actions{
  position:absolute; left:12px; right:12px; bottom:12px; z-index:2;
  display:flex; gap:10px; opacity:0; transform:translateY(8px);
  transition:opacity .25s ease, transform .25s ease;
}
.wcs-thumb:hover .wcs-actions{ opacity:1; transform:translateY(0); }
@media (hover:none){
  .wcs-actions{ opacity:1; transform:none; }
}

.wcs-btn{
  flex:1 1 auto; text-align:center; font-size:14px; line-height:1;
  padding:11px 12px; border:1px solid transparent; border-radius:999px;
  text-decoration:none; cursor:pointer;
}
.wcs-btn:focus-visible{ outline:2px solid currentColor; outline-offset:2px; }

/* ====== META TOP: TITLE | PRICE ====== */
.wcs-row{ display:flex; align-items:center; justify-content:space-between; gap:12px; }

/* Równa wysokość sekcji tytułu (dla 2 linii) */
.wcs-row-top{
  display:flex; align-items:flex-start; justify-content:space-between; gap:12px;
  margin-top:12px;
  --wcs-title-lines:2;
  --wcs-title-line-height:1.3;
  min-height:calc(var(--wcs-title-lines) * 1em * var(--wcs-title-line-height));
}

.wcs-title{
  flex:1 1 auto;
  margin:0;
  font-size:16px;
  line-height:1.3;
  display:-webkit-box;
  -webkit-line-clamp:var(--wcs-title-lines,2);
  -webkit-box-orient:vertical;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:100%;
  word-break:break-word;
}
.wcs-title a{ text-decoration:none; display:inline-block; }
.wcs-title a:focus-visible{ outline:2px solid currentColor; outline-offset:2px; }

.wcs-price{
  font-weight:600; margin:0; white-space:nowrap; line-height:1;
  display:flex; align-items:center; gap:.35em; flex:0 0 auto;
}
.wcs-price del,
.wcs-price ins{ color:inherit; }
.wcs-price del{ opacity:.6; }

/* ====== SEPARATOR ====== */
.wcs-separator{
  height:1px; width:100%; background:currentColor; opacity:.12;
  margin:.5rem 0;
  padding:var(--wcs-sep-py,0) var(--wcs-sep-px,0);
}

/* ====== META BOTTOM: VARIANTS | CATEGORY ====== */
.wcs-row-bottom{ align-items:flex-start; }
.wcs-meta-left, .wcs-meta-right{ display:flex; align-items:center; gap:8px; }

.wcs-cat{ margin:0; }
.wcs-cat a{
  display:inline-block; font-size:12px; line-height:1;
  padding:6px 10px; text-decoration:none;
  border:1px solid transparent; border-radius:999px;
}
.wcs-cat a:focus-visible{ outline:2px solid currentColor; outline-offset:2px; }

/* Warianty */
.wcs-variations{ display:flex; flex-wrap:wrap; gap:8px; }
.wcs-variations a{
  display:inline-flex; align-items:center; justify-content:center;
  height:32px; min-width:32px; padding:0 10px;
  text-decoration:none; border:1px solid rgba(0,0,0,.1); border-radius:8px;
  font-size:12px; line-height:1;
}
.wcs-variations a:focus-visible{ outline:2px solid currentColor; outline-offset:2px; }

/* ====== SWIPER NAV (dla karuzeli) ====== */
.wcs-wrapper.layout-carousel{ position:relative; }
.wcs-swiper-nav .wcs-swiper-prev,
.wcs-swiper-nav .wcs-swiper-next{
  position:absolute; top:50%; transform:translateY(-50%);
  width:42px; height:42px; border-radius:999px; background:#fff;
  box-shadow:0 6px 20px rgba(0,0,0,.1); z-index:5; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
}
.wcs-swiper-nav .wcs-swiper-prev{ left:-20px; }
.wcs-swiper-nav .wcs-swiper-next{ right:-20px; }
@media (max-width:767px){
  .wcs-swiper-nav .wcs-swiper-prev{ left:6px; }
  .wcs-swiper-nav .wcs-swiper-next{ right:6px; }
}

/* ====== DROBNE DOSTOSOWANIA ====== */
.wcs-title, .wcs-price{ margin-bottom:0; }