:root {
  --primary-color: #212529;
  --secondary-color: #6c757d;
  --accent-color: #495057;
  --light-bg: #f8f9fa;
  --border-color: #dee2e6;
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --focus-color: #fd7e14;
  /* Zmienne dla lightboxa - tryb jasny */
  --lightbox-overlay-bg: rgba(0, 0, 0, 0.8);
  --lightbox-content-bg: white;
  --lightbox-caption-color: #333;
  --lightbox-nav-btn-bg: rgba(0, 0, 0, 0.5);
  --lightbox-nav-btn-hover-bg: rgba(0, 0, 0, 0.7);
  --lightbox-close-btn-bg: rgba(0, 0, 0, 0.5);
  --lightbox-close-btn-hover-bg: rgba(0, 0, 0, 0.7);
}

[data-bs-theme="dark"] {
  --primary-color: #f8f9fa;
  --secondary-color: #adb5bd;
  --accent-color: #6c757d;
  --light-bg: #343a40;
  --border-color: #495057;
  --text-primary: #f8f9fa;
  --text-secondary: #adb5bd;
  --focus-color: #fd7e14;
  /* Zmienne dla lightboxa - tryb ciemny */
  --lightbox-overlay-bg: rgba(0, 0, 0, 0.9); /* Nieco ciemniejsze w trybie ciemnym */
  --lightbox-content-bg: #343a40; /* Tło zdefiniowane w --light-bg dla dark theme */
  --lightbox-caption-color: #f8f9fa; /* Jasny tekst na ciemnym tle */
  --lightbox-nav-btn-bg: rgba(255, 255, 255, 0.3); /* Jasne strzałki na ciemnym tle */
  --lightbox-nav-btn-hover-bg: rgba(255, 255, 255, 0.5);
  --lightbox-close-btn-bg: rgba(255, 255, 255, 0.3);
  --lightbox-close-btn-hover-bg: rgba(255, 255, 255, 0.5);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: 70px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  transition: all 0.3s ease;
}


a {
  color: var(--text-secondary);
}

.video-responsive {
  position: relative;
  width: 100%;
}

:focus-visible {
  outline: 3px solid var(--focus-color);
  outline-offset: 3px;
  border-radius: 4px;
}

.nav-link:focus-visible,
.dropdown-item:focus-visible,
.btn:focus-visible,
.social-icon:focus-visible {
  outline: 3px solid var(--focus-color);
  outline-offset: 3px;
  border-radius: 4px;

}

/* Styl dla paginacji */
.pagination .page-item .page-link {
  color: #333;
  /* Ciemny tekst dla zwykłych linków */
  background-color: #fff;
  /* Białe tło dla zwykłych linków */
  border-color: #ccc;
  /* Jasnoszara ramka */
}

/* Styl dla linków paginacji po najechaniu myszką (hover) */
.pagination .page-item .page-link:hover {
  color: #000;
  /* Czarny tekst po najechaniu */
  background-color: #f0f0f0;
  /* Bardzo jasnoszare tło po najechaniu */
  border-color: #aaa;
  /* Nieco ciemniejsza ramka po najechaniu */
}

/* Styl dla aktywnej strony paginacji */
.pagination .page-item.active .page-link {
  color: #fff;
  /* Biały tekst dla aktywnej strony */
  background-color: #333;
  /* Ciemnoszare tło dla aktywnej strony */
  border-color: #333;
  /* Ciemnoszara ramka dla aktywnej strony */
}

/* Styl dla wyłączonych (disabled) linków paginacji */
.pagination .page-item.disabled .page-link {
  color: #666;
  /* Jasnoszary tekst */
  background-color: #e9ecef;
  /* Bardzo jasnoszare tło */
  border-color: #dee2e6;
  /* Domyślna ramka Bootstrapa */
}

/* Usuń domyślny outline dla wszystkich focus */
.qty-input:focus {
  outline: none;
}

