/* ========================================
   HOMEPAGE WRAPPER
======================================== */
.jtc-homepage-wrapper {
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
}

/* ========================================
   BLOCK WRAPPER - KONTROLA SZEROKOŚCI
======================================== */
.jtc-block-wrapper {
  width: 100%;
  margin: 0 auto 50px;
}

.jtc-block-wrapper[data-container-width="full"] {
  max-width: 100%;
}

.jtc-block-wrapper[data-container-width="1400"] {
  max-width: 1400px;
  padding: 0 20px;
}

.jtc-block-wrapper[data-container-width="1200"] {
  max-width: 1200px;
  padding: 0 20px;
}

.jtc-block-wrapper[data-container-width="1000"] {
  max-width: 1000px;
  padding: 0 20px;
}

/* ========================================
   SECTION TITLE
======================================== */
.jtc-section-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 30px;
  text-align: center;
  color: #333;
}

/* ========================================
   SLIDER
======================================== */
.jtc-slider-wrapper {
  margin-bottom: 0;
}

/* Szerokość slidera */
.jtc-slider-wrapper[data-width="full"] .jtc-slider {
  max-width: 100%;
  margin: 0 auto;
}

.jtc-slider-wrapper[data-width="1400"] .jtc-slider {
  max-width: 1400px;
  margin: 0 auto;
}

.jtc-slider-wrapper[data-width="1200"] .jtc-slider {
  max-width: 1200px;
  margin: 0 auto;
}

.jtc-slider-wrapper[data-width="1000"] .jtc-slider {
  max-width: 1000px;
  margin: 0 auto;
}

/* Wysokość slidera - Auto */
.jtc-slider-wrapper[data-height="auto"] .jtc-slide-item {
  height: auto;
}

.jtc-slider-wrapper[data-height="auto"] .jtc-slide-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Wysokość slidera - Aspect Ratio */
.jtc-slider-wrapper[data-height="16-9"] .jtc-slide-item {
  aspect-ratio: 16 / 9;
}

.jtc-slider-wrapper[data-height="21-9"] .jtc-slide-item {
  aspect-ratio: 21 / 9;
}

.jtc-slider-wrapper[data-height="4-3"] .jtc-slide-item {
  aspect-ratio: 4 / 3;
}

.jtc-slider-wrapper[data-height="3-2"] .jtc-slide-item {
  aspect-ratio: 3 / 2;
}

.jtc-slider-wrapper[data-height="16-9"] .jtc-slide-item img,
.jtc-slider-wrapper[data-height="21-9"] .jtc-slide-item img,
.jtc-slider-wrapper[data-height="4-3"] .jtc-slide-item img,
.jtc-slider-wrapper[data-height="3-2"] .jtc-slide-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jtc-slide-item {
  display: block;
  overflow: hidden;
}

.jtc-slide-item img {
  width: 100%;
  display: block;
}

.jtc-slider .owl-nav button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5) !important;
  color: #fff !important;
  font-size: 30px !important;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.jtc-slider .owl-nav button:hover {
  background: rgba(0, 0, 0, 0.7) !important;
}

.jtc-slider .owl-nav .owl-prev {
  left: 20px;
}

.jtc-slider .owl-nav .owl-next {
  right: 20px;
}

/* UKRYJ DOTS POD SLIDEREM */
.jtc-slider .owl-dots {
  display: none !important;
}

/* ========================================
   KATEGORIE - GRID
======================================== */
.jtc-categories-section {
  margin-bottom: 0;
  padding: 0;
}

.jtc-categories-grid {
  display: grid;
  gap: 20px;
  width: 100%;
}

/* Domyślnie 4 kolumny */
.jtc-categories-grid {
  grid-template-columns: repeat(4, 1fr);
}

