/*
    CSS Template:

    element size:
        height
        max-height
        width
        max-width
        margin
        padding
        gap

    position:
        position
        top
        left
        right
        bottom
        transform

    element display:
        display
        flex
        flex-direction
        flex-wrap
        justify-contents
        align-items

    font design:
        color
        text-align
        font
        font-family
        font-weight
        font-style
        font-size

    element design:
        background
        background-color
        border-radius
        outline

    other design:
        box-sizing
        cursor
*/

* {
    margin: 0;
    padding: 0;

    font-family: 'Roboto', sans-serif !important;

    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
}

a:link {
    color: #8d8ea6;
}

body {
    background-image: url(https://mmautoparts.eu/images/page_images/foto_gallery/1/dystrybucja-nowych-jak-i-regenerowanych-rozrusznikow-oraz-alternatorow.jpg);
    background-attachment: fixed;
    background-size: cover;
    background-repeat: no-repeat;
}

#loading {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

#loading img {
    position: absolute;
    max-width: 80px;
    max-height: 80px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.search-bar-container {
    width: 40vw;
    min-width: 300px;
    max-width: 750px;
    margin: 140px auto 30px;
    padding: 20px;
    background-color: #EEF0F2;
    border-radius: 28px;
    box-shadow: 0 0 8px rgba(60, 154, 65, 0.5);
}

.search-bar-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
}

.search-bar {
    flex-grow: 1;
    padding: 10px 20px;
    font: normal normal normal 0.9vw/1vw Overpass;
    background: transparent;
    border: none;
    border-right: 0.30vw solid #231F20;
    outline: none;
}

.search-bar::placeholder {
    color: #231F20;
}

.search-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 10px;
}

.search-icon {
    height: auto;
    width: 2.5vw;
    max-width: 50px;
    min-width: 20px;
}

.blog {
    width: 80vw;
    max-width: 1500px;
    padding: 20px;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #0a0a0c;
    background-color: #e7eef1;
    border: #153e4fb8 solid 3px;
    border-radius: 20px;
}

.filter-options-wrapper {
    width: 100%;
    gap: 20px;

    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.filter-options {
    width: calc(100% - 200px);
    min-height: 10vw;
    padding: 20px;
    gap: 10px;
    position: sticky;
    top: 20px;
    display: flex;
    flex-wrap: wrap;
    align-self: flex-start;
    background-color: #e7eef1;
    border-radius: 20px;
}

.filter-options input[type="number"] {
    min-width: 100px;
    flex: 1 1 100px;
}

.filter-options select, .filter-options input {
    height: 40px;
    max-width: 200px;
    padding: 5px 10px;
    flex: 1 1 150px;
    color: white;
    font-size: 14px;
    background-color: #0f577357;
    border: 1px solid #e7eef1;
    border-radius: 5px;
}
.filter-options select:hover {
    background-color: #0f4f689e;
}

#filter-button {
    background-color: #0F4F68;
    border: none;
    color: white;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
}

#filter-button:hover {
    background-color: #0f4f68c2;
}

#reset-button {
    background-color: #941b19;
    border: none;
    color: white;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
}

#reset-button:hover {
    background-color: #d32f2f;
}

.oeSearch-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.oeSearch-bar {
    flex: 1;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #e7eef1;
    border-radius: 5px;
    background-color: #666;
    color: white;
}

.oeSearch-bar-icon-container {
    display: flex;
    align-items: center;
}

.oeSearch-icon {
    width: 60px;
    height: 60px;
    cursor: pointer;
}

.warning {
    color: #cccccc;
    font-size: 12px;
    margin-top: 5px;
}

img[alt="Pobierz"] {
    width: 6ch;
}

