/* Digital Products Shortcode */

.rama-digital-slider {
  position: relative;
  margin: 0 10px 30px;
 }

.rama-digital-slider .slick-slide {
  margin: 0 10px;
}

.rama-digital-slider .slick-track {
  display: flex;
}
 
.rama-digital-slider .slick-list {
  display: flex;
}

.rama-digital-slider .slick-prev,
.rama-digital-slider .slick-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: transparent;
  border: none;
}

.rama-digital-slider .slick-arrow {
  padding: 0;
}

.rama-digital-slider .slick-prev {
  left: -55px;
}

.rama-digital-slider .slick-next {
  right: -55px;
}

.rama-digital-slider .loader-container,
.rama-digital-grid .loader-container  {
  text-align: center;
  padding: 20px;
}

.rama-digital-slider .svg-loader,
.rama-digital-grid .svg-loader {
  animation: spin 0.9s linear infinite;
}

.rama-digital-grid .loader-container {
  position: absolute;
  z-index: 99;
  top: 50%;
  bottom: 0;
  margin: auto;
  left: 50%;
  transform: translate(-50%, -50%);
}

.rama-digital-grid .wpgb-loading {
  opacity: 0.3;
}

/* Default to 4 products per row */

.rama-digital-grid .digital-products-sc {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.digital-products-sc .single-product-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #ddd;
  background-color: #fff;
  align-self: start;
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
  overflow: hidden;
  height: 420px;
}

.digital-products-sc .single-product-card:hover {
  z-index: 2;
  position: relative;
  overflow: visible;
  border-color: var(--c-rama-blue);
}

.digital-products-sc .single-product-card a {
  color: inherit;
  text-decoration: none;
}

.digital-products-sc .single-product-card .product-image {
  display: block;
  width: 100%;
  position: relative;
  height: 210px;
  
  /* Gradient overlay */
  &:after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      height: 50%; /* Adjust the height as needed */
      background: linear-gradient(to top, #000000ad, transparent);
      z-index: 1; /* Ensure it's above the image but below the content */
  }
}

.digital-products-sc .single-product-card .product-image .class-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.digital-products-sc .single-product-card .teacher-info {
  position: absolute;
  z-index: 9;
  left: 20px;
  bottom: 15px;
  text-transform: uppercase;
  font-family: var(--f-headings);
  color: #fff;
  display: flex;
  gap: 10px;
  align-items: center;
  transition: bottom 0.3s ease;
}

.digital-products-sc .single-product-card:hover .teacher-info {
  bottom: 150px;
}

.digital-products-sc .single-product-card .teacher {
  font-style: italic;
  color: #555;
}

.digital-products-sc .single-product-card .teacher-image {
  width: 30px;
  height: 30px;
  border-radius: 100px;
}

.digital-products-sc .single-product-card .product-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 150px;
  background: #fff;
  padding: 20px 20px 0;
  transition: margin-top 0.3s ease;
  position: relative;
  z-index: 9;
}


.digital-products-sc .single-product-card:hover .product-details {
  margin-top: -140px;
}

.digital-products-sc .single-product-card h2 {
  font-family: var(--f-headings);
  font-size: 1.1em !important;
  line-height: 120% !important;
  font-weight: 600;
  text-align: left;
  text-transform: uppercase;
  color: var(--c-rama-blue);
  margin-bottom: 0;
}

.digital-products-sc .single-product-card .two-line-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: {Line-Height} * 2;
  line-height: {Line-Height};
}

.digital-products-sc .single-product-card .single-intention {
  background-color: #eaefff;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 0.8em;
  display: inline-block;
  width: fit-content;
}

.digital-products-sc .single-product-card .excerpt {
  font-size: 0.9em;
  max-height: 3em;
  overflow: hidden;
  transition: max-height 0.3s ease;
  text-align: left;
}

.digital-products-sc .single-product-card:hover .excerpt {
  max-height: 15em;
}

.digital-products-sc .single-product-card .price {
  font-weight: bold;
  color: #000;
  margin-top: auto;
  left: 20px;
  display: block;
  position: absolute;
  bottom: 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media screen and (max-width: 1000px )  {
  .rama-digital-grid .digital-products-sc {
  grid-template-columns: repeat(3, 1fr);
  }
}

@media screen and (max-width: 800px )  {
  .rama-digital-grid .digital-products-sc {
  grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 600px )  {
  .digital-products-sc .single-product-card {
  height: 450px;
  }
  .digital-products-sc .single-product-card .product-image {
  height: 250px;
  }
  .rama-digital-grid .digital-products-sc {
  grid-template-columns: repeat(1, 1fr);
  }
}