﻿/*------------------------------ PRODUCTS ------------------------------*/
.container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    max-width: 1700px;
    width: 100%;
    margin: 50px auto;
    gap: 40px;
}

.sidebar {
    width: 450px;
    background: white;
    padding: 25px;
    box-shadow: 4px 4px 15px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    margin-left: 40px;
    max-height: 80vh;
    overflow-y: auto;
}

    .sidebar h2 {
        font-size: var(--h2-font);
        font-weight: bold;
        text-align: center;
        margin-bottom: 10px;
        color: var(--other-color);
        text-transform: capitalize;
    }

    .sidebar ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

        .sidebar ul li {
            padding: 12px;
            border-bottom: 1px solid var(--other-color-2);
            transition: all 0.5s ease;
            word-wrap: break-word;
            overflow: hidden;
            white-space: normal;
            word-break: break-word;
        }

            .sidebar ul li:last-child {
                border-bottom: none;
            }

            .sidebar ul li:hover {
                background: var(--second-color);
                border-radius: 10px;
            }

            .sidebar ul li a {
                text-decoration: none;
                color: var(--other-color);
                font-size: var(--p-font);
                display: block;
                transition: all 0.2s ease;
                font-weight: bold;
            }

                .sidebar ul li a:hover,
                .sidebar ul li.active a {
                    color: var(--main-color);
                    font-weight: bold;
                    padding-left: 5px;
                }

        .sidebar ul .submenu {
            padding-left: 15px;
            margin: 10px;
        }

            .sidebar ul .submenu li {
                padding: 8px;
                border-bottom: none;
            }

                .sidebar ul .submenu li a {
                    font-size: 14px;
                    font-weight: 600;
                }

.products {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
}

.product-card {
    background: white;
    padding: 15px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    width: calc(33.333% - 20px);
    text-align: center;
    display: flex;
    flex-direction: column;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

    .product-card:hover {
        box-shadow: 6px 6px 20px rgba(0, 0, 0, 0.15);
        transform: translateY(-10px);
    }

.product-image {
    width: 100%;
    height: auto;
}

.product-divider {
    width: 100%;
    height: 2px;
    background: var(--other-color-2);
    margin: 10px 0;
}

.product-name {
    text-decoration: none;
    color: var(--other-color);
    font-weight: bold;
    word-wrap: break-word;
    white-space: normal;
    overflow: hidden;
    text-align: center;
    max-width: 100%;
    padding-top: 15px;
    font-size: var(--m-h1-font);
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 20px;
}

.product-stock-code {
    font-size: var(--p-font);
    color: var(--other-color);
    font-weight: 500;
}

.product-logo {
    width: 35px;
    height: 35px;
}

@media (max-width: 1400px) {
    .product-card {
        width: calc(50% - 20px);
    }
}

@media (max-width: 1200px) {
    .product-card {
        width: calc(100% - 20px);
    }

    .product-image {
        max-width: 80%;
        display: block;
        margin: 0 auto;
    }
}

@media (max-width: 1000px) {
    .container {
        flex-direction: column;
        align-items: center;
    }

    .sidebar {
        width: 90%;
        text-align: center;
    }

        .sidebar h2 {
            font-size: var(--m-h2-font);
            text-align: center;
            margin-bottom: 15px;
        }

        .sidebar ul li {
            padding: 15px;
        }

        .sidebar ul .submenu {
            padding-left: 20px;
            margin-top: 5px;
        }

            .sidebar ul .submenu li {
                padding: 8px;
            }

                .sidebar ul .submenu li a {
                    font-size: 14px;
                }

    .products {
        justify-content: center;
        width: 90%;
    }

    .product-card {
        width: calc(100% - 20px);
    }
}

@media (max-width: 799px) {
    .container {
        flex-direction: column;
        align-items: center;
    }

    .sidebar {
        width: 80%;
        margin-left: 0;
        text-align: center;
        padding: 5px;
    }

        .sidebar h2 {
            font-size: var(--m-h2-font);
            margin: 10px;
        }

        .sidebar ul li {
            padding: 12px;
            border-bottom: 1px solid var(--other-color-2);
            width: 95%;
            margin: 0 auto;
        }

            .sidebar ul li a {
                font-size: var(--m-p-font);
            }

        .sidebar ul .submenu li a {
            font-size: 13px;
        }

    .products {
        justify-content: center;
    }

    .product-card {
        width: calc(100% - 20px);
    }

    .product-image {
        max-width: 90%;
        display: block;
        margin: 0 auto;
    }

    .product-name {
        font-size: var(--m-h3-font);
    }

    .product-stock-code {
        font-size: var(--m-p-font);
    }

    .product-logo {
        width: 30px;
        height: 30px;
    }
}
