﻿/*@import 'Root.css';*/


.container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3.6px;
    padding: 10px;
    box-sizing: border-box;
    /*width: 100vh;*/
    /*min-width: 375px;*/
    /*max-width: 400px;*/
    margin: 2px auto;
}



.product-details .product-name {
    font-size: var(--font-product-title);
}

/* For small screens like small phones (portrait) */
@media (max-width: 351px) {
    .container {
        grid-template-columns: 1fr; /* Single column layout */
        padding: 5px;
    }
}
/* For medium screens like larger phones (landscape) and small tablets */
@media (min-width: 352px) and (max-width: 600px) {
    .container {
        grid-template-columns: repeat(2, 1fr); /* Two column layout */
        gap: 5px;
        padding: 10px;
    }
}
/* For large screens like tablets and desktops */
@media (min-width: 601px) and (max-width: 1024px) {
    .container {
        grid-template-columns: repeat(3, 1fr); /* Three column layout */
        gap: 10px;
        padding: 10px;
    }
}
/* For extra large screens like large desktops */
@media (min-width: 1025px) {
    .container {
        grid-template-columns: repeat(4, 1fr); /* Four column layout */
        gap: 15px;
        padding: 20px;
        max-width: 100%; /* Remove max-width constraint */
    }
}

.card {
    position: relative;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #fff;
}

.discount-badge {
    position: absolute;
    height: 20px;
    top: 10px;
    left: 10px;
    background: linear-gradient(rgba(255, 0, 0, 0.6), rgba(255, 0, 0, 0.3));
    color: white;
    width: 30px; /* Set width to ensure a circle */
    height: 40px;
    padding: 4px 8px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    display: flex; /* Use flexbox */
    flex-direction: column; /* Stack elements vertically */
    align-items: center; /* Center items horizontally */
    font-size: 9px;
}

    .discount-badge .upto {
        margin-bottom: 2px; /* Add some space between "Upto" and the discount percentage */
    }



.image-container {
    grid-column: span 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.product-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(4, auto);
    gap: 5px;
    align-items: center;
    width: 100%;
}

    .product-details p {
        margin: 0;
        font-size: var(--font-price);
        color: #666;
        padding-left: 2px;
    }

    .product-details .product-name {
        grid-column: span 2;
        /* height: 28px; Removed fixed height */
        font-weight: bold;
        overflow-wrap: break-word;
        max-width: 100%;
        text-align: left;
        /* CSS for truncating text after 2 lines */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }


    .product-details .price-range {
        padding-left: 6%;
        /*grid-column: span 2;*/
    }

    .product-details .mrp {
        padding-right: 10%;
        justify-self: end;
    }

    .product-details .price {
        text-decoration: line-through;
        text-decoration-thickness: 0.6px;
        margin: 0px;
        padding: 0px;
    }

    .product-details .discount {
        grid-column: span 2;
        font-size: 16px;
        color: red;
        font-weight: bold;
    }

    /*rating section*/

    .product-details .rating {
        display: flex;
        align-items: center;
        margin-top: 5px;
    }

        .product-details .rating svg {
            width: 16px;
            height: 16px;
            margin-right: 2px;
            /*background-color:#666;*/
        }

/*category section*/

@media (min-width: 300px) and (max-width: 768px) {

    /*category section*/
    .sidebar {
        padding: 0px;
        border-radius: 9px;
        /*margin-top: 9px;*/
        margin-bottom: 9px;
    }

    /*.sidebar ul {
            padding: 10px;
            display: flex;
        }*/

    /* categories start from here */
    .categories {
        /*background-color: #e1e1e1;*/
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        /*font-size: 15px;*/
        /*line-height: 3;*/
        /*padding: 8px;*/
        /*align-items:center;*/
    }

    /*.categories-container {
        display: flex;
        gap: 17px;
        overflow-x: auto;
    }

    .category-item {
        display: flex;
        flex-direction: column;
        align-items: center;
    }*/

    .categories-container {
        display: grid;
        grid-auto-flow: column;
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); /* Responsive grid */
        gap: 0px;
        padding: 0px;
    }

    .category-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        /*background-color: white;*/
        padding: 10px;
        border-radius: 8px;
        /*box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);*/
    }

    .category-icon {
        width: 56px;
        height: 56px; /* Ensure a square aspect ratio */
        border-radius: 50%;
        object-fit: cover;
        box-shadow: var(--button-shadow);
        background-color: var(--background-color);
        transition: background-color 0.3s ease, box-shadow 0.3s ease;
    }

        .category-icon:hover {
            background-color: var(--button-hover-color);
            box-shadow: var( --button-hover-shadow);
        }
}
