/* =========================================
   SHOP CSS - Kategorije, tagovi, listing proizvoda
   ========================================= */

/* === MOBILNI PRIKAZ PROIZVODA === */
@media only screen and ( min-width: 320px ) and ( max-width: 767px ) {
    .products {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    }
    ul.products:before,
    ul.products:after {
        width: 0 !important;
    }
    ul.products li.product {
        -webkit-box-flex: 1;
        -ms-flex-positive: 1;
        flex-grow: 1;
        width: 34%;
              max-width: 50%;
        padding: 0 2px;
              margin-bottom: 0;
    }
    .col-full {
    margin-left: 3px;
    margin-right: 3px;
    padding: 0;
}
    .storefront-sorting {margin-bottom: 0px;}
}

/* === KATEGORIJE - DESKTOP PRIKAZ (4 U REDU) === */
@media (min-width:1024px){
  /* Vrati UL na klasičan flow (bez grida) i ukloni pseudo‑clearfix */
  .home ul.products.columns-3{
    display: block !important;
  }
  .home ul.products.columns-3::before,
  .home ul.products.columns-3::after{
    content: none !important;
    display: none !important;
  }

  /* Kartice: 4 u redu, float levo */
  .home ul.products.columns-3 li.product,
  .home ul.products.columns-3 li.product-category{
    float: left !important;
    width: 23.5% !important;        /* ~4 u redu */
    margin-right: 2% !important;     /* razmak između */
    margin-bottom: 20px !important;
    clear: none !important;
  }

  /* Ukloni Woo pravila za 3 kolone koja rade clear na svakom 3n+1 */
  .home ul.products.columns-3 li.product:nth-child(3n+1),
  .home ul.products.columns-3 li.product-category:nth-child(3n+1){
    clear: none !important;
  }

  /* Postavi pravila za 4 kolone */
  .home ul.products.columns-3 li.product:nth-child(4n),
  .home ul.products.columns-3 li.product-category:nth-child(4n){
    margin-right: 0 !important;      /* poslednji u redu bez desnog margina */
  }
  .home ul.products.columns-3 li.product:nth-child(4n+1),
  .home ul.products.columns-3 li.product-category:nth-child(4n+1){
    clear: both !important;          /* novi red počinje ovde */
  }

  /* Prvi element – bez left margine i cleara */
  .home ul.products.columns-3 li.product:first-child,
  .home ul.products.columns-3 li.product-category:first-child{
    margin-left: 0 !important;
    clear: none !important;
  }
}

/* === STILIZACIJA KARTICA KATEGORIJA === */
ul.products li.product-category {
  position: relative !important;
  overflow: hidden !important;
  border-radius: 16px !important;
  border: 1px solid #d1c466 !important;
  background-color: #000000 !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
}

/* Slika kategorije */
ul.products li.product-category img {
  width: 100% !important;
  height: 200px !important;
  object-fit: cover !important;
  display: block !important;
  margin: 0 !important;
  border-radius: 0 !important;
  transition: transform 0.3s ease !important;
}

ul.products li.product-category:hover img {
  transform: scale(1.03) !important;
}

/* Naslov kategorije */
ul.products li.product-category h2 {
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  text-align: center !important;
  color: #d1c466 !important;
  margin: 6px 8px 10px 8px !important;
  background: rgba(0, 0, 0, 0.25) !important;
  padding: 6px 8px !important;
  border-radius: 6px !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  height: 2.7em !important;
}

/* Mobilni prikaz kategorija */
@media screen and (max-width: 768px) {
  ul.products {
    gap: 6px !important;
  }

  ul.products li.product-category img {
    height: 180px !important;
  }

  ul.products li.product-category h2 {
    font-size: 14px !important;
    padding: 5px 6px !important;
    margin: 5px 6px 8px 6px !important;
    height: 3em !important;
  }
}

/* Sakrij broj proizvoda */
ul.products li.product-category mark.count {
  display: none !important;
}

/* Link unutar kategorije */
ul.products li.product-category a {
  display: block !important;
  text-decoration: none !important;
  color: inherit !important;
}

