@import "../../../styles/varibale.scss";

.containerCategory {
    background: #fff;
     padding: 3rem 0 0;
    margin-top: 2rem;
}

.sectionSubTitle {
    font-weight: 700;
    font-size: 30px;
    line-height: 1.4;
    color: $primaryColor;
    text-align: center;
    padding-bottom: 1rem;
}

.cardContainer {
    display: grid;
    --num-cols: 6;
    --gap: 1em;
    padding: var(--gap);
    grid-template-columns: repeat(var(--num-cols), 1fr);
    gap: var(--gap);
}

.card {
    border: 1px solid #EBEBEB;
    border-radius: 8px;
    background: $white;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 300px;
    position: relative;
    padding-top: 2rem;
    border-radius: 8px;


}

.image {
    width: 100%;
    height: auto;
    cursor: pointer;
    margin-left: auto;
    margin-right: auto;
    object-fit: contain;
    object-position: center;
    max-height: 176px;
    margin-bottom: 0.5rem !important;
}

.discountMain {
    display: flex;
    justify-content: flex-end;
}

.discountButton {
    background: $indisparePink;
    border-radius: 5px;
    color: $white;
    padding: 0.25rem 0.75rem;
    max-width: 5rem;
    text-align: right;
    font-size: 12px;
    position: absolute;
    /* margin-right: -5.5rem; */
    /* margin-top: -0.75rem; */
    width: 86px;
    z-index: 9;
    right: 0.5rem;
    top: 0.5rem;
}

.productImgParent {
    max-height: 176px;
    width: 100%;
}

.cardTitle {
    font-weight: 600;
    font-size: 12px;
    line-height: 16px;
    text-align: center;
    /* or 133% */


    color: #222222;
}

.price {
    // margin-top: 10px;
    font-weight: 700;
    font-size: 16px;
    line-height: 14px;
    color: $primaryColor;
    width: 100%;
    text-align: center;

}

.exc {
    font-size: 10px;
    line-height: 14px;
    color: $primaryColor;
    width: 100%;
    // text-align: center;
}

.offerTitle {
    font-weight: 600;
    font-size: 12px;
    line-height: 22px;
    color: $indisparePink;
    text-align: center;
    padding: 0.5rem 0;
}
.viewText{
    color: $primaryColor;
    font-size: 14px;
    font-weight: 700;
    align-items: center;
    display: flex;
}

.firstContainer{
    display: flex;
    flex-direction: column;
}
.buttonContainer {
    flex: 1;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(to right, rgba(86,0,153,0.8), rgba(255,0,128,0.8)), url('/images/image.svg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    border: none;
    cursor: pointer;
}


@media (max-width: 1080px) {
    .cardContainer {
        --gap: .5em;
        --num-cols: 4;
    }
}

@media (max-width: 839.98px) {
    .cardContainer {
        --gap: 0.5em;
        --num-cols: 3;
    }
}

@media (min-width: 840px) and (max-width: 1040px) {
    .cardContainer {
        --gap: 0.5em;
        --num-cols: 3;
    }
}

@media (max-width: 768px) {
    .cardContainer {
        --gap: 0.5em;
        --num-cols: 2;
    }
    .viewText{
        display: none;
    }
    .firstContainer{
        min-height: 200px;
    }
    .buttonContainer{
        min-height: 200px;
    }
}

.productCard {
  border-radius: 16px;
  overflow: hidden;
  height: 100%;
  position: relative;
  transition: all 0.3s ease;
  
  &:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  }
}

.imageContainer {
  background: #fff;
  padding: 16px;
  transition: all 0.3s ease;
  position: relative;
  
  .productCard:hover & {
    padding: 8px;
  }
}

.productImage {
  width: 100%;
  height: 180px;
  object-fit: contain;
  transition: all 0.3s ease;
  
  .productCard:hover & {
    height: 160px;
  }
}

.cartIconOverlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease;
  
  .productCard:hover & {
    opacity: 1;
  }
}

.buyNowButton {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
  
  .productCard:hover & {
    opacity: 1;
  }
}
.productCard {
  border-radius: 16px;
  overflow: hidden;
  height: 100%;
  position: relative;
  transition: all 0.3s ease;
  
  &:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  }
}

.imageContainer {
  background: #fff;
  padding: 16px;
  transition: all 0.3s ease;
  position: relative;
  
  .productCard:hover & {
    padding: 8px;
  }
}

.productImage {
  width: 100%;
  height: 180px;
  object-fit: contain;
  transition: all 0.3s ease;
  
  .productCard:hover & {
    height: 160px;
  }
}

.cartIconOverlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease;
  
  .productCard:hover & {
    opacity: 1;
  }
}

.productTitle {
  margin: 4px 0 8px 0;
  font-size: 14px;
  line-height: 1.4;
  height: 40px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.priceContainer {
  margin-bottom: 12px;
}

.currentPrice {
  font-size: 18px;
  color: #8B008B;
  display: block;
  font-weight: bold;
}

.originalPrice {
  font-size: 14px;
  color: #999;
  text-decoration: line-through;
}

.gstText {
  font-size: 12px;
  color: #666;
  display: block;
}

.buttonGroup {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.buyNowButton {
  background: #8B008B;
  border-color: #8B008B;
  height: 36px;
  font-weight: 600;
  border-radius: 6px;
  flex: 2;
  
  &:hover {
    background: #7A007A;
    border-color: #7A007A;
  }
}

.cartButton {
  height: 36px;
  width: 36px;
  border-radius: 6px;
  border-color: #8B008B;
  color: #8B008B;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0;
  min-width: 36px;
  
  &:hover {
    border-color: #7A007A;
    color: #7A007A;
  }
}

.discountTag {
  background: #F3465F;
  color: #fff;
  position: absolute;
  top: 12px;
  right: 12px;
  font-weight: 600;
  z-index: 1;
}
@media (max-width: 460px) {
    .cardContainer {
        --gap: 0.5em;
        --num-cols: 2;
        // --row-height: 330px;
        align-items: center;


    }

    .card {
        max-width: 180px;
        height: 100%;
    }
}