/* DEFINICJE ZMIENNYCH - DODAJ TO NA POCZĄTEK PLIKU */
:root {
  /* Skala szarości */
  --gray-50:  #f8f9fa;  /* jasny popiel */
  --gray-100: #f1f3f5;  /* bardzo jasny popiel */
  --gray-200: #e9ecef;  /* jasny popiel */
  --gray-300: #dee2e6;  /* popiel */
  --gray-400: #ced4da;  /* średni popiel */
  --gray-500: #adb5bd;  /* ciemniejszy popiel */
  --gray-600: #6c757d;  /* grafit */
  --gray-700: #495057;  /* ciemny grafit */
  --gray-800: #343a40;  /* antracyt */
  --gray-900: #212529;  /* ciemny antracyt */
  
  /* Pomarańczowy akcent */
  --orange-400: #ff9f4d;
  --orange-500: #ff8c2e;
  --orange-600: #f47820;
  --orange-700: #e05f0a;
  
  /* Biały */
  --white: #ffffff;
  
  /* Czcionki */
   --font-primary: "Montserrat", -apple-system, blinkmacsystemfont, "Segoe UI", Montserrat, "Helvetica Neue", arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

/* PIERWSZA KOLUMNA NA GŁÓWNEJ STRONIE */
.product-blocks .row:first-child .col-md-12 > div {
  background: linear-gradient(135deg, var(--gray-800) 0%, var(--gray-700) 100%);
  border-left: none;
  padding: clamp(2.5rem, 4vw, 4rem);
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  max-width: 1100px;
  margin: 0 auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Efekt glow na rogu dla pierwszej kolumny */
.product-blocks .row:first-child .col-md-12 > div::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(244, 120, 32, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Kontener główny */
#content-wrapper {
  background-color: var(--gray-50);
  padding-right: 0.2rem;
  padding-left: 0.2rem;
}

/* Reset dla Bootstrapowych kolumn - ZMNIEJSZONE MARGINESY */
.products-list.row {
  margin: 0 -0.25rem !important; /* Zmniejszone z -0.75rem */
  display: flex;
  flex-wrap: wrap;
}

.products-list__block {
  padding: 0 0.25rem !important; /* Zmniejszone z 0.75rem */
  margin-bottom: 1.5rem !important; /* Zwiększony odstęp między wierszami */
  display: flex;
}

/* ── NAGŁÓWEK KATEGORII - CIEMNY STYL (JAK PIERWSZA KOLUMNA) ── */

/* Kontener nagłówka */
.container .row .col-12.ct-left {
  padding: 0 0.25rem; /* Zmniejszone z 0.75rem */
}

/* Blok kategorii - ciemny gradient jak w pierwszej kolumnie */
.block-category.listing-h1 {
  background: linear-gradient(135deg, var(--gray-800) 0%, var(--gray-700) 100%);
  border-left: none;
  padding: clamp(2.5rem, 4vw, 4rem);
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  margin: 2rem 0.25rem 3rem; /* Dodany margines boczny */
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Dekoracyjne linie w tle (efekt techniczny) - jaśniejsze na ciemnym tle */
.block-category.listing-h1::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 0;
}

/* Pomarańczowa poświata w rogu - TAKA SAMA JAK W PIERWSZEJ KOLUMNIE */
.block-category.listing-h1::after {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(244, 120, 32, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Kontener treści */
.block-category.listing-h1 > div {
  position: relative;
  z-index: 1;
}

/* Nagłówek H1 - biały na ciemnym tle (DOBRY KONTRAST) */
.block-category.listing-h1 h1 {
  font-family: var(--font-primary);
  font-size: 2.4rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 1.2rem 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
  position: relative;
  display: inline-block;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Pomarańczowa linia pod H1 */
.block-category.listing-h1 h1::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 80px;
  height: 3px;
  background: var(--orange-600);
  border-radius: 2px;
}

/* Tekst opisu - jasny na ciemnym tle (DOBRY KONTRAST) */
.block-category.listing-h1 p {
font-family: var(--font-primary);
  font-size: 1.3rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 1rem 0;
}

.block-category.listing-h1 p:last-child {
  margin-bottom: 0;
}

/* Pierwszy akapit - delikatne wyróżnienie */
.block-category.listing-h1 p:first-of-type {
  font-size: 1.15rem;
  color: #ffffff;
  font-weight: 400;
}

/* Responsywność nagłówka */
@media (max-width: 992px) {
  .block-category.listing-h1 {
    padding: 2rem 2rem;
    margin: 1.5rem 0.25rem 2.5rem;
  }
  
  .block-category.listing-h1 h1 {
    font-size: 2rem;
  }
  
  .block-category.listing-h1 h1::after {
    width: 60px;
  }
  
  .block-category.listing-h1 p {
    font-size: 1rem;
  }
  
  .block-category.listing-h1 p:first-of-type {
    font-size: 1.05rem;
  }
}

@media (max-width: 768px) {
  .block-category.listing-h1 {
    padding: 1.5rem 1.5rem;
    margin: 1rem 0.25rem 2rem;
  }
  
  .block-category.listing-h1 h1 {
    font-size: 1.7rem;
  }
  
  .block-category.listing-h1 p {
    font-size: 0.95rem;
    line-height: 1.4;
  }
}

@media (max-width: 480px) {
  .block-category.listing-h1 {
    padding: 1.2rem 1.2rem;
    margin: 1rem 0.15rem 2rem; /* Mniejsze marginesy boczne na mobile */
  }
  
  .block-category.listing-h1 h1 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
  }
  
  .block-category.listing-h1 h1::after {
    width: 50px;
    height: 2px;
    bottom: -6px;
  }
  
  .block-category.listing-h1 p {
    font-size: 1.1rem;
  }
}

/* Karta produktu - zajmuje całą wysokość kolumny */
.product-miniature {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
  cursor: pointer;
}

.product-miniature:hover {
  transform: translateY(-5px);
  border-color: var(--orange-600);
  box-shadow: 0 15px 30px rgba(244, 120, 32, 0.1);
}

/* Górna linia akcentu na hover */
.product-miniature::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gray-300), var(--orange-600), var(--gray-300));
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: left;
  z-index: 2;
}

