/* Navigation is in the separate heading widget; zb-product-tabs is unique
   to this plugin instance. All product rules are scoped to the widget class. */
.zb-product-tabs {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0 30px;
  margin: -8px 0 38px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.zb-product-tabs a[role="tab"] {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 0 11px;
  color: #8f98a8;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: color .2s ease;
}

.zb-product-tabs a[role="tab"]::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: #8b5cf6;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .2s ease;
}

.zb-product-tabs a[role="tab"]:hover,
.zb-product-tabs a[role="tab"]:focus-visible {
  color: #c4b5fd;
  outline: none;
}

.zb-product-tabs a[role="tab"][aria-selected="true"],
.zb-product-tabs a[role="tab"].is-active {
  color: #f5f3ff;
}

.zb-product-tabs a[role="tab"][aria-selected="true"]::after,
.zb-product-tabs a[role="tab"].is-active::after {
  transform: scaleX(1);
}

.zb-popular-products {
  position: relative;
}

.zb-popular-products.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 20;
  cursor: progress;
  background: rgba(15, 18, 25, .55);
  backdrop-filter: blur(1px);
}

.zb-popular-products [aria-busy="true"] {
  min-height: 240px;
}

.zb-popular-products .zb-tabs-status.is-error {
  margin: 0 0 16px;
  padding: 10px 12px;
  color: #fecaca;
  background: rgba(127, 29, 29, .18);
  border: 1px solid rgba(248, 113, 113, .3);
  font-size: 13px;
  line-height: 1.45;
}

.zb-popular-products .products.wd-products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 22px !important;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
}

.zb-popular-products .wd-product.product-grid-item {
  width: auto !important;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
}

.zb-popular-products .wd-product .wd-product-wrapper {
  position: relative !important;
  display: flex !important;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  padding: 14px 14px 0 !important;
  overflow: hidden;
  background: #141719;
  border: 1px solid rgba(255, 255, 255, .045);
  border-radius: 0 !important;
  box-shadow: none !important;
  transition: transform .2s ease, border-color .2s ease;
}

.zb-popular-products .wd-product .wd-product-wrapper:hover,
.zb-popular-products .wd-product .wd-product-wrapper:focus-within {
  transform: translateY(-2px);
  border-color: rgba(139, 92, 246, .28);
}

.zb-popular-products .wd-product .wd-product-thumb {
  display: contents !important;
  position: static !important;
  transform: none !important;
  contain: none !important;
}

.zb-popular-products .wd-product .wd-product-img-link {
  order: 1;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: calc(100% + 28px);
  height: auto;
  aspect-ratio: 1 / 1;
  margin: 0 -14px 16px !important;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
  /* Match the card so object-fit letterboxing never creates a false frame. */
  background: #141719;
  border: 0;
  border-radius: 0 !important;
}

.zb-popular-products .wd-product .wd-product-img-link img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: contain !important;
  object-position: center;
  background: transparent !important;
  border-radius: 0 !important;
}

.zb-popular-products .wd-product .product-labels,
.zb-popular-products .wd-product .onsale,
.zb-popular-products .wd-product .product-label,
.zb-popular-products .wd-product .product-label-hot,
.zb-popular-products .wd-product .hot-label,
.zb-popular-products .wd-product .badge-hot {
  display: none !important;
}

/* Preserve WoodMart's real wishlist control while suppressing only the
   compare and quick-view controls in this product grid. */
.zb-popular-products .wd-product .wd-buttons {
  position: absolute !important;
  top: 22px !important;
  right: 22px !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 8;
  display: block !important;
  width: 36px !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
}

.zb-popular-products .wd-product .wd-compare-btn,
.zb-popular-products .wd-product .wd-quick-view-btn {
  display: none !important;
}

.zb-popular-products .wd-product .wd-wishlist-btn {
  display: block !important;
  width: 36px;
  height: 36px;
  margin: 0 !important;
}