/* Dodaj outline tylko dla focus-visible */
.qty-input:focus-visible {
  outline-offset: 0px;
  outline: 1px solid var(--focus-color);
  border-radius: 4px;
  border-color: var(--focus-color) !important;
}

/* Dla przeglądarek które nie wspierają focus-visible */
.qty-input:focus:not(:focus-visible) {
  outline: none;
}

/* CSS dla skip link: */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: var(--bs-body-bg);
  padding: 8px;
  z-index: 100;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

.wrapper {
  flex: 1;
  position: relative;
}

/* Enhanced Navbar */
.navbar {
  min-height: 70px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

[data-bs-theme="dark"] .navbar {
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: 1px;
  color: white !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.navbar-brand:hover {
  transform: translateY(-1px);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.nav-link {
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--accent-color);
  transition: all 0.3s ease;
}

.nav-link:hover::after {
  width: 80%;
  left: 10%;
}

/* Dropdown enhancements */
.dropdown-menu {
  border: none;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  backdrop-filter: blur(10px);
}

[data-bs-theme="dark"] .dropdown-menu {
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

.dropdown-item {
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.dropdown-item:hover {
  background-color: var(--light-bg);
  border-left-color: var(--accent-color);
  transform: none;
}



.list .card {}

.list .card:hover {
  border: 1px solid var(--primary-color);
}

/* Cart styling */
.cart-info {
  background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
  border-radius: 20px;
  padding: 0.5rem 1rem;
  color: white !important;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.cart-info:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border-color: var(--accent-color);
}

/* Mobile buttons - poprawiona wersja */
.mobile-buttons {
  position: sticky;
  top: 70px;
  z-index: 999;
  background: var(--light-bg);
  border-bottom: 1px solid var(--border-color);
  transition: none;
}

/* Dodaj to do swojego CSS */
#myCarousel .carousel-item {
  height: 430px;
}

/* Style dla linków w banerach */
.item-baner {
  display: block;
  height: 430px;
  opacity: 0;
  /* Niewidoczne linki */
  transition: opacity 0.3s ease;
}

.item-baner:hover {
  opacity: 0.1;
  /* Delikatne podświetlenie przy hover */
  background-color: rgba(255, 255, 255, 0.2);
}

.item-baner:focus {
  opacity: 0.2;
  outline: 2px solid var(--accent-color);
  outline-offset: -2px;
}

@media (max-width: 768px) {
  .item-baner {
    height: 250px;
  }

  /* Zmniejsz wysokość banerów na mobile */
  .carousel-item>div {
    height: 250px !important;
  }
}

@media (max-width: 768px) {
  #myCarousel .carousel-item {
    height: 250px;
  }
}

[data-bs-theme="dark"] .mobile-buttons {
  background: var(--light-bg);
}

/* Header logo section */
header {
  background-image: url('/img/layout/head.webp');
  /* Ścieżka do Twojej grafiki */
  background-size: cover;
  /* Sprawia, że obrazek pokrywa całą powierzchnię, przycinając go w razie potrzeby */
  background-position: center center;
  /* Centruje obrazek w pionie i poziomie */
  background-repeat: no-repeat;
  /* Zapobiega powtarzaniu się obrazka */
  border-bottom: 1px solid var(--border-color);
  transition: none;
  position: relative;
  min-height: 200px;
  padding-top: 50px;
  padding-bottom: 50px;
}

#logo {
  display: inline-block;
  line-height: 0;
}

#logo img {
  transition: all 0.3s ease;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

#logo:hover img {
  transform: scale(1.05);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.15));
}

/* Main content */
main {
  transition: none;
  position: relative;
}

.popover {
  z-index: 9999 !important;
  /* Ustaw bardzo wysoki z-index */
  opacity: 1 !important;
  /* Upewnij się, że jest widoczny */
}

/* Wrapper dla formularza */
.qty-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Okrągły input */
.qty-input {
  width: 80px !important;
  height: 40px;
  text-align: center;
  border-radius: 20px !important;
  /* Pełne zaokrąglenie */
  border: 2px solid #dee2e6;
  padding: 0.375rem 1rem;
  transition: all 0.3s ease;
}

