/*
Theme Name: Astra Child
Theme URI: https://wpastra.com/
Description: Child theme for Astra on vgbrbearing.com
Author: VGBR Bearing
Template: astra
Version: 1.0.4
Text Domain: astra-child
*/
.vgbr-b2b-terms{margin:14px 0 18px;padding:11px 14px;background:#f8fafc;border:1px solid #e2e8f0;border-inline-start:3px solid #0f172a;border-radius:6px;font-size:13px;line-height:1.6;color:#334155;display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px}
.vgbr-b2b-terms__item{display:inline-block}
.vgbr-b2b-terms__label{color:#0f172a;font-weight:600}
.vgbr-b2b-terms__sep{color:#94a3b8;font-weight:700}
@media (max-width:767px){.vgbr-b2b-terms{padding:10px 12px;font-size:12.5px;gap:4px 6px}}

/* VGBR-B6-SHOP-SIDEBAR */
@media (min-width: 922px) {
  body.post-type-archive-product.ast-left-sidebar #secondary,
  body.tax-product_cat.ast-left-sidebar #secondary {
    width: 26% !important;
    padding-right: 28px !important;
  }
  body.post-type-archive-product.ast-left-sidebar #primary,
  body.tax-product_cat.ast-left-sidebar #primary {
    width: 74% !important;
  }
}
@media (min-width: 1025px) {
  html body.post-type-archive-product.ast-left-sidebar ul.products,
  html body.tax-product_cat.ast-left-sidebar ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 24px 20px !important;
  }
}
body.post-type-archive-product.ast-left-sidebar #secondary .widget,
body.tax-product_cat.ast-left-sidebar #secondary .widget {
  background: #ffffff;
  border: 1px solid #e3e9f1;
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 18px;
}
body.post-type-archive-product.ast-left-sidebar #secondary .widget-title,
body.tax-product_cat.ast-left-sidebar #secondary .widget-title {
  font-size: 16px;
  font-weight: 700;
  color: #0d2238;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e8eef5;
}
body.post-type-archive-product.ast-left-sidebar #secondary ul.woocommerce-widget-layered-nav-list li,
body.tax-product_cat.ast-left-sidebar #secondary ul.product-categories li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 14px;
  line-height: 1.4;
}
body.post-type-archive-product.ast-left-sidebar #secondary ul.woocommerce-widget-layered-nav-list li a,
body.tax-product_cat.ast-left-sidebar #secondary ul.product-categories li a {
  color: #14517d;
  text-decoration: none;
}
body.post-type-archive-product.ast-left-sidebar #secondary ul.woocommerce-widget-layered-nav-list li.chosen a {
  font-weight: 700;
  color: #d62828;
}
@media (max-width: 921px) {
  body.post-type-archive-product.ast-left-sidebar #secondary .widget,
  body.tax-product_cat.ast-left-sidebar #secondary .widget {
    padding: 12px 14px;
    margin-bottom: 12px;
  }
  body.post-type-archive-product.ast-left-sidebar #secondary ul.woocommerce-widget-layered-nav-list,
  body.tax-product_cat.ast-left-sidebar #secondary ul.product-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
  }
  body.post-type-archive-product.ast-left-sidebar #secondary ul.woocommerce-widget-layered-nav-list li,
  body.tax-product_cat.ast-left-sidebar #secondary ul.product-categories li {
    display: inline-flex;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid #d5e0eb;
    border-radius: 999px;
    background: #f7fafc;
    font-size: 12.5px;
  }
}
/* VGBR B6 Shop Grid + Sidebar v2 */
@media (min-width: 922px) {
  body.woocommerce.ast-left-sidebar #secondary,
  body.woocommerce-page.ast-left-sidebar #secondary {
    width: 24% !important;
    padding-right: 28px !important;
  }
  body.woocommerce.ast-left-sidebar #primary,
  body.woocommerce-page.ast-left-sidebar #primary {
    width: 76% !important;
  }
  body.post-type-archive-product.ast-left-sidebar #primary ul.products,
  body.tax-product_cat.ast-left-sidebar #primary ul.products,
  body.woocommerce.ast-left-sidebar #primary ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 24px 20px !important;
  }
}
@media (max-width: 921px) and (min-width: 768px) {
  body.post-type-archive-product.ast-left-sidebar #primary ul.products,
  body.tax-product_cat.ast-left-sidebar #primary ul.products,
  body.woocommerce.ast-left-sidebar #primary ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 18px 16px !important;
  }
}
.widget_layered_nav ul, .widget_product_categories ul { list-style: none; margin: 0; padding: 0; }
.widget_layered_nav ul li, .widget_product_categories ul li { margin: 6px 0; font-size: 14px; }
.widget_layered_nav ul li.chosen a { font-weight: 700; color: #0f172a; }

/* VGBR B6 Final Polish */
body.post-type-archive-product #secondary .widget_layered_nav ul,
body.tax-product_cat #secondary .widget_layered_nav ul,
body.post-type-archive-product #secondary .widget_product_categories ul,
body.tax-product_cat #secondary .widget_product_categories ul,
.widget_layered_nav ul,
.widget_product_categories ul {
  max-height: 220px !important;
  overflow-y: auto !important;
  padding-right: 4px !important;
}
@media (max-width: 991px) {
  body.post-type-archive-product .ast-container,
  body.tax-product_cat .ast-container {
    display: flex !important;
    flex-direction: column !important;
  }
  body.post-type-archive-product #primary,
  body.tax-product_cat #primary {
    order: 1 !important;
    width: 100% !important;
  }
  body.post-type-archive-product #secondary,
  body.tax-product_cat #secondary {
    order: 2 !important;
    width: 100% !important;
    padding-right: 0 !important;
    margin-top: 24px !important;
  }
}
#ast-scroll-top {
  background: rgba(15, 23, 42, 0.75) !important;
  color: #ffffff !important;
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
  border-radius: 8px !important;
  bottom: 86px !important;
  right: 20px !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18) !important;
  opacity: 0.9 !important;
}
#ast-scroll-top:hover {
  background: rgba(15, 23, 42, 0.92) !important;
  opacity: 1 !important;
}
@media (max-width: 767px) {
  #ast-scroll-top {
    bottom: 72px !important;
    right: 16px !important;
  }
}

