:root {
  --carousel-control-size: 40px;
  --icon-size-lg: 64px;
  --icon-size-md: 44px;
  --icon-size-sm: 90px;
  --gallery-size-xl: 650px;
  --gallery-size-md: 470px;
  --gallery-size-sm: 360px;
}

/* Sekcja 1 */
.u-section-1 {
  min-height: 724px;
  padding-top: 5px;
}

.u-section-1 .u-layout-wrap-1 {
  margin: 74px 0 0;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 20px;
}

/* Galerie */
.u-gallery-1 {
  width: var(--gallery-size-xl);
  height: var(--gallery-size-xl);
  grid-gap: 10px;
  margin: 0 auto;
}

/* Karuzele */
.u-carousel-control-1,
.u-carousel-control-2 {
  position: absolute;
  width: var(--carousel-control-size);
  height: var(--carousel-control-size);
  top: 50%;
  transform: translateY(-50%);
}

.u-carousel-control-1 { left: 10px; }
.u-carousel-control-2 { right: 10px; }

/* Ikony */
[class*="u-icon-"] {
  width: var(--icon-size-lg);
  height: var(--icon-size-lg);
  border-radius: 10px;
  margin: 0 auto;
  padding: 4px;
}

/* Kontenery ikon */
[class*="u-container-layout-"] {
  padding: 5px 3px;
}

/* Media Queries */
@media (max-width: 1199px) {
  .u-section-1 {
    min-height: 610px;
  }
  .u-gallery-1 {
    width: var(--gallery-size-md);
    height: var(--gallery-size-md);
  }
  [class*="u-icon-"] {
    width: var(--icon-size-md);
    height: var(--icon-size-md);
    padding: 0;
  }
}

@media (max-width: 575px) {
  .u-gallery-1 {
    width: 340px;
    height: 340px;
  }
  [class*="u-icon-"] {
    width: var(--icon-size-sm);
    height: var(--icon-size-sm);
  }
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #fff;
  padding: 20px;
  text-align: center;
  border-radius: 8px;
  width: 300px;
  max-width: 90%;
  box-sizing: border-box;
}

.modal button {
  padding: 10px;
  margin: 10px;
  border: none;
  background-color: #007bff;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  border-radius: 5px;
  min-width: 80px;
}

.modal button:hover {
  background-color: #0056b3;
}


/* Responsywność */
@media (max-width: 480px) {
    .modal-content {
        width: 90%;
        padding: 15px;
    }
    .modal button {
        font-size: 14px;
        padding: 8px;
        margin: 8px 5px;
        min-width: 60px;
    }
}
/* Główny kontener flex - karuzela i opis obok siebie */
.u-layout-wrap-1 {
  display: flex;
  gap: 20px;
  flex-wrap: wrap; /* na małych ekranach układa pionowo */
  justify-content: center;
  padding: 20px;
}

/* Lewa kolumna: karuzela */
.u-size-30.carousel-col {
  flex: 1 1 400px;  /* minimalna szerokość 400px */
  max-width: 600px;
}

/* Prawa kolumna: opis i formularz */
.u-size-30.info-col {
  flex: 1 1 300px;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Formularz jako flex - aby elementy były obok siebie */
form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

form label {
  flex: 0 0 auto;
}

form input[type="number"] {
  width: 65px;      /* Stała szerokość */
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 4px;
}


form button {
  flex: 1 1 auto;
  min-width: 120px;
  padding: 10px 15px;
  background-color: rgb(240, 109, 33);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

form button:hover {
  background-color: rgb(231, 69, 4);
}

/* Obrazki karuzeli responsywne */
.u-carousel-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* Miniaturki karuzeli */
.u-carousel-thumbnails img {
  max-width: 60px;
  height: auto;
  border-radius: 4px;
  cursor: pointer;
}

/* Responsywność - układ pionowy na mniejszych ekranach */
@media (max-width: 768px) {
  .u-layout-wrap-1 {
    flex-direction: column;
    padding: 10px;
  }

  .u-size-30.carousel-col,
  .u-size-30.info-col {
    max-width: 100%;
    flex: 1 1 100%;
  }

  form {
    flex-direction: column;
    align-items: stretch;
  }

  form input[type="number"],
  form button {
    width: 100%;
    flex: none;
  }
}
/* --- LEPSZY RESPONSYWNY UKŁAD STRONY --- */

.u-section-1 .u-layout-wrap-1 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 74px;
  padding: 0 20px;
}

.u-section-1 .u-layout-cell {
  flex: 1 1 300px;
  box-sizing: border-box;
  padding: 20px;
}

/* --- GALERIA --- */

.u-section-1 .u-gallery-1 {
  width: 100%;
  max-width: 650px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.u-section-1 .u-carousel-thumbnails-1 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding-top: 0px;
}

.u-section-1 .u-carousel-thumbnail {
  width: 80px;
  height: 80px;
  object-fit: cover;
}

/* --- IKONY --- */

.u-section-1 .u-icon-1,
.u-section-1 .u-icon-2,
.u-section-1 .u-icon-3,
.u-section-1 .u-icon-4,
.u-section-1 .u-icon-5,
.u-section-1 .u-icon-6 {
  width: 48px;
  height: 48px;
  padding: 5px;
  margin: 0 auto;
}

/* --- PRZYCISK --- */

.u-section-1 .u-btn-1 {
  font-size: 1.2rem;
  padding: 10px 20px;
  margin-top: 20px;
  align-self: flex-end;
}

/* --- MODAL ZDJĘCIA --- */

.modal-content {
  max-width: 95%;
  width: 100%;
  box-sizing: border-box;
  margin: 0 10px;
}

/* --- GALERIA PRODUKTÓW (Repeater) --- */

.u-section-3 .u-repeater-1 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  justify-items: center;
}