.qty-input:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Okrągły przycisk */
.cart-btn {
  width: 50px;
  height: 50px;
  border-radius: 50% !important;
  /* Pełny okrąg */
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cart-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.cart-btn i {
  font-size: 1.2rem;
}

/* Alternatywna wersja z większym inputem */
.qty-input-large {
  width: 120px !important;
  height: 45px;
  border-radius: 25px !important;
  font-size: 1.1rem;
  font-weight: 500;
}

.cart-btn-large {
  width: 45px;
  height: 45px;
}

/* Dark theme support */
[data-bs-theme="dark"] .qty-input {
  background-color: #212529;
  border-color: #495057;
  color: #fff;
}

[data-bs-theme="dark"] .qty-input:focus {
  border-color: #0d6efd;
  background-color: #212529;
}

/* Mobile responsiveness */
@media (max-width: 576px) {
  .qty-input {
    width: 60px !important;
    height: 36px;
    font-size: 0.9rem;
  }

  .cart-btn {
    width: 36px;
    height: 36px;
  }

  .cart-btn i {
    font-size: 1rem;
  }
}

/* Animacja dla inputa przy zmianie wartości */
.qty-input:focus {
  animation: pulse 0.3s ease;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

/* Opcjonalnie: style dla + i - do zmiany ilości */
.qty-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.qty-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #dee2e6;
  background-color: #fff;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.2rem;
  line-height: 1;
}

.qty-btn:hover {
  background-color: #e9ecef;
  color: #495057;
}
.box-product-title{
   font-size: 1.2rem !important;
    font-weight: 400;
}
.box-product-price-netto {
  font-size: 1.8rem
}
.product-buy-price{
    font-size: 2.8rem !important;  
}
.product-buy-price .promocja{
    
}
.product-buy-price-old{
    font-size: 1.2rem !important;  
    text-decoration: line-through;
}
/* Footer enhancements */
footer {
  background-color: var(--primary-color);
  color: white;
  transition: all 0.3s ease;
}

[data-bs-theme="dark"] footer {
  background-color: #1a1d20;
}

footer .nav-link {
  color: rgba(255, 255, 255, 0.8) !important;
  transition: all 0.3s ease;
}

footer .nav-link:hover {
  color: white !important;
  transform: translateY(-2px);
}

/* Social icons */
.social-icon {
  font-size: 1.5em;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  text-decoration: none;
}

.social-icon:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Theme toggle button */
#themeToggle {
  font-size: 1.2em;
  transition: all 0.3s ease;
}

#themeToggle:hover {
  /* background: rgba(255, 255, 255, 0.2);*/
}

/* Navbar toggler */
.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
  transition: opacity 0.2s ease;
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* Navbar collapse animation */
.navbar-collapse.collapsing {
  transition: height 0.15s ease;
}

