.term-description {
  padding: 10px 30px;
  margin: 10px 0 0 0;
  display: flex;
  align-items: center;

  @media (min-width: 1024px) {
    margin: 20px 0;
  }

  p:last-of-type {
    margin-bottom: 0;
  }
}

.actions-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
}

.woocommerce-result-count {
  font-weight: 700;
  font-size: 20px;
  line-height: 23px;
  margin-bottom: 0 !important;

  @media (max-width: 767px) {
    display: none;
  }
}

.woocommerce-ordering {
  margin-bottom: 0 !important;
}
  /* Products Grid Container */
  ul.products:not(.slick-products) {
    display: grid !important;
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    gap: 20px !important;
    margin-bottom: 0 !important;
  }

@media (min-width: 768px) {
  ul.products:not(.slick-products) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1280px) {
  ul.products:not(.slick-products) {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

.related ul.products.columns-4 {
  @media (min-width: 1280px) {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1279px) {
  ul.products {
    gap: 30px !important;
  }
}

@media (max-width: 999px) {
  ul.products {
    justify-content: center !important;
  }
}

@media (max-width: 500px) {
  ul.products {
    gap: 15px !important;
  }
}

/* Remove default WooCommerce pseudo elements */
ul.products:before,
ul.products:after {
  content: none !important;
}

/* Individual Product Items */
ul.products li {
  display: flex !important;
  flex-direction: column !important;
  margin: 0 !important;
  font-family: Montserrat, sans-serif;
  color: #243540 !important;
  width: 100% !important;

  .price {
    margin-bottom: 18px !important;
  }
}

/* Product Category Items */
ul.products li.product-category a {
  display: flex;
  flex-direction: column;
}

ul.products li.product-category a .img-container {
  min-height: 250px;
}

ul.products li.product-category a .img-container img {
  margin: 0;
}

ul.products li.product-category .img-container {
  border: 1px solid #243540;
}

ul.products li.product-category a:hover .product-button {
  background-color: #243540;
  transition: 0.5s;
}

ul.products li.product-category a:hover .product-button svg path {
  fill: #fff;
}

/* Regular Product Items (not categories) */
ul.products li.product:not(.product-category) {
  background-color: #fff;
  width: 100%;
}

@media (max-width: 767px) {
  ul.products li.product:not(.product-category) {
    padding: 15px;
  }
}

ul.products li.product:not(.product-category) h2.woocommerce-loop-product__title {
  text-transform: none !important;
  font-size: 18px !important;
}

ul.products li.product:not(.product-category) a .img-container {
  background-color: #fff;
}

ul.products li.product:not(.product-category) a .img-container img {
  margin: 0;
}

/* Product Title */
ul.products li .woocommerce-loop-product__title {
  padding: 0;
}

/* Product Image Container */
ul.products li .img-container {
  display: flex;
  position: relative;
  margin: 0 0 1em;
  justify-content: center;
  width: 100%;
}

ul.products li .img-container img {
  width: auto;
  align-self: center;
}

/* Product Link Hover Effect */
ul.products li .woocommerce-loop-product__link:hover .product-button {
  background-color: #243540;
  transition: 0.5s;
}

ul.products li .woocommerce-loop-product__link:hover .product-button svg path {
  fill: #fff;
}

/* Product Typography */
ul.products li *:not(span.vat):not(.button):not(.added_to_cart):not(span.onsale):not(.woocommerce-Price-amount, .woocommerce-Price-amount *) {
  color: #243540 !important;
  text-transform: none !important;
  font-size: 18px !important;
  line-height: 24px !important;
}

ul.products li a img {
    height: 274px !important;
    object-fit: contain !important;
    border-bottom: solid 1px #F4F4F4 !important;
}

/* @media (max-width: 767px) {
  ul.products li *:not(span.vat):not(.button):not(.added_to_cart):not(span.onsale) {
    font-size: 16px !important;
  }
} */

ul.products li p {
  margin-bottom: 20px !important;
}

/* VAT Label */
ul.products li span.vat {
  font-weight: bold !important;
  font-size: 10px !important;
  text-transform: uppercase;
}

/* Sale Badge */
ul.products li span.onsale {
  top: -20px !important;
}

@media (max-width: 767px) {
  ul.products li span.onsale {
    right: auto !important;
    left: -10px !important;
    margin: 0 !important;
  }
}

/* Price */
ul.products li span.price {
  margin-bottom: 20px;
}

/* Product Buttons */
ul.products .button,
.category-item .button {
  background-color: #FFEE4E !important;
  color: #243540 !important;
  padding: 12px 20px !important;
  font-size: 13px !important;
  text-transform: uppercase !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  transition: opacity 0.3s ease !important;
  white-space: nowrap !important;
  text-align: center !important;
  border-radius: 0 !important;
  border: none !important;
}

ul.products .button.view-product-button {
  background-color: #F2F3F4 !important;
}

ul.products .button:hover {
  background-color: #243540 !important;
  color: #FFEE4E !important;

  span {
    color: #FFEE4E !important;
  }
}

ul.products .button.view-product-button:hover {
  background-color: #243540 !important;
  color: #FFEE4E !important;

  span {
    color: #FFEE4E !important;
  }
}

/* Added to Cart Link */
ul.products .added_to_cart {
  font-weight: bold !important;
  margin-top: 10px;
  text-align: center;
  text-decoration: underline !important;
}

ul.products .added_to_cart:hover {
  color: #141f26 !important;
}

/* Sale Badge Styling */
span.onsale {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  top: -15px !important;
  left: -15px !important;
  right: auto;
  width: 60px;
  height: 60px;
  margin: 0 !important;
  background-color: #42B2A4;
  color: #243540;
  font-weight: 700 !important;
  text-transform: uppercase;
  font-family: Montserrat, sans-serif;
  font-size: 16px !important;
}

@media (max-width: 767px) {
  span.onsale {
    font-size: 14px !important;
    width: 50px;
    height: 50px;
    left: -455px !important;
    right: 0 !important;
    margin: 0 auto !important;
    top: -10px !important;
  }
}

@media (max-width: 540px) {
  span.onsale {
    margin: 0 !important;
    left: -10px !important;
    right: auto !important;
  }
}

/* Price Styling */
span.price {
  color: #243540 !important;
  font-weight: 700 !important;
  margin-bottom: 20px;
}
.orderby {
  text-transform: uppercase;
}
/* Product Content Wrapper */
.product-content-wrapper {
  padding: 30px;
  height: 100%;
  display: flex;
  flex-direction: column;

  .woocommerce-loop-product__title {
    overflow: hidden;
    padding: 0 !important;
  }
  .button-wrapper {
      margin-top: auto;
  }
}

.product-content-wrapper .price,
.product-content-wrapper .amount * {
  font-size: 26px !important;
}

.product-content-wrapper .button {
  width: 100% !important;
}

/* Slider Products Override */
.slick-products {
  display: block !important;
}

.slick-slide-item {
  padding: 0 10px;
}

.slick-products .product {
  width: 100% !important;
  margin: 0 !important;
  list-style-type: none !important;
  background-color: #ffffff !important;
}

.woocommerce-product-gallery {
    background-color: #ffffff !important;
    padding: 30px;

    .woocommerce-product-gallery__image.flex-active-slide {
        aspect-ratio: 1 / 1;
        height: 100%;
        display: flex !important;
        justify-content: center;
        align-items: center;
    }

    .flex-control-thumbs {
        display: flex;
        gap: 10px;
        margin-top: 30px !important;
    }

    @media only screen and (min-width: 1024px) {
        padding: 60px;

        .flex-control-thumbs {
            margin-top: 74px !important;
        }
    }
}

.woocommerce-error, .woocommerce-info, .woocommerce-message {
    font-size: 12px !important;
    line-height: 15px !important;
    color: #243540 !important;
    background-color: #fff !important;
    display: flex !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 20px;

    .button {
        width: 100% !important;
        margin-left: auto !important;
        text-align: center !important;

        @media only screen and (min-width: 768px) {
            width: auto !important;
        }
    }
}

.woocommerce-taxonomy-loop-wrapper {
    display: flex;
    flex-wrap: wrap;
    width: 100%;

    ul.products {
      align-self: flex-start;
    }

    .sidebar-cta {
      margin-top: 30px;

      &.desktop {
        display: none;
      }

      &.mobile {
        width: 100%;
        margin-bottom: 30px;

        .enquire-now-block {
          width: 100%;
        }
      }

      @media only screen and (min-width: 1024px) {
        &.mobile {
          display: none;
        }
        &.desktop {
          display: block;
        }
      }
    }
    .woocommerce-sidebar-taxonomy {
      width: 100%;
      margin-bottom: 10px;

      .enquire-now-block {
        width: 100%;
      }
    }
    .shop-controls-wrapper {
      flex: 1 1 0%;
    }
    @media only screen and (max-width: 768px) {
        .woocommerce-ordering,
        .orderby {
          width: 100%;
          text-transform: capitalize;
        }
    }
    @media only screen and (min-width: 1024px) {
        .woocommerce-sidebar-taxonomy {
          max-width: 330px;
        }

        .shop-controls-wrapper {
          flex: 1 1 0%;
          margin-left: 30px;
        }
    }
}


.custom-product-filters,
.search-bar-woo
 {
    background: #ffffff;
    padding: 20px 30px;
    margin-top: 10px;

    @media only screen and (min-width: 1024px) {
        padding: 28px 35px;
        margin-top: 0;
    }
}

.search-bar-woo {
    margin-bottom: 10px;

    .search-bar-title {
        font-size: 14px;
        font-weight: 700;
        margin-bottom: 15px;
        text-transform: uppercase;
        display: block;
    }

	#ajaxsearchpro1_1, #ajaxsearchpro1_2, div.asp_m.asp_m_1 {
		border-radius: 0 !important;
		.autocomplete {
			display: none !important;
		}
	}

  .asp_w {
    box-shadow: none !important;
    border-radius: 0 !important;
    border-color: #f4f4f4;
  }

	#ajaxsearchpro1_1 .probox .proinput input.orig, #ajaxsearchpro1_2 .probox .proinput input.orig, div.asp_m.asp_m_1 .probox .proinput input.orig {
		margin: 0 !important;
		height: auto !important;
    box-shadow: none !important;
	}

	.probox {
		padding: 5px 5px 5px 15px !important;
		margin: 0 !important;
		border-radius: 0 !important;
		border: none !important;
		height: auto !important;
		display: flex !important;
		align-items: center !important;
    box-shadow: none !important;
    background: #f4f4f4 !important;

		* {
			font-family: 'Montserrat', sans-serif !important;
			font-size: 13px !important;
			line-height: 16px !important;
		}

		.innericon {
			position: relative;
			background-color: #f4f4f4 !important;
			svg {
				display: none !important;
			}
			&:after {
				content: url('../images/search-icon.svg');
				position: absolute;
				top: 50%;
				left: 50%;
				transform: translate(-50%, -50%);
				padding-top: 2px;
			}
		}

		.proinput {
			padding: 0px !important;
			margin: 0 !important;
		}

	}

	div.asp_m.ajaxsearchpro .probox .proinput form {
		padding: 0px !important;
		font-size: 13px !important;
		line-height: 16px !important;
	}
}
}

