/**
 * Products Widget Styles
 */

.related-products-list {
  margin-top: 50px;
}

.single-post .related-products-list {
  margin-top: 30px;
}

/* Header Styles */
.deshibiker-products-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
  padding: 10px 10px 10px 20px;
  background-color: #fff;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-left: 5px solid #e63946;
}

.page-content .deshibiker-products-header {
  margin-bottom: 20px;
}

.page-content .deshibiker-products-title,
.deshibiker-products-title {
  font-size: 18px;
  font-weight: 500;
  margin: 0;
  color: #333;
}

.deshibiker-view-all {
  font-size: 14px;
  font-weight: 500;
  color: #e63946;
  text-decoration: none;
  transition: all 0.3s ease;
}

.deshibiker-view-all:hover {
  color: #d62828;
  text-decoration: underline;
}

/* Product Item Styles */
.deshibiker-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.deshibiker-products-grid.column-3 {
  grid-template-columns: repeat(3, 1fr);
}

.deshibiker-products-slider {
  position: relative;
  padding: 10px 0 30px;
}

.deshibiker-product-item {
  height: 100%;
  transition: all 0.3s ease;
}

.deshibiker-product-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: #fff;
  border-radius: 8px;
  padding: 15px 5px 10px;
  border: 1px solid #fff;
  overflow: hidden;
  transition: all 0.3s ease;
}

.related-products-list .deshibiker-product-inner,
.deshibiker-listings-widget .deshibiker-product-inner {
  padding: 0 0 10px;
}

.page-content:not(.transparent) .deshibiker-product-inner,
.deshibiker-product-inner:hover {
  border-color: #ccc;
}

.deshibiker-product-image {
  position: relative;
  overflow: hidden;
  padding-top: 100%;
}

.deshibiker-product-image-16-9,
.blog .deshibiker-product-image {
  padding-top: 66.66666666666666%; /* 19:9 Aspect Ratio */
}

.deshibiker-product-image-4-3 {
  padding-top: 75%; /* 4:3 Aspect Ratio */
}

.deshibiker-product-image-1-1 {
  padding-top: 100%; /* 1:1 Aspect Ratio */
}

.deshibiker-product-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.deshibiker-product-image:hover img {
  transform: scale(1.05);
}

.deshibiker-product-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 15px;
  text-align: center;
}

.page-content .deshibiker-product-title,
.deshibiker-product-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 10px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  max-height: 2.6em; /* 2 lines * 1.3 line-height */
}

.deshibiker-product-title a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.deshibiker-product-title a:hover {
  color: #e63946;
}

.deshibiker-product-price {
  font-size: 18px;
  font-weight: 700;
  color: #e63946;
}

.deshibiker-product-price del {
  color: #888;
  font-weight: 400;
  font-size: 14px;
  margin-right: 5px;
}

.deshibiker-product-price ins {
  text-decoration: none;
}

.deshibiker-product-button-wrapper {
  padding-top: 15px;
}

.page-content .deshibiker-product-button,
.rtcl .deshibiker-product-button,
.deshibiker-product-button {
  display: inline-block;
  background-color: transparent;
  border: 1px solid #e63946;
  color: #e63946;
  padding: 1px 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.rtcl .deshibiker-product-button:hover,
.deshibiker-product-button:hover {
  background-color: #d62828;
  color: #fff;
}

/* Swiper Navigation Styles */
.deshibiker-products-widget {
  position: relative;
  margin-bottom: 30px;
}

/* Add padding only when arrows are visible */
.deshibiker-products-widget .swiper-button-next:not([style*="display: none"]),
.deshibiker-products-widget .swiper-button-prev:not([style*="display: none"]) {
  display: flex;
}

.deshibiker-products-widget
  .swiper-button-next:not([style*="display: none"])
  ~ .deshibiker-products-slider,
.deshibiker-products-widget
  .swiper-button-prev:not([style*="display: none"])
  ~ .deshibiker-products-slider {
  /* margin: 0 50px; */
}

.deshibiker-products-widget .swiper-button-next,
.deshibiker-products-widget .swiper-button-prev {
  color: #e63946;
  background-color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.deshibiker-products-widget .swiper-button-next {
  right: -50px;
}

.deshibiker-products-widget .swiper-button-prev {
  left: -50px;
}

.deshibiker-products-widget .swiper-button-next:hover,
.deshibiker-products-widget .swiper-button-prev:hover {
  background-color: #e63946;
  color: #fff;
  border-color: #e63946;
}

.deshibiker-products-widget .swiper-button-next:after,
.deshibiker-products-widget .swiper-button-prev:after {
  font-size: 16px;
  font-weight: bold;
}

.deshibiker-products-widget .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background-color: #ccc;
  opacity: 1;
}

.deshibiker-products-widget .swiper-pagination-bullet-active {
  background-color: #e63946;
}

/* Responsive Styles */
@media (max-width: 991px) {
  .deshibiker-products-widget
    .swiper-button-next:not([style*="display: none"])
    ~ .deshibiker-products-slider,
  .deshibiker-products-widget
    .swiper-button-prev:not([style*="display: none"])
    ~ .deshibiker-products-slider {
    /* margin: 0 40px; */
  }

  .deshibiker-products-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .deshibiker-products-widget .swiper-button-next,
  .deshibiker-products-widget .swiper-button-prev {
    width: 35px;
    height: 35px;
  }

  .deshibiker-products-widget .swiper-button-next {
    right: 10px;
  }

  .deshibiker-products-widget .swiper-button-prev {
    left: 10px;
  }
}

@media (max-width: 767px) {
  .deshibiker-products-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .deshibiker-view-all {
    margin-top: 10px;
  }

  .deshibiker-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .deshibiker-products-grid .deshibiker-product-content {
    padding: 0px;
  }

  .deshibiker-products-title {
    font-size: 20px;
  }

  .deshibiker-product-title {
    font-size: 14px;
  }

  .deshibiker-product-price {
    font-size: 16px;
  }

  .deshibiker-product-button {
    padding: 1px 15px;
    font-size: 12px;
  }

  .deshibiker-products-widget
    .swiper-button-next:not([style*="display: none"])
    ~ .deshibiker-products-slider,
  .deshibiker-products-widget
    .swiper-button-prev:not([style*="display: none"])
    ~ .deshibiker-products-slider {
    /* margin: 0 30px; */
  }

  .deshibiker-products-widget .swiper-button-next,
  .deshibiker-products-widget .swiper-button-prev {
    top: calc(50% + 30px);
    width: 30px;
    height: 30px;
  }

  .deshibiker-products-widget .swiper-button-next:after,
  .deshibiker-products-widget .swiper-button-prev:after {
    font-size: 12px;
  }
  .deshibiker-products-slider {
    position: relative;
    padding: 10px 0 10px;
  }
  .deshibiker-products-widget {
    margin-bottom: 10px;
  }
  .deshibiker-products-grid.column-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 575px) {
  .deshibiker-products-grid.column-3 {
    grid-template-columns: 1fr;
  }
}