/* Mobile improvements - poprawiona wersja */
@media (max-width: 991.98px) {
  #themeToggle {
    font-size: 1em;
  }

  .navbar {
    min-height: 70px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
  }

  .navbar-collapse {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 0 0 10px 10px;
    margin-top: 0;
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(15px);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
  }

  [data-bs-theme="dark"] .navbar-collapse {
    background: rgba(33, 37, 41, 0.98);
  }

  .navbar-collapse .nav-link {
    color: var(--text-primary) !important;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin: 0.25rem 0;
    transition: background-color 0.2s ease, color 0.2s ease;
  }

  .navbar-collapse .nav-link:hover {
    background-color: var(--accent-color);
    color: white !important;
  }

  .navbar-collapse .nav-link::after {
    display: none;
  }

  .dropdown-toggle::after {
    float: right;
    margin-top: 0.5rem;
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
  }

  .dropdown-menu {
    position: static !important;
    float: none !important;
    width: 100% !important;
    margin-top: 0.5rem !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    background: var(--light-bg) !important;
    transform: none !important;
  }

  .dropdown-item {
    color: var(--text-primary) !important;
    padding: 0.75rem 1rem;
    transition: background-color 0.2s ease, color 0.2s ease;
    border-left: none;
  }

  .dropdown-item:hover {
    background-color: var(--accent-color) !important;
    color: white !important;
  }

  .mobile-buttons .btn {
    border-radius: 20px;
    padding: 0.5rem 1rem;
    background-color: var(--light-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
    margin: 0.25rem;
    transition: background-color 0.2s ease, color 0.2s ease;
  }

  .mobile-buttons .btn:hover {
    background-color: var(--accent-color);
    color: white;
  }

  .mobile-buttons .btn-outline-danger {
    border-color: #ffc107;
    color: #ffc107;
  }

  .mobile-buttons .btn-outline-danger:hover {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Utility classes */
.glass-effect {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-bs-theme="dark"] .glass-effect {
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.product-container {
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-top: 2rem;
}

[data-bs-theme="dark"] .product-container {
  background: #2d3338;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

.product-image {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.product-image:hover {
  transform: scale(1.02);
}

.product-image img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.product-image .zoom-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  font-size: 1.6rem;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

.product-image:hover .zoom-icon {
  opacity: 1;
}

.product-info {
  padding: 2rem;
}

.product-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.product-price {
  color: var(--accent-color);
}

.product-price strong {
  font-size: 2.5rem;
  font-weight: 800;
}

.product-meta {
  background: var(--light-bg);
  padding: 1.5rem;
  border-radius: 10px;
  margin-bottom: 2rem;
}

[data-bs-theme="dark"] .product-meta {
  background: #1a1d20;
}

.meta-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.meta-item:last-child {
  border-bottom: none;
}

.meta-label {
  font-weight: 600;
  color: #666;
}

.availability-badge {
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.availability-badge.in-stock {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.availability-badge.preorder {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.availability-badge.out-of-stock {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

[data-bs-theme="dark"] .availability-badge.in-stock {
  background: #1e3a24;
  color: #4fb54f;
  border-color: #2d5a34;
}

[data-bs-theme="dark"] .availability-badge.preorder {
  background: #1e2a3a;
  color: #5bc0de;
  border-color: #2d4a5a;
}

[data-bs-theme="dark"] .availability-badge.out-of-stock {
  background: #3a1e1e;
  color: #f58b8b;
  border-color: #5a2d2d;
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.qty-input {
  width: 80px;
  height: 50px;
  text-align: center;
  border-radius: 25px;
  border: 2px solid var(--border-color);
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.qty-input:focus {
  border-color: var(--focus-color);
  box-shadow: 0 0 0 0.25rem rgba(253, 126, 20, 0.25);
  outline: none;
}

.qty-btn {
  width: 40px;
  height: 40px;
  border-radius: 50% !important;
  border: 2px solid var(--border-color);
  background: white;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.2rem;
  line-height: 1;
}

[data-bs-theme="dark"] .qty-btn {
  background: var(--light-bg);
  color: var(--text-primary);
}

.qty-btn:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.add-to-cart-btn {
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 25px;
  background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
  border: none;
  color: white;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.add-to-cart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.add-to-cart-btn:disabled {
  background: var(--secondary-color);
  cursor: not-allowed;
  transform: none;
}

.nav-tabs {
  border-bottom: 2px solid var(--border-color);
  margin-top: 3rem;
}

.nav-tabs .nav-link {
  border: none;
  padding: 1rem 2rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: 10px 10px 0 0;
  transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
  color: var(--accent-color);
  background: rgba(73, 80, 87, 0.1);
}

.nav-tabs .nav-link.active {
  color: var(--accent-color);
  background: white;
  border-bottom: 2px solid var(--accent-color);
}

[data-bs-theme="dark"] .nav-tabs .nav-link.active {
  background: var(--light-bg);
}

.tab-content {
  background: white;
  padding: 2rem;
  border-radius: 0 0 10px 10px;
}

[data-bs-theme="dark"] .tab-content {
  background: var(--light-bg);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: scale(1.05);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
}

.manufacturer-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--light-bg);
  border-radius: 10px;
  margin-bottom: 1rem;
}

.manufacturer-info img {
  max-width: 60px;
  height: auto;
}

.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  transform: scale(1.1);
  background: var(--primary-color);
}

@media (max-width: 768px) {
  .product-info {
    padding: 1rem;
  }

  .product-title {
    font-size: 1.5rem;
  }

  .product-price {
    font-size: 2rem;
  }

  .quantity-selector {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* --- Zaktualizowane Style dla Lightboxa --- */

/* Styl dla warstwy nakładki (overlay) */
#lightboxOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--lightbox-overlay-bg); /* Użycie zmiennej CSS */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999; /* ZNACZNIE wyższy z-index, aby był nad wszystkim */
    cursor: default;
}

/* Styl dla kontenera powiększonego obrazu */
#lightboxContent {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background-color: var(--lightbox-content-bg); /* Użycie zmiennej CSS */
    padding: 0; /* Usunięcie paddingu wokół obrazu */
    box-shadow: none; /* Usunięcie cienia */
    border-radius: 0; /* Usunięcie zaokrągleń */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Styl dla powiększonego obrazu */
#lightboxImage {
    max-width: 100%;
    max-height: 100%;
    display: block;
    object-fit: contain;
    margin-bottom: 0; /* Usunięcie marginesu pod obrazem */
    border-radius: 0; /* Upewnij się, że obrazek sam w sobie nie ma zaokrągleń */
}

/* Styl dla podpisu/tytułu zdjęcia (szpaleta na tekst) */
#lightboxCaption {
    color: var(--lightbox-caption-color); /* Użycie zmiennej CSS */
    font-size: 1.1em;
    padding: 10px 20px; /* Większy padding dla szpalety */
    text-align: center;
    max-width: 100%;
    word-wrap: break-word;
    background-color: var(--lightbox-content-bg); /* Tło szpalety takie jak contentu */
    /* Dodatkowe style dla szpalety */
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1); /* Delikatny cień od spodu */
    width: 100%; /* Szpaleta na całą szerokość lightboxContent */
    min-height: 50px; /* Minimalna wysokość, żeby zawsze było miejsce na tekst */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Styl dla przycisku zamknięcia */
#lightboxCloseBtn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--lightbox-close-btn-bg); /* Użycie zmiennej CSS */
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 1.8em;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    padding: 0;
    transition: background-color 0.2s ease;
    z-index: 1001; /* Zapewnia, że jest nad strzałkami */
}

#lightboxCloseBtn:hover {
    background-color: var(--lightbox-close-btn-hover-bg); /* Użycie zmiennej CSS */
}

/* Style dla przycisków nawigacyjnych (strzałek) */
.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--lightbox-nav-btn-bg); /* Użycie zmiennej CSS */
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 2em;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    transition: background-color 0.2s ease;
    z-index: 999;
}

.lightbox-nav-btn:hover {
    background-color: var(--lightbox-nav-btn-hover-bg); /* Użycie zmiennej CSS */
}

/* Pozycjonowanie strzałek wewnątrz lightboxContent, po bokach obrazu */
#lightboxPrevBtn {
    left: 10px;
}

#lightboxNextBtn {
    right: 10px;
}

/* Styl dla obrazów, które mają aktywować lightbox */
.zoomable-image {
    cursor: zoom-in;
}

/* Media Query dla mniejszych ekranów - dostosowanie rozmiaru contentu i strzałek */
@media (max-width: 768px) {
    #lightboxContent {
        max-width: 95%;
        max-height: 95%;
    }

    /* Na mniejszych ekranach strzałki mogą nachodzić na obrazek, możesz dostosować ich pozycję, np. */
    #lightboxPrevBtn {
        left: 5px;
        /* Bliżej krawędzi */
        width: 35px;
        height: 35px;
        font-size: 1.5em;
    }

    #lightboxNextBtn {
        right: 5px;
        /* Bliżej krawędzi */
        width: 35px;
        height: 35px;
        font-size: 1.5em;
    }
}