/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.1
 Text Domain:  woodmart
*/
/* Sakrij "Show 9 / 12 / 24" deo */
.wd-products-per-page,
.wd-label.per-page-title,
.per-page-variation,
.per-page-border {
  display: none !important;
}

/* Sakrij ikonice za prikaz (grid/list, 2–3–4 kolone) */
.shop-view.per-row-2,
.shop-view.per-row-3,
.shop-view.per-row-4,
.wd-products-shop-view {
  display: none !important;
}
/* ✅ GLAVNI KONTEJNER */
.filter-bar-scroll {
  display: flex;
  align-items: center;
  gap: 18px;
  overflow-x: auto;
  white-space: nowrap;
  padding: 14px 0;
  margin-bottom: 24px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  position: relative;
}

/* ✅ Filter kartica */
.filter-bar-scroll .extra-filter {
  background: #ffffff;
  border: 1px solid #e2e2e2;
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 160px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: all 0.25s ease;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ✅ Hover i aktivni efekat */
.filter-bar-scroll .extra-filter:hover,
.filter-bar-scroll .extra-filter:has(select:focus) {
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
  border-color: #bbb;
  transform: translateY(-2px);
}

/* ✅ Label */
.filter-bar-scroll label,
.custom-attr-label,
.custom-brand-filter label {
  font-weight: 600;
  font-size: 15px;
  color: #222;
  margin-bottom: 6px;
  display: block;
}

/* ✅ Select */
.filter-bar-scroll select,
.custom-brand-filter select,
.custom-attr-select {
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #fff;
  font-size: 15px;
  color: #111;
  padding: 6px 10px;
  cursor: pointer;
  width: 100%;
  transition: 0.2s ease-in-out;
}

.filter-bar-scroll select:hover,
.custom-attr-select:hover {
  border-color: #999;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

/* ✅ Uklanjamo ružnu crtu “–” */
.filter-bar-scroll select option[value=""]::before {
  content: "";
}

/* ✅ Aktivni select - lagani “focus glow” */
.filter-bar-scroll select:focus {
  outline: none;
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.08);
}

/* ✅ Scrollbar - tanak i suptilan */
.filter-bar-scroll::-webkit-scrollbar {
  height: 6px;
}
.filter-bar-scroll::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}
.filter-bar-scroll::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* ✅ “Fading” ivice za pokazivanje scrolla */
.filter-bar-scroll::before,
.filter-bar-scroll::after {
  content: "";
  position: sticky;
  top: 0;
  width: 40px;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}