/* === TAGOVI - MOBILNI WIDGETI === */
@media screen and (max-width: 768px) {
  .widget_tag_cloud a.tag-cloud-link {
    background: linear-gradient(to bottom, #0a0a0a, #000) !important;
    color: #d1c466 !important;
    border: 1px solid #d1c466 !important;
    padding: 14px 0 !important;
    margin: 16px auto !important;
    width: 90% !important;
    display: block !important;
    text-align: center;
    border-radius: 14px;
    font-size: 16px !important;
    font-weight: 600;
    text-decoration: none !important;
    text-transform: capitalize;

    /* Efekat ispupčenosti */
    box-shadow:
      0 6px 12px rgba(0, 0, 0, 0.8),
      inset 0 2px 4px rgba(255, 255, 255, 0.08),
      inset 0 -2px 2px rgba(0, 0, 0, 0.6);

    transition: all 0.3s ease-in-out;
  }

  .widget_tag_cloud a.tag-cloud-link:hover {
    background: #d1c466 !important;
    color: #000 !important;
    transform: translateY(-2px);
    box-shadow:
      0 10px 16px rgba(209, 196, 102, 0.25),
      inset 0 1px 2px rgba(0, 0, 0, 0.2);
  }

  .widget_tag_cloud {
    padding: 25px 15px;
  }

  /* Sakrij specifične tagove */
  .widget_tag_cloud a[href*="pokloni-za-novu-godinu"],
  .widget_tag_cloud a[href*="pokloni-za-8-mart"],
  .widget_tag_cloud a[href*="pokloni-za-dan-zena"] {
    display: none !important;
  }
}

/* Tagovi - globalno */
.tag-cloud-link {
  display: block;
    font-size: 12pt!important;
    text-decoration: none!important;
}

.tag-link-count {
    display: none;
}

/* Levi sidebar sa kategorijama na mobilnoj verziji */
@media only screen and (max-width: 800px) {
  .tagcloud {
            display:none;
  }
}

/* === PROIZVODI - KARTICE === */
ul.products li.product.type-product {
  background-color: #000000 !important;
  border: 1px solid #d1c466 !important;
  border-radius: 10px !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  height: 100% !important;
  overflow: hidden !important;
}

/* Slika proizvoda */
ul.products li.product.type-product img {
  width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

/* Naslov proizvoda - 2 reda uvek */
ul.products li.product.type-product h2.woocommerce-loop-product__title {
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  color: #d1c466 !important;
  text-align: center !important;
  margin: 10px 10px 6px 10px !important;

  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  height: 2.6em !important;
}

/* Rating - stvarni */
ul.products li.product.type-product .star-rating {
  font-size: 17px !important;
  line-height: 1.2 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  height: 40px !important;
  margin: 4px auto 5px auto !important;
  color: #d1c466 !important;
}

/* Prazne zvezdice + "Ocenite" */
ul.products li.product.type-product .custom-no-rating {
  text-align: center !important;
  margin-bottom: 5px !important;
  line-height: 1.2 !important;
  height: 40px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
}

ul.products li.product.type-product .custom-no-rating .stars {
  color: #d1c466 !important;
  font-size: 17px !important;
}

ul.products li.product.type-product .custom-no-rating .text {
  font-size: 13px !important;
  font-style: italic !important;
  color: #888 !important;
}

/* Cena */
ul.products li.product.type-product .price {
  text-align: center !important;
  color: #d1c466 !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  margin-bottom: 10px !important;
  white-space: nowrap !important;
  display: flex !important;
  justify-content: center !important;
  gap: 6px !important;
  align-items: center !important;
}

/* Stara cena (precrtana) */
ul.products li.product.type-product .price del {
  color: #d1c466 !important;
  opacity: 1 !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  text-decoration: line-through !important;
}

/* Sakrij "RSD" iz precrtane cene */
ul.products li.product.type-product .price del .woocommerce-Price-currencySymbol {
  display: none !important;
}

/* Sakrij "RSD" iz nove cene */
ul.products li.product.type-product .price ins .woocommerce-Price-currencySymbol {
  display: none !important;
}

/* Dugme "Add to cart" */
ul.products li.product.type-product .button {
  background-color: #d1c466 !important;
  color: #000000 !important;
  font-weight: 500 !important;
  width: 90% !important;
  margin: 10px auto 15px auto !important;
  display: block !important;
  padding: 10px 0 !important;
  border-radius: 6px !important;
  border: none !important;
  text-align: center !important;
}

ul.products li.product.type-product .button:hover {
  background-color: #c1b35c !important;
  color: #000 !important;
}

/* Sakrij "SALE" oznaku */
ul.products li.product.type-product span.onsale {
  display: none !important;
}

/* Sakrij tekst "Rated 5.00 out of 5" */
ul.products li.product.type-product .star-rating span {
  font-size: 0 !important;
}

ul.products li.product.type-product .star-rating span strong {
  display: none !important;
}

/* Ojačaj prikaz zvezdica */
ul.products li.product.type-product .star-rating::before,
ul.products li.product.type-product .star-rating span::before {
  color: #d1c466 !important;
  opacity: 1 !important;
}

/* Mobilno – rešavanje crnog prostora */
@media (max-width: 767px) {
  ul.products li.product.type-product {
    min-height: auto !important;
    height: auto !important;
  }

  ul.products li.product.type-product .star-rating,
  ul.products li.product.type-product .custom-no-rating {
    height: 40px !important;
    margin-bottom: 5px !important;
  }

  ul.products li.product.type-product .price {
    margin-bottom: 0px !important;
  }

  ul.products li.product.type-product .button {
    margin-bottom: 5px !important;
  }

  ul.products li.product.type-product h2.woocommerce-loop-product__title {
    height: 2.6em !important;
    margin-top: 6px !important;
    margin-bottom: 2px !important;
  }
}

/* === PONUDA MESECA (LEGACY) === */
@media screen and (min-width:1024px){
.ponuda {
    width: 60%!important;
    margin-top: 10%!important;
    margin-left: 35%!important;
}
.woocommerce:nth-child(4) {
    margin-top: -1%;
}
.wf-container:nth-child(1) {
    margin-top: -23%;
}

.slkpr {
    margin-top: -380px!important;
}
}
