/*
Theme Name: Beaver Builder Child Theme
Theme URI: http://www.wpbeaverbuilder.com
Version: 1.0
Description: An example child theme that can be used as a starting point for custom development.
Author: The Beaver Builder Team
Author URI: http://www.fastlinemedia.com
template: bb-theme
*/

/* Add your custom styles here... */
/* Custom Rating */
.custom-rating {
  display: flex;
  align-items: center;
  margin-top: 5px;
}
.custom-rating .star-rating {
  float: none;
  margin: 0;
  margin-right: 5px;
}
.custom-rating .link-to-reviews {
  display: flex;
}
.custom-rating .rating-number {
  margin-right: 10px;
}
#reviews,
#review_form {
  scroll-margin-top: 200px;
}
body.single-product .product_meta > .posted_in:nth-child(2) {
  display: none !important;
}
body.single-product .product_meta {
  display: grid !important;
}
.custom-product-loop {
  display: flex;
  flex-direction: row;
  gap: 20px;
  flex-wrap: wrap;
  width: 100%;
}

.product-buy-button a.button {
  background-color: #84b139;
  /* font-family: "Merriweather", serif; */
  font-weight: normal;
  font-size: 16px;
  line-height: 1.2;
  text-transform: none;
  border: 1px solid #61832a;
  border-radius: 4px;
}
.owl-carousel .product-item {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.owl-carousel .product-thumbnail {
  width: 100%;
}
.owl-carousel .product-thumbnail {
  display: flex;
  align-items: end;
  min-height: 370px;
}
.owl-carousel .prod-details {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  align-items: center;
  margin-left: 10px;
}
.product-item a:hover {
  text-decoration: none;
}

@media only screen and (max-width: 767px) {
  .prod-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
  }
  .product-item {
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .product-title {
    margin-top: 5px;
  }
  .product-thumbnail {
    width: 100%;
  }
  .post-type-archive-product .uabb-post-thumbnail {
    display: flex;
    align-items: end;
    min-height: 240px;
  }
}

.post-type-archive-product
  .uabb-blog-post-inner-wrap.uabb-thumbnail-position-top.uabb-empty-img {
  display: flex;
  flex-direction: column;

  justify-content: flex-end;
}

@media only screen and (min-width: 768px) {
  .woopack-product-image {
    display: flex;
    min-height: 300px;
    align-items: end;
  }
  .select2-container--default
    .select2-selection--single
    .select2-selection__clear {
    margin-right: 20px;
  }
  .archive.tax-product_cat .fl-post-grid-image {
    display: flex;
    min-height: 325px;
    align-items: end;
  }
  .page-id-217324 .wpcbm-wrapper.wpcbm-wrapper-archive-image {
    display: flex;
    align-items: end;
    min-height: 450px;
  }

  .page-id-217324 .woocommerce li.product.type-product {
    margin-bottom: 20px;
  }

  .post-type-archive-product .uabb-post-thumbnail {
    display: flex;
    align-items: end;
    min-height: 330px;
  }
}

.post-type-archive-product .uabb-blog-posts-shadow {
  height: unset !important;
}

.archive.tax-product_cat .fl-post-grid-post.fl-post-columns-post {
  height: unset !important;
}

/* Custom Category Archive */
.category-products {
  margin: 0 auto;

  display: flex;
}
.custom-category-archive .child-container {
  background-image: url("/wp-content/uploads/2023/03/leaves-background.jpg");
  background-repeat: no-repeat;
  background-position: center center;
  background-attachment: scroll;
  background-size: cover;
  background-blend-mode: overlay;
  background-color: #ffffffb3;
}

.custom-category-archive .custom-products-loop {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 0 auto;
  padding: 20px;
}
.custom-category-archive .posts-loop {
  width: 72%;
  scroll-margin-top: 200px;
}
.custom-category-archive .product-search-form {
  position: sticky;
  top: 200px; /* Adjust depending on your header height */
  width: 28%;
  padding: 20px;
  border: 1px solid #e5e5e5;
  max-height: max-content;
  background: #fcfcfc;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  border-radius: 3px;
}

/* Optional subtle floating effect on scroll */
.custom-category-archive .product-search-form.stuck {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.custom-category-archive .product-search-form .sort-wrapper #sort-products {
  padding: 5px;
  border-radius: 5px;
}

.bookformat-search div {
  display: flex;
  flex-direction: column;
}

.child-categories .child-category a:hover {
  text-decoration: none;
}
.pres-category-childs .category-title {
  font-size: 60px;
  margin-bottom: 30px;
  margin-top: 30px;
}

.custom-category-archive .custom-products-loop .product {
  flex: 0 0 calc(25% - 20px);
  display: flex;
  flex-direction: column;
}

.custom-category-archive .custom-products-loop .product .product-thumbnail {
  width: 100%;
  display: flex;
  min-height: 280px;
  align-items: end;
  margin-bottom: 10px;
}
.custom-category-archive
  .custom-products-loop
  .product
  .product-title
  .woocommerce-loop-product__title {
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: 0;
  margin: 0;
  text-align: center;
}
.custom-category-archive .custom-products-loop .product .prod-details {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  align-items: center;
  margin: 0;
}

.category-products .posts-loop .woocommerce-pagination {
  width: 100%;
  text-align: center;
}

button.search-button {
  width: 100%;
  padding: 10px !important;
  font-size: 1.2em;
  color: white;
  border-radius: 5px;
}
p.open-filter {
  display: none;
  width: 100%;
  background: #eee;

  padding: 5px;
  text-align: center;
  border: 1px solid gray;
  border-radius: 5px;
  color: #383838;
  font-weight: 500;
  font-size: 16px;
  margin: 5px 0px 5px 0px;
}

@media (max-width: 768px) {
  .custom-category-archive .custom-products-loop .product {
    flex: 0 0 calc(50% - 20px); /* Two columns on medium screens */
  }

  .category-products {
    margin: 0 auto;

    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .custom-category-archive .product-search-form {
    position: relative;
    top: auto;
    z-index: 5;
    box-shadow: none;
    border: none;
    padding: 0;
    width: 100%;
  }

  .custom-category-archive .posts-loop {
    width: 90%;
  }

  .custom-category-archive .custom-products-loop .product .product-thumbnail {
    min-height: 220px;
  }
  .custom-category-archive .product-search-form .sort-wrapper #sort-products {
    width: 100%;
  }
  p.open-filter {
    display: block;
  }
  .bookformat-search {
    display: none;
  }
}

@media (max-width: 480px) {
  .custom-category-archive .custom-products-loop .product {
    flex: 0 0 calc(50% - 20px); /* Single column on small screens */
  }
  .custom-category-archive .custom-products-loop .product .product-thumbnail {
    min-height: 220px;
  }
  button.open-filter {
    display: block;
  }
  .bookformat-search {
    display: none;
  }
}

/* Author Products */
.custom-product-loop {
  display: flex;
  flex-direction: row;
  gap: 20px;
  flex-wrap: wrap;
  width: 100%;
}

.product-buy-button a.button {
  background-color: #84b139;
  font-family: "Merriweather", serif;
  font-weight: normal;
  font-size: 16px;
  line-height: 1.2;
  text-transform: none;
  border: 1px solid #61832a;
  border-radius: 4px;
}
.product-item {
  width: 48%;
  text-align: center;
  display: flex;
  flex-direction: row;
}

.product-thumbnail {
  width: 40%;
}
.prod-details {
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 5px;
  align-items: flex-start;
  margin-left: 10px;
}
.product-item a:hover {
  text-decoration: none;
}

.product-title .woocommerce-loop-product__title {
  font-size: 1.2em;
  line-height: 1.3;
  letter-spacing: 0;
  margin: 0;
  text-align: center;
}

@media only screen and (max-width: 767px) {
  .prod-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
  }
  .product-item {
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .product-title {
    margin-top: 5px;
  }
  .product-thumbnail {
    width: 100%;
  }

  .custom-category-archive
    .custom-products-loop
    .product
    .product-title
    .woocommerce-loop-product__title {
    text-align: center;
  }
}

@media only screen and (max-width: 480px) {
  .custom-category-archive
    .custom-products-loop
    .product
    .product-title
    .woocommerce-loop-product__title {
    text-align: center;
    font-size: 16px;
  }
}
/* new */
/* Shimmer grid container */
.shimmer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 20px;
}

/* Card placeholder */
.shimmer-card {
  background: #fff;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Thumbnail */
.shimmer-thumbnail {
  width: 100%;
  height: 250px;
  border-radius: 8px;
  margin-bottom: 10px;
  background: #e2e2e2;
}

/* Text placeholders */
.shimmer-text {
  height: 16px;
  margin-bottom: 8px;
  border-radius: 4px;
  background: #e2e2e2;
}
.shimmer-text.short {
  width: 60%;
}

/* Animation effect */
.shimmer-animate {
  position: relative;
  overflow: hidden;
}
.shimmer-animate::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150px;
  height: 100%;
  width: 150px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(300%);
  }
}

@media (max-width: 1024px) {
  .shimmer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 768px) {
  .shimmer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .shimmer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
