/* Category slider (shop-by-category) widget.
   Static, cacheable rules live here. Rules driven by the BH Shortcode
   Customizer admin options (.item / img / h4) are added inline in <head>
   from inclueds/lib/woo/cat_slider.php, since they depend on saved options. */

.bhwd-owl-carousel,
.bhwd-owl-carousel * {
  box-sizing: border-box;
}

/* Consistent square image ratio for every category thumbnail, at any size. */
.bhwd-owl-carousel .item img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* Reserve real side padding for the prev/next arrow buttons (34px wide,
   see .bhwd-woocat-prev/.bhwd-woocat-next below) so they sit in their own
   gutter instead of overlapping the first/last circular thumbnail. Also
   keeps items off the viewport edge on mobile. */
.bhwd-owl-carousel {
  padding: 0 46px;
}

/* Owl's own core CSS puts overflow:hidden on .owl-stage-outer to mask the
   horizontal slide - but that also clips the top of each item's hover
   effect (.item:hover img scales up slightly). Let vertical overflow show
   while still clipping horizontally, and add a little headroom above the
   stage (offset back up with a matching negative margin) so the scaled-up
   image has somewhere to grow into instead of getting its top cut off. */
.bhwd-owl-carousel .owl-stage-outer {
  overflow-x: hidden;
  overflow-y: visible;
  padding-top: 10px;
  margin-top: -10px;
}

.bhwd-owl-carousel .item:hover img {
  transform: scale(1.05);
  border-color: #C0473C;
  box-shadow: 0 6px 16px rgba(192, 71, 60, 0.18);
}

.bhwd-owl-carousel .item:focus-visible img {
  outline: 2px solid #C0473C;
  outline-offset: 2px;
}

.bhwd-owl-carousel .dcnav-current .item img,
.bhwd-owl-carousel .item.dcnav-current img {
  border-color: #C0473C;
  box-shadow: 0 0 0 1.5px #C0473C, 0 4px 10px rgba(192, 71, 60, 0.16);
}

.bhwd-owl-carousel .dcnav-current h4 {
  color: #C0473C;
  font-weight: 600;
}

/* NOTE: .bhwd-alt-native-class lives on the SAME element Owl Carousel (JS) is
   initialized on (.bhwd-owl-carousel). Owl adds its own ".owl-loaded" class to
   that element once it takes over, and builds its own windowed/sliding stage
   internally. These rules must therefore act ONLY as a no-JS / pre-init
   fallback (plain native horizontal scroll) - scoped with :not(.owl-loaded) -
   otherwise they fight Owl's own layout and the whole strip renders as one
   long scrollable row showing every item instead of a clipped, arrow-driven
   carousel. */
.bhwd-alt-native-class:not(.owl-loaded) {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
}
.bhwd-alt-native-class:not(.owl-loaded)::-webkit-scrollbar {
  display: none;
}
.bhwd-alt-native-class:not(.owl-loaded) {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.bhwd-alt-native-class:not(.owl-loaded) > a {
  width: calc(100% / 8);
  margin-left: 10px;
  margin-right: 10px;
  scroll-snap-align: start;
}

.bhwd-arrow-buttons {
  position: absolute;
  top: 40px;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
  pointer-events: none;
  z-index: 5;
}
.bhwd-woocat-prev,
.bhwd-woocat-next {
  pointer-events: auto;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border: 1px solid #E7E4DD;
  border-radius: 999px;
  color: #1C1B18;
  box-shadow: 0 4px 10px rgba(28, 27, 24, 0.1);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.bhwd-woocat-prev:hover,
.bhwd-woocat-next:hover {
  background: #C0473C;
  border-color: #C0473C;
  color: #FFFFFF;
  transform: scale(1.06);
}
.bhwd-woocat-prev:focus-visible,
.bhwd-woocat-next:focus-visible {
  outline: 2px solid #C0473C;
  outline-offset: 2px;
}
.bhwd-woocat-prev.disabled,
.bhwd-woocat-next.disabled {
  opacity: 0.35;
  pointer-events: none;
  box-shadow: none;
  transform: none !important;
}

@media (max-width: 800px) {
  .bhwd-alt-native-class:not(.owl-loaded) > a {
    width: calc(100% / 5) !important;
  }
  .bhwd-alt-native-class:not(.owl-loaded) {
    overflow: auto;
    white-space: nowrap;
  }
}
@media (max-width: 768px) {
  .bhwd-alt-native-class:not(.owl-loaded) > a {
    width: calc(100% / 4) !important;
  }
  .bhwd-alt-native-class:not(.owl-loaded) {
    overflow: hidden;
    white-space: unset;
  }
  .bhwd-owl-carousel {
    padding: 0 40px;
  }
}
@media (max-width: 500px) {
  .bhwd-owl-carousel img {
    width: 90px !important;
    height: 90px !important;
  }
  .bhwd-alt-native-class:not(.owl-loaded) {
    scroll-snap-type: x mandatory;
    padding-bottom: 15px;
    -webkit-overflow-scrolling: touch;
  }
  .bhwd-alt-native-class:not(.owl-loaded) > a {
    flex: 0 0 calc(33.33% - 30px);
    margin: 0 15px;
    scroll-snap-align: start;
  }
  .bhwd-alt-native-class:not(.owl-loaded) > a h4 {
    width: 144px;
    margin: 8px auto 0;
  }
  .bhwd-woocat-prev,
  .bhwd-woocat-next {
    width: 30px;
    height: 30px;
  }
  /* Keep arrows centered on the (now 90px) image, not the desktop 80px one. */
  .bhwd-arrow-buttons {
    top: 45px;
  }
  .bhwd-owl-carousel {
    padding: 0 34px;
  }
}
@media (max-width: 300px) {
  .bhwd-owl-carousel img {
    width: 55px !important;
    height: 55px !important;
  }
  /* Keep arrows centered on the (now 55px) image. */
  .bhwd-arrow-buttons {
    top: 28px;
  }
  .bhwd-owl-carousel {
    padding: 0 30px;
  }
}



