/* =========================================================
   IPSO – /utilaje-noi-aplicatii/
   NOU: Themify – WooCommerce Product Filter (ACTIV)
   VECHI: Filter Everything (WPC) – (COMENTAT)
   ========================================================= */


/* -----------------------------------------------
   NOU (ACTIV) – Themify WPF
   Font mai mic + spacing mai mic + checkbox-uri mici
------------------------------------------------ */

/* Font + line-height pentru textul filtrelor */
.themify-wpf,
.tf-wpf,
.themify-wpf label,
.tf-wpf label {
    font-size: 12px;
    line-height: 1.25;
}

/* Spațiere între rânduri (items) */
.themify-wpf li,
.tf-wpf li {
    margin: 0 0 5px 0;
    padding: 0;
}

/* Subliste (subcategorii) – mai compacte */
.themify-wpf ul ul,
.tf-wpf ul ul {
    margin-top: 4px;
}

/* Spațiu între grupuri de filtre */
.themify-wpf .field,
.tf-wpf .field {
    margin-bottom: 14px;
}

/* Checkbox / Radio mai mici + aliniere */
.themify-wpf input[type="checkbox"],
.tf-wpf input[type="checkbox"],
.themify-wpf input[type="radio"],
.tf-wpf input[type="radio"]{
    transform: scale(0.85);
    transform-origin: left center;
    margin-right: 8px;
}

.themify-wpf label,
.tf-wpf label{
    display: inline-flex;
    align-items: center;
    gap: 8px;
}


/* ---------------------------------------------------------
   VECHI (COMENTAT) – Filter Everything Pro (WPC)
   Dacă revii la pluginul vechi, scoate comentariile.
--------------------------------------------------------- */

/*
.wpc-filters-main-wrap,
.wpc-filters-main-wrap label {
    font-size: 14px;
    line-height: 1.25;
}

.wpc-filters-main-wrap li.wpc-term-item {
    margin: 0 0 6px 0;
    padding: 0;
}

.wpc-filters-main-wrap ul ul {
    margin-top: 4px;
}
*/


/* -----------------------------
   Carduri produse și subcategorii
   (INCLUDE SHADOW + HOVER)
----------------------------- */
.woocommerce ul.products li.product,
.elementor-element.elementor-products-grid ul.products li.product {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 10px;
    padding: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
    min-height: 350px;
    background: #ffffff;
}

.woocommerce ul.products li.product:hover,
.elementor-element.elementor-products-grid ul.products li.product:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    transform: translateY(-3px);
}


/* --------------------------------------
   Titlu și text – culoare uniformă (bază)
-------------------------------------- */
.woocommerce ul.products li.product,
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .product-excerpt,
.woocommerce ul.products li.product p,
.woocommerce ul.products li.product .subcategory-description {
    color: #292929 !important;
}


/* =========================================================
   FIX: descrierile din carduri (div[itemprop="description"])
   să nu mai fie galbene (inclusiv listele ul/li)
========================================================= */
.woocommerce ul.products li.product div[itemprop="description"],
.woocommerce ul.products li.product div[itemprop="description"] *,
.woocommerce ul.products li.product div[itemprop="description"] p,
.woocommerce ul.products li.product div[itemprop="description"] ul,
.woocommerce ul.products li.product div[itemprop="description"] li {
    color: #292929 !important;
}

/* Dacă există linkuri în descriere, rămân negre */
.woocommerce ul.products li.product div[itemprop="description"] a,
.woocommerce ul.products li.product div[itemprop="description"] a:link,
.woocommerce ul.products li.product div[itemprop="description"] a:visited,
.woocommerce ul.products li.product div[itemprop="description"] a:hover,
.woocommerce ul.products li.product div[itemprop="description"] a:active {
    color: #292929 !important;
    text-decoration: none !important;
}


