
.main-wrapper {
    width: 100%;
    max-width: 980px; /* Set max-width to 980px for the main content */
    margin: auto;
    margin-top: 20px;
}

.product-category-section {
    /* margin-bottom: 40px; */
    /* background-color: #fff; */
    /* box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); */
    padding: 40px 20px 10px;
    border-radius: 8px;
}

.container {
    width: 100%;
    padding: 0 0 45px 0;
    box-shadow: none;
    overflow: hidden;
    position: relative;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* margin-bottom: 20px; */
    /* border-bottom: 2px solid #ccc; */
    padding-bottom: 10px;
}

.header h1 {
    margin: 0;
    font-size: 1.5em;
    color: #333;
}

.navigation .nav-btn {
    background-color: #f5f5f5;
    border: 1px solid #f5f5f5;
    padding: 10px 15px;
    font-size: 1.2em;
    cursor: pointer;
    margin-left: 5px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.navigation .nav-btn:hover {
    background-color: #febd17;
}

.slider-wrapper {
    width: 100%;
    overflow: hidden;
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.product-page {
    min-width: 100%;
    display: flex;
    justify-content: space-around;
    padding: 20px 0;
    box-sizing: border-box;
    flex-wrap: nowrap; /* Prevent wrapping in desktop view for sliding */
    text-align: center;
}

.product-item {
    text-align: center;
    /* Default: 3 items per row on larger screens (980px) */
    flex: 0 0 calc(33.333% - 20px); /* 3 items per row with 10px margin on each side (total 20px per item) */
    margin: 0 10px; /* 10px margin on left and right */
    /* padding: 15px; */
    /* border: 1px solid #eee; */
    border-radius: 8px;
    text-align: center;
    /* background-color: #f9f9f9; */
    display: flex;
    justify-content: center;
}

.product-item img {
    max-width: 100%;
    height: auto;
    margin-bottom: 15px;
}

.product-item h3 {
    font-size: 1.2em;
    color: #555;
    margin-bottom: 10px;
}

.product-item p {
    font-size: 0.9em;
    color: #777;
    line-height: 1.5;
}

.slider-progress {
    width: 100%;
    height: 4px;
    background-color: #eee;
    margin-top: 20px;
    border-radius: 5px;
    overflow: hidden;
    display: block !important;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background-color: #febd17;
    transition: width 0.5s ease-in-out;
}
.progress-bar.no_scroll {
    background-color: #eee;
}


/* --- Media Query for screens up to 768px wide --- */
@media (max-width: 768px) {
    .main-wrapper {
        max-width: 100%; /* Allow full width on mobile */
        padding: 0 10px; /* Add some padding to the main wrapper on mobile */
        box-sizing: border-box;
    }

    .product-category-section {
        margin-bottom: 20px;
        padding: 10px 0; /* Reduce padding for sections on mobile */
    }
    .container {
        padding-bottom:0;
    }
    .header {
        flex-direction: column;
        align-items: flex-start;
    }

    .navigation {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 10px;
    }

    .navigation .nav-btn {
        display: none; /* Hide navigation buttons on small screens */
    }

    .slider-wrapper {
        overflow: visible; /* Allow content to flow naturally */
    }

    .slider-track {
        display: flex; /* Changed to flex to allow product-items to wrap directly */
        flex-wrap: wrap; /* Allows product-items to wrap */
        justify-content: space-between; /* Distributes items with space between them */
        transform: none !important; /* Remove any transform applied by JS */
        transition: none; /* Remove transition */
        padding: 0; /* Remove padding from track, handled by main-wrapper */
    }

    .product-page {
        /* This is the key change: make product-page not affect the flex layout directly */
        display: contents; /* Makes children participate directly in parent's flex layout */
        min-width: auto; /* Ensure no fixed width is applied */
        padding: 0; /* Ensure no padding is applied */
        margin-bottom: 0; /* Ensure no margin is applied */
    }

    .product-item {
        text-align: center;
        /* Adjust for 2 items per row on mobile, with spacing */
        flex: 0 0 calc(50% - 10px); /* Each item takes 50% minus 10px, resulting in 20px total gap between items */
        margin: 0; /* Remove individual item margins, rely on flexbox spacing */
        margin-bottom: 15px; /* Add bottom margin for vertical stacking */
        box-sizing: border-box; /* Crucial: Ensure padding/border are included in width */
    }

    .slider-progress {
        display: none; /* Hide progress bar on small screens */
    }
    .item-banner {padding: 0;}
}