.kolekcja-products-grid,
.kolekcje-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 2rem 0;
}

.kolekcja-archive-box {
  border: 1px solid #ddd;
  padding: 1px 15px;
  text-align: center;
  background: #fff;
  transition: box-shadow .2s;
}
.kolekcja-archive-box:hover {
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.kolekcja-archive-thumb {
  position: relative;
  overflow: hidden;
}
.kolekcja-thumb-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: opacity 0.3s ease-in-out;
}

/* Usunięta nakładka białej warstwy z ::after */
.kolekcja-archive-thumb::after,
.kolekcja-overlay-wrap::after,
.hover-overlay-img::after {
  display: none !important;
}

.kolekcja-archive-title {
  font-size: 23px;
  font-weight: 600;
  color: #222;
  margin-top: 10px;
  transition: color 0.2s;
}
.kolekcja-archive-link:hover .kolekcja-archive-title {
  color: #666;
}

.kolekcja-product {
  background: #fff;
  border: 1px solid #eee;
  padding: 16px;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  transition: box-shadow 0.3s;
}
.kolekcja-product:hover {
  box-shadow: 0 0 10px rgba(0,0,0,0.09);
}
.kolekcja-product__thumb {
  position: relative;
}

.kolekcja-product__badge {
  position: absolute;
  top: 0px;
  right: 8px;
  background: #b80000;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 3px;
  z-index: 10;
}

.kolekcja-product__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 1.2em;
  font-size: 19px;
  color: #222;
  font-weight: 600;
  margin-top: 10px;
  margin-bottom: 8px;
  transition: color 0.2s;
}
.kolekcja-product__name a {
  color: #222;
  text-decoration: none;
}
.kolekcja-product__link:hover .kolekcja-product__name {
  color: #666;
}

.kolekcja-product__price {
  font-weight: 600;
  font-size: 18px;
  color: #222;
  margin-top: auto;
}

/* Styl hovera dla przycisków (pozostaje bez zmian) */
.btnc {
  background: #FBCF0B;
  color: #222;
  border-radius: 0;
  font-weight: 700;
  font-size: 1rem;
  padding: 16px 28px;
  display: inline-block;
  transition: background 0.15s, color 0.15s;
  margin-bottom: 8px;
  text-decoration: none;
  border: none;
}
.btnc:hover {
  background: #111;
  color: #fff;
}

/* Pozostałe style layoutowe mogą zostać — usunięto wyłącznie elementy kolidujące z efektem JS */
/* Paginacja */
.kolekcje-pagination .page-numbers {
  display: inline-block;
  margin: 0 4px;
  padding: 8px 12px;
  background: #f4f4f4;
  color: #222;
  text-decoration: none;
  border-radius: 2px;
}
.kolekcje-pagination .page-numbers.current {
  background: #000;
  color: #fff;
}

/* Nagłówki kategorii */
.kolekcje-tax-title,
.kolekcje-cat-title {
  text-align: center;
  font-size: 130%;
  font-weight: bold;
  margin-bottom: 20px;
}

/* Lista kategorii */
.kolekcje-cat-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  list-style: none;
  margin: 0 0 20px 0;
  padding: 0;
  gap: 16px;
}
.kolekcje-cat-link {
  text-decoration: none !important;
  padding: 8px 16px;
  background: #f2f2f2;
  color: #333;
  font-weight: 500;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
  border: none !important;
}
.kolekcje-cat-link::after,
.kolekcje-cat-link::before {
  content: none !important;
  display: none !important;
}
.kolekcje-cat-link:hover {
  background: #e5e5e5;
  color: #222;
}
.kolekcje-cat-link.current {
  background: #d5d5d5;
  color: #111;
}

/* Suwak filtrujący */
.kolekcje-tax-filter,
.kolekcje-filter-wrapper {
  text-align: right;
  margin-bottom: 20px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}
.filter-label,
.switch-label {
  font-size: 14px;
  color: #222;
}
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
  top: 0; left: 0;
  right: 0; bottom: 0;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #38a169;
}
input:checked + .slider:before {
  transform: translateX(18px);
}

/* Subkategorie */
.kolekcje-subcategories {
  list-style: none;
  padding-left: 0;
  margin: 0 0 20px 0;
  text-align: center;
}
.kolekcje-subcategories li {
  display: inline-block;
  margin: 0 10px;
}
.kolekcje-subcategories a {
  color: #111;
  font-weight: 500;
  text-decoration: underline;
}

/* USUNIĘTO WARSTWY ZAKŁÓCAJĄCE HOVER W JS:
   .kolekcja-archive-thumb::after
   .kolekcja-overlay-wrap::after
   .hover-overlay-img::after
*/
.img-hover-wrap {
  position: relative;
  overflow: hidden;
}
.main-img, .hover-img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: auto;
  transition: opacity 0.6s ease-in-out;
}
.hover-img {
  opacity: 0;
  z-index: 2;
}
.img-hover-wrap:hover .hover-img {
  opacity: 1;
}
.img-hover-wrap:hover .main-img {
  opacity: 0;
}

/* Finalne style hover działające z JS */
.kolekcja-thumb-img[data-hover] {
  transition: opacity 0.9s ease-in-out; /* wolniejsze i łagodniejsze */
  z-index: 1;
  position: relative;
}

.img-hover-box {
  position: relative;
  overflow: hidden;
}

.img-hover-box img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.5s ease-in-out;
  object-fit: cover;
}

/* Hover image jest nad głównym, ale domyślnie niewidoczna */
.img-hover-box .hover-img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 2;
}

/* Biała przezroczysta nakładka */
.img-hover-box::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(255, 255, 255, 0.15); /* delikatna biel */
  opacity: 0;
  z-index: 3;
  transition: opacity 0.4s ease-in-out;
}

/* Efekt hover */
.img-hover-box:hover .hover-img {
  opacity: 1;
}

.img-hover-box:hover::after {
  opacity: 1;
}

/* ========================================
   RESPONSYWNOŚĆ GRIDU KOLEKCJI
======================================== */
@media (max-width: 992px) {
  .kolekcja-products-grid,
  .kolekcje-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}

@media (max-width: 576px) {
  .kolekcja-products-grid,
  .kolekcje-products-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .kolekcja-product__badge {
    font-size: 14px;
    padding: 4px 10px;
  }

  .kolekcja-product__name {
    font-size: 16px;
  }

  .kolekcja-product__price {
    font-size: 16px;
  }
}
