/* Valgusallikad Core v2.4.46 — shop category page cleanup
   Removes duplicated filter UI, hides the redundant result count and aligns ordering cleanly. */

body.vlg-core-shop-category-clean .vlg-filter-toggle,
body.vlg-core-shop-category-clean .vlg-filter-backdrop,
body.vlg-core-shop-category-clean .vlg-filter-drawer-head,
body.vlg-core-shop-category-clean .vlg-filter-drawer-actions,
body.vlg-core-shop-category-clean .vlg-filter-close {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.vlg-core-shop-category-clean.vlg-filter-open,
body.vlg-core-shop-category-clean body.vlg-filter-open {
  overflow: auto !important;
  touch-action: auto !important;
}

/* If the theme renders its own category widget, hide the duplicate WooCommerce
   Product Categories widget from the dynamic sidebar. */
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-category-widget ~ .widget_product_categories,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-category-widget ~ .widget.widget_product_categories,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-category-widget ~ .woocommerce.widget_product_categories,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-category-widget ~ [class*="widget_product_categories"] {
  display: none !important;
}

body.vlg-core-shop-category-clean .vlg-shop-layout {
  align-items: start !important;
}

/* Sidebar AINULT desktopil (≥992px) — mobiilil peidetud */
@media (min-width: 992px) {
  body.vlg-core-shop-category-clean #vlgShopSidebar.vlg-shop-sidebar,
  body.vlg-core-shop-category-clean .vlg-shop-sidebar#vlgShopSidebar {
    display: grid !important;
    gap: 16px !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: auto !important;
    max-width: 290px !important;
    min-width: 0 !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
}

body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-filter-drawer-head + *,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-filter-drawer-actions + * {
  margin-top: 0 !important;
}

/* Keep the single category card compact and readable. */
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-category-widget,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-widget.vlg-category-widget {
  margin: 0 !important;
  padding: 16px !important;
  border-radius: 18px !important;
  background: #fff !important;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .06) !important;
}

body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-category-widget h3 {
  margin: 0 0 12px !important;
  color: #f28a00 !important;
  font-size: 13px !important;
  font-weight: 950 !important;
  letter-spacing: .02em !important;
  text-transform: uppercase !important;
}

body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-cat-dropdown-list,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-cat-tree {
  display: grid !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-cat-item {
  margin: 0 !important;
  padding: 0 !important;
  border-bottom: 1px solid rgba(15, 23, 42, .07) !important;
}

body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-cat-item:last-child {
  border-bottom: 0 !important;
}

body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-cat-link {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 10px !important;
  align-items: center !important;
  min-height: 42px !important;
  padding: 10px 8px !important;
  border-radius: 12px !important;
  text-decoration: none !important;
  color: #071224 !important;
  background: transparent !important;
  font-weight: 900 !important;
}

body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-cat-link:hover,
body.vlg-core-shop-category-clean #vlgShopSidebar .current-cat > .vlg-cat-row .vlg-cat-link,
body.vlg-core-shop-category-clean #vlgShopSidebar .current-cat-parent > .vlg-cat-row .vlg-cat-link {
  background: rgba(242, 138, 0, .10) !important;
  color: #bf6500 !important;
}

body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-cat-title {
  min-width: 0 !important;
  overflow-wrap: anywhere !important;
  line-height: 1.12 !important;
}

body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-cat-count {
  min-width: 32px !important;
  padding: 3px 7px !important;
  border-radius: 999px !important;
  background: #eef4fb !important;
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  text-align: center !important;
}

@media (max-width: 991.98px) {
  body.vlg-core-shop-category-clean .vlg-shop-layout,
  body.vlg-core-shop-category-clean body.vlg-theme .vlg-shop-layout {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  body.vlg-core-shop-category-clean #vlgShopSidebar.vlg-shop-sidebar,
  body.vlg-core-shop-category-clean .vlg-shop-sidebar#vlgShopSidebar {
    position: relative !important;
    inset: auto !important;
    z-index: 1 !important;
    order: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
    overscroll-behavior: auto !important;
    transition: none !important;
  }

  body.vlg-core-shop-category-clean .vlg-shop-products {
    order: 2 !important;
  }

  body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-category-widget,
  body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-widget.vlg-category-widget {
    padding: 14px !important;
    border: 1px solid rgba(203, 213, 225, .72) !important;
    border-radius: 20px !important;
  }
}

@media (max-width: 767.98px) {
  body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-cat-link {
    min-height: 46px !important;
    padding: 11px 10px !important;
    font-size: 14px !important;
  }
}


/* v2.4.46 — remove the redundant "Kuvatakse kõik X tulemust" line.
   The same product count is already shown in the archive hero card, so keeping
   it here creates visual duplication and unnecessary spacing. */
body.vlg-core-shop-category-clean .vlg-shop-preloop > .woocommerce-result-count,
body.vlg-core-shop-category-clean .vlg-shop-preloop .woocommerce-result-count,
body.vlg-core-shop-category-clean .woocommerce-result-count.vlg-core-hide-result-count,
body.vlg-core-shop-category-clean p.woocommerce-result-count {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

/* v2.4.46 — keep the sort dropdown visually aligned to the right edge. */
body.vlg-core-shop-category-clean .vlg-shop-preloop {
  display: grid !important;
  grid-template-columns: 1fr !important;
  justify-items: end !important;
  align-items: center !important;
  gap: 14px !important;
  width: 100% !important;
}

body.vlg-core-shop-category-clean .vlg-shop-preloop > .woocommerce-ordering,
body.vlg-core-shop-category-clean .vlg-shop-preloop .woocommerce-ordering {
  float: none !important;
  clear: both !important;
  justify-self: end !important;
  align-self: center !important;
  margin: 0 0 18px auto !important;
  width: min(100%, 360px) !important;
  max-width: 360px !important;
  display: block !important;
  text-align: left !important;
}

body.vlg-core-shop-category-clean .vlg-shop-preloop .woocommerce-ordering select,
body.vlg-core-shop-category-clean form.woocommerce-ordering select,
body.vlg-core-shop-category-clean .woocommerce-ordering .orderby {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 48px !important;
  box-sizing: border-box !important;
  border-radius: 14px !important;
}

body.vlg-core-shop-category-clean .vlg-shop-preloop::after {
  content: "" !important;
  display: block !important;
  clear: both !important;
}

@media (max-width: 991.98px) {
  body.vlg-core-shop-category-clean .vlg-shop-preloop {
    justify-items: stretch !important;
  }

  body.vlg-core-shop-category-clean .vlg-shop-preloop > .woocommerce-ordering,
  body.vlg-core-shop-category-clean .vlg-shop-preloop .woocommerce-ordering {
    justify-self: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 14px !important;
  }
}


/* v2.4.47 — active category branch auto-open.
   When a visitor opens a parent category such as "LED valgustid", keep its
   direct child categories visible in the sidebar instead of hiding them behind
   the small arrow/hover menu. */
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree .vlg-cat-item.is-sub-open > .vlg-cat-submenu,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree .vlg-cat-item.vlg-core-auto-open > .vlg-cat-submenu,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree li.current-cat > ul.children,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree li.current-cat-parent > ul.children,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree li.current-cat-ancestor > ul.children {
  display: grid !important;
  position: static !important;
  left: auto !important;
  top: auto !important;
  right: auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  max-height: none !important;
  overflow: visible !important;
  gap: 6px !important;
  margin: 4px 0 8px 12px !important;
  padding: 2px 0 2px 12px !important;
  border: 0 !important;
  border-left: 2px solid rgba(242, 138, 0, .24) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  z-index: auto !important;
}

body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree .vlg-cat-item:not(.is-sub-open):not(.vlg-core-auto-open) > .vlg-cat-submenu,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree li:not(.current-cat):not(.current-cat-parent):not(.current-cat-ancestor) > ul.children {
  display: none !important;
}

body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree .vlg-cat-submenu .vlg-cat-link,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree ul.children a {
  min-height: 34px !important;
  padding: 7px 8px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
}

body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree .vlg-cat-submenu .vlg-cat-count,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree ul.children .count {
  font-size: 11px !important;
  opacity: .9 !important;
}

body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree .vlg-cat-item.is-sub-open > .vlg-cat-row .vlg-cat-link,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree .vlg-cat-item.current-cat > .vlg-cat-row .vlg-cat-link,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree li.current-cat > a {
  background: rgba(242, 138, 0, .10) !important;
  color: #bf6500 !important;
}

body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree .vlg-cat-subtoggle[data-vlg-core-auto-expanded="1"] span {
  transform: rotate(180deg) !important;
}

@media (max-width: 767.98px) {
  body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree .vlg-cat-item.is-sub-open > .vlg-cat-submenu,
  body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree .vlg-cat-item.vlg-core-auto-open > .vlg-cat-submenu,
  body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree li.current-cat > ul.children,
  body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree li.current-cat-parent > ul.children,
  body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree li.current-cat-ancestor > ul.children {
    margin-left: 8px !important;
    padding-left: 10px !important;
  }

  body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree .vlg-cat-submenu .vlg-cat-link,
  body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree ul.children a {
    min-height: 40px !important;
    font-size: 13.5px !important;
  }
}


/* v2.4.49 — category sidebar readability + opened branch layout.
   Keep category names on one line and render the opened branch as a real
   inline list, similar to the main "Kõik kategooriad" menu. */
@media (min-width: 992px) {
  /* 2-veeruline griid AINULT siis kui külgriba on olemas */
  body.vlg-core-shop-category-clean .vlg-shop-layout:not(.vlg-shop-layout-no-sidebar) {
    grid-template-columns: minmax(320px, 360px) minmax(0, 1fr) !important;
    column-gap: 28px !important;
  }
  /* Ilma külgribata — täislaius */
  body.vlg-core-shop-category-clean .vlg-shop-layout.vlg-shop-layout-no-sidebar {
    grid-template-columns: 1fr !important;
    column-gap: 0 !important;
  }

  body.vlg-core-shop-category-clean #vlgShopSidebar.vlg-shop-sidebar,
  body.vlg-core-shop-category-clean .vlg-shop-sidebar#vlgShopSidebar {
    width: clamp(320px, 21vw, 360px) !important;
    max-width: 360px !important;
  }
}

body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-category-widget,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-widget.vlg-category-widget {
  overflow: visible !important;
}

body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-cat-tree,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-cat-dropdown-list,
body.vlg-core-shop-category-clean #vlgShopSidebar .product-categories {
  width: 100% !important;
  min-width: 0 !important;
}