.custom-product-filters h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group {
    border-bottom: 1px solid #DBDBDB;
    margin-bottom: 0;
}

.filter-group-toggle,
.mobile-filter-toggle {
  background-color: transparent;
  width: 100%;
    font-size: 13px;
    line-height: 15px;
    font-weight: 700;
    margin: 0;
    padding: 0;
    cursor: pointer;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-transform: none;
    letter-spacing: 0.3px;
    border: none;
    color: #000;
    text-align: left;

    @media only screen and (min-width: 1024px) {
      padding: 15px 10px 15px 0;
    }

    &:hover {
      text-decoration: underline;
      background-color: transparent;
    }
}

.filter-group-toggle:after {
    content: "";
    width: 12px;
    height: 12px;
    background-image: url("../images/chevron-down.svg");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.3s ease;
}

.filter-group-toggle.active:after {
    transform: rotate(180deg);
}

.filter-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
}

.filter-group input[type="checkbox"] {
    margin-right: 8px;
}

.price-slider {
    margin: 20px auto;
    max-width: 90%;;
}

.price-inputs {
    display: flex;
    gap: 15px;
    margin: 15px 0;
}

.price-input {
    flex: 1;
}

.price-input label {
    display: block;
    font-size: 12px;
    margin-bottom: 5px;
    font-weight: 600;
}