/* Dynamiczne kolumny na podstawie data-per-row */
.jtc-categories-grid[data-per-row="2"] { grid-template-columns: repeat(2, 1fr); }
.jtc-categories-grid[data-per-row="3"] { grid-template-columns: repeat(3, 1fr); }
.jtc-categories-grid[data-per-row="4"] { grid-template-columns: repeat(4, 1fr); }
.jtc-categories-grid[data-per-row="5"] { grid-template-columns: repeat(5, 1fr); }
.jtc-categories-grid[data-per-row="6"] { grid-template-columns: repeat(6, 1fr); }
.jtc-categories-grid[data-per-row="7"] { grid-template-columns: repeat(7, 1fr); }
.jtc-categories-grid[data-per-row="8"] { grid-template-columns: repeat(8, 1fr); }

.jtc-category-item {
  text-align: center;
  transition: transform 0.3s ease;
  width: 100%;
}

.jtc-category-item:hover {
  transform: translateY(-5px);
}

.jtc-category-item a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.jtc-category-image {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  margin-bottom: 10px;
  background: #f5f5f5;
}

.jtc-category-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.jtc-category-item:hover .jtc-category-image img {
  transform: scale(1.05);
}

.jtc-category-name {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: #333;
}

/* ========================================
   BESTSELLERY - KARUZELA
======================================== */
.jtc-bestsellers-section {
  margin-bottom: 0;
  padding: 0;
}

.jtc-bestsellers-carousel .jtc-product-item {
  padding: 10px;
  text-align: center;
  background: transparent;
}

.jtc-bestsellers-carousel .jtc-product-item a {
  text-decoration: none;
  color: inherit;
  display: block;
  background: transparent;
}

.jtc-product-image {
  width: 100%;
  overflow: hidden;
  margin-bottom: 10px;
  background: transparent;
}

/* Aspect ratio dla bestsellerów */
.jtc-bestsellers-carousel[data-ratio="1-1"] .jtc-product-image {
  aspect-ratio: 1 / 1;
}

.jtc-bestsellers-carousel[data-ratio="4-3"] .jtc-product-image {
  aspect-ratio: 4 / 3;
}

.jtc-bestsellers-carousel[data-ratio="16-9"] .jtc-product-image {
  aspect-ratio: 16 / 9;
}

.jtc-bestsellers-carousel[data-ratio="3-4"] .jtc-product-image {
  aspect-ratio: 3 / 4;
}

.jtc-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.jtc-product-item:hover .jtc-product-image img {
  transform: scale(1.05);
}

.jtc-product-name {
  font-size: 14px;
  font-weight: 600;
  margin: 10px 0 5px;
  color: #333;
  min-height: 40px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.jtc-product-price {
  font-size: 16px;
  font-weight: 700;
  color: #2e7d32;
}

.jtc-bestsellers-carousel .owl-nav button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5) !important;
  color: #fff !important;
  font-size: 24px !important;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.jtc-bestsellers-carousel .owl-nav button:hover {
  background: rgba(0, 0, 0, 0.7) !important;
}

.jtc-bestsellers-carousel .owl-nav .owl-prev {
  left: -20px;
}

.jtc-bestsellers-carousel .owl-nav .owl-next {
  right: -20px;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 1200px) {
  .jtc-categories-grid[data-per-row="5"],
  .jtc-categories-grid[data-per-row="6"],
  .jtc-categories-grid[data-per-row="7"],
  .jtc-categories-grid[data-per-row="8"] {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .jtc-section-title {
    font-size: 24px;
    margin-bottom: 20px;
  }

  .jtc-categories-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px;
  }

  .jtc-slider .owl-nav button,
  .jtc-bestsellers-carousel .owl-nav button {
    width: 35px;
    height: 35px;
    font-size: 20px !important;
  }

  .jtc-bestsellers-carousel .owl-nav .owl-prev {
    left: -10px;
  }

  .jtc-bestsellers-carousel .owl-nav .owl-next {
    right: -10px;
  }
}

@media (max-width: 480px) {
  .jtc-categories-grid {
    grid-template-columns: repeat(1, 1fr) !important;
  }
}