body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-cat-row,
body.vlg-core-shop-category-clean #vlgShopSidebar .cat-item,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-cat-item {
  min-width: 0 !important;
}

body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-cat-link,
body.vlg-core-shop-category-clean #vlgShopSidebar .product-categories a {
  grid-template-columns: minmax(max-content, 1fr) auto !important;
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
  font-size: clamp(12px, .78vw, 13.5px) !important;
  letter-spacing: -.015em !important;
}

body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-cat-title,
body.vlg-core-shop-category-clean #vlgShopSidebar .cat-name,
body.vlg-core-shop-category-clean #vlgShopSidebar .product-categories a,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree ul.children a {
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
  min-width: max-content !important;
  line-height: 1.15 !important;
}

body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-cat-count,
body.vlg-core-shop-category-clean #vlgShopSidebar .count {
  white-space: nowrap !important;
  flex: 0 0 auto !important;
  margin-left: auto !important;
}

body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree .vlg-cat-item.is-sub-open > .vlg-cat-submenu,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree .vlg-cat-item.vlg-core-auto-open > .vlg-cat-submenu,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree li.current-cat > ul.children,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree li.current-cat-parent > ul.children,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree li.current-cat-ancestor > ul.children {
  display: grid !important;
  gap: 2px !important;
  margin: 2px 0 10px 14px !important;
  padding: 0 0 4px 12px !important;
  border-left: 0 !important;
  background: transparent !important;
}