.price-input input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
}

.filter-apply-btn {
    width: 100%;
    padding: 12px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.3s ease;
}

.filter-apply-btn:hover {
    background: #333;
}

.filter-reset {
    display: block;
    text-align: left;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #243540 !important;
    text-decoration: underline;
}

.filter-reset:hover {
    color: #000;
}

.woocommerce-taxonomy-loop-wrapper {
  .woocommerce-error, .woocommerce-info, .woocommerce-message {
      font-size: 12px !important;
      line-height: 15px !important;
      color: #243540 !important;
      background-color: #fff !important;
      display: flex !important;
      flex-wrap: wrap !important;
      width: 100% !important;
      justify-content: space-between !important;
      align-items: center !important;
      gap: 20px;

      .button {
          width: 100% !important;
          margin-left: auto !important;
          text-align: center !important;

          @media only screen and (min-width: 768px) {
              width: auto !important;
          }
      }
  }
}

/* Show toggle button below 1280px */
@media (max-width: 1279px) {
    .mobile-filter-toggle {
        display: flex;
        gap: 30px;
    }

    /* Add arrow icon */
    .mobile-filter-toggle::after {
      content: "";
      width: 12px;
      height: 12px;
      background-image: url("../images/chevron-down.svg");
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
      transition: transform 0.3s ease;
      display: inline-block;
    }

    /* Rotate arrow when active */
    .mobile-filter-toggle.active::after {
        transform: translateY(-50%) rotate(180deg);
    }

    /* Hide form by default on mobile */
    #product-filter-form {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    /* Show form when active */
    #product-filter-form.active {
        max-height: 2000px; /* Adjust based on your content height */
    }
}

/* Desktop - always show form */
@media (min-width: 1280px) {
    #product-filter-form {
        display: block !important;
        max-height: none !important;
    }
}

.category-marketing-content {
  .marketing-content {
    background-color: #ffffff;
    padding: 30px;
    margin-bottom: 30px;

    @media only screen and (min-width: 1024px) {
      padding: 51px 62px;
      margin-bottom: 64px;
    }
  }
}

.woocommerce-pagination {
  width: 100% !important;
  margin-top: 60px;

  ul.page-numbers {
    margin: 0 !important;
    border: 0 !important;

    li.page-number {
      border: 0 !important;

      &.current {
        background: transparent !important;
      }

      a.page-numbers {
        color: #243540 !important;
      }
    }
  }
}