.product-miniature:hover::before {
  transform: scaleX(1);
}

/* Efekt "technical dot" w prawym dolnym rogu */
.product-miniature::after {
  content: '';
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  width: 8px;
  height: 8px;
  background: var(--orange-600);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-miniature:hover::after {
  opacity: 0.5;
}

/* Miniatura zdjęcia */
.product-miniature__thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1/1;
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-200);
  width: 100%;
}

.product-miniature__thumb a {
  display: block;
  height: 100%;
  width: 100%;
}

.product-miniature__thumb picture {
  display: block;
  height: 100%;
  width: 100%;
}

.product-miniature__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
  filter: grayscale(30%);
}

.product-miniature:hover .product-miniature__thumb img {
  transform: scale(1.05);
  filter: grayscale(0%);
}

/* Nakładka na zdjęcie (efekt techniczny) */
.product-miniature__thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(244, 120, 32, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-miniature:hover .product-miniature__thumb::after {
  opacity: 1;
}

/* Dolna sekcja z treścią */
.product-miniature .box-bottom {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  background: var(--white);
  position: relative;
}

/* Tytuł produktu - STAŁA WYSOKOŚĆ 3 LINII */
.product-miniature__title {
  font-family: var(--font-primary);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 0.8rem 0;
  color: var(--gray-800);
  transition: color 0.3s ease;
  text-align: left;
  
  /* STAŁA WYSOKOŚĆ - 3 linie tekstu */
  height: calc(1.4em * 3);
  min-height: calc(1.4em * 3);
  max-height: calc(1.4em * 3);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

.product-miniature__title a {
  color: inherit;
  text-decoration: none;
  display: inline-block;
  position: relative;
}

.product-miniature__title a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--orange-600);
  transition: width 0.3s ease;
}

.product-miniature:hover .product-miniature__title a::after {
  width: 100%;
}

/* Cechy produktu (listing-feaures) z pomarańczowym punktem */
.listing-feaures {
  font-family: oswald;
  font-size: 17px;
  color: #25374b !important;
  font-weight: 300;
  margin: 0.2rem 0;
  line-height: 1.5;
  text-align: left;
  position: relative;
  padding-left: 0.5rem;
}

/* Pomarańczowy punkt przed każdą cechą */
.product-miniature .box-bottom .listing-feaures::before {
  content: '•';
  color: var(--orange-600);
  font-weight: bold;
  position: absolute;
  left: 0;
  top: 0;
  font-size: 18px;
  font-family: inherit;
}

/* Cena */
.product-miniature__pricing {
  margin: 1rem 0 0.5rem 0;
  text-align: left;
  padding-top: 0.8rem;
  border-top: 1px solid var(--gray-200);
}

.product-miniature__pricing .price {
  font-family: var(--font-primary);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gray-800);
  display: block; /* Blok wymusza nową linię dla dzieci */
  line-height: 1.3;
}