body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree .vlg-cat-submenu .vlg-cat-item,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree ul.children li {
  border-bottom: 0 !important;
}

body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree .vlg-cat-submenu .vlg-cat-link,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree ul.children a {
  display: grid !important;
  grid-template-columns: 12px minmax(max-content, 1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 32px !important;
  padding: 5px 6px !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #334155 !important;
  font-size: clamp(12px, .74vw, 13px) !important;
  font-weight: 800 !important;
}

body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree .vlg-cat-submenu .vlg-cat-link::before,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree ul.children a::before {
  content: '›' !important;
  display: inline-grid !important;
  place-items: center !important;
  width: 12px !important;
  height: 18px !important;
  color: #94a3b8 !important;
  font-size: 18px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
}

body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree .vlg-cat-submenu .vlg-cat-link:hover,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree ul.children a:hover,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree .vlg-cat-submenu .current-cat > .vlg-cat-row .vlg-cat-link,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree ul.children li.current-cat > a {
  background: rgba(242, 138, 0, .10) !important;
  color: #bf6500 !important;
}

body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree .vlg-cat-item.is-sub-open > .vlg-cat-row .vlg-cat-link,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree .vlg-cat-item.vlg-core-auto-open > .vlg-cat-row .vlg-cat-link,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree li.current-cat-parent > a,
body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-core-active-branch-tree li.current-cat-ancestor > a {
  margin-bottom: 2px !important;
  background: rgba(242, 138, 0, .10) !important;
  color: #bf6500 !important;
}

@media (max-width: 991.98px) {
  body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-category-widget,
  body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-widget.vlg-category-widget {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-cat-link,
  body.vlg-core-shop-category-clean #vlgShopSidebar .product-categories a {
    font-size: 14px !important;
  }
}


/* ==========================================================
   v2.4.71 — Kategooria menüü visuaalne täiustus
   (mobiili "Kõik kategooriad" modali parandused)
   ========================================================== */

/* Expand toggle "v" → nool, parem välimus */
body .vlg-cat-subtoggle,
body #vlgShopSidebar .vlg-cat-subtoggle {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 10px !important;
  background: rgba(242, 138, 0, .08) !important;
  border: 1.5px solid rgba(242, 138, 0, .18) !important;
  color: #bf6500 !important;
  font-size: 0 !important; /* peida "v" tekst */
  cursor: pointer !important;
  transition: background .15s, border-color .15s, transform .2s !important;
  position: relative !important;
}

