/* v3.6.0 — Shop/Kompass layout hotfix + stronger mobile category cards */

.vlg-shop-head .vlg-shop-tools[aria-hidden="true"] {
  display: none !important;
}

.vlg-shop-preloop {
  width: 100%;
  margin: 0 0 22px;
  display: grid;
  gap: 14px;
}

.vlg-shop-preloop::after {
  content: "";
  display: table;
  clear: both;
}

.vlg-shop-preloop .woocommerce-notices-wrapper,
.vlg-shop-preloop .vlg-kompass-shop-card,
.vlg-shop-preloop .vlg-buyer-assistant {
  width: 100%;
  max-width: none;
  clear: both;
}

.vlg-shop-preloop .woocommerce-result-count,
.vlg-shop-preloop .woocommerce-ordering {
  margin: 0 !important;
}

.vlg-shop-preloop .woocommerce-result-count {
  align-self: center;
  color: #64748b;
  font-weight: 800;
}

.vlg-shop-preloop .woocommerce-ordering {
  justify-self: end;
}

.vlg-shop-preloop .woocommerce-ordering select {
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid #dbe6f3;
  padding: 0 14px;
  font-weight: 800;
  color: #071224;
  background: #fff;
}

.vlg-shop-preloop > .woocommerce-result-count,
.vlg-shop-preloop > .woocommerce-ordering {
  display: inline-flex;
}

.vlg-shop-preloop {
  grid-template-columns: 1fr auto;
}

.vlg-shop-preloop > .vlg-kompass-shop-card,
.vlg-shop-preloop > .vlg-buyer-assistant,
.vlg-shop-preloop > .woocommerce-notices-wrapper {
  grid-column: 1 / -1;
}

body.vlg-theme .vlg-shop-products,
body.vlg-theme .vlg-shop-layout,
body.vlg-theme .vlg-shop-page {
  min-width: 0;
}

@media (max-width: 767.98px) {
  .vlg-shop-preloop {
    grid-template-columns: 1fr !important;
    margin-bottom: 16px;
  }

  .vlg-shop-preloop .woocommerce-ordering,
  .vlg-shop-preloop .woocommerce-ordering select {
    width: 100%;
    justify-self: stretch;
  }

  html body.vlg-theme #kategooriad .vlg-category-grid,
  html body.vlg-theme .vlg-category-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  html body.vlg-theme #kategooriad .vlg-category-card,
  html body.vlg-theme .vlg-category-grid .vlg-category-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 112px !important;
    display: grid !important;
    grid-template-columns: 82px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 14px !important;
    overflow: hidden !important;
  }

  html body.vlg-theme #kategooriad .vlg-category-card > div,
  html body.vlg-theme .vlg-category-grid .vlg-category-card > div {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    gap: 4px !important;
    text-align: left !important;
  }

  html body.vlg-theme #kategooriad .vlg-category-card strong,
  html body.vlg-theme .vlg-category-grid .vlg-category-card strong {
    display: block !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    hyphens: manual !important;
    text-align: left !important;
    font-size: 18px !important;
    line-height: 1.12 !important;
    letter-spacing: -.02em !important;
    max-width: 100% !important;
  }

  html body.vlg-theme #kategooriad .vlg-category-card small,
  html body.vlg-theme #kategooriad .vlg-category-card span,
  html body.vlg-theme .vlg-category-grid .vlg-category-card small,
  html body.vlg-theme .vlg-category-grid .vlg-category-card span {
    writing-mode: horizontal-tb !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    text-align: left !important;
    line-height: 1.2 !important;
  }

  html body.vlg-theme #kategooriad .vlg-category-card img,
  html body.vlg-theme .vlg-category-grid .vlg-category-card img {
    width: 76px !important;
    height: 76px !important;
    max-width: 76px !important;
    object-fit: contain !important;
  }
}
