/* Custom CSS */
body {
    overflow-y: scroll;
}

/* Links & Buttons */
a {
    color: #0274be;
    text-decoration: none!important;
}

a:focus,
button:focus,
.wp-block-search__button:focus {
    outline: none;
}

/* Listen-Elemente */
.wp-block-list,
.wp-block-pages-list__item,
.wp-block-categories-list {
    list-style-position: inside;
}

/* Header */
.site-header-section>* {
    padding: 0 0 0 20px;
}

/* Transparenter Header */
.ast-theme-transparent-header #masthead {
    position: unset;
}

/* Suchbutton */
form[CLASS*="wp-block-search__"].wp-block-search .wp-block-search__inside-wrapper .wp-block-search__button:hover {
    background-color: #025790;
}

.wp-block-search.wp-block-search__button-only .wp-block-search__input:focus {
    outline: none;
    box-shadow: none;
}

@media (max-width: 992px) {
    .widget.widget_block.widget_search {
        margin: 10px 20px;
    }
}

/* Menü */
/* Sprachwechsler nur auf der Startseite ausblenden */
body.page-id-5252 .wpml-ls-slot-21,
body.page-id-5975 .wpml-ls-slot-21 {
    display: none !important;
}

/* Benutzerdefinierter Sprachwechsler - Startseite */
li.language-switcher a {
    padding: 0 1em;
}

li.language-switcher a img {
    vertical-align: baseline;
}

/* Breadcrumbs ausblenden */
.woocommerce .woocommerce-breadcrumb {
    display: none;
}

/* Produkte - Seitenleiste - Filter */
#block-20 {
    display: none;
}

.woocommerce-ordering select.orderby:focus {
    border-style: none;
}

/* Print-Icon */
.woocommerce-js .woocommerce-result-count {
    margin-top: 0.5em;
}

.woocommerce .woocommerce-ordering {
    margin-bottom: 2em;
}

.woocommerce-products-header {
    display: block;
    justify-content: space-between;
}

.page-title {
    margin-bottom: 0.5em;
}

.woocommerce-pdf-catalog.link-wrapper .woocommerce_pdf_catalog_button,
a.woocommerce-pdf-catalog-button.woocommerce_pdf_catalog_button {
    margin: 0 0.5em 1em 0;
    text-align: center;
}

a.woocommerce-LoopProduct-link.woocommerce-loop-product__link {
    width: 200px;
    height: 200px;
    display: flex !important;
    justify-content: center;
    align-items: center;
}

.related.products a.woocommerce-LoopProduct-link.woocommerce-loop-product__link,
.products a.woocommerce-LoopProduct-link.woocommerce-loop-product__link {
    width: auto;
    height: 200px;
}


@media (max-width: 992px) {
    a.woocommerce-LoopProduct-link.woocommerce-loop-product__link {
        width: auto;
        height: 250px;
    }
}

img.attachment-woocommerce_thumbnail.size-woocommerce_thumbnail {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Badges */
.custom-sale-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: red;
    color: white;
    padding: 5px 10px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 20px;
    z-index: 10;
}

.new-product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #0274BE;
    color: white;
    padding: 5px 10px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 20px;
    z-index: 10;
}

.promo-product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #091E4F;
    color: white;
    padding: 5px 10px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 20px;
    z-index: 10;
}

.k-product-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: #424242;
    color: white;
    padding: 5px 10px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 20px;
    z-index: 10;
}

.b-product-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: #424242;
    color: white;
    padding: 5px 10px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 20px;
    z-index: 10;
}

/* Badges Produktdetail */
.woocommerce-product-title {
    display: flex;
    align-items: center;
}