/* VGBR Gallery Thumbnails Pre-Init CLS Fix */
.single-product #nickx-gallery.nickx-slider-nav:not(.nswiper-horizontal):not(.nswiper-vertical) .nswiper-wrapper,
.single-product .nickx-slider-nav:not(.nswiper-horizontal):not(.nswiper-vertical) .nswiper-wrapper {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.single-product #nickx-gallery.nickx-slider-nav:not(.nswiper-horizontal):not(.nswiper-vertical) .nswiper-slide,
.single-product .nickx-slider-nav:not(.nswiper-horizontal):not(.nswiper-vertical) .nswiper-slide {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: 1 / 1 !important;
  margin: 0 !important;
  overflow: hidden !important;
}
.single-product #nickx-gallery.nickx-slider-nav:not(.nswiper-horizontal):not(.nswiper-vertical) .nswiper-slide:nth-child(n+5),
.single-product .nickx-slider-nav:not(.nswiper-horizontal):not(.nswiper-vertical) .nswiper-slide:nth-child(n+5) {
  display: none !important;
}
.single-product #nickx-gallery.nickx-slider-nav .nswiper-slide {
  aspect-ratio: 1 / 1;
}
.single-product #nickx-gallery.nickx-slider-nav .nswiper-slide:not(.video-thumbnail) img {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  display: block !important;
}
.single-product #nickx-gallery.nickx-slider-nav .nswiper-slide.video-thumbnail img {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  display: block !important;
}
/* END VGBR Gallery Thumbnails Pre-Init CLS Fix */