/* Nool SVG asendab "v" teksti */
body .vlg-cat-subtoggle::after,
body #vlgShopSidebar .vlg-cat-subtoggle::after {
  content: '' !important;
  display: block !important;
  width: 10px !important;
  height: 10px !important;
  border-right: 2.5px solid #bf6500 !important;
  border-bottom: 2.5px solid #bf6500 !important;
  transform: rotate(45deg) translateY(-2px) !important;
  transition: transform .2s !important;
}

body .vlg-cat-subtoggle:hover,
body #vlgShopSidebar .vlg-cat-subtoggle:hover {
  background: rgba(242, 138, 0, .16) !important;
  border-color: rgba(242, 138, 0, .36) !important;
}

/* Pööratud nool kui on avatud */
body .vlg-cat-item.is-sub-open > .vlg-cat-row .vlg-cat-subtoggle::after,
body #vlgShopSidebar .vlg-cat-item.is-sub-open > .vlg-cat-row .vlg-cat-subtoggle::after,
body .vlg-cat-item.vlg-core-auto-open > .vlg-cat-row .vlg-cat-subtoggle[data-vlg-core-auto-expanded="1"]::after {
  transform: rotate(-135deg) translateY(2px) !important;
}

/* Orange dot → väiksem, täpsem */
body .vlg-cat-dot,
body .vlg-cat-item > .vlg-cat-row .vlg-cat-dot {
  flex-shrink: 0 !important;
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background: #f28a00 !important;
  box-shadow: 0 0 0 2px rgba(242,138,0,.18) !important;
}

/* Kategooria rea parem joondus */
body .vlg-cat-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

/* Toodete arvu badge — laiem raadiusega, selgem */
body .vlg-cat-count {
  min-width: 30px !important;
  padding: 3px 8px !important;
  border-radius: 999px !important;
  background: #eef4fb !important;
  color: #475569 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  text-align: center !important;
  white-space: nowrap !important;
}

/* Aktiivsele kategooriale oranž foon */
body .vlg-cat-item.current-cat > .vlg-cat-row .vlg-cat-link,
body .vlg-cat-item.current-cat-parent > .vlg-cat-row .vlg-cat-link,
body .vlg-cat-item.current-cat-ancestor > .vlg-cat-row .vlg-cat-link {
  background: rgba(242,138,0,.10) !important;
  color: #bf6500 !important;
}

/* Mobiili kategooriamodali container — rohkem varju, parem border-radius */
body .vlg-mobile-cat-modal,
body .vlg-mobiil-cat,
body [class*="vlg"][class*="cat"][class*="modal"],
body [class*="vlg"][class*="mobile"][class*="cat"] {
  border-radius: 20px !important;
  box-shadow: 0 20px 60px rgba(0,0,0,.18) !important;
}

/* Hover efekt kategooria lingil — sujuv */
body .vlg-cat-link {
  transition: background .14s, color .14s !important;
}

