﻿@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

* {
    font-family: "Poppins", sans-serif;
}

body {
    background: #f1f1f1 !important;
}

body .container {
    max-width: 1365px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

/* File Input Styles */
#file-input {
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Button Styles */
button {
    background-color: transparent;
    border: none;
    padding: 0;
    margin: 0 10px;
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
}

.icon-button {
    background-color: transparent;
    border: none;
    padding: 0;
    margin: 0 10px;
    cursor: pointer;
}

.button-icon {
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease;
}

.icon-button:hover .button-icon {
    transform: scale(1.1);
}

#export-button:hover .button-icon {
    content: url('images/project_images/export2.png');
}

#show-selected-button:hover .button-icon {
    content: url('images/project_images/cart2.png');
}

#clear-counters-button:hover .button-icon {
    content: url('images/project_images/clear2.png');
}

#show-all-products-button:hover .button-icon {
    content: url('images/project_images/showall2.png');
}

/* Logo aligned to the left */
.logo {
    width: 300px;
    height: auto;
    margin-right: 20px;
}

/* Warehouse Button Styles */
.warehouse-button {
    padding: 5px 10px;
    cursor: pointer;
    color: #72777f;
    background: none;
    border: none;
    font-family: "Poppins", sans-serif;
    font-size: 16px;
}

.warehouse-button:hover,
.warehouse-button.active {
    color: #5c6b88;
    font-weight: bold;
}

/* Sidebar for Filters and Categories */
#categories-filters-container {
    width: 100%;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.card-code {
    font-weight: bold; /* Makes the code text bold */
    color: #333; /* Adjust the color as needed */
    margin-bottom: 5px; /* Add some space below the code */
    font-size: 12px; /* Adjust the font size */
}

.category-item {
    padding: 5px 10px;
    cursor: pointer;
    color: #72777f;
}

.category-item.active {
    color: #5c6b88; /* Active color */
    font-weight: bold; /* Bold text */
}

.category-item:hover {
    color: #5c6b88;
    font-weight: bold;
}

.separator {
    color: #ccc;
}

/* Filterable Cards Section */
#filterable-cards {
    flex-grow: 1;
    padding: 0px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    box-sizing: border-box;
    justify-content: flex-start;
}

#filterable-cards .card {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 16rem;
    border: 2px solid transparent;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s;
    background: #fff;
    margin-bottom: 20px;
    margin-right: 5px;
    position: relative; /* Added to position overlay */
}

#filterable-cards .card:hover {
    box-shadow: 0 0 15px rgba(92, 107, 136, 0.3);
}

#filterable-cards .card.hide {
    display: none;
}

#filterable-cards .card .image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 252px; /* Ensure the container maintains the same height as the images */
    overflow: hidden; /* Hide any part of the image that exceeds the container */
}

#filterable-cards .card img {
    height: 252px;
    width: auto; /* Automatically adjust width while preserving aspect ratio */
    max-width: 100%; /* Prevent the image from exceeding the card's width */
    object-fit: contain; /* Ensures the image fits within the specified height */
    transition: filter 0.3s ease; /* Smooth transition for the blur */
}

#filterable-cards .card .blur {
    filter: blur(3px); /* Apply the blur effect */
}

#filterable-cards .card .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/project_images/overlay.png') center center no-repeat;
    background-size: contain;
    pointer-events: none; /* Ensure the overlay does not interfere with interaction */
}
.out-of-stock img {
    opacity: 0.5;
}

#filterable-cards .card .card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

#filterable-cards .card .card-body .size-counter-container {
    margin-top: 10px;
}

#filterable-cards .card .card-body .size-counter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

#filterable-cards .card .card-body .size-counter .size-label {
    flex: 1;
    text-align: right;
    color: #5c6b88;
    padding-right: 15px;
}

#filterable-cards .card .card-body .size-counter .counter-container {
    flex: 1;
    display: flex;
    justify-content: center;
}

#filterable-cards .card .card-body .size-counter .stock-display {
    flex: 1;
    text-align: left;
    color: #5c6b88;
    padding-left: 15px;
}

.count-display {
    font-size: 18px;
    width: 40px;
    text-align: center;
}

button.decrease,
button.increase {
    background-color: #5c6b88;
    color: white;
    border: none;
    padding: 5px 10px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

button.decrease:hover,
button.increase:hover {
    background-color: #4e5a70;
}

button.decrease:disabled,
button.increase:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Featured Product Styles */
.card.featured {
    border: 2px solid gold;
    box-shadow: 0 0 15px gold;
    position: relative;
}

.card.featured .featured-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: url('images/project_images/star.png') no-repeat center center;
    background-size: contain;
}


/* Mobile Adjustments */
@media (max-width: 600px) {
    #sidebar {
        display: none;
    }

    #filterable-cards {
        margin-left: 0;
        flex-direction: column;
        align-items: center;
    }

    #filterable-cards .card {
        width: calc(100% - 20px);
    }

    #show-selected-button {
        width: 100%;
    }

    #clear-counters-button {
        width: 100%;
        margin-top: 10px;
    }
}