.main-page-container {
    background-color: #F4F4F4;
    padding: 50px 0;
}

/*category section*/
.categories-section p {
    font-family: 'Nunito Sans';
    font-style: normal;
    font-weight: 600;
    font-size: 17px;
    line-height: 23px;
    text-transform: uppercase;

    color: #000000;
}

.categories-section .mynaui--filter {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%230d0d0d' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M4.5 7h15M7 12h10m-7 5h4'/%3E%3C/svg%3E");

    margin-top: -3px;
}

.category-btn {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 10px 24px;
    text-align: center;
    box-shadow: none;
    border: none;
    font-family: 'Nunito Sans';
    font-style: normal;
    font-weight: 800;
    font-size: 16px;
    line-height: 22px;
    text-transform: uppercase;

    color: #141415;

    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, transform 0.3s ease;
}

.category-btn:hover {
    background-color: #E7E7E7;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    text-decoration: none;
}

.active-category {
    background-color: #393939 !important;
    color: #FFFFFF !important;
}

/*products*/
.product-section {
    background-color: #F4F4F4;
}

.product-section a {
    text-decoration: none;
}

.product-section .section-title {
    font-family: 'Nunito Sans';
    font-style: normal;
    font-weight: 800;
    font-size: 16px;
    line-height: 22px;
    text-transform: uppercase;

    color: #141415;
}

.product-container {
    background: linear-gradient(180deg, #F9F9F9 0%, #F0F2F1 100%);
    border-radius: 10px;
    transition: box-shadow 0.3s ease;
    /*overflow: hidden;*/

    /* Add this for consistent height */
    min-height: 360px; /* adjust based on your layout */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-container:hover {
    box-shadow: 0px 3px 9px rgba(0, 0, 0, 0.1);
}

.product-container:hover .card-img-top {
    transform: scale(1.05);
}

.product-image-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.product-image-wrapper img {
    display: block;
    width: 100%;
    object-fit: contain;
}

.product-section .favourite-icon,
.product-section .favourite-icon-full {
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
    z-index: 2;
    right: 12px;
}

.product-section .favourite-icon:hover,
.product-section .favourite-icon-full:hover {
    transform: scale(1.2);
}

.product-container .product-name {
    font-family: 'Nunito Sans';
    font-style: normal;
    font-weight: 700;
    font-size: 16px;
    line-height: 22px;
    text-align: center;
    color: #141415;

    /* Clamp to 3 lines */
    display: -webkit-box;
    /*-webkit-line-clamp: 3;*/
    /*-webkit-box-orient: vertical;*/
    overflow: hidden;
    /*text-overflow: ellipsis;*/
    word-break: break-word;
    overflow-wrap: anywhere;
    /* FIX: Prevent height jump */
    height: 66px;

    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-container .product-price {
    font-family: 'Nunito Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 22px;
    text-transform: lowercase;
    color: #141415;

    display: flex;
    align-items: center;
    /*gap: 15px; !* space between old and new price *!*/
}

.product-container .old-price {
    font-size: 14px;
    color: #808080;
    text-decoration: line-through;
    line-height: 1;
    display: inline-block;
}

.product-container .new-price {
    font-size: 15px;
    font-weight: 700;
    color: #141415;
}

.product-section .card {
    padding: 0;
}

.product-section .card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.custom-img-height {
    min-height: 370px;
}

.card-img-top {
    height: 100%;
    transition: transform 0.4s ease;
}

.five-cols .col {
    display: flex;
    flex-direction: column;
}

.product-container {
    flex: 1;
}

@media (max-width: 1199.98px) {
    .five-cols .col {
        flex: 0 0 25%;
        max-width: 25%;
    }

    .product-container .product-price {
        flex-direction: column-reverse;
        gap: 5px;
    }
}

@media (max-width: 991.98px) {
    .five-cols .col {
        flex: 0 0 33.3333%;
        max-width: 33.3333%;
    }
}

@media (max-width: 767.98px) {
    .five-cols .col {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 575.98px) {
    .product-container {
        max-width: 280px;
    }

    .five-cols .col {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media only screen and (max-width: 550px) {
    .fade-product {
        padding: 0 10px;
        margin: 35px 0 !important;
    }

    .product-container {
        min-height: unset;
    }

    .custom-img-height {
        aspect-ratio: 1 / 1; /* perfect square */
        height: auto;
        min-height: unset;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .product-image {
        max-height: 100%;
        width: auto;
        object-fit: contain;
    }

    .product-container .product-name {
        height: 66px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .product-container .product-price {
        flex-direction: column-reverse;
        gap: 5px;
    }
}

/* Overlay styles */
.product-link-wrapper {
    display: inline-block;
    text-decoration: none;
    position: relative;
    width: 100%;
}

.product-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.product-image {
    display: block;
    width: 100%;
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.9));
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
    pointer-events: none; /* So clicks pass through to the link */
}

.overlay-text {
    font-family: 'Nunito Sans', sans-serif;
    font-style: normal;
    font-weight: 900;
    font-size: 21px;
    line-height: 29px;
    text-align: center;
    text-transform: uppercase;
    color: #241A15;
    opacity: 0.78;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border-radius: 6px;
}

/*product sort animation*/
.fade-product {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.fade-product.hide {
    opacity: 0;
}

/*toastify*/
.toastify {
    word-break: break-word;
    max-width: 90vw;
    box-sizing: border-box;
}

.toast-close {
    color: #141415 !important;
    opacity: 1 !important;
}


.buy-button-container {
    display: inline-block
}

.buy-button {
    font-family: 'Nunito Sans', sans-serif;
    display: inline-block;
    border-radius: 8px;
    background: #F5F5F5;
    position: relative;
    top: 50%;
    border: 1px solid #E0E0E0;
    font-size: 15px;
    font-weight: 500;
    transition: 0.3s ease;

}

.product-container:hover .buy-button {
    background: linear-gradient(to right, #F5F5F5, #E0E0E0);
}

.custom-img-height {
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.product-image {
    max-height: 100%;
    width: auto;
    object-fit: contain;
}

.product-name {
    height: 44px;
    line-height: 22px;
    overflow: hidden;
    display: -webkit-box;
}

.product-price {
    min-height: 22px;
}

.buy-button-container {
    margin-top: auto;
}

@media (max-width: 576px) {
    .custom-img-height {
        height: 200px;
    }

    .product-name {
        height: 44px;
        font-size: 14px;
    }

    .product-price {
        font-size: 14px;
    }

    .buy-button {
        font-size: 13px;
        padding: 0.5rem 0.75rem;
    }

    .buy-button-container svg {
        display: none;
    }
}
