* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Verdana pro", sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* Ensure body takes the full viewport height */
    margin: 0;
    background-color: var(--white);
    font-optical-sizing: auto;

}

main {
    flex: 1;
    /* Makes the main content expand to fill available space */
}



:root {
    --logo-color: #f79836;
    --primary-color: #a8cf45;
    --primary-color-dark: #0e844d;
    --text-dark: #333333;
    --white: #ffffff;
    --button: #0b3d26;

}

.all-products h1 {
    font-size: 2.5rem;
    color: var(--primary-color-dark);
    font-weight: 600;
    text-align: center;
    margin: 20px 0px;
}


.product-grid {
    display: flex;
    flex-wrap: wrap;
    grid-template-columns: repeat(4, 1fr);
    padding: 0px;
    gap: 2px;
}


.product-frame {
    flex: 0 0 22%;
    margin: 5px;
    padding: 10px;
    box-sizing: border-box;
    background: #fff;
    border: 0.2px solid #0e844d8a;
    text-align: center;
    height: fit-content;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    height: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    text-align: left;
    transition: transform 0.3s, box-shadow 0.3s;
}



/* General styling for the product card */

.product-frame:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* Styling for the product image with hover effect */
.product-image {
    position: relative;
    height: 254px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    transition: opacity 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
}

.product-image .hover-image {
    opacity: 0;
}

.product-frame:hover .hover-image {
    opacity: 1;
}

.product-frame:hover .default-image {
    opacity: 0;
}

/* Styling for product details */
.product-name {
    font-size: 15px;
    font-weight: bold;
    margin: 9px 0 5px;
    text-align: start;
    color: var(--primary-color-dark);
}

.primary-ingredient {
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.rating-quantity {
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
}

.quantity {
    font-size: 14px;
    color: var(--text-dark);
}

/* Rating styling */
.product-rating {
    display: flex;
    justify-content: left;
    align-items: center;
    gap: 5px;
}

.stars {
    color: var(--primary-color-dark);
    /* Gold color for stars */
    font-size: 1.2em;
}

.view-more {
    font-size: 20px;
    padding: 6px;
    margin: 10px;
    background-color: transparent;
    border: none;
    color: var(--primary-color-dark);
    font-weight: bold;
    cursor: pointer;

}


.category-container {
    overflow: hidden;
    /* start collapsed */
    transition: max-height 0.5s ease;
}


.view-button {
    display: flex;
    justify-content: end;
    margin-top: 10px;
}

.rating-count {
    font-size: 0.9em;
    color: #666;
}

.tags {
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 5px;
}

/* Price styling */
.product-price {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 5px;

}

/* Button styling */
.product-buttons {
    display: flex;
    justify-content: space-between;
    /* gap: 20px; */
}

.product-buttons button {
    background-color: var(--button);
    color: var(--white);
    z-index: 10;
    font-weight: 500;
    border: none;
    padding: 5px 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}


.product-buttons button:hover {
    background-color: var(--primary-color);
    color: var(--text-dark);
    font-weight: 700;
}

.product-buttons .view-product {
    background-color: var(--primary-color-dark);
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.product-buttons .view-product:hover {
    background-color: var(--primary-color);
    color: var(--text-dark);
    font-weight: 700;
    transform: scale(1.05);
    box-shadow: 0 0 10px var(--primary-color);
}






@media (min-width: 481px) and (max-width: 768px) {
    .product-frame {
        flex: 0 0 215px;
    }

    .product-image {
        height: 200px;
    }

    .product-grid {

        padding: 10px;
        gap: 0px;
    }

    section.all-products {
        padding: 10px 20px !important;
    }
}
@media (max-width: 360px) {
    .product-image {
        height: 150px !important;
    }
        .product-frame {
        flex: 0 0 160px !important;
    }
}
@media (max-width: 1024px) {
      .product-image {
        height: 200px ;
    }
}

@media (max-width: 480px) {
    .product-frame {
        flex: 0 0 186px;
    }

    .product-image {
        height: 200px;
    }

    .product-image img {
        object-fit: inherit;
    }

    .product-buttons button {
        padding: 4px !important;
    }

    .product-buttons button i{
        font-size: 9px;
    }
    section.all-products {
        padding: 10px 10px !important;
    }

    .product-grid {

        gap: 0px;
    }


}



/* ------------- */
section.all-products {
    padding: 10px 80px;
}




.product-rate {
    display: flex;
    gap: 5px;
}

.product-value {
    color: rgb(197, 61, 61);
    font-size: 14px;
    font-weight: 600;
}

a.product-link {
    text-decoration: none;
}

/* -------------- */


.carousel-row {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 3px;
    scrollbar-width: none;
    /* Firefox */
}

.carousel-row::-webkit-scrollbar {
    display: none;
}

.carousel-section {
    flex: 0 0 calc(25% - 15px);
    box-sizing: border-box;
    border-radius: 10px;

    min-width: 0;
}





.carousel-button.left {
    left: 20px;
    font-size: 15px;
}

.carousel-button.right {
    right: 20px;
    font-size: 15px;
}

.product-desc h3 {

    font-weight: 600;

}



/* Tablets: 3 items */
@media (min-width: 767px) and (max-width:991px) {


    .carousel-section {
        flex: 0 0 calc(33% - 10px);
    }

    .carousel-row {
        gap: 2px;
    }
}

@media (max-width: 360px) {


    .carousel-container {
        padding: 20px !important;
    }

}

@media (max-width: 767px) {


    .carousel-container {
        padding: 20px !important;
    }

    .carousel-section {
        flex: 0 0 calc(50% - 10px);
    }

    .carousel-row {
        gap: 0px;
    }

    .all-products h1 {
        font-size: 30px;

    }
}