/* 🔕 Ukrycie starych cen */
.abs-item-price-box .abs-item-price-reference {
  display: none !important;
}

/* ✅ GALERIA – 2 produkty obok siebie od 319px do 768px */
@media (min-width: 319px) and (max-width: 768px) {

  .abs-offer-gallery.view-kind-box {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
  }

  .abs-layout-product-gallery.module-loader {
    width: 46% !important;
    margin: 1% !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    vertical-align: top !important;
    flex: unset !important;
  }

  /* ✅ NAPRAWIONE ZDJĘCIA */
  .abs-img-wrapper img {
    max-width: 100% !important;
    max-height: 170px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto 10px auto !important;
  }

  .abs-layout-product-gallery.module-loader * {
    text-align: center !important;
  }
}

/* ✅ PEŁNY widok do 318px */
@media (max-width: 318px) {

  .abs-offer-gallery.view-kind-box {
    display: block !important;
  }

  .abs-layout-product-gallery.module-loader {
    width: 100% !important;
    margin: 0 auto 20px auto !important;
    display: block !important;
  }

  .abs-layout-product-gallery.module-loader * {
    text-align: left !important;
  }

  /* ✅ NAPRAWIONE ZDJĘCIA */
  .abs-img-wrapper img {
    max-width: 100% !important;
    max-height: 170px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto 10px auto !important;
  }
}

/* ✅ Centrowanie pojedynczego slajdu w karuzeli */
@media (max-width: 768px) {

  .slick-slide > section.abs-offer-gallery.view-kind-box {
    display: flex !important;
    justify-content: center !important;
  }

  .slick-slide .abs-layout-product-gallery.module-loader {
    margin: 0 auto !important;
  }
}

* ✅ WYŚRODKOWANIE DOLNEGO MENU – TYLKO DESKTOP, wygląd jak konkurencja */
@media (min-width: 1024px) {

  .navbar-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0 auto;
    text-align: center;
  }

  .navbar-nav > li {
    display: inline-block;
    margin: 0 13px;
  }

  .navbar-nav > li > a {
    text-transform: uppercase;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.5px;
    color: #333;
    text-decoration: none;
  }

  .navbar-nav > li > a:hover {
    color: #000;
  }
}

/* ✅ LEPSZA WIDOCZNOŚĆ PAGINACJI */
ul.pagination {
  background-color: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 40px;
  margin-bottom: 30px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
  gap: 8px;
}

/* ✅ Styl przycisków w paginacji */
ul.pagination li a {
  padding: 8px 12px;
  border-radius: 4px;
  background-color: #fff;
  color: #333;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  display: inline-block;
}

/* ✅ Hover efekt */
ul.pagination li a:hover {
  background-color: #eee;
  color: #000;
}

/* ✅ Aktywna strona */
ul.pagination li.active a,
ul.pagination li a.current-page {
  background-color: #333;
  color: #fff;
}

/* ✅ Zmniejszenie marginesu nad tekstem SEO */
#category-description {
  margin-top: 10px !important;
}

/* 🔒 Ukryj baner rejestracji wtedy, kiedy ukryte są ceny hurtowe */
body:not(:has(.cena-hurtowa-info)) img[src*="rejestracja"] {
  display: none !important;
}

/* ✅ NAPRAWA ROZJECHANYCH ZDJĘĆ NA TELEFONIE I TABLECIE */
@media (min-width: 319px) and (max-width: 768px) {

  .abs-layout-product-gallery.module-loader .abs-img-wrapper {
    width: 100% !important;
    height: 180px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
  }

  .abs-layout-product-gallery.module-loader .abs-img-wrapper img {
    max-width: 100% !important;
    max-height: 170px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
  }
}

/* ✅ TABLET POZIOMO – trochę większe zdjęcia */
@media (min-width: 769px) and (max-width: 1024px) {

  .abs-layout-product-gallery.module-loader .abs-img-wrapper {
    width: 100% !important;
    height: 220px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
  }

  .abs-layout-product-gallery.module-loader .abs-img-wrapper img {
    max-width: 100% !important;
    max-height: 210px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
  }
}

/* ✅ Logowanie i rejestracja - mocno widoczne */
#clientLoginorcreatePage > a {
  display: block !important;
  padding: 16px 20px !important;
  background: #e53935 !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 18px !important;
  border-radius: 10px !important;
  margin: 10px !important;
  text-align: center !important;
  cursor: pointer !important;
}

#clientLoginorcreatePage > a span {
  color: #fff !important;
}

#clientLoginorcreatePage > a::after {
  content: " →";
  color: #fff !important;
  font-weight: 700;
}

/* ✅ Poprawa układu cen promocyjnych na bardzo małych telefonach */
@media (max-width: 360px) {

  .abs-layout-product-gallery.module-loader .abs-item-price-box {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 2px !important;
    line-height: 1.15 !important;
  }

  .abs-layout-product-gallery.module-loader .abs-item-price-base,
  .abs-layout-product-gallery.module-loader .abs-item-price-reference {
    display: block !important;
    font-size: 10px !important;
    line-height: 1.1 !important;
    margin-bottom: 2px !important;
  }

  .abs-layout-product-gallery.module-loader .abs-item-price-final,
  .abs-layout-product-gallery.module-loader .abs-item-price-amount {
    display: block !important;
    font-size: 18px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
  }

  .abs-layout-product-gallery.module-loader .abs-item-price-mode,
  .abs-layout-product-gallery.module-loader .abs-item-price-breakdown {
    display: block !important;
    font-size: 9px !important;
    line-height: 1.1 !important;
  }

  .abs-layout-product-gallery.module-loader [class*="discount"],
  .abs-layout-product-gallery.module-loader [class*="promo"],
  .abs-layout-product-gallery.module-loader [class*="rabat"] {
    font-size: 10px !important;
    line-height: 1 !important;
    padding: 1px 4px !important;
    margin: 1px 0 !important;
  }
}