/* -----------------------------
   Butoane galbene – Fira Sans Bold
----------------------------- */
.woocommerce ul.products li.product a.button,
.woocommerce ul.products li.product .subcategory-button,
.elementor-element.elementor-products-grid ul.products li.product a.button,
.elementor-element.elementor-products-grid ul.products li.product .subcategory-button {
    font-family: 'Fira Sans', sans-serif !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    display: inline-block;
    margin-top: auto;
    align-self: center;
    max-width: 180px;
    width: auto;

    background-color: #f5b211 !important;
    border-color: #f5b211 !important;
    color: #292929 !important;

    text-decoration: none !important;
    border-radius: 5px;
    padding: 8px 16px;
    text-align: center;
    transition: background-color 0.3s, color 0.3s, transform 0.3s, border-color 0.3s;
}

/* Hover butoane */
.woocommerce ul.products li.product a.button:hover,
.woocommerce ul.products li.product .subcategory-button:hover,
.elementor-element.elementor-products-grid ul.products li.product a.button:hover,
.elementor-element.elementor-products-grid ul.products li.product .subcategory-button:hover {
    background-color: #292929 !important;
    border-color: #292929 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
}


/* -----------------------------
   Mobile – un produs pe rând
----------------------------- */
@media only screen and (max-width: 767px) {
    .woocommerce ul.products li.product,
    .elementor-element.elementor-products-grid ul.products li.product {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        clear: both !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 20px !important;
    }

    .woocommerce ul.products,
    .elementor-element.elementor-products-grid ul.products {
        display: flex !important;
        flex-wrap: wrap !important;
    }

    .woocommerce ul.products li.product a.button,
    .woocommerce ul.products li.product .subcategory-button {
        width: auto !important;
        max-width: 100% !important;
        align-self: center !important;
    }
}
/* =========================================================
   IPSO – Themify WPF (DESKTOP ONLY)
   Checkbox-uri mai mici + font mai mic + etichete pe un singur rând
========================================================= */
@media (min-width: 1025px) {

  /* Font mai mic în filtre */
  .themify-wpf,
  .tf-wpf,
  .themify-wpf label,
  .tf-wpf label {
    font-size: 11px !important;
    line-height: 1.15 !important;
  }

  /* Etichete pe un singur rând */
  .themify-wpf label,
  .tf-wpf label {
    white-space: nowrap !important;
  }

  /* Mai mult spațiu pentru text (indent/padding mai mic) */
  .themify-wpf ul,
  .tf-wpf ul {
    padding-left: 0 !important;
    margin-left: 0 !important;
  }

  .themify-wpf li,
  .tf-wpf li {
    margin: 0 0 4px 0 !important;
  }

  /* Checkbox / Radio mai mici (input nativ) */
  .themify-wpf input[type="checkbox"],
  .tf-wpf input[type="checkbox"],
  .themify-wpf input[type="radio"],
  .tf-wpf input[type="radio"] {
    width: 14px !important;
    height: 14px !important;
    transform: scale(0.75) !important;
    transform-origin: left center !important;
    margin-right: 6px !important;
  }

  /* Dacă pluginul desenează checkbox-ul din pseudo-elemente */
  .themify-wpf label:before,
  .tf-wpf label:before,
  .themify-wpf label:after,
  .tf-wpf label:after {
    transform: scale(0.75) !important;
    transform-origin: left center !important;
  }

  /* Badge-ul cu numărul (dacă există) */
  .themify-wpf .count,
  .tf-wpf .count {
    font-size: 10px !important;
    padding: 0 6px !important;
  }
}
/* =========================================================
   IPSO – Themify WPF (DESKTOP) – font puțin mai mare + ierarhie mai clară
========================================================= */
@media (min-width: 1025px) {

  /* 1) Font puțin mai mare în filtre */
  :is(.themify-wpf, .tf-wpf, .tfwpf, [class*="themify-wpf"], [class*="tf-wpf"], [class*="wpf"]) {
    font-size: 13px !important;      /* era 11px */
    line-height: 1.22 !important;
  }

  :is(.themify-wpf, .tf-wpf, .tfwpf, [class*="themify-wpf"], [class*="tf-wpf"], [class*="wpf"]) label {
    font-size: 11px !important;
    line-height: 1.22 !important;
    white-space: nowrap !important;
  }

  /* 2) Spațiere ușor mai aerisită între rânduri */
  :is(.themify-wpf, .tf-wpf, .tfwpf, [class*="themify-wpf"], [class*="tf-wpf"], [class*="wpf"]) li {
    margin: 0 0 6px 0 !important;
  }

  /* 3) IERARHIE: subliste mai în interior + păstrăm liniile vizibile */
  /* nivel 2 */
  :is(.themify-wpf, .tf-wpf, .tfwpf, [class*="themify-wpf"], [class*="tf-wpf"], [class*="wpf"]) ul ul {
    margin-left: 18px !important;      /* împinge subcategoriile în interior */
    padding-left: 12px !important;     /* păstrează spațiul pentru linie */
    border-left: 1px solid rgba(0,0,0,0.12) !important; /* linia mai vizibilă */
    margin-top: 6px !important;        /* separă nivelurile */
  }

  /* nivel 3 (dacă există) */
  :is(.themify-wpf, .tf-wpf, .tfwpf, [class*="themify-wpf"], [class*="tf-wpf"], [class*="wpf"]) ul ul ul {
    margin-left: 14px !important;
    padding-left: 12px !important;
    border-left: 1px solid rgba(0,0,0,0.10) !important;
  }

  /* 4) Checkbox-uri/radio: păstrăm mai mici, dar nu exagerat */
  :is(.themify-wpf, .tf-wpf, .tfwpf, [class*="themify-wpf"], [class*="tf-wpf"], [class*="wpf"])
  input[type="checkbox"],
  :is(.themify-wpf, .tf-wpf, .tfwpf, [class*="themify-wpf"], [class*="tf-wpf"], [class*="wpf"])
  input[type="radio"] {
    transform: scale(0.85) !important;   /* un pic mai mare decât 0.75 */
    margin-right: 8px !important;
  }

  /* 5) Count badge un pic mai lizibil */
  :is(.themify-wpf, .tf-wpf, .tfwpf, [class*="themify-wpf"], [class*="tf-wpf"], [class*="wpf"])
  :is(.count, [class*="count"]) {
    font-size: 11px !important;
    padding: 0 7px !important;
  }
}

