.main {
  overflow-x: hidden;
  max-width: 100%;
}

.product-items-section {
  max-width: 100%;
  overflow-x: hidden;
}

/* product-items-section-container — kompaktne horizontalne podkategorije */
.product-items-section-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: var(--section-margin);
  max-width: 100%;
}

/* Podkategorije — horizontalni swiper */
.subcat-swiper-wrap {
  margin-bottom: var(--section-margin);
  max-width: 100%;
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.subcat-swiper {
  width: 100%;
  overflow: hidden !important;
  padding: 8px 0;
}

.subcat-swiper .swiper-wrapper {
  align-items: stretch;
  padding: 4px 0;
  box-sizing: border-box;
}

.subcat-swiper .swiper-slide {
  width: auto;
  height: auto;
  flex-shrink: 0;
}

.subcat-swiper-pagination {
  position: relative !important;
  bottom: auto !important;
  top: auto !important;
  left: auto !important;
  width: 100% !important;
  margin-top: 14px;
  transform: none !important;
}

.subcat-swiper-pagination .swiper-pagination-bullet {
  background: var(--secondary-color);
  opacity: 0.35;
}

.subcat-swiper-pagination .swiper-pagination-bullet-active {
  opacity: 1;
  background: var(--primary-color);
}

/* product-items-section-title */
.product-items-section-title {
  font-size: var(--p-font-size-m);
  color: var(--primary-color);
  text-shadow: none;
  padding: 0;
  margin: 0;
  line-height: 1.35;
}

/* product-items-section-btn */
.product-items-section-btn {
  display: inline-block;
  width: 100%;
  max-width: 150px;
  text-align: center;
  background: linear-gradient(135deg, var(--secondary-color) 0%, #15803d 100%);
  padding: 15px 40px;
  border-radius: var(--border-radius-lg);
  font-weight: var(--font-light-weight);
  font-size: var(--p-font-size-l);
  color: white;
  border: none;
  margin-bottom: var(--padding-10);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
}

.product-items-section-link-lvl2:hover,
.product-items-section-btn:hover {
  background: linear-gradient(
    135deg,
    var(--button-hover-color) 0%,
    var(--secondary-color) 100%
  );
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  color: var(--text-color);
}

/* product-items-section-link */
.product-items-section-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  width: fit-content;
  padding: 8px 16px 8px 8px;
  background-color: white;
  border: 1px solid var(--secondary-color);
  text-align: left;
  font-weight: var(--font-light-weight);
  font-size: var(--p-font-size-m);
  border-radius: var(--border-radius);
  overflow: hidden;
  color: black;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.product-items-section-link > img {
  width: 56px;
  height: 56px;
  min-width: 56px;
  object-fit: cover;
  border-radius: 6px;
  mix-blend-mode: multiply;
  filter: brightness(1.04);
}

.product-items-section-link:not(:has(img)) {
  padding: 8px 16px;
  gap: 0;
}

.product-items-section-link:hover {
  border: 1px solid var(--primary-color-opacity);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.product-items-section-link > * {
  padding-bottom: 0;
}

.product-items-section-link:hover > img {
  scale: 1.05;
  transition: all var(--transition-base);
}

/* OVO SU DODATNE DEFINICIJE KOJE SE TAKOĐE PRIMENJUJU: */

.filter-fab,
.filter-offcanvas-overlay,
.filter-offcanvas-close {
  display: none;
}

@media screen and (max-width: 768px) {
  .product-items-section-container {
    width: 100%;
    padding: 0 12px;
    gap: 10px;
  }

  .product-items-section-link {
    flex: 0 0 auto;
    width: fit-content;
    max-width: 100%;
  }

  .filter-fab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 40px;
    left: 50px;
    z-index: 5;
    width: fit-content;
    padding: 3px 5px;
    border: none;
    border-radius: 4px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #15803d 100%);
    color: #fff;
    box-shadow: var(--shadow-md);
    font-size: 10px;
    line-height: 1;
    cursor: pointer;
    transition: background var(--transition-base), box-shadow var(--transition-base);
  }

  .filter-fab:hover {
    background: linear-gradient(
      135deg,
      var(--button-hover-color) 0%,
      var(--secondary-color) 100%
    );
    box-shadow: var(--shadow-md);
  }

  .filter-fab i {
    font-size: inherit;
    line-height: 1;
  }

  .filter-offcanvas-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 10040;
    background: #000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
      visibility 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .filter-offcanvas-overlay.is-visible {
    opacity: 0.6;
    visibility: visible;
    pointer-events: auto;
  }

  .product-items-section-filter-container[data-filter-offcanvas] {
    position: fixed;
    top: 0;
    left: 0;
    width: 66.666vw;
    height: 100%;
    height: 100dvh;
    margin: 0;
    border-radius: 0;
    z-index: 10050;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
      visibility 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 8px 0 30px rgba(0, 0, 0, 0.18);
    pointer-events: none;
    visibility: hidden;
    overscroll-behavior: contain;
  }

  .product-items-section-filter-container[data-filter-offcanvas].is-open {
    transform: translateX(0);
    pointer-events: auto;
    visibility: visible;
  }

  .product-items-section-filter-container[data-filter-offcanvas]
    .filter-row:first-child {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
    margin-bottom: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
  }

  .product-items-section-filter-container[data-filter-offcanvas]
    .filter-row
    .filter-text {
    cursor: default;
    border-bottom: 0;
    padding: 4px 0 8px;
  }

  .product-items-section-filter-container[data-filter-offcanvas]
    .filter-row
    .filter-text
    .toggle-icon {
    display: none;
  }

  .filter-offcanvas-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-left: auto;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-color);
    font-size: 22px;
    cursor: pointer;
  }

  .product-items-section-filter-container[data-filter-offcanvas] .filter-items {
    max-height: none !important;
    overflow: visible !important;
    opacity: 1 !important;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .product-items-section-filter-container[data-filter-offcanvas]
    .filter-row:has(.filter-text.active) {
    margin-bottom: 0;
  }

  .product-items-section-filter-container[data-filter-offcanvas]
    .filter-group-toggle {
    pointer-events: auto;
    cursor: pointer;
    padding: 14px 18px;
    background: var(--third-bcakground-color);
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  }

  .product-items-section-filter-container[data-filter-offcanvas]
    .filter-group-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .product-items-section-filter-container[data-filter-offcanvas]
    .filter-group.open
    .filter-group-chevron {
    transform: rotate(180deg);
  }

  .product-items-section-filter-container[data-filter-offcanvas] .filter-options {
    max-height: 0;
    overflow: hidden;
    border-width: 0;
    box-shadow: none;
    margin-top: 0;
    transition:
      max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
      border-width 0.2s ease,
      margin-top 0.2s ease;
  }

  .product-items-section-filter-container[data-filter-offcanvas]
    .filter-group.open
    .filter-options {
    max-height: 240px;
    overflow-y: auto;
    border-width: 2px;
    margin-top: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  }

  body.filter-offcanvas-open {
    overflow: hidden;
  }
}

@media screen and (max-width: 550px) {
  .filter-fab {
    left: 20px;
  }
}