.product-miniature__pricing .unit-p {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--gray-700);
  margin-left: 0;
  margin-top: 0.2rem; /* Dodany odstęp od góry */
  display: block; /* Wymusza nową linię */
}

/* Kolory produktu */
.color-box {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
  text-align: left;
}

.color-box span[class*="color-"] {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.color-box span[class*="color-"]:hover {
  transform: scale(1.15);
  border-color: var(--orange-600);
  box-shadow: 0 0 0 2px rgba(244, 120, 32, 0.2);
}

/* Kolory - zgodne z product-blocks */
.color-134 { background-color: #0b9a88; } /* zielony */
.color-135 { background-color: #014dbd; } /* niebieski */
.color-136 { background-color: #d6af6a; } /* beżowy */
.color-138 { background-color: #ecdf05; } /* żółty */
.color-140 { background-color: #ff7f00; } /* pomarańczowy */
.color-143 { background-color: #fa0001; } /* czerwony */
.color-144 { background-color: #b0b0b0; } /* szary */
.color-154 { background-color: #444d5e; } /* grafitowy */
.color-162 { background-color: #fff; box-shadow: inset 0px 0px 0px 1px rgba(0, 0, 0, 0.37); } /* biały */
.color-163 { background-color: #000; } /* czarny */

/* Opisy produktów wstawione między produkty */
.product-list-desc {
  grid-column: 1 / -1;
  background: var(--white);
  border-left: 4px solid var(--orange-600);
  border-radius: 8px;
  padding: 2rem;
  margin: 1rem 0.25rem 2rem; /* Zmniejszone marginesy boczne */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
  width: calc(100% - 0.5rem); /* Dostosowane do nowych marginesów */
}

.product-list-desc h2 {
  font-family: var(--font-primary);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 1rem;
}

.product-list-desc h3 {
  font-family: var(--font-primary);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--gray-700);
  margin: 1.5rem 0 0.8rem;
}

.product-list-desc p {
  font-family: var(--font-primary);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--gray-600);
  margin-bottom: 1rem;
}

.product-list-desc p:last-child {
  margin-bottom: 0;
}

.product-list-desc strong {
  color: var(--orange-700);
  font-weight: 600;
}

/* Filtr - przycisk na mobile */

.filtr-mobile-button:hover {
  background: var(--orange-600);
  color: var(--white);
  text-decoration: none;
}

.filtr-mobile-button .filter_count {
  font-weight: 700;
  color: var(--orange-600);
}

.filtr-mobile-button:hover .filter_count {
  color: var(--white);
}

/* Przycisk "Powrót do góry" */
.up .btn-secondary {
  background: var(--white);
  color: var(--gray-700);
  border: 2px solid var(--gray-300);
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 8px;
  transition: all 0.3s ease;
  margin: 2rem 0.25rem 1rem; /* Dostosowane marginesy */
}

.up .btn-secondary:hover {
  border-color: var(--orange-600);
  background: var(--orange-600);
  color: var(--white);
}

/* Responsywność dla tytułów i cen */
@media (max-width: 992px) {
  .product-miniature__title {
    font-size: 1.1rem;
  }
  
  .product-miniature__pricing .price {
    font-size: 1.3rem;
  }
  
  .listing-feaures {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .product-miniature .box-bottom {
    padding: 1.2rem;
  }
  
  .product-miniature__title {
    font-size: 1rem;
  }
  
  .product-miniature__pricing .price {
    font-size: 1.2rem;
  }
  
  .color-box span[class*="color-"] {
    width: 15px;
    height: 15px;
  }
  
  .product-list-desc {
    padding: 1.5rem;
    margin: 1rem 0.15rem 2rem; /* Mniejsze marginesy na mobile */
    width: calc(100% - 0.3rem);
  }
  
  .product-list-desc h2 {
    font-size: 1.4rem;
  }
  
  .product-list-desc h3 {
    font-size: 1.2rem;
  }
  
  .listing-feaures {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .product-miniature .box-bottom {
    padding: 1rem;
  }
  
  .product-miniature__title {
    font-size: 0.95rem;
  }
  
  .listing-feaures {
    font-size: 14px;
  }
  
  .product-miniature__pricing .price {
    font-size: 1.1rem;
  }
  
  .product-list-desc {
    padding: 1.2rem;
    margin: 1rem 0.1rem 2rem; /* Minimalne marginesy na małych ekranach */
    width: calc(100% - 0.2rem);
  }
  
  /* Dodatkowe poprawki dla bardzo małych ekranów */
  .products-list.row {
    margin: 0 -0.15rem !important;
  }
  
  .products-list__block {
    padding: 0 0.15rem !important;
  }
}