/* Styl karty produktu */
.product-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 8px;
  overflow: hidden;
  height: 100%;
  border: 1px solid rgba(0,0,0,0.1);
  background-color: white;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* Kontener dla karty */
.desktop-view {
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px); /* Tylko podniesienie, bez powiększania */
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
  z-index: 10; /* Zwiększony z-index */
}

/* Kontener zdjęcia */
.product-card .image-container {
  position: relative;
  overflow: hidden;
  padding-top: 100%; /* Proporcje 1:1 */
  /* background-color: #f8f9fa; */
}

.product-card .image-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
  padding: 10px;
}

.product-card:hover .image-container img {
  transform: scale(1.05);
}

/* Badge (Nowość, Promocja, Bestseller) */
.product-card .promo-badge {
  position: absolute;
  z-index: 2;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Przycisk ulubione w górnym lewym rogu */
.wishlist-top-button {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  background-color: white;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Przycisk widoczny po najechaniu */
.product-card:hover .wishlist-top-button {
  opacity: 1;
}

/* Przycisk zawsze widoczny, gdy produkt jest w ulubionych */
.wishlist-top-button .bi-heart-fill {
  color: #dc3545;
}

.wishlist-top-button:has(.bi-heart-fill) {
  opacity: 1;
}

.wishlist-top-button i {
  font-size: 1.2rem;
  color: #6c757d;
}

.wishlist-top-button:hover {
  background-color: #f8f9fa;
}

.wishlist-top-button:hover i.bi-heart {
  color: #dc3545;
}

/* Pozycje badge'y */
.product-card .badge-primary {
  top: 10px;
  right: 10px;
}

.product-card .badge-secondary {
  top: 45px;
  right: 10px;
}

/* Badge dla wersji mobilnej */
.product-list-image .promo-badge {
  position: absolute;
  z-index: 2;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  font-size: 0.75rem;
}

.product-list-image .badge-primary {
  top: 5px;
  right: 5px;
}

.product-list-image .badge-secondary {
  top: 35px;
  right: 5px;
}

/* Treść karty */
.product-card .card-body {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Nazwa produktu */
.product-card .product-title {
  font-weight: 500;
  margin-bottom: 10px;
  line-height: 1.4;
  height: 2.8em; /* Stała wysokość - dokładnie 2 linie tekstu */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Ograniczenie do 2 linii */
  -webkit-box-orient: vertical;
  text-overflow: ellipsis; /* Dodanie wielokropka */
  font-size: 0.95rem; /* Mniejszy rozmiar czcionki */
}

.product-card .product-title a {
  color: #212529;
  text-decoration: none;
  transition: color 0.2s ease;
}

.product-card .product-title a:hover {
  color: var(--bs-primary, #007bff);
}

/* Cena */
.product-card .product-price {
  margin-top: auto;
  margin-bottom: 10px;
  height: 2em; /* Zmniejszona wysokość dla ceny */
  display: flex;
  align-items: center;
  justify-content: flex-end; /* Wyrównanie do prawej */
}

.product-card .current-price {
  font-size: 1.2rem; /* Zmniejszona wielkość czcionki */
  font-weight: 700;
  color: #212529;
  order: 3; /* Kolejność wyświetlania */
}

.product-card .old-price {
  font-size: 0.85rem;
  color: #6c757d;
  text-decoration: line-through;
  margin-right: 5px;
  order: 1; /* Kolejność wyświetlania */
}

.product-card .promo-price {
  color: #dc3545;
}

.product-card .omnibus-info {
  margin-left: 5px;
  margin-right: 5px;
  cursor: help;
  order: 2; /* Kolejność wyświetlania */
}

.product-card .omnibus-info i {
  font-size: 0.85rem;
}

/* Dostępność */
.product-card .product-availability {
  margin-bottom: 15px;
  font-size: 0.85rem;
  min-height: 1.5em; /* Minimalna wysokość zamiast stałej */
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px; /* Odstęp między elementami */
}

.product-card .shipping-time-info {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  background-color: #f8f9fa;
  padding: 2px 6px;
  border-radius: 4px;
}

.product-card .shipping-time-info i {
  margin-right: 3px;
  color: #6c757d;
}

/* Przyciski */
.product-card .card-footer {
  background-color: transparent;
  border-top: 1px solid rgba(0,0,0,0.05);
  padding: 15px;
  margin-top: auto;
}

/* Przyciski widoczne po najechaniu */
.product-hover-buttons {
  position: absolute;
  bottom: 0; /* Przyciski na dole karty */
  left: 0;
  right: 0;
  background-color: white;
  padding: 10px;
  border-top: 1px solid rgba(0,0,0,0.05);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card:hover .product-hover-buttons {
  opacity: 1;
}

/* Szerszy przycisk dodawania do koszyka */
.add-to-cart-form {
  width: 100%;
}

.add-to-cart-form .btn {
  padding: 8px 16px; /* Większy padding dla przycisku */
  font-weight: 500;
}

/* Style dla przycisku outlined */
.add-to-cart-form .btn-outline-primary {
  border-width: 2px; /* Grubsze obramowanie */
  transition: all 0.3s ease;
}

.add-to-cart-form .btn-outline-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Ukrywamy oryginalną stopkę karty */
.product-card .card-footer {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card:hover .card-footer {
  opacity: 0;
}

.product-card .btn {
  border-radius: 4px;
  transition: all 0.2s ease;
}

.product-card .btn-primary {
  background-color: #007bff;
  border-color: #007bff;
}

.product-card .btn-primary:hover {
  background-color: #0069d9;
  border-color: #0062cc;
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.product-card .btn-outline-secondary:hover {
  background-color: #6c757d;
  color: white;
}

/* Usuwamy dodatkowy padding, który powodował przesuwanie elementów */

/* Widok listy dla mobile */
.mobile-view {
  margin-top: 0; /* Usunięcie górnego marginesu */
}

.product-list-item {
  display: flex;
  padding: 15px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  background-color: white;
  margin-bottom: 10px;
  margin-top: 0; /* Usunięcie górnego marginesu */
}

.product-list-image {
  width: 120px;
  height: 120px;
  margin-right: 15px;
  position: relative;
}

.product-list-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-list-details {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-list-title {
  font-weight: 500;
  margin-bottom: 5px;
  margin-top: 0; /* Usunięcie górnego marginesu */
  line-height: 1.4;
  height: 2.8em; /* Stała wysokość - dokładnie 2 linie tekstu */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Ograniczenie do 2 linii */
  -webkit-box-orient: vertical;
  text-overflow: ellipsis; /* Dodanie wielokropka */
}

.product-list-title a {
  color: #212529;
  text-decoration: none;
}

.product-list-title a:hover {
  color: var(--bs-primary, #007bff);
}

.product-list-price {
  height: 2em; /* Zmniejszona wysokość dla ceny */
  display: flex;
  align-items: center;
  justify-content: flex-end; /* Wyrównanie do prawej */
}

.product-list-price .current-price {
  font-size: 1.1rem; /* Zmniejszona wielkość czcionki */
  font-weight: 700;
  order: 3; /* Kolejność wyświetlania */
}

.product-list-price .old-price {
  order: 1; /* Kolejność wyświetlania */
}

.product-list-price .omnibus-info {
  margin-left: 5px;
  margin-right: 5px;
  cursor: help;
  order: 2; /* Kolejność wyświetlania */
}

.product-list-price .omnibus-info i {
  font-size: 0.85rem;
}

.product-list-availability {
  min-height: 1.5em; /* Minimalna wysokość zamiast stałej */
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px; /* Odstęp między elementami */
}

/* Style dla informacji o wysyłce w widoku listy */
.product-list-availability .shipping-time-info {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  background-color: #f8f9fa;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.product-list-availability .shipping-time-info i {
  margin-right: 3px;
  color: #6c757d;
}

.product-list-actions {
  margin-top: auto;
}

/* Usunięcie marginesu dla elementu col ga4-select-item-trigger */
.col.ga4-select-item-trigger {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Responsywność */
@media (max-width: 767.98px) {
  .desktop-view {
    display: none;
  }
  
  .mobile-view {
    display: block;
  }
}

@media (min-width: 768px) {
  .desktop-view {
    display: block;
  }
  
  .mobile-view {
    display: none;
  }
}

/* --- Style dla sliderów produktów (Swiper) --- */

.product-slider {
  /* Dodaj padding, aby przyciski nawigacji nie nachodziły na slajdy */
  padding-left: 40px;
  padding-right: 40px;
  margin-left: -40px; /* Skompensuj padding, aby wyrównać z kontenerem */
  margin-right: -40px; /* Skompensuj padding */
}

/* Ukryj domyślny overflow Swipera, aby padding działał */
.product-slider .swiper {
  overflow: visible; /* Pozwól przyciskom wyjść poza */
}

/* Zapewnij, że slajdy mają odpowiedni z-index */
.product-slider .swiper-slide {
  z-index: 1;
}

.product-slider .swiper-slide:hover {
  z-index: 10;
}