/*
Theme Name: Storefront Child
Theme URI: https://woo.com/products/storefront/
Template: storefront
Author: Automattic
Version: 4.5.4.1710070744
*/

/* Sticky-Menü */
#masthead {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 999;
    transition: background-color 0.3s ease;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px; /* Höhe des Headers */
}

/* Abstand zwischen Header und Content */
body {
    padding-top: 100px; /* Abstand entsprechend der Höhe des Headers + etwas zusätzlichen Puffer */
}

#masthead.sticky {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Optimiertes Logo-Styling */
#masthead .custom-logo-link img {
    max-height: 80px;
    width: auto;
    height: auto;
    max-width: 200px;
    object-fit: contain;
}

/* Hauptmenü-Styling */
@media screen and (min-width: 768px) {
    #masthead .main-navigation {
        flex-grow: 1;
        text-align: center;
    }

    #masthead .main-navigation ul.menu {
        display: inline-block;
        padding: 0;
        margin: 0;
    }

    #masthead .main-navigation ul.menu > li {
        display: inline-block;
        margin: 0 15px;
    }

    #masthead .main-navigation ul.menu > li > a {
        padding: 10px 15px;
        text-decoration: none;
        color: #333;
        transition: color 0.3s ease;
    }

    #masthead .site-header-cart {
        position: absolute;
        top: 10px;
        right: 20px;
    }
}

/* Versteckt alle H1-Tags auf Seiten und Beiträgen */
h1 {
    display: none !important;
}

/* Beitragsbilder und Seitentitel ausblenden */
.entry-header .post-thumbnail,
.page .post-thumbnail,
.single .post-thumbnail {
    display: none !important;
}

/* Produktbilder anzeigen */
.wp-post-image {
    display: block !important;
    visibility: visible !important;
}

/* Entfernt Aufzählungszeichen im Footer-Menü */
.footer-widgets .widget_nav_menu .menu {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.footer-widgets .widget_nav_menu .menu li::before {
    content: none;
}

/* Zentrierung der Footer-Widgets */
.footer-widgets {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 20px 0;
}

.footer-widgets .block {
    width: auto;
    text-align: center;
}

/* Maximalbreite des Footer-Bereichs */
.site-footer .col-full {
    max-width: 1200px;
    margin: 0 auto;
}

/* Flex-Viewport-Höhe für Produktgalerie */
.flex-viewport {
    height: auto !important;
}

/* Entfernt den Abstand zwischen zwei Blöcken */
.wp-block-spacer {
    height: 0 !important;
}

/* Entfernt Padding und Margin bei vollbreiten Blöcken */
.wp-block-group.alignfull,
.wp-block-cover.alignfull {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Entfernt die dynamische Höhe des wp-block-spacer */
.wp-block-spacer {
    height: 0 !important;
}

/* Optional: Entfernt auch Margin und Padding */
.wp-block-spacer {
    margin: 0 !important;
    padding: 0 !important;
}

/* Entfernt die Trennlinie zwischen Menüüberschrift und Menü */
.footer-widgets .widget_nav_menu .widget-title {
    border-bottom: none;
}

/* Google-Karte im mobilen Modus sichtbar */
.footer-widget-3 iframe {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Responsive Design: Widgets untereinander anordnen */
@media screen and (max-width: 768px) {
    .footer-widgets {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .footer-widgets .block {
        width: 100%;
        text-align: center;
    }

    .footer-widget-3 iframe {
        width: 100%;
        max-width: 300px;
        height: 200px;
    }
}

/* Stückpreis Anzeige kleiner anzeigen */
.price-unit {
    font-size: 0.8em !important;
}

/* Mehr Produkte auf einer Kategorieseite */
.products.columns-3 {
    grid-template-columns: repeat(4, 1fr); /* 4 Produkte pro Reihe */
}
.products li.product {
    width: 100%; /* Passe die Breite an */
}
