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

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

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

.cardContainer {
    // Remove grid styles as we're using slick slider
    padding: 1rem 0;

    :global(.slick-slide) {
         padding: 0 12px;
        outline: none;
    }
     :global(.slick-list) {
        margin: 0 -12px; // prevent outer overflow
    }


    :global(.slick-prev:before, .slick-next:before) {
        color: #000;
    }
}

.slideItem {
    border: 1px solid #d9d9d9;
  border-radius: 1em;
    background: $white;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 250px;
    position: relative;
    padding-top: 2rem;
    border-radius: 8px;
    min-height: 320px;
}

.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;
    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;
    color: #222222;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    /* limit to 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    /* Prevent long words from breaking layout */
}

.price {
    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%;
}

.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;
}

.rfqButton {
    width: 100%;
    margin-top: 1rem;
    border: 2px solid #291C61 !important;
    color: #291C61 !important;
    background: transparent !important;
    font-weight: 600;
    height: 36px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 13px;
    
    &:hover {
        background: #291C61 !important;
        color: white !important;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(41, 28, 97, 0.2);
    }
    
    &:active {
        transform: translateY(0);
    }
}

.noProducts {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-size: 16px;
}

// Slick slider overrides
.cardContainer {
    :global(.slick-prev),
    :global(.slick-next) {
        &:before {
            display: none !important;
        }
    }
}


@media (max-width: 768px) {
    .viewText {
        display: none;
    }

    .slideItem {
        padding: 0 5px;
        width: 100%;
        // max-width: 80%;
    }
    
    .cardContainer {
        :global(.slick-prev) {
            left: -7px !important;
        }
        
        :global(.slick-next) {
            right: -7px !important;
        }
    }
}

@media (max-width: 480px) {
    .containerCategory{
        :global(.slick-slide) {
            display: flex !important;
            justify-content: center; // center the slide content
        }
        :global(.slick-list) {
            padding: 0 !important;   // remove extra padding
        }
    }

    .slideItem {
        margin: 0 auto;          // center horizontally
        max-width: auto;          // prevent full bleed
        width: auto;             // allow shrink
    }
    
    .cardContainer {
        :global(.slick-prev) {
            left: -7px !important;
        }
        
        :global(.slick-next) {
            right: -7px !important;
        }
    }
}