.zb-popular-products .wd-product .wd-wishlist-btn > a {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  color: #c4b5fd !important;
  background: rgba(20, 23, 25, .88) !important;
  border: 1px solid rgba(196, 181, 253, .28) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.zb-popular-products .wd-product .wd-wishlist-btn > a:hover,
.zb-popular-products .wd-product .wd-wishlist-btn > a:focus-visible,
.zb-popular-products .wd-product .wd-wishlist-btn.wd-added > a,
.zb-popular-products .wd-product .wd-wishlist-btn > a.wd-added {
  color: #fff !important;
  background: rgba(124, 58, 237, .9) !important;
  border-color: rgba(167, 139, 250, .9) !important;
  outline: none;
}

.zb-popular-products .wd-product .wd-wishlist-btn .wd-action-icon {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: inherit !important;
}

/* Retain accessible wishlist text while leaving WoodMart's icon visible. */
.zb-popular-products .wd-product .wd-wishlist-btn .wd-action-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.zb-popular-products .wd-product .wd-entities-title {
  order: 2;
  display: -webkit-box;
  height: 46px;
  min-height: 46px;
  margin: 0 6px 6px !important;
  overflow: hidden;
  color: #f5f5f5;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  text-overflow: ellipsis;
}

.zb-popular-products .wd-product .wd-entities-title > a {
  color: inherit !important;
  text-decoration: none !important;
}

.zb-popular-products .wd-product .wd-product-cats {
  order: 3;
  min-height: 17px;
  margin: 0 6px 7px !important;
  overflow: hidden;
  color: #8b94a3 !important;
  font-size: 10.5px !important;
  font-weight: 550;
  line-height: 1.35;
  letter-spacing: .035em;
  text-transform: uppercase;
  white-space: nowrap;
}

.zb-popular-products .wd-product .wd-product-cats a {
  color: inherit !important;
  text-decoration: none !important;
}

.zb-popular-products .wd-product.product_cat-operating-systems .wd-product-cats a,
.zb-popular-products .wd-product.product_cat-windows-servers .wd-product-cats a,
.zb-popular-products .wd-product.product_cat-microsoft-products .wd-product-cats a {
  font-size: 0 !important;
}

.zb-popular-products .wd-product.product_cat-operating-systems .wd-product-cats a::after {
  content: "WINDOWS";
  font-size: 10.5px;
}

.zb-popular-products .wd-product.product_cat-windows-servers .wd-product-cats a::after {
  content: "WINDOWS SERVER";
  font-size: 10.5px;
}

.zb-popular-products .wd-product.product_cat-microsoft-products .wd-product-cats a::after {
  content: "BUSINESS & DEVELOPER";
  font-size: 10.5px;
}

.zb-popular-products .wd-product .price {
  order: 4;
  display: flex !important;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 30px;
  margin: 0 6px 11px !important;
  color: #f6f2ff !important;
  font-size: 21px !important;
  font-weight: 750 !important;
  line-height: 1.3;
}

.zb-popular-products .wd-product .price ins {
  color: #f6f2ff !important;
  font-weight: 750 !important;
  text-decoration: none !important;
}

.zb-popular-products .wd-product .price del {
  color: #7f8793 !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  opacity: 1 !important;
}

.zb-popular-products .wd-product .wd-add-btn {
  position: static !important;
  order: 5;
  display: block !important;
  align-self: flex-end;
  width: 60% !important;
  margin: 0 -14px 0 0 !important;
  padding: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  pointer-events: auto !important;
}

.zb-popular-products .wd-product .wd-add-btn a.button {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  height: 50px !important;
  min-height: 50px !important;
  margin: 0 !important;
  padding: 0 14px !important;
  box-sizing: border-box;
  color: #fff !important;
  background: linear-gradient(135deg, #6d28d9, #8b5cf6) !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-align: center;
  white-space: normal;
  text-transform: none !important;
}

.zb-popular-products .wd-product .wd-add-btn a.button:hover,
.zb-popular-products .wd-product .wd-add-btn a.button:focus-visible {
  color: #fff !important;
  background: #7c3aed !important;
  outline: none;
}

.zb-popular-products .wd-product .wd-add-btn .wd-action-icon {
  display: none !important;
}

.zb-popular-products .wd-product .wd-add-btn .wd-action-text {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 1 !important;
}

.zb-popular-products .wd-product .wd-add-btn a.product_type_simple.add_to_cart_button .wd-action-text {
  font-size: 0 !important;
}

.zb-popular-products .wd-product .wd-add-btn a.product_type_simple.add_to_cart_button .wd-action-text::after {
  content: "Add to Cart";
  font-size: 14px;
}

.zb-popular-products .wd-product .wd-entities-title > a::after {
  content: "View Product";
  position: absolute;
  left: 14px;
  bottom: 0;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: calc(40% - 14px);
  min-height: 50px;
  padding-left: 7px;
  box-sizing: border-box;
  color: #d4d7dc;
  background: transparent;
  border: 0;
  border-radius: 0 !important;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  transition: color .2s ease;
}

.zb-popular-products .wd-product .wd-entities-title > a:hover::after,
.zb-popular-products .wd-product .wd-entities-title > a:focus-visible::after {
  color: #c4b5fd;
}

@media (max-width: 1024px) {
  .zb-product-tabs {
    gap: 0 22px;
  }

  .zb-popular-products .products.wd-products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 600px) {
  .zb-product-tabs {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    gap: 0 22px;
    overflow-x: auto !important;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .zb-product-tabs::-webkit-scrollbar {
    display: none;
  }

  .zb-product-tabs a[role="tab"] {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .zb-popular-products .products.wd-products {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px !important;
  }

  /* WoodMart normally overlays its add-to-cart ::before icon and swaps it
     with the label on hover. Keep that existing icon in the mobile flex row
     so touch hover states cannot place it over the Zurbit label. */
  .zb-popular-products:not(.zb-software-bundles) .wd-product .wd-add-btn a.button {
    gap: 7px !important;
  }

  .zb-popular-products:not(.zb-software-bundles) .wd-product .wd-add-btn a.button::before {
    position: static !important;
    inset: auto !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: auto !important;
    height: auto !important;
    transform: none !important;
  }

  .zb-popular-products:not(.zb-software-bundles) .wd-product .wd-add-btn a.button .wd-action-text {
    flex: 0 0 auto;
    width: auto;
    transform: none !important;
  }
}

/* Homepage mobile clearance for WoodMart's existing fixed toolbar. The toolbar
   itself is intentionally left unchanged. */
@media (max-width: 767px) {
  body.home.sticky-toolbar-on {
    padding-bottom: calc(55px + env(safe-area-inset-bottom, 0px)) !important;
  }

  body.home.sticky-toolbar-on .scrollToTop {
    bottom: calc(67px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (max-width: 380px) {
  .zb-popular-products .wd-product .wd-add-btn {
    width: calc(100% + 28px) !important;
    margin: 50px -14px 0 !important;
  }

  .zb-popular-products .wd-product .wd-entities-title > a::after {
    right: 14px;
    bottom: 50px;
    width: auto;
    justify-content: center;
    padding: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .zb-product-tabs a[role="tab"],
  .zb-product-tabs a[role="tab"]::after,
  .zb-popular-products .wd-product .wd-product-wrapper,
  .zb-popular-products .wd-product .wd-add-btn a.button {
    transition: none !important;
  }
}
