/* =========================================================
   LUEN SHOP – CATEGORY PAGE
   ========================================================= */

/* 🔹 Layout */
.category-page.container {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-top: 40px;
  width: 100%;
}

.category-layout.grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  width: 100%;
}

/* =========================================================
   FILTER SIDEBAR
   ========================================================= */

.category-filters {
  background: #fff;
  padding: 25px 25px 35px;
  border-radius: 16px;
  border: 1px solid #e3ddd8;
  position: sticky;
  top: 100px;
  height: fit-content;
}

.filters-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #3b2666;
  text-transform: uppercase;
}

/* 🔸 Accordion Sections */
.accordion-section {
  border-bottom: 1px solid #e3ddd8;
}

.accordion-toggle {
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  padding: 14px 0;
  font-size: 16px;
  font-weight: 600;
  color: #3b2666;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
  padding-right: 25px;
}

.accordion-toggle:hover {
  color: #6e3bb7;
}

/* 🔹 Font Awesome strelice */
.accordion-toggle::after {
  content: '\f107'; /* fa-chevron-down */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #6e3bb7;
  transition: transform 0.25s ease;
}

.accordion-toggle.active::after {
  content: '\f106'; /* fa-chevron-up */
  transform: translateY(-50%) rotate(0deg);
}

.accordion-content {
  display: none;
  padding: 10px 0 20px;
}

.accordion-content.active {
  display: block;
}

/* 🔹 FacetWP Elements */
.facetwp-facet {
  margin-bottom: 15px;
}

.facetwp-facet label {
  font-weight: 500;
  color: #3b2666;
  margin-bottom: 6px;
  display: block;
}

.facetwp-facet .facetwp-checkbox,
.facetwp-facet .facetwp-radio {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}

.facetwp-facet input[type='checkbox'],
.facetwp-facet input[type='radio'] {
  accent-color: #6e3bb7;
  margin-right: 8px;
}

.facetwp-facet select {
  border: 1px solid #d8d1ca;
  border-radius: 6px;
  padding: 6px 8px;
  width: 100%;
  font-size: 15px;
}

/* 🔹 Slider */
.facetwp-facet .facetwp-slider {
  accent-color: #6e3bb7;
  width: 100%;
  margin-top: 10px;
}

/* =========================================================
   PRODUCT GRID – stabilna 4-kolonska verzija
   ========================================================= */

.category-products {
  width: 100%;
}

.category-products .product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  width: 100%;
  margin-top: 10px;
}

.category-products .product-item {
  background: #fff;
  border: 1px solid #ece8e3;
  border-radius: 12px;
  text-align: center;
  padding: 18px 15px 20px;
  text-decoration: none;
  color: #2c1b47;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.category-products .product-item:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}

.category-products .product-item img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  margin-bottom: 12px;
  border-radius: 8px;
}

.category-products .product-item h3 {
  font-size: 16px;
  font-weight: 600;
  color: #3b2666;
  margin: 10px 0 8px;
  line-height: 1.4;
}

.category-products .price {
  display: block;
  color: #6e3bb7;
  font-weight: 700;
  font-size: 15px;
}

/* 🔹 Responsive kolone */
@media (max-width: 1200px) {
  .category-products .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .category-products .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }
}

@media (max-width: 540px) {
  .category-products .product-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {
  .category-layout.grid {
    grid-template-columns: 1fr;
  }

  .category-filters {
    position: relative;
    top: auto;
  }
}

/* =========================================================
   POSEBNI FILTERI
   ========================================================= */

.facetwp-facet-proizvodi_na_popustu label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #3b2666;
}

.facetwp-facet-proizvodi_na_popustu input[type='checkbox'] {
  accent-color: #6e3bb7;
}

/* =========================================================
   ANIMACIJA – fade-in pri učitavanju proizvoda (FacetWP AJAX)
   ========================================================= */

/* Početno stanje tokom AJAX učitavanja */
.facetwp-template .product-item {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Kada FacetWP završi renderovanje (dodaje .facetwp-loaded) */
.facetwp-loaded .product-item {
  opacity: 1;
  transform: translateY(0);
}

/* Lagani "stagger" efekat */
.facetwp-loaded .product-item:nth-child(1) {
  transition-delay: 0.05s;
}
.facetwp-loaded .product-item:nth-child(2) {
  transition-delay: 0.1s;
}
.facetwp-loaded .product-item:nth-child(3) {
  transition-delay: 0.15s;
}
.facetwp-loaded .product-item:nth-child(4) {
  transition-delay: 0.2s;
}
.facetwp-loaded .product-item:nth-child(5) {
  transition-delay: 0.25s;
}
.facetwp-loaded .product-item:nth-child(6) {
  transition-delay: 0.3s;
}