.custom-badges-wrapper {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.custom-badge {
    display: inline-block;
    background: #424242;
    color: white;
    font-size: 14px;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.custom-badge.sale { background: red; }
.custom-badge.new { background: #0274BE; }
.custom-badge.promo { background: #091E4F; }
.custom-badge.b { background: #424242; }
.custom-badge.k { background: #424242; }

/* Produktvorschau */
.astra-shop-thumbnail-wrap {
    margin-bottom: .8em;
}

@media (max-width: 921px) {
    .ast-left-sidebar #content > .ast-container {
        flex-direction: column;
    }

    #secondary.secondary {
        padding: 1.5em 0 0 0;
    }
}

h2.woocommerce-loop-product__title:hover {
    text-decoration: underline;
}

.articel-unit-field,
.articel-number-field {
    margin-bottom: .5em!important;
}

/* Suchergebnisse - Produkt */
@media (max-width: 991px) {
    .ast-blog-layout-4-grid .ast-article-post {
        width: 50%;
    }
}

@media (max-width: 767px) {
    .ast-blog-layout-4-grid .ast-article-post {
        width: 100%;
    }
}

.search article.product {
    text-align: center;
}

.ast-separate-container .ast-article-inner {
    background-color: #fff;
}

.ast-no-thumb .ast-blog-featured-section {
    margin-bottom: 1.5em;
}

.ast-no-thumb .ast-blog-featured-section img {
    width: 330px;
    height: 300px;
    object-fit: contain;
}

.ast-blog-featured-section img {
    width: 330px;
    height: 300px;
    object-fit: contain;
}

.archive .entry-title, .blog .entry-title, .search .entry-title {
    margin-bottom: 0.2em;
}

/* Badges - Suchergebnisse */
.product-badge {
    position: absolute;
    color: white;
    padding: 5px 10px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 20px;
    white-space: nowrap;
}

/* Individuelle Positionen der Badges */
.product-badge.top-angebote {
    top: 240px;
    right: 0;
    background: red;
}

.product-badge.neue-produkte {
    top: 25px;
    left: 0;
    background: #0274BE;
}

.product-badge.promo {
    top: 25px;
    right: 0;
    background: #091E4F;
}

.product-badge.k {
    top: 240px;
    left: 0;
    background: #424242;
}

.product-badge.b {
    top: 240px;
    left: 0;
    background: #424242;
}

/* Produktdetail */
.woocommerce-product-details__short-description p {
    margin-bottom: 1em;
}

.custom-lagerbestand {
    font-size: .9em;
}

.woocommerce-product-gallery__image img {
    max-height: 600px;
    width: 600px;
    object-fit: contain;
}

/* Suchergebnisse */
.ast-blog-layout-4-grid .ast-article-inner .wp-post-image {
    height: 300px;
    object-fit: cover;
}

.search .entry-header {
    display: none;
}

.entry-title a {
    color: #3a3a3a;
    font-size: 0.75em;
}

.entry-title a:hover {
    text-decoration: underline!important;
}

.post-content>.read-more {
    display: none;
}

/* Quick View */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.modal-content {
    display: flex;
    flex-wrap: wrap;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    max-width: 600px;
    flex-direction: unset!important;
    transform: scale(0.8);
    transition: transform 0.3s ease-in-out;
}

/* Klasse für die sichtbare Animation */
.modal.show {
    opacity: 1;
}

.modal.show .modal-content {
    transform: scale(1);
}

#productImage {
    width: 100%;
    height: 300px;
    object-fit: contain;
    margin-bottom: 20px;
}

.close {
    width: 20px;
    height: 20px;
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
}

.close::before,
.close::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: #333;
    top: 50%;
    left: 0;
    transform: translateY(-50%) rotate(45deg);
}

.close::after {
    transform: translateY(-50%) rotate(-45deg);
}

.openModal {
    font-size: 20px;
    cursor: pointer;
    transition: color 0.3s;
}

.openModal:hover {
    color: #0274be;
}

/* Complianz - Cookie Policy */
#cmplz-document {
    max-width: unset;
}

/* Logos - Hover */
.spectra-image-gallery__media-wrapper {
    cursor: unset!important;
}

/* Custom Product-Filter */
div#block-67,
div#block-67 p {
    margin-bottom: 0;
}

/* Verstecke alle untergeordneten Kategorien anfangs */
.children {
    display: none;
    padding-left: 20px; /* Abstand für untergeordnete Kategorien */
}

/* Pfeil-Stil */
.toggle-arrow {
    margin-left: 10px;
    cursor: pointer;
}

/* Stil für die aktive Kategorie */
.cat-item > a.active {
    font-weight: bold;
}

/* Unterstreiche die aktuelle Seite */
.cat-item a.current-page {
    text-decoration: underline;
    font-weight: bold;
}

/* Sidebar */
@media (min-width: 993px) {
    .ast-left-sidebar #secondary {
        padding-right: 50px;
    }
}