/* Kategooria pealkiri — parem lugemisvahe */
body .vlg-cat-title {
  letter-spacing: -.01em !important;
  line-height: 1.2 !important;
}

@media (max-width: 767px) {
  body .vlg-cat-subtoggle,
  body #vlgShopSidebar .vlg-cat-subtoggle {
    width: 40px !important;
    height: 40px !important;
    border-radius: 12px !important;
  }
}


/* ==========================================================
   v2.4.73 — Kategooria expand-nupp: puhta noolega
   ========================================================== */

/* Peida "⌄" / "v" / "^" tekst spans sees */
body .vlg-cat-subtoggle span,
body #vlgShopSidebar .vlg-cat-subtoggle span {
  display: none !important;
}

/* Nupu alus — ümar, oranž piirjoone, ilus */
body .vlg-cat-subtoggle,
body #vlgShopSidebar .vlg-cat-subtoggle {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  background: rgba(242, 138, 0, .07) !important;
  border: 1.5px solid rgba(242, 138, 0, .22) !important;
  cursor: pointer !important;
  transition: background .15s, border-color .15s !important;
  position: relative !important;
  padding: 0 !important;
}
body .vlg-cat-subtoggle:hover,
body #vlgShopSidebar .vlg-cat-subtoggle:hover {
  background: rgba(242, 138, 0, .15) !important;
  border-color: rgba(242, 138, 0, .45) !important;
}

/* CSS chevron nool ::after kaudu */
body .vlg-cat-subtoggle::after,
body #vlgShopSidebar .vlg-cat-subtoggle::after {
  content: '' !important;
  display: block !important;
  width: 9px !important;
  height: 9px !important;
  border-right: 2.5px solid #bf6500 !important;
  border-bottom: 2.5px solid #bf6500 !important;
  transform: rotate(45deg) translateY(-2px) !important;
  transition: transform .2s ease !important;
}

/* Avatud olek — nool üles */
body .vlg-cat-item.is-sub-open > .vlg-cat-row .vlg-cat-subtoggle::after,
body .vlg-cat-item.vlg-core-auto-open > .vlg-cat-row .vlg-cat-subtoggle::after,
body #vlgShopSidebar .vlg-cat-item.is-sub-open > .vlg-cat-row .vlg-cat-subtoggle::after,
body .vlg-cat-subtoggle[aria-expanded="true"]::after {
  transform: rotate(-135deg) translateY(2px) !important;
}

/* Aktiivsel avatud nupul tugevam oranž */
body .vlg-cat-item.is-sub-open > .vlg-cat-row .vlg-cat-subtoggle,
body .vlg-cat-item.vlg-core-auto-open > .vlg-cat-row .vlg-cat-subtoggle,
body .vlg-cat-subtoggle[aria-expanded="true"] {
  background: rgba(242, 138, 0, .14) !important;
  border-color: rgba(242, 138, 0, .5) !important;
}

/* Kategooria rida — parem joondus */
body .vlg-cat-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 2px 4px !important;
}

/* Kategooria link — sujuv hover */
body .vlg-cat-link {
  border-radius: 10px !important;
  transition: background .13s, color .13s !important;
  flex: 1 !important;
}
body .vlg-cat-link:hover {
  background: rgba(242, 138, 0, .08) !important;
  color: #bf6500 !important;
  text-decoration: none !important;
}

/* Toodete arv — pill badge */
body .vlg-cat-count {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 28px !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
  background: #eef2f7 !important;
  color: #475569 !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
  letter-spacing: -.01em !important;
}

/* Aktiivne kategooria — oranž taust */
body .current-cat > .vlg-cat-row .vlg-cat-link,
body .current-cat-parent > .vlg-cat-row .vlg-cat-link,
body .current-cat-ancestor > .vlg-cat-row .vlg-cat-link {
  background: rgba(242, 138, 0, .10) !important;
  color: #bf6500 !important;
  font-weight: 900 !important;
}

/* Alamkategooria read — veidi väiksemad, sisendiga */
body .vlg-cat-submenu .vlg-cat-link {
  font-size: 13px !important;
  padding: 7px 10px !important;
}
body .vlg-cat-submenu .vlg-cat-row {
  padding: 1px 2px 1px 4px !important;
}

/* Mobiilil veidi suurem nupp */
@media (max-width: 768px) {
  body .vlg-cat-subtoggle,
  body #vlgShopSidebar .vlg-cat-subtoggle {
    width: 42px !important;
    height: 42px !important;
    border-radius: 12px !important;
  }
}