.catalog-container-wrapper {
    width: 100%;

    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.catalog-container {
    width: 10%;
    padding: 10px;
    gap: 10px;
    height: 10vw;
    /*margin: 10px 25px 0 0;*/
    position: sticky;
    top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-self: flex-start;
    align-items: flex-start;
    background-color: #e7eef1;
    border-radius: 20px;
}

.catalog-download {
    max-width: 100px;
    height: 9vw;
    padding: 10px 10px;
    color: #121116;
    background-color: #e7eef1;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.advanced-toggle {
    padding: 8px;

    position: absolute;
    left: 50%;
    bottom: -20px;
    transform: translateX(-50%);

    color: white;

    background-color: #5f5457;
    transition: background-color 0.3s ease;
    border: none;
    border-radius: 0 0 10px 10px;

    cursor: pointer;
}

.advanced-filters {
    margin-top: 10px;
    padding: 15px;

    display: none;

    color: white;
    background-color: #444;
    border-radius: 5px;
}

.advanced-filters.visible {
    display: block;
}

.advanced-filter-options {
    width: 100%;
    padding-top: 10px;
    gap: 10px;

    display: none;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: minmax(40px, auto);
}

.advanced-filter-options.visible {
    display: grid;
}

.results-table {
    width: 100%;
    margin: 20px auto;
    padding-top: 20px;
}

.sort_button {
    margin: 5px;
    padding: 2px;
    background-color: #e7eef1;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sort_button:hover {
    background-color: #e7eef1;
    cursor: pointer;
    color: #0f4f68;
}

.sort_button:active  {
    background-color: #888888;

    cursor: pointer;
}

.sort_button.active {
    font-weight: bold;
    color: #007bff;
}


.table-header {
    display: flex;
    justify-content: space-around;
    padding-left: 12%;
    color: #0f4f68;
    font-weight: bold;
    background-color: #e7eef1;
    border-radius: 5px 5px 0 0;
}

.item-field, .item-field-full {
    margin-top: 0px;
    padding: 10px;
    color: #0a0a0c;
    background-color: #ffffff;
    border-radius: 5px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    height: auto;
    min-height: 100px;
    max-height: 7000px;

    overflow: hidden;
    white-space: nowrap;
}

.item-field:hover {
    background-color: #0f4f6833;
    cursor: pointer;
}

.item-field-full {
    flex-wrap: wrap;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 15px;
}

.item-field-full a:visited {
    color: gray;
}

.item-field, .item-field-full.visible {
    gap: 6.2%;
    display: flex;
    flex-direction: row;
    align-items: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.item-name {
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    margin-bottom: 5px;
    text-align: left;
    white-space: normal;
}


.item-name:last-child {
    margin-bottom: 0;
}


.item-field {
    margin-top: 5px;
    background-color: #ffffff;
}

.item-icon {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 15px;
    flex: 0 0 auto;
    max-width: 300px;
}

.item-photo {
    flex: 0 0 auto;
    max-width: 200px;
}

.item-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1 1 0;
    max-width: calc(100% - 310px);
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}


.item-image-3D {
    width: 200px;
    height: 200px;
}


.item-field div {
    flex: 1;
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-field-full {
    display: none;
}

.item-image {
    height: 80px;
    width: 80px;
}

.item-field img, .item-image {
    flex-shrink: 0;
    height: 80px;
    width: 80px;
    object-fit: cover;
}

.item-image-3D {
    height: 300px;
    width: 300px;
}

.pagination {
    gap: 8px;

    display: flex;
    justify-content: center;
    align-items: center;
}

.pagination a, .pagination span {
    min-height: 30px;
    min-width: 30px;
    padding: 5px;

    display: flex;
    justify-content: center;
    align-items: center;

    color: white;
    text-decoration: none;

    background-color: #2E2E32;
    border-radius: 5px;
}

.pagination .active {
    background-color: #515155;
}

.pagination span {
    color: white;
}

.pagination a:hover {
    background-color: #656569;
}


@media (max-width: 1000px) {
    .item-field, .item-field-full.visible {
        gap: 6.2%;
        display: flex;
        flex-direction: column;
        align-items: center;
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
    }
}


@media (max-width: 767px) {

    .blog {
        width: 99vw;
        padding: 5px;
        padding-bottom: 8px;
    }

    .pagination {
        margin-bottom: 8px;
    }

    .filter-options-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .filter-options {
        position: static;
        width: 100% !important;
        min-height: auto;
        margin-bottom: 10px;
    }

    .catalog-container {
        order: 2;
        width: 100% !important;
        margin-top: 10px;
        height: auto;
        padding: 10px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .catalog-download {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 10px;
        height: auto;
        width: auto;
        padding: 8px 12px;
    }

    .catalog-download img {
        max-width: 40px;
        height: auto;
    }

    .search-bar-container {
        width: 90vw;
        margin: 90px auto 20px;
    }

    .search-bar {
        font: normal normal normal 3.5vw / 4vw Overpass;
    }

    .results-table {
        margin: 20px auto 0px;
    }

    .item-field, .item-field-full.visible {
        gap: 6.2%;
        display: flex;
        flex-direction: column;
        align-items: center;
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
    }

    .item-details{
        max-width: 100%;
        margin-top: 10px;
    }

    .pagination a, .pagination span {
        min-height: 25px;
        min-width: 25px;
    }
}

@media (min-width: 768px) and (max-width: 1099px) {
    html, body {
        height: 100vw;
    }

    .search-bar-container {
        width: 90vw;
        margin: 90px auto 20px;
    }

    .search-bar {
        font: normal normal normal 2.5vw/3vw Overpass;
    }

    .blog {
        width: 95vw;
    }

    .catalog-download {
        height: 20vw;
    }

    .catalog-container {
        height: 24vw;
        width: 20%;
    }

    .filter-options {
        height: 24vw;
        width: calc(100% - 20% - 2vw);
    }

    .filter-options-wrapper {
        gap: 2vw;
    }

    .results-table {
        margin: 0px auto;
    }

    .item-field img, .item-image {
        height: 70px;
        width: 70px;
    }

    .pagination {
        margin-bottom: 8px;
        font-size: 2.2vw;
        gap: 1.5vw;
    }
}

@media (min-width: 1099px) and (max-width: 1314px) {
    .filter-options {
        min-height: 17vw;
    }

    .catalog-container {
        height: 17vw;
    }

    .catalog-download {
        height: 16vw;
    }
}

@media (min-width: 1315px) and (max-width: 1529px) {
    .filter-options {
        min-height: 10.5vw;
    }

    .catalog-container {
        height: 10.5vw;
    }

    .catalog-download {
        height: 9.5vw;
    }
}

@media (min-width: 1821px) {
    .filter-options {
        min-height: 6vw;
    }

    .catalog-container {
        height: 6vw;
    }

    .catalog-download {
        height: 5vw;
    }
}

@media screen and (min-width: 1100px) {
    .wrapper__logo--img {
        width: 8vw;
        position: relative;
        left: -36pt;
        top: 6pt;
    }
}
/*@media (min-width: 992px) {*/

/*}*/