.afe-collections-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.afe-collection-card {
  position: relative;
  padding-top: 100%;
  overflow: hidden;
  border-radius: 2px;
  background-color: #f4f4f4;
}

.afe-collection-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
  z-index: 0;
}

.afe-collection-card:hover .afe-collection-bg {
  transform: scale(1.03);
}

.afe-collection-link {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-decoration: none;
  color: white;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  z-index: 1;
}

.afe-collection-title {
  position: relative;
  padding: 0px 0 10px 20px;
  font-size: 1.1rem;
  font-weight: 400;
  width: 100%;
  color: white;
  overflow: hidden;
  text-align: left;
}

.afe-collection-title span {
  position: relative;
  display: inline-block;
  overflow: hidden;
  padding-bottom: 8px;
}

.afe-collection-title span::before {
  content: "";
  position: absolute;
  bottom: 0px;
  left: 0;
  height: 1px;
  width: 100%;
  background-color: white;
  transform: translateX(-100%);
  transition: transform 0.4s ease-in-out;
}

.afe-collection-link:hover .afe-collection-title span::before {
  transform: translateX(0);
}

#afe-collections-loader {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

@media (max-width: 768px) {
  #afe-collections-loader {
    grid-template-columns: repeat(2, 1fr);
  }
}

.afe-skeleton-card {
  padding-top: 120%;
  background: linear-gradient(-90deg, #eeeeee 0%, #dddddd 50%, #eeeeee 100%);
  background-size: 200% 200%;
  animation: skeleton-loading 1.2s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/********************* Home page category display**************************/
#afe-single-collection-wrapper {
    width: 100%;
    overflow: hidden;
}


.afe-single-parent {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.afe-single-collection-card {
    position: relative;
    width: 100%;
    height: 80vh;
    overflow: hidden;
}

.afe-single-collection-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    z-index: 1;
    transition: transform 1.4s ease;
}

.afe-single-collection-card:hover .afe-single-collection-bg {
    transform: scale(1.05);
}

.afe-single-collection-link {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    text-align: center;
    text-decoration: none;
}

.afe-single-collection-title {
    margin: 0;
    font-size: 16px !important;
    font-weight: 400;
    color: #000;
    background-color: #f4f4f4;
    border: 1px solid #000;
    padding: 10px 20px;
    display: inline-block;
}

.afe-single-collection-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.807), transparent);
    z-index: 2;
    pointer-events: none;
}

.afe-slider-prev,
.afe-slider-next {
  display: none;
}

.afe-slider-prev { left: 10px; }
.afe-slider-next { right: 10px; }


@media (max-width: 768px) {
  .afe-collections-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .afe-collections-grid .afe-collection-item:last-child {
    grid-column: span 2;
  }
  .afe-collection-title {
    padding: 0px 0 5px 10px;
    font-size: 14px;
    margin: 0;
  }

  .afe-single-parent {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
}

@media (max-width: 548px) {
  .afe-collections-grid {
    gap: 10px;
  }
  .afe-collections-grid .afe-collection-item:last-child {
    grid-column: span 2;
  }

  .afe-single-collection-title {
    font-size: 14px;
    padding: 10px;
  }

  .afe-slider-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
  }

  .afe-single-parent {
    display: flex !important;
    transition: transform 0.5s ease;
    width: 100%;
  }

  .afe-single-collection-item {
    flex: 0 0 102%;
    max-width: 102%;
  }

  .afe-slider-prev,
  .afe-slider-next {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    width: 40px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    color: rgba(0,0,0,0.6);
    border: none;
    font-size: 20px;
    z-index: 10;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: background 0.3s ease;
  }
  

  .afe-slider-prev:hover,
  .afe-slider-next:hover,
  .afe-slider-next:focus,
  .afe-slider-next:focus {
    background: #f0f0f0;
  }

  .afe-slider-prev i,
  .afe-slider-next i {
    font-size: 20px;
  }
}