/* --- MOBILE STYLES --- */

@media (max-width: 768px) {
  .u-section-1 .u-layout-wrap-1 {
    flex-direction: column;
    align-items: center;
  }

  .u-section-1 .u-gallery-1 {
    max-width: 90%;
  }

  .u-section-1 .u-btn-1 {
    align-self: center;
  }
}

/* Kontener, który otacza nazwę produktu i galerię, aby ustawić je w linii */
.product-header-gallery {
  display: flex;
  align-items: center;  /* wyrównanie pionowe */
  gap: 20px;            /* odstęp między nazwą a galerią */
  flex-wrap: wrap;      /* na małych ekranach może zawijać */
  margin-bottom: 20px;
  justify-content: center;
}

/* Nazwa produktu */
.product-name {
  font-size: 1.8rem;
  font-weight: 700;
  flex-shrink: 0;
  min-width: 200px;
  max-width: 300px;
  text-align: center;
}

/* Galeria */
.product-gallery {
  flex: 1 1 400px;
  max-width: 650px;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Responsywność: na małych ekranach ułożenie pionowe */
@media (max-width: 768px) {
  .product-header-gallery {
    flex-direction: column;
  }
  .product-name {
    max-width: 100%;
    margin-bottom: 15px;
  }
  .product-gallery {
    max-width: 100%;
    aspect-ratio: auto;
  }
}
.color-blocks {
  display: flex;
  gap: 1px; /* Minimalna przerwa między kolorami */
  flex-wrap: nowrap;
  margin-top: 10px;
  justify-content: flex-start;
  overflow-x: auto;
}

.color-blocks .u-layout-cell {
  padding: 0;
  margin: 0;
  border: none;
  width: auto;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.color-blocks .u-layout-cell img {
  display: block;
  width: 30px; /* zmień w razie potrzeby */
  height: 30px;
  border-radius: 4px;
}

.u-gallery-item .u-back-image {
  object-fit: contain;   /* dopasowuje obrazek do kontenera, zachowując proporcje */
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: block;
}
/* Główne linki w menu - zawsze białe */
.u-header a,
.u-header a:hover,
.u-header a:visited,
.u-header a:active {
  color: white !important;
}

/* Jeśli nagłówek robi się "sticky" */
.u-header.u-sticky a {
  color: white !important;
}

/* Jeśli masz klasy typu .u-nav-link */
.u-nav-link,
.u-nav-link:hover,
.u-nav-link:visited,
.u-nav-link:active {
  color: white !important;
}
/* Domyślnie linki białe */
.u-header a {
  color: white !important;
  transition: color 0.3s ease; /* płynna zmiana */
}

/* Po najechaniu: czarne */
.u-header a:hover {
  color: black !important;
}
.btn-dodaj {
  padding: 5px 12px;
  font-size: 14px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-left: 10px;
  transition: background-color 0.3s;
  max-width: 120px;
}

.btn-dodaj:hover {
  background-color: #45a049;
}

.jednostka-miary {
  margin: 0 10px;
  font-weight: bold;
}
.ilosc-produktu {
    font-size: 1.2rem;
    margin-top: 15px;
    color: #333;
}

@keyframes wypelnij-gradient {
  from {
    background-size: 0% 100%;
  }
  to {
    background-size: 100% 100%;
  }
}

.pasek-dostepnosci {
  display: flex;
  width: 100px;
  height: 20px;
  overflow: hidden;
  border: 1px solid #000000;
  border-radius: 5px;
  margin-top: 3px;
  position: relative;
}

.segment {
  flex: 1;
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 0% 100%;
  animation: wypelnij-gradient 0.6s ease forwards;
  position: relative;
}

.segment:nth-child(2) {
  animation-delay: 0.2s;
}

.segment:nth-child(3) {
  animation-delay: 0.4s;
}

.segment:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 2px;
  background-color: white;
  z-index: 1;
}

/* Gradientowe kolory segmentów */
.czerwony {
  background-image: linear-gradient(to right, #ff6b6b, #e74c3c);
}

.zolty {
  background-image: linear-gradient(to right, #ffeaa7, #f1c40f);
}

.zielony {
  background-image: linear-gradient(to right, #2ecc71, #27ae60);
}

.u-carousel-item {
  display: none;
  transition: all 0.5s ease;
}

.u-carousel-item.u-active {
  display: block;
}

.u-carousel-control {
  all: unset; /* Usuwa wszystkie style dziedziczone po klasach Nicepage */
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  opacity: 1 !important; /* Zawsze widoczne */
}

.u-carousel-control svg {
  width: 24px;
  height: 24px;
  fill: #333 !important; /* lub #fff jeśli masz ciemne tło */
  transition: fill 0.3s ease;
}

.u-carousel-control-1 {
  left: 10px !important;
}

.u-carousel-control-2 {
  right: 10px !important;
}

.ukryj-strzalki .u-carousel-control-prev,
.ukryj-strzalki .u-carousel-control-next {
    display: none !important;
}