.filter-bar-scroll::before {
  left: 0;
  background: linear-gradient(to right, #fff 60%, transparent);
}
.filter-bar-scroll::after {
  right: 0;
  background: linear-gradient(to left, #fff 60%, transparent);
}

/* ✅ Mobile */
@media (max-width: 768px) {
  .filter-bar-scroll {
    gap: 14px;
    padding: 10px 6px;
  }

  .filter-bar-scroll .extra-filter {
    min-width: 130px;
    padding: 8px 10px;
  }

  .filter-bar-scroll label,
  .custom-attr-label {
    font-size: 14px;
  }

  .filter-bar-scroll select {
    font-size: 13px;
  }
}
/* 🔹 Sakrij sve Woodmart default elemente unutar shop headera */
.shop-loop-head .woocommerce-result-count,
.shop-loop-head .wd-show-sidebar-btn,
.shop-loop-head .wd-products-per-page,
.shop-loop-head .wd-products-shop-view {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 🔹 Sakrij višak wrapper-a koji zna ostati prazan */
.shop-loop-head .wd-shop-tools:empty {
  display: none !important;
}
/* 🔹 Poravnanje "Ukupno" sa breadcrumbom */
.shop-loop-head .wd-shop-tools:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 12px;
}

.shop-loop-head .woocommerce-breadcrumb {
  flex: 1;
  font-size: 15px;
  color: #333;
  text-align: left;
}

.broj-artikala-inline {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-size: 15px;
  color: #222;
}

.broj-artikala-label {
  font-weight: 500;
  color: #444;
}

.broj-artikala-broj {
  font-weight: 600;
  color: #000;
}

/* 🔹 Mobilni prikaz */
@media (max-width: 768px) {
  .shop-loop-head .wd-shop-tools:first-child {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px;
  }

  .woocommerce-breadcrumb {
    font-size: 14px;
    color: #444;
  }

  .broj-artikala-inline {
    font-size: 14px;
  }
}
/* ========================================= */
/* ✅ MOBILNI I RESPONSIVE RASPORED FILTERA */
/* ========================================= */

/* Glavni kontejner za sve filtere */
.custom-brand-filter,
.custom-attributes-filter {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 12px;
  overflow-x: auto;
  white-space: nowrap;
  scroll-behavior: smooth;
  padding: 10px 0;
  margin-bottom: 18px;
  scrollbar-width: thin;
}

/* Fini scrollbar */
.custom-brand-filter::-webkit-scrollbar,
.custom-attributes-filter::-webkit-scrollbar {
  height: 6px;
}
.custom-brand-filter::-webkit-scrollbar-thumb,
.custom-attributes-filter::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}
.custom-brand-filter::-webkit-scrollbar-thumb:hover,
.custom-attributes-filter::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* Svaki filter blok kao mala kartica */
.custom-brand-filter label,
.custom-attributes-filter .extra-filter {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 150px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  flex-shrink: 0;
  transition: all 0.25s ease;
}

/* Hover efekat */
.custom-brand-filter label:hover,
.custom-attributes-filter .extra-filter:hover {
  border-color: #bbb;
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

/* Stil teksta i selecta */
.custom-brand-filter label,
.custom-attr-label {
  font-weight: 600;
  font-size: 14px;
  color: #222;
  margin-bottom: 5px;
}

.custom-brand-filter select,
.custom-attr-select {
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  padding: 6px 10px;
  width: 100%;
  cursor: pointer;
}

/* ✅ Mobilni izgled: horizontalni slider */
@media (max-width: 768px) {
  .custom-brand-filter,
  .custom-attributes-filter {
    gap: 10px;
    padding: 6px 2px;
  }

  .custom-brand-filter label,
  .custom-attributes-filter .extra-filter {
    min-width: 130px;
    padding: 8px 10px;
  }

  .custom-brand-filter select,
  .custom-attr-select {
    font-size: 13px;
  }
}
/* ✅ Spojeni brand + attribute filteri u jedan horizontalni red */
.filter-bar-scroll {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
  white-space: nowrap;
  margin-bottom: 18px;
  padding: 10px 0;
}

.filter-bar-scroll form {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 14px;
}

.filter-bar-scroll select {
  min-width: 130px;
}

/* ✅ Mobilni – slider osećaj */
@media (max-width: 768px) {
  .filter-bar-scroll {
    gap: 10px;
    padding: 6px 4px;
  }
}
/* ========================================= */
/* ✅ Mobilni prikaz filtera u jednom redu sa scrollom */
/* ========================================= */
@media (max-width: 768px) {
  /* Glavni kontejner ostaje horizontalan */
  .filter-bar-scroll {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: flex-start;
    gap: 10px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 8px 4px;
    scroll-behavior: smooth;
  }

  /* Brend i atribut forme postaju inline-flex */
  .filter-bar-scroll form.custom-brand-filter,
  .filter-bar-scroll form.custom-attributes-filter {
    display: inline-flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-width: 140px;
    flex-shrink: 0;
  }

  /* Kartice zbijene ali čitke */
  .filter-bar-scroll select,
  .filter-bar-scroll label {
    font-size: 13px;
  }

  /* Sitna optimizacija za razmak i senku */
  .custom-brand-filter,
  .custom-attributes-filter .extra-filter {
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-radius: 10px;
  }
}
/* 💻 Samo za desktop */
@media (min-width: 769px) {
  .shop-loop-head {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  /* Prvi red — breadcrumb i ukupno */
  .shop-loop-head .wd-shop-tools:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
  }

  /* Drugi red — filteri i sortiranje */
  .shop-loop-head .wd-shop-tools:nth-child(2) {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 15px;
    overflow-x: auto;
    white-space: nowrap;
  }

  /* Ukloni višak margina */
  .filter-bar-scroll {
    margin-bottom: 0 !important;
  }
}
@media (max-width: 768px) {
  .woocommerce-ordering select.orderby {
    margin-top: -8px !important;
    transform: translateY(-3px);
  }
}
@media (max-width: 768px) {
  /* Strelica malo više, bez labele */
  .woocommerce-ordering select.orderby {
    margin-top: -40px !important;
    transform: translateY(-3px);
  }

  /* Zaključaj raspored filtera i sortiranja */
  .filter-bar-scroll {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
  }

  /* Onemogući Woodmart da pomeri sortiranje */
  .woocommerce-ordering {
    order: 2 !important;
    margin: 0 !important;
    flex: 0 1 auto !important;
    width: auto !important;
  }

  /* Sakrij label "Sortiraj po:" ako bi se pojavio */
  .woocommerce-ordering label,
  .woocommerce-ordering .wd-label {
    display: none !important;
  }
}
