/* LAYOUT CSS */
.layout {
    display: flex;
    gap: 40px;
    padding: 40px 20px 20px 20px;
    position: relative;
}

.mobile-menu-btn {
    display: none;
    position: absolute;
    top: 0px;
    left: 0;
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 2px 8px;
    background-color: var(--primary);
    border-radius: 6px;
    font-size: 24px;
    z-index: 999;
   
    width: 40px;
    height: 40px;
}
/* SIDEBAR */
.sidebar {
    width: 200px;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.sidebar h2 {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 560;
    color: var(--secondary);
    font-size: 18px;
}
.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto; /* or scroll if you want it always visible */
    flex-grow: 1; /* take up remaining space */
    min-height: 0; /* ensures it doesn't overflow container */
}

.sidebar li {
    padding: 8px 0;
    cursor: pointer;
    color: #333;
    text-transform: uppercase;
    font-weight: 400;
    margin: 10px 0 !important;
}
li.alt-kategori {
    padding-left: 1em !important;
}

.sidebar li a {
    transition: var(--transition);
    font-size: 16px;
}

.sidebar li a:hover {
    color: var(--primary);
}

.toolbar {
    position: absolute;
    top: var(--p-top);
    transform: translateY(calc(-100% - 0.5em));
    right: 0;
}
.toolbar > *
{
    font-size: 18px;
}

.toolbar select {
    background-color: #55575b;
    color: var(--white);
    width: 70px;
}

.sidebar li.active {
    color: #f71c5b;
    /* highlight color */
}

.sidebar li.active  .ust{
    border-bottom: 1px solid;
    /* highlight color */
}

/* MAIN CONTENT */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* TOOLBAR */
.toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 16px;
}

.toolbar label {
    margin-right: 8px;
}

.toolbar select {
    padding: 4px;
}

/* PRODUCT GRID */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16vw, 1fr));
    gap: 18px;
}

.product-item {
    text-align: center;
}

.product-item img {
    width: 300px;
    height: 300px;
    object-fit: contain;
    margin: 0 auto;
}

.product-item .title {
    font-size: 18px;
    color: #333;
}

.pagination {
    display: flex;
    gap: 8px;
    justify-content: end;
    align-items: end;
    padding-top: 22px;
}

.pagination-button {
    color: var(--white);
    background-color: var(--primary);
    min-width: 36px;
    padding: 4px 8px;
    text-align: center;
    height: 30px;
    align-items: center;
    display: flex;
    justify-content: center;
    transition: var(--transition);
}

.pagination-button:hover {
    color: var(--white);
    background-color: color-mix(in srgb, var(--primary) 80%, black 20%);
}

.prd-img .swiper-wrapper{
    padding-bottom: 30px;
}

.prd-img .swiper-pagination-bullet {
    background: var(--primary);
}

.prd-img .swiper-button-next,
.prd-img .swiper-button-prev {
    width: 30px;
    height: 30px;
    margin-top: -20px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease;
    backdrop-filter: blur(5px);
}

.prd-img:hover .swiper-button-next,
.prd-img:hover .swiper-button-prev {
    opacity: 1;
}

.prd-img .swiper-button-next:hover,
.prd-img .swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.8);
}

.prd-img .swiper-button-next:after,
.prd-img .swiper-button-prev:after {
    font-size: 18px;
    color: white;
    font-weight: bold;
}

.sidebar .alt-kategori a
{
    font-size: 14px !important;
    text-transform: capitalize;
}

.no-products
{
    font-size: 18px;
    min-height: 50vh;
}

@media screen and (max-width: 1024px) {
    .mobile-menu-btn {
        display: block;
    }
    .no-products
    {
        min-height: 50vh;
        display: flex;
        justify-content: center;
        align-items: center;

    }
    .sidebar {
        display: flex;
        flex-direction: column;
        position: absolute;
        left: 0;
        top: -10px;
        min-width: max-content;
        background: white;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        padding: 60px 20px 20px 20px;
        transform: translateX(-100%);
        opacity: 0;
        z-index: 99;
        border-radius: 0 20px 20px 0;
    }
    .sidebar li.alt-kategori
    {
        font-size: 0.8em;
    }
    .sidebar.active {
        transform: translateX(0);
        opacity: 1;
    }

    .layout {
        flex-direction: column;
    }
    .product-grid
    {
        grid-template-columns: repeat(auto-fill, minmax(20vw, 1fr));
    }
}

@media screen and (max-width: 768px) {

    .product-grid
    {
        grid-template-columns: repeat(auto-fill, minmax(40vw, 1fr));
    }
}