/* General Styles */
@font-face {
    font-family: 'JameelNooriNastaleeq.ttf';
    src: url('../Jameel/JameelNooriNastaleeq.ttf') format('truetype');
}

body {
    font-family: 'Times New Roman', Times, serif;
    margin: 0;
    padding: 0;
    background-color: #fafafa;
}

.categoryname {
    text-align: center;
    margin-bottom: 10px;
}

.container {
    width: 100%;
    height: auto;
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    text-align: center;
}

/* Product Card */
.product {
    position: relative;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: calc(33% - 20px);
    /* box-sizing: border-box; */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    height: auto;
    margin-bottom: 10px;
}

.product:hover {
    transform: translateY(-8px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.product img {
    max-width: 220px;
    margin-top: 10px;
    width: 100%;
    height: 60%;
    object-fit: fill;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 10px;
}

.product h2 {
    font-size: 20px;
    /* margin: 15px 10px; */
    margin-top: 8px;
    margin-bottom: 4px;
    color: #333;
}

.productprice {
    font-size: 16px;
    margin-top: 0px;
    margin-bottom: 2px;
    color: #c62828;
}

.original-price {
    text-decoration: line-through;
    color: #e53935;
    font-size: 12px;
    margin-top: 0px;
    margin-bottom: 0px;
}

.discounted-price {
    color: #43a047;
    font-weight: bold;
    font-size: 12px;
    margin-top: 0px;
    margin-bottom: 2px;
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #e53935;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
}

.view-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 30px;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 12px;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.product:hover .view-icon {
    opacity: 1;
}

.heart-icon {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 24px;
    color: #e0e0e0;
    /* Empty heart color */
    cursor: pointer;
    transition: color 0.3s ease;
}

.heart-icon.liked {
    color: #e53935;
    /* Red heart color */
}

.heart-icon .fa-heart {
    color: inherit;
    /* Ensure icon inherits the color */
}

/* Centering the Free Shipping Label */
.shipping {
    display: flex;
    justify-content: center;
    align-items: center;
    /* margin: 10px 0; */
    font-size: 12px;
    color: #555;
    margin-top: 0px;
    margin-bottom: 2px;
}

.shipping img {
    width: 24px;
    height: 24px;
    margin-right: 10px;
}

.shipping p {
    margin: 0;
}

/* Button Styles */
button {
    width: 150px;
    height: 28px;
    /* margin-bottom: 10px; */
    background-color: #05873d;
    border: none;
    color: white;
    /* padding: 12px 24px; */
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 15px;
    border-radius: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

button:hover {
    background-color: #c62828;
    transform: scale(1.05);
}

button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.5);
}

/* Responsive Styles */
@media (max-width: 480px) {
    .product {
        width: calc(54% - 20px);
        height: auto;
        margin-bottom: 5px;
    }
    .product img{
        max-width: 160px;
        height: 55%;
    }
    .product h2{
        margin-top: 4px;
        margin-bottom: 2px;
    }
    .original-price{
        font-size: 12px;
    }
    .discounted-price{
        font-size: 12px;
    }
    .productprice{
        font-size: 14px;
        margin-top: 0px;
        margin-bottom: 1px;
    }
    .discount-badge {
        position: absolute;
        top: 10px;
        right: 8px;
        background-color: #e53935;
        color: #fff;
        padding: 3px 6px;
        border-radius: 5px;
        font-size: 10px;
        font-weight: bold;
    }
    .shipping{
        font-size: 12px;
        margin-top: 0px;
    }
    .container {
        padding: 0px;
        margin: 0px;
        gap: 10px;
    }

    button {
        padding: 0px;
        font-size: 12px;
        width: 100px;
        height: 26px;
        margin: 0px;
        text-align: center;
    }

    body {
        margin: 0;
    }
}

/* Add these styles for the search bar */
.search-bar {
    width: 100%;
    padding: 20px;
    background-color: #f7f7f7;
    text-align: center;
    /* margin-bottom: 20px; */
}

.search-bar input[type="text"] {
    width: 60%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    margin-right: 10px;
}

.search-bar button {
    width: 75px;
    height: 35px;
    /* padding: 10px 20px; */
    font-size: 16px;
    border: none;
    background-color: #e53935;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}

.search-bar button:hover {
    background-color: #c62828;
}

.containerall {
    display: flex;
    flex-direction: row;
    height: auto;
}

.sidebar {
    width: 25%;
    background-color: #f4f4f4;
    padding: 10px;
    box-sizing: border-box;
    overflow-x: auto;
    /* Enable horizontal scroll */
    overflow-y: hidden;
    text-align: left;
}

.categories {
    margin-top: 40px;
    white-space: nowrap;
    text-align: center;
}

li {
    list-style-type: none;
    margin-right: 10px;
    margin-bottom: 8px;
    padding: 0;
}

li a {
    display: inline-block;
    text-decoration: none;
    color: black;
    text-align: center;
}

.main-content {
    justify-content: center;
    width: 75%;
    background-color: #e0e0e0;
    padding: 10px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    * {
        box-sizing: border-box;
    }

    body {
        margin: 0;
        padding: 0;
        overflow-x: hidden;
        /* Prevent horizontal overflow */
    }

    .search-bar {
        padding-bottom: 3px;
    }

    .search-bar button {
        width: 70px;
        padding: 0px;
        font-size: 16px;
        border: none;
        background-color: #e53935;
        color: white;
        border-radius: 5px;
    }

    .containerall {
        width: 100%;
        display: flex;
        flex-direction: column;
        overflow-x: hidden;
        /* Ensure no overflow from child elements */
    }

    .sidebar {
        width: 100%;
        height: auto;
        overflow-x: hidden;
        overflow-y: hidden;
    }

    .categories {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        /* Enable horizontal scroll if necessary */
        width: 100%;
        margin-left: 0;
        margin: 0;
    }

    /* Basic styles for li and a */
    li {
        list-style-type: none;
        margin-right: 10px;
        margin-bottom: 8px;
        padding: 0;
    }

    /* Styling the anchor as a button */
    li a {
        display: inline-block;
        text-decoration: none;
        padding: 8px;
        background-color: whitesmoke;
        color: black;
        border-radius: 5px;
        border: 1px solid gray;
        text-align: center;
    }

    .main-content {
        width: 100%;
        height: auto;
        align-content: center;

    }
}