/* =========================================================
   Themify WPF – Acordeon (DESKTOP) – Varianta A
   Click pe label = toggle, click pe input = select
========================================================= */
@media (min-width: 1025px) {

  /* Ascundem submeniurile by default */
  .wpf_layout_vertical .wpf_items_wrapper .wpf_hierachy > li > ul.wpf_submenu.wpf_level_2 {
    display: none;
  }

  /* Indicator tip săgeată pentru părinți (li care au submenu) */
  .wpf_layout_vertical .wpf_items_wrapper .wpf_hierachy > li:has(> ul.wpf_submenu.wpf_level_2) > label {
    position: relative;
    padding-right: 16px;
    cursor: pointer;
  }

  .wpf_layout_vertical .wpf_items_wrapper .wpf_hierachy > li:has(> ul.wpf_submenu.wpf_level_2) > label::after {
    content: "▸";
    position: absolute;
    right: 0;
    top: 0;
    line-height: 1.2;
    opacity: 0.7;
    transform: translateY(1px);
  }

  /* Când e deschis, săgeata se rotește */
  .wpf_layout_vertical .wpf_items_wrapper .wpf_hierachy > li.wpf-acc-open > label::after {
    content: "▾";
    opacity: 0.85;
  }
}

@media (min-width:1025px){
  .wpf_hierachy > li.wpf-acc-open > label { font-weight: 700; }
  .wpf_hierachy > li > ul.wpf_submenu.wpf_level_2 { margin-left: 16px; }
}