/* ==========================================================
   v2.4.75 — Kategooria toggle: SVG nool, span peidetud
   ========================================================== */

/* Peidam KÕIK sisu nupus (span, text, pseudo-elemendid) */
body .vlg-cat-subtoggle,
body #vlgShopSidebar .vlg-cat-subtoggle,
body .vlg-category-dropdown .vlg-cat-subtoggle,
body .vlg-cat-tree .vlg-cat-subtoggle {
  /* Reset kõik vanad pseudo-element stiilid */
  font-size: 0 !important;
  color: transparent !important;
  overflow: hidden !important;

  /* Nupu mõõdud ja kujundus */
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  padding: 0 !important;
  cursor: pointer !important;
  border: 1.5px solid rgba(203, 213, 225, .8) !important;
  background-color: #ffffff !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 14px 14px !important;
  /* SVG nool alla */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 5l4.5 4 4.5-4' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  transition: background-color .15s, border-color .15s, background-image .15s, transform .18s ease !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.06) !important;
}

/* Peida span sees täielikult */
body .vlg-cat-subtoggle span,
body #vlgShopSidebar .vlg-cat-subtoggle span,
body .vlg-cat-subtoggle::before,
body .vlg-cat-subtoggle::after {
  display: none !important;
  content: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  position: absolute !important;
  pointer-events: none !important;
}

/* Hover efekt */
body .vlg-cat-subtoggle:hover {
  background-color: #fff7ed !important;
  border-color: rgba(242, 138, 0, .4) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 5l4.5 4 4.5-4' stroke='%23f28a00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  box-shadow: 0 2px 8px rgba(242,138,0,.16) !important;
}

/* Avatud olek — nool üles */
body .vlg-cat-item.is-sub-open > .vlg-cat-row .vlg-cat-subtoggle,
body .vlg-cat-subtoggle[aria-expanded="true"] {
  background-color: #fff7ed !important;
  border-color: rgba(242, 138, 0, .45) !important;
  /* SVG nool ülesse */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 9l4.5-4 4.5 4' stroke='%23f28a00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  box-shadow: 0 2px 10px rgba(242,138,0,.2) !important;
}

/* Mobiilil suurem */
@media (max-width: 768px) {
  body .vlg-cat-subtoggle,
  body #vlgShopSidebar .vlg-cat-subtoggle {
    width: 42px !important;
    height: 42px !important;
    border-radius: 12px !important;
    background-size: 16px 16px !important;
  }
}


/* ==========================================================
   v2.4.77 — Sidebar alati nähtav desktopil (≥992px)
   Tagab et külgriba kuvatakse ka ilma vlg-core-shop-category-clean klassita
   ========================================================== */

@media (min-width: 992px) {
  /* Näita sidebar kui see on olemas HTML-is */
  #vlgShopSidebar.vlg-shop-sidebar {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    pointer-events: auto !important;
  }

  /* 2-veeruline griid KUI sidebar on olemas */
  .vlg-shop-layout:not(.vlg-shop-layout-no-sidebar) {
    display: grid !important;
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr) !important;
    gap: 24px !important;
    align-items: start !important;
  }

  /* Täislaius KUI sidebar puudub */
  .vlg-shop-layout.vlg-shop-layout-no-sidebar,
  .vlg-shop-layout:not(:has(#vlgShopSidebar)) {
    display: block !important;
    width: 100% !important;
  }
}


/* ==========================================================
   v2.4.78 — Peida alamkategooria kaardid tooteloendist
   Kategooriad näidatakse ainult külgribas, mitte tooteruudustikus
   ========================================================== */

/* WooCommerce näitab product_cat postid klassiga .product-category —
   peida need tooteloendist, kuna navigatsioon on külgribas */
.vlg-shop-products ul.products li.product-category,
.vlg-shop-products .products li.product-category,
ul.products li.product-category.first,
ul.products li.product-category {
  display: none !important;
}

/* Kui KÕIK nähtavad elemendid on kategooriad (tühi tulemuste leht),
   näita sõbralik sõnum */
.vlg-shop-products ul.products:not(:has(li:not(.product-category))):empty::after,
.vlg-shop-products ul.products:not(:has(li:not(.product-category))) li.product-category:first-child::before {
  /* Lase WooCommerce "tooteid ei leitud" sõnumil töötada normaalselt */
  content: none;
}


