/*
 Theme Name:   Sundwiger Muehle
 Theme URI:    https://sundwigermuehle.de
 Description:  Child-Theme fuer Astra — Sundwiger Muehle Anpassungen
 Author:       Johannes Alberts
 Template:     astra
 Version:      1.0.0
*/

/* ── Logo: nicht zu groß ── */
.site-branding .custom-logo {
    max-height: 80px;
    width: auto;
}
.ast-site-identity {
    padding: 8px 0;
}

/* ── Startseite: Seitentitel "Startseite" ausblenden ── */
body.home .entry-title,
body.page-id-2601 .entry-title {
    display: none;
}

/* ── Buttons: Mühlengrün statt WordPress-Blau ── */
.wp-block-button__link,
.wp-element-button {
    background-color: #4A6741 !important;
    border-radius: 6px !important;
    border: none !important;
    color: #fff !important;
    padding: 12px 28px !important;
    font-weight: 500;
    letter-spacing: 0.03em;
    transition: background-color 0.2s ease;
}

.wp-block-button__link:hover,
.wp-element-button:hover {
    background-color: #3a5233 !important;
    color: #fff !important;
}

/* ── Dropdown-Menü: Kategorien unter Online-Shop ── */
.main-header-menu .menu-item .sub-menu {
    background: #faf8f4;
    border: none;
    border-top: 3px solid #4A6741;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 8px 0;
    min-width: 220px;
    border-radius: 0 0 6px 6px;
}

.main-header-menu .menu-item .sub-menu li {
    border-bottom: 1px solid rgba(74,103,65,0.08);
}

.main-header-menu .menu-item .sub-menu li:last-child {
    border-bottom: none;
}

.main-header-menu .menu-item .sub-menu a {
    color: #3a3a3a;
    font-size: 14px;
    padding: 10px 20px;
    transition: all 0.2s ease;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.main-header-menu .menu-item .sub-menu a:hover {
    background: #4A6741;
    color: #fff;
    padding-left: 24px;
}

/* ── Hauptmenü ── */
.main-header-menu > .menu-item > a {
    font-weight: 500;
    letter-spacing: 0.03em;
}

.main-header-menu > .menu-item.menu-item-has-children > a::after {
    content: ' \25be';
    font-size: 10px;
    opacity: 0.6;
}

/* ── Startseite: Cover-Bilder hell ── */
.wp-block-cover .wp-block-cover__background,
.wp-block-cover .has-background-dim {
    opacity: 0.08 !important;
}

.wp-block-cover .wp-block-cover__inner-container {
    text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}

/* ── Mobile ── */
@media (max-width: 768px) {
    .wp-block-cover {
        min-height: 300px !important;
    }
    .wp-block-cover .wp-block-cover__inner-container h1,
    .wp-block-cover .wp-block-cover__inner-container h2 {
        font-size: 28px !important;
    }
    .wp-block-cover .wp-block-cover__inner-container p {
        font-size: 16px !important;
    }
}

/* ── Layoutkorrekturen ── */
.wp-block-media-text__content > *:last-child {
    margin-bottom: 0 !important;
}

/* ── Produktbilder: nie stauchen ── */
.astra-shop-thumbnail-wrap img,
.woocommerce-product-gallery img,
.woocommerce ul.products li.product img,
.search-results .product img {
    object-fit: contain !important;
    width: 100%;
    height: auto !important;
    aspect-ratio: 1 / 1;
}

/* ── Suchergebnisse: Grid ── */
.woocommerce-page.search-results ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* ── Einzelprodukt: Bild nicht verzerren ── */
.woocommerce div.product div.images img {
    object-fit: contain;
    max-height: 500px;
    width: auto;
    margin: 0 auto;
}
