.homepage-grid {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  margin-top: 72px;
  margin-bottom: 28px;
}
.homepage-grid .nav-link {
  color: rgba(3, 3, 3, 0.8);
  font-family: Roboto;
  font-weight: 300;
  letter-spacing: 0;
  font-size: 20px;
  line-height: 32px;
  text-transform: uppercase;
  margin: 0 1rem;
}
@media screen and (min-width: 320px) and (max-width: 720px) {
  .homepage-grid {
    margin-top: unset;
  }
  .homepage-grid .nav-link {
    font-size: 16px;
    line-height: 16px;
  }
}

.homepage-grid .nav-link.active {
  color: #6b7afe;
}

.nav-tabs,
.nav-tabs .nav-link,
.homepage-grid .nav-tabs .active {
  border: 0;
}

#nav-5 {
  flex-wrap: wrap;
}

.tab-content > .active {
  display: flex !important;
  gap: 18px;
  background-color: #EFEDFA;
  padding: 34px 22px;
}

@media screen and (min-width: 320px) and (max-width: 720px) {
  .homepage-grid .nav-tabs {
    flex-wrap: unset;
    white-space: nowrap;
    margin-left: 24px;
    padding: 16px 16px 0;
    overflow: scroll;
  }
}

.homepage {
  display: flex;
  justify-content: space-between;
  flex-direction: row;
  border-radius: 12px;
}

.homepage-title {
  color: rgba(3, 3, 3, 0.8);
  font-family: Roboto;
  font-size: 56px;
  font-weight: 300;
  letter-spacing: 0;
  line-height: 54px;
  text-transform: capitalize;
}

.homepage-title strong {
  color: #614ACE;
}

@media screen and (min-width: 320px) and (max-width: 720px) {
  .homepage {
    flex-wrap: wrap;
    justify-content: center;
    margin: 0 16px;
  }
  .homepage-title {
    font-size: 32px;
    font-weight: 300;
    letter-spacing: 0;
    line-height: 32px;
    text-transform: capitalize;
  }
  .homepage-title strong {
    color: #614ACE;
  }
}

.homepage-subtitle {
  color: rgba(3, 3, 3, 0.8);
  font-family: Roboto;
  font-size: 24px;
  font-weight: 300;
  letter-spacing: 0;
  line-height: 32px;
}

@media screen and (min-width: 320px) and (max-width: 720px) {
  .homepage-subtitle {
    font-size: 18px;
    font-weight: 300;
    letter-spacing: 0;
    line-height: 16px;
  }
}

.alfin-hp-card {
  transition-duration: 0.5s;
  flex: 0 1 100%;
  background-color: #f7f7fa;
  padding: 2rem;
  border-radius: 12px;
}

.alfin-hp-card:hover {
  transform: scale(1.1);
  cursor: pointer;
}

.alfin-hp-card:only-child {
  border-radius: 12px;
}

.alfin-hp-card.sub-product-card {
  min-width: 110px;
  max-width: 110px;
  padding: 2px;
}

.alfin-hp-card.sub-product-card > img{
  max-width: 80%;
  margin-left: 10%;
  margin-right: 10%;
}


@media screen and (min-width: 320px) and (max-width: 720px) {
  .alfin-hp-card {
    border-radius: 12px;
  }
  .alfin-hp-card {
    flex: 0 1 50%;
  }
}

.alfin-hp-icon {
  width: 100%;
  object-fit: contain;
  object-position: center;
  padding: 3rem;
}

.alfin-hp-card:nth-child(3) .alfin-hp-icon,
.alfin-hp-card:nth-child(5) .alfin-hp-icon {
  zoom: 1.4;
  padding-bottom: 12px;
}

.alfin-hp-card-text {
  color: rgba(3, 3, 3, 0.8);
  font-family: Roboto;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 0;
  line-height: 19px;
  text-align: center;
  margin: 0;
}

.services-wrapper {
  margin: 30px auto 0;
}

.sw-img {
  object-fit: contain;
  object-position: center;
}

.alfin-button-link--border {
  padding: 14px 6px 14px 16px;
  border: 1px solid #6b7afe !important;
  border-radius: 50px;
}

.alfin-button-link--border:hover {
  cursor: pointer;
  color: white;
  background-color: #6b7afe;
}

.homepage.seller-homepage {
  padding: 48px;
  max-width: 420px;
  margin: 150px auto 0;
  flex-direction: column;
  position: relative;
}
.homepage.seller-homepage:after {
  content: "";
  position: absolute;
  top: 0%;
  right: -90%;
  background-image: url("../img/undraw_develop_app_re_bi4i 1.59ce8f5f21d8.svg");
  background-size: 100%;
  background-repeat: no-repeat;
  width: 320px;
  height: 300px;
}
.homepage.seller-homepage:before {
  content: "";
  position: absolute;
  top: 0%;
  left: 0%;
  right: 0%;
  background-image: url("../img/homepagebg.ade2c0065804.svg");
  background-size: 100%;
  background-repeat: no-repeat;
  width: 320px;
}

.seller-homepage .alfin-title {
  color: rgba(3, 3, 3, 0.8);
  font-family: Roboto;
  font-size: 24px;
  font-weight: bold;
  letter-spacing: 0;
  line-height: 32px;
  position: relative;
  margin: 0 0 16px;
}

/* Sub-product panel styles */
.sub-product-panel-wrapper {
  position: relative;
  width: 100%;
  height: auto;
  margin-top: 20px;
  margin-bottom: 20px;
  animation: fadeInDown 0.3s ease-out;
  overflow: visible;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sub-product-pointer {
  position: absolute;
  top: -10px;
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 12px solid #E0E0E0;
  z-index: 2;
  animation: fadeIn 0.3s ease-out;
}

.sub-product-pointer::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid #ffffff;
  z-index: 3;
}

.sub-product-panel {
  position: relative;
  background-color: #ffffff;
  border-radius: 12px;
  padding: 16px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  align-content: flex-start;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  max-width: 90%;
  width: fit-content;
  height: auto;
  margin: 0 auto;
  transform: translateX(-50%);
  z-index: 1;
  overflow: visible;
  justify-content: flex-start;
}

.sub-product-button {
  background-color: #ffffff;
  border: 2px solid #E0E0E0;
  border-radius: 8px;
  padding: 10px 20px;
  font-family: Roboto;
  font-size: 16px;
  font-weight: 500;
  color: rgba(3, 3, 3, 0.8);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: normal;
  flex-shrink: 1;
  flex-grow: 0;
  min-width: fit-content;
}

.sub-product-button:hover {
  border-color: #614ACE;
  color: #614ACE;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(97, 74, 206, 0.2);
}

.sub-product-button-active {
  border-color: #614ACE !important;
  color: #614ACE !important;
  font-weight: 600;
}

.sub-product-button-active:hover {
  background-color: #f5f3ff;
}

.alfin-hp-card.sub-product-active {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(97, 74, 206, 0.2);
}

@media screen and (min-width: 320px) and (max-width: 720px) {
  .sub-product-panel {
    flex-wrap: wrap;
    padding: 12px 16px;
    min-width: auto;
    max-width: 90%;
    gap: 8px;
    transform: translateX(-50%);
  }

  .sub-product-button {
    padding: 8px 16px;
    font-size: 14px;
    flex: 1 1 auto;
    min-width: 120px;
  }

  .sub-product-panel-wrapper {
    margin-top: 10px;
    margin-bottom: 10px;
  }
}