/* ==========================================================
   v2.4.79 — Hover → Click fix + mobiili sidebar peit
   ========================================================== */

/* 1. HOVER FIX: Eemalda hõljuv dropdown #vlgShopSidebar-ist
      Alamkategooriad avanevad AINULT kliki kaudu (.is-sub-open JS-st) */
@media (min-width: 783px) {
  #vlgShopSidebar .vlg-cat-submenu-mode-accordion .vlg-cat-item.has-children:hover > .vlg-cat-submenu,
  #vlgShopSidebar .vlg-cat-submenu-mode-accordion .vlg-cat-item.has-children:focus-within > .vlg-cat-submenu {
    display: none !important;
    position: static !important;
  }

  /* Avatuna (JS lisab .is-sub-open) näita inline, mitte hõljuvana */
  #vlgShopSidebar .vlg-cat-submenu-mode-accordion .vlg-cat-item.has-children.is-sub-open > .vlg-cat-submenu,
  body.vlg-core-shop-category-clean #vlgShopSidebar .vlg-cat-item.is-sub-open > .vlg-cat-submenu {
    display: grid !important;
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 2px 0 6px 12px !important;
    border-left: 2px solid rgba(242,138,0,.2) !important;
    padding-left: 10px !important;
    z-index: auto !important;
  }

  /* Hover efekti eemalda link-ilt (ainult nupp muudab värvi) */
  #vlgShopSidebar .vlg-cat-submenu-mode-accordion .vlg-cat-item.has-children:hover > .vlg-cat-row .vlg-cat-link {
    background: transparent !important;
    color: inherit !important;
  }
}

/* 2. MOBIIL: Peida sidebar täielikult (<992px) */
@media (max-width: 991.98px) {
  #vlgShopSidebar.vlg-shop-sidebar,
  .vlg-shop-sidebar#vlgShopSidebar,
  body.vlg-core-shop-category-clean #vlgShopSidebar.vlg-shop-sidebar,
  body.vlg-core-shop-category-clean .vlg-shop-sidebar#vlgShopSidebar {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
  }

  /* Mobiilil tooteloend võtab kogu laiuse */
  .vlg-shop-layout {
    display: block !important;
    grid-template-columns: 1fr !important;
  }
  .vlg-shop-products {
    width: 100% !important;
  }
}


/* ==========================================================
   v2.4.80 — Puuteseadmel keela KÕIK hover-põhised alammenüü
   avamised. Puuteseadmel töötab ainult klikk (JS .is-sub-open)
   ========================================================== */

/* hover:none = seadmel pole hover võimekust (telefon, tahvelarvuti)
   pointer:coarse = jäme osuti (sõrm) */
@media (hover: none), (pointer: coarse) {

  /* Keela hover-dropdown kõigis kontekstides */
  .vlg-cat-submenu-mode-accordion .vlg-cat-item.has-children:hover > .vlg-cat-submenu,
  .vlg-cat-submenu-mode-accordion .vlg-cat-item.has-children:focus-within > .vlg-cat-submenu,
  body.vlg-theme .vlg-cat-submenu-mode-accordion .vlg-cat-item.has-children:hover > .vlg-cat-submenu,
  body.vlg-theme .vlg-cat-submenu-mode-accordion .vlg-cat-item.has-children:focus-within > .vlg-cat-submenu,
  body.vlg-theme .vlg-cat-submenu-mode-accordion .vlg-cat-item.has-children:not(.is-sub-open):hover > .vlg-cat-submenu {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    position: absolute !important;
    opacity: 0 !important;
  }

  /* Keela hover-link highlight */
  .vlg-cat-submenu-mode-accordion .vlg-cat-item.has-children:hover > .vlg-cat-row .vlg-cat-link,
  body.vlg-theme .vlg-cat-submenu-mode-accordion .vlg-cat-item.has-children:hover > .vlg-cat-row .vlg-cat-link {
    background: transparent !important;
    color: inherit !important;
  }

  /* Ainult klikk (.is-sub-open) avab */
  .vlg-cat-submenu-mode-accordion .vlg-cat-item.has-children.is-sub-open > .vlg-cat-submenu,
  body.vlg-theme .vlg-cat-submenu-mode-accordion .vlg-cat-item.has-children.is-sub-open > .vlg-cat-submenu {
    display: grid !important;
    visibility: visible !important;
    pointer-events: auto !important;
    opacity: 1 !important;
  }
}
