.magento-products-container {
    display: grid;
    grid-auto-rows: 1fr;
    grid-template-columns: 1fr 1fr 1fr;
}

.magento-products-container.magento-products-1-cols {
    grid-template-columns: 1fr;
}

.magento-products-container.magento-products-2-cols {
    grid-template-columns: 1fr 1fr;
}

.magento-products-container.magento-products-4-cols {
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

@media screen and (min-width: 768px) and (max-width: 1024px) {
    .magento-products-container.magento-products-4-cols {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media screen and (min-width: 426px) and (max-width: 767px) {
    .magento-products-container,
    .magento-products-container.magento-products-4-cols {
        grid-template-columns: 1fr 1fr;
    }
}

@media screen and (max-width: 425px) {
    .magento-products-container,
    .magento-products-container.magento-products-2-cols,
    .magento-products-container.magento-products-4-cols {
        grid-template-columns: 1fr;
    }
}

.magento-products-container .magento-product-wrapper {
    margin-bottom: 0px !important;
    padding: 10px 15px 20px;
    box-sizing: border-box;
}

.product-item .product-image-photo {
    max-width: 85%;
    object-fit: contain;
    object-position: center;
    height: 100%;
}

.product-item-info {
    height: 100%;
    display: flex;
    flex-direction: column;
    line-height: normal;
    letter-spacing: normal;
    vertical-align: top;
    box-shadow: 0 0 12px 0 rgb(0 0 0 / 10%);
    transition: box-shadow .25s ease;
    align-items: stretch;
}

.product-item-info:hover {
    box-shadow: 0 0 12px 0 rgba(0,0,0,0.5)
}

.product-item-photo {
    position: relative;
}

.product-image-wrapper {
    display: block;
    height: 0;
    overflow: hidden;
    position: relative;
    z-index: 1;
    padding-bottom: 100%;
}

.product-item .product-image-photo {
    max-width: 85%;
    object-fit: contain;
    object-position: center;
    margin: auto;

    bottom: 0;
    display: block;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
}

.product-item-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px 15px 15px;
    height: 100%;
}

.product-item-details .custom-text-special-product {
    margin-top: auto;
}

.product-item-actions .actions-primary > .stock {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.33;
    padding-left: 13px;
    position: relative;
}

.product-item-actions .actions-primary>.stock:before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 0;
    background-color: #409c63;
}

.product-item-actions .actions-primary>.stock.unavailable {
    line-height: unset !important;
    padding-top: 0px !important;
    padding-right: 0px !important;
    padding-bottom: 0px !important
}

.product-item-actions .actions-primary>.stock.unavailable:before {
    background-color: #ff003d
}

.product-item .custom-attributes-holder {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: 12px;
    line-height: 1.33;
}

.product-item .price-box {
    margin: 15px 0 0;
    font-size: 16px;
}

.price-box.price-final_price {
    display: flex;
    flex-direction: column;
}

.product-item .price-box .price {
    white-space: nowrap;
    font-weight: normal !important;
    line-height: 1.5;
    display: flex;
    justify-content: center;
    align-items: baseline;
}

.product-item .price-box .price-wrapper {
    display: inline-block;
}

.product-item .price-box .price-label {
    text-transform: lowercase;
}

.badges-holder {
    position: absolute;
    pointer-events: none;
    width: 100%;
    overflow: hidden;
    top: 17px;
    left: 0;
    padding: 0 13px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-flow: row wrap;
    -webkit-flex-direction: row;
    -ms-flex-direction: row;
    -ms-flex-wrap: wrap;
    flex-direction: row;
    align-items: center;
    z-index: 10;
    box-sizing: border-box;
    margin: 0 -2.5px;
    max-width: 89%;
    container-type: inline-size;
    container-name: badges;
}

.badges-holder .badge {
    -webkit-border-radius: 2px;
    -moz-border-radius: 2px;
    width: auto;
    text-align: center;
    border: 1px solid transparent;
    box-sizing: border-box;
    border-radius: 20px;
    line-height: 1.67;
    font-size: 12px;
    color: white;
    background-color: #000;
    margin: 0 2.5px 5px !important;
    font-weight: lighter;
    display: flex;
    justify-content: center;
    align-items: center;
}

.badges-holder .badge > span {
    padding: 0 10px;
}


.badges-holder .badge+.badge {
    margin-top: 0
}

.badges-holder .badge.badge-custom-attr_pg_nachhaltig {
    background-color: var(--magento-nachhaltig-badge-color);
}

.badges-holder .badge.badge-custom-attr_pg_ressourcenschonend {
    background-color: var(--magento-ressourcenschonend-badge-color);
}

.badges-holder .badge.badge-custom-attr_pg_neu {
    background-color: var(--magento-neu-badge-color);
}

.badges-holder .badge-custom-attr_pg_nachhaltig::after {
    content: url('../images/badges/nachhaltig.svg');
    height: 20px
}

.badges-holder .badge-custom-attr_pg_ressourcenschonend::after {
    content: url('../images/badges/ressourcenschonend.svg');
    height: 20px
}

.badges-holder .badge-custom-attr_pg_nachhaltig > span,
.badges-holder .badge-custom-attr_pg_ressourcenschonend > span {
    padding-right: 0;
}


.product-image-container {
    position: relative
}

.product-item-details .product-item-name {
    margin-bottom: 22px;
    min-height: 55px;
}

.product-item-details .product-item-link {
    font-size: 16px;
    line-height: 20px;
    font-weight: bold;
    text-decoration: none;
    display: block;
    color: #242424;
    font-weight: 400;
}

.product-item-details .product-item-link.special-link {
    color: var(--magento-link-color);
    opacity: 1;
    transition: opacity ease 0.3s;
    margin-top: 20px;
    text-align: center;
}

.product-item-details .product-item-link.special-link:hover {
    opacity: 0.75;
}

.product-item-details .custom-text-special-product {
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    /* letter-spacing: 0.5px; */
}

@media screen and (max-width: 479px) {
    .badges-holder .badge-custom-attr_pg_nachhaltig > span,
    .badges-holder .badge-custom-attr_pg_ressourcenschonend > span {
        display: none;
    }
}

html:lang(ch-fr) .badges-holder .badge-custom-attr_pg_ressourcenschonend > span {
    display: none;
}

@container badges (max-width: 170px) {
    .badges-holder .badge-custom-attr_pg_ressourcenschonend > span {
        display: none;
    }
}

.cartonfinder-widget-form {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
}

.cartonfinder-row {
    margin-bottom: 15px;
    display: flex;
    flex-direction: row;
    width: 100%;
    align-items: center;
    justify-content: space-between;
}

.cartonfinder-widget-form input[type="number"] {
    width: 80px;
    text-align: center;
    color: #000;
    -moz-appearance: textfield;
    border-width: 1px;
}

.cartonfinder-widget-form input::-webkit-outer-spin-button,
.cartonfinder-widget-form input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cartonfinder-widget-form input::placeholder {
    color: #000;
    opacity: 1;
}

.cartonfinder-widget-form input::-ms-input-placeholder {
    color: #000;
    opacity: 1;
}

.cartonfinder-widget-form button {
    align-self: center;
    padding-left: 25px;
    padding-right: 25px;
}

.cartonfinder-widget-form label {
    font-weight: normal;
}

.cartonfinder-widget-form label > span {
    opacity: 0.6;
}