/* =========================================================
 * MKC PRODUKTDARSTELLUNG
 * Zentral im Plugin seit Version 0.6.6.7.
 * Der frühere komplette Divi-/Seiten-CSS-Block kann entfernt werden.
 * ========================================================= */

/* =========================================================
 * GRUNDLAYOUT
 * ========================================================= */

.et-db #et-boc .et-l .et_pb_post_content .et_pb_section {
    padding: 0;
}

.et-db #et-boc .et-l .et_pb_post_content .et_pb_section .et_pb_row {
    width: 100%;
}

/* =========================================================
 * IN-DEN-WARENKORB
 * ========================================================= */

.dfw-6-add-to-cart.et_pb_wc_add_to_cart .in-stock {
    margin-bottom: 10px;
}

.dfw-6-add-to-cart.et_pb_wc_add_to_cart
.woocommerce-variation-price .price {
    display: block;
    margin-bottom: 10px;
    color: #000000;
    font-size: 20px;
}

.dfw-6-add-to-cart.et_pb_wc_add_to_cart
.woocommerce-variation-price .price bdi {
    font-weight: 500;
}

.dfw-6-add-to-cart.et_pb_wc_add_to_cart
form.cart .variations td.value span::after {
    margin-top: -8px;
}

.woocommerce div.product
.dfw-6-add-to-cart form.cart .variations {
    margin-bottom: 0;
}

.woocommerce div.product
.dfw-6-add-to-cart form.cart .variations tr td:first-child {
    padding-top: 15px !important;
}

/* =========================================================
 * KURZBESCHREIBUNG
 * ========================================================= */

.dfw-6-short-description ul {
    margin: 15px 0 0 15px;
    font-weight: 600;
}

.dfw-6-short-description ul li {
    padding-left: 8px;
}

/* =========================================================
 * DIVI-BUTTON-SYMBOL
 * ========================================================= */

body #page-container
.et_pb_section
.dfw-6-cart-notice.et_pb_wc_cart_notice_0_tb_body
.wc-forward::after {
    content: attr(data-icon) !important;
}

/* =========================================================
 * ÄHNLICHE PRODUKTE
 * ========================================================= */

.dfw-6-related-products .related h2 {
    margin-bottom: 10px;
}

.dfw-6-related-products .woocommerce-loop-product__title {
    display: inline-block;
    width: 50% !important;
}

.et-db #et-boc .et-l
.dfw-6-related-products .products .star-rating {
    display: inline-block;
    float: right;
    height: 1em;
    margin-top: 6px !important;
}

/* =========================================================
 * BEWERTUNGEN
 * ========================================================= */

.dfw-6-reviews .comment-form-cookies-consent label,
.dfw-6-reviews .comment-notes {
    font-family: "Jost", Helvetica, Arial, Lucida, sans-serif;
}

.woocommerce
.dfw-6-reviews
#reviews
#comments
ol.commentlist li {
    padding-bottom: 10px;
    box-shadow: 0 2px 18px 0 rgb(0 0 0 / 10%);
}

.woocommerce
.dfw-6-reviews
#reviews
#comments
ol.commentlist li img.avatar {
    position: relative;
    float: none;
    margin: 20px 0 0 20px;
}

.woocommerce
.dfw-6-reviews
#reviews
#comments
ol.commentlist li .comment-text {
    display: flex;
    flex-wrap: wrap;
    margin: 0 0 0 70px !important;
}

.woocommerce
.dfw-6-reviews
#reviews
.commentlist .star-rating {
    order: 2;
    height: 1em;
    margin: -55px 0 36px 50px !important;
}

.woocommerce
.dfw-6-reviews
#reviews
.commentlist .description {
    order: 3;
    width: calc(100% + 30px) !important;
    margin-top: 10px;
    margin-left: -50px !important;
}

.woocommerce
.dfw-6-reviews
#reviews
#comments
ol.commentlist li .comment-text p.meta {
    width: 100%;
    margin: -85px 50px 0 !important;
    line-height: 1.3em;
}

.dfw-6-reviews .comment-form {
    display: flex;
    flex-wrap: wrap;
}

.dfw-6-reviews .comment-form .comment-notes {
    order: 1;
    width: 100%;
}

.dfw-6-reviews .comment-form .comment-form-author {
    order: 2;
    width: 48%;
    margin-right: 3% !important;
}

.dfw-6-reviews
.comment-form
.comment-form-author input[type="text"],
.dfw-6-reviews
.comment-form
.comment-form-email input[type="email"] {
    width: 100% !important;
}

.dfw-6-reviews .comment-form .comment-form-email {
    order: 3;
    width: 48.5%;
}

.dfw-6-reviews .comment-form .comment-form-rating {
    order: 4;
    width: 100%;
}

.dfw-6-reviews .comment-form .comment-form-comment {
    order: 5;
    width: 100%;
}

.dfw-6-reviews .comment-form .comment-form-cookies-consent {
    order: 6;
}

.dfw-6-reviews .comment-form .form-submit {
    order: 7;
    width: 100%;
}

/* =========================================================
 * EINZELPRODUKT – ALLGEMEINE ZEILEN
 * ========================================================= */

body.single-product .et-l--body .et_pb_row,
body.single-product .et_pb_post_content .et_pb_row {
    width: 94% !important;
    max-width: 1500px !important;
    margin-right: auto !important;
    margin-left: auto !important;
}

/* =========================================================
 * PRODUKT-HAUPTBEREICH UND PRODUKTREGISTERKARTEN
 * ========================================================= */

@media screen and (min-width: 981px) {
    body.single-product .et-l--body .et_pb_row:has(.dfw-6-woo-image),
    body.single-product .et_pb_post_content .et_pb_row:has(.dfw-6-woo-image),
    body.single-product .et-l--body .et_pb_row:has(.et_pb_wc_tabs),
    body.single-product .et_pb_post_content .et_pb_row:has(.et_pb_wc_tabs),
    body.single-product .et-l--body .et_pb_row:has(.woocommerce-tabs),
    body.single-product .et_pb_post_content .et_pb_row:has(.woocommerce-tabs) {
        width: 97% !important;
        max-width: 1600px !important;
        margin-right: auto !important;
        margin-left: auto !important;
    }
}

/* =========================================================
 * WARENKORB-BESTÄTIGUNG
 * ========================================================= */

body.single-product .dfw-6-cart-notice {
    width: calc(100% - 24px) !important;
    max-width: none !important;
    margin-right: 24px !important;
    margin-left: 0 !important;
}

body.single-product
.dfw-6-cart-notice
.woocommerce-message {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 0 20px !important;
    padding: 18px 25px !important;
    color: #ffffff;
    text-align: center !important;
    line-height: 1.5 !important;
}

body.single-product
.dfw-6-cart-notice
.woocommerce-message
.wc-forward {
    position: static !important;
    float: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 240px !important;
    margin: 14px auto 0 !important;
    padding: 12px 28px !important;
    text-align: center !important;
}

body.single-product
.dfw-6-cart-notice
.woocommerce-message::before {
    position: static !important;
    margin: 0 0 8px !important;
}

/* Zwei MKC-Aktionen unter derselben Erfolgsmeldung. */
body.single-product
.woocommerce-message
.mkc-add-to-cart-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
    width: calc(100% + 10px) !important;
    margin: 14px -5px 0 !important;
}

body.single-product
.dfw-6-cart-notice
.woocommerce-message
.mkc-add-to-cart-actions > .button {
    position: static !important;
    float: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    width: auto !important;
    min-width: 220px !important;
    margin: 0 !important;
    padding: 12px 28px !important;
    text-align: center !important;
}

body.single-product
.woocommerce-message
.mkc-add-to-cart-message-text {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
}

/* =========================================================
 * PRODUKTBILDER UND GALERIE – DESKTOP
 *
 * Die Produktgalerie wird vollständig vom Plugin geführt.
 * Hauptbild proportional, Thumbnails links mit halbiertem Abstand.
 * Zu viele Thumbnails bleiben innerhalb der Galerie scrollbar.
 * ========================================================= */

@media screen and (min-width: 981px) {
    body.single-product .et_pb_row:has(.dfw-6-woo-image),
    body.single-product .et_pb_row:has(.dfw-6-woo-image) .et_pb_column,
    body.single-product .dfw-6-woo-image,
    body.single-product .dfw-6-woo-image .et_pb_module_inner {
        overflow: visible !important;
    }

    body.single-product .dfw-6-woo-image {
        transform: none !important;
        margin-top: 8px !important;
        margin-bottom: 8px !important;
    }

    body.single-product
    .dfw-6-woo-image
    .woocommerce-product-gallery {
        position: relative !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
        overflow: visible !important;
    }

    body.single-product
    .dfw-6-woo-image
    .woocommerce-product-gallery__image > a {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    body.single-product
    .dfw-6-woo-image
    .woocommerce-product-gallery__image > a > img {
        display: block !important;
        width: auto !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: 700px !important;
        margin: 0 auto !important;
        object-fit: contain !important;
        object-position: center center !important;
    }

    body.single-product
    .dfw-6-woo-image
    .flex-control-thumbs {
        position: absolute !important;
        top: 9px !important;
        left: -110px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        width: 100px !important;
        margin: 0 !important;
        padding: 0 2px 0 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        overscroll-behavior: contain;
        scrollbar-width: none;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 20 !important;
        list-style: none !important;
    }

    body.single-product
    .dfw-6-woo-image
    .flex-control-thumbs::-webkit-scrollbar {
        width: 0;
        height: 0;
        display: none;
    }

    body.single-product
    .dfw-6-woo-image
    .flex-control-thumbs li {
        display: block !important;
        float: none !important;
        flex: 0 0 auto !important;
        width: 100% !important;
        margin: 0 0 10px !important;
        padding: 0 !important;
    }

    body.single-product
    .dfw-6-woo-image
    .flex-control-thumbs li:last-child {
        margin-bottom: 0 !important;
    }

    body.single-product
    .dfw-6-woo-image
    .flex-control-thumbs li img {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
        border: 2px solid transparent !important;
        cursor: pointer !important;
        opacity: 0.7 !important;
        transition: opacity 0.2s ease, border-color 0.2s ease !important;
        object-fit: contain !important;
        object-position: center center !important;
    }

    body.single-product
    .dfw-6-woo-image
    .flex-control-thumbs li img:hover,
    body.single-product
    .dfw-6-woo-image
    .flex-control-thumbs li img.flex-active {
        border-color: #c50000 !important;
        opacity: 1 !important;
    }
}

/* =========================================================
 * EINHEITLICHER BILDRAHMEN IN PRODUKTLISTEN
 * ========================================================= */

body.woocommerce ul.products li.product a img,
body.woocommerce-page ul.products li.product a img,
body .et_pb_shop ul.products li.product a img,
body .dfw-6-related-products ul.products li.product a img {
    object-fit: contain !important;
    object-position: center center !important;
}

body.woocommerce ul.products li.product .et_shop_image,
body.woocommerce-page ul.products li.product .et_shop_image,
body .et_pb_shop ul.products li.product .et_shop_image,
body .dfw-6-related-products ul.products li.product .et_shop_image {
    overflow: hidden !important;
}

/* =========================================================
 * TABLET
 * ========================================================= */

@media screen and (min-width: 768px) and (max-width: 980px) {
    body.single-product .et-l--body .et_pb_row,
    body.single-product .et_pb_post_content .et_pb_row {
        width: 94% !important;
    }

    body.single-product .dfw-6-cart-notice {
        width: calc(100% - 18px) !important;
        margin-right: 18px !important;
    }
}

/* =========================================================
 * MOBILE ANSICHT
 * ========================================================= */

@media screen and (max-width: 767px) {
    .et_pb_wc_related_products
    .dfw-6-related-products
    ul.products.columns-4 li.product {
        width: 100% !important;
        margin-right: 0 !important;
    }

    .woocommerce
    .dfw-6-reviews
    #reviews
    .commentlist
    .star-rating {
        margin: -25px 0 10px 50px !important;
    }

    .dfw-6-reviews .comment-form .comment-form-author,
    .dfw-6-reviews .comment-form .comment-form-email {
        width: 100%;
    }

    body.single-product .et-l--body .et_pb_row,
    body.single-product .et_pb_post_content .et_pb_row {
        width: 94% !important;
    }

    body.single-product .dfw-6-cart-notice {
        width: 100% !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
    }

    body.single-product
    .dfw-6-cart-notice
    .woocommerce-message {
        padding: 16px 15px !important;
    }

    body.single-product
    .dfw-6-cart-notice
    .woocommerce-message
    .wc-forward {
        width: 100% !important;
        min-width: 0 !important;
    }

    body.single-product
    .woocommerce-message
    .mkc-add-to-cart-actions {
        width: 100% !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
    }
}

@media screen and (max-width: 560px) {
    body.single-product
    .woocommerce-message
    .mkc-add-to-cart-actions {
        flex-direction: column !important;
    }

    body.single-product
    .dfw-6-cart-notice
    .woocommerce-message
    .mkc-add-to-cart-actions > .button {
        width: 100% !important;
        min-width: 0 !important;
    }
}

/* =========================================================
 * PRODUKTSEITE – „IN DEN WARENKORB“ NACH MKC-STANDARD
 * ========================================================= */

body.single-product form.cart .single_add_to_cart_button,
body.single-product form.cart button.single_add_to_cart_button {
    box-sizing: border-box !important;
    min-height: 46px !important;
    margin: 0 !important;
    padding: 11px 20px !important;
    border: 1px solid #c50000 !important;
    border-radius: 15px !important;
    background-color: #c50000 !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    letter-spacing: 0.03em !important;
    text-transform: uppercase !important;
    box-shadow: none !important;
    transform: none !important;
    transition: background-color 0.2s ease, border-color 0.2s ease !important;
}

body.single-product form.cart .single_add_to_cart_button:hover,
body.single-product form.cart .single_add_to_cart_button:focus,
body.single-product form.cart button.single_add_to_cart_button:hover,
body.single-product form.cart button.single_add_to_cart_button:focus {
    background-color: #e06660 !important;
    color: #ffffff !important;
    border-color: #e06660 !important;
    box-shadow: none !important;
    transform: none !important;
}

body.single-product form.cart .single_add_to_cart_button::after,
body.single-product form.cart button.single_add_to_cart_button::after {
    display: none !important;
    content: none !important;
}


/* 0.6.8.8 – einheitliche Warenkorb-Bestätigung im Standard- und GKV-Shop. */
body.single-product .dfw-6-cart-notice .woocommerce-message .mkc-add-to-cart-actions > .button,
body.single-product .woocommerce-message .mkc-add-to-cart-actions > .button {
    box-sizing: border-box !important;
    border-radius: 24px !important;
    background: #fff !important;
    transition: background-color .18s ease !important;
}

body.single-product .dfw-6-cart-notice .woocommerce-message .mkc-add-to-cart-actions > .button:hover,
body.single-product .dfw-6-cart-notice .woocommerce-message .mkc-add-to-cart-actions > .button:focus,
body.single-product .woocommerce-message .mkc-add-to-cart-actions > .button:hover,
body.single-product .woocommerce-message .mkc-add-to-cart-actions > .button:focus {
    width: auto !important;
    min-width: 220px !important;
    margin: 0 !important;
    padding: 12px 28px !important;
    border-radius: 24px !important;
    background: #f1f1f1 !important;
    transform: none !important;
}

@media screen and (max-width: 560px) {
    body.single-product .dfw-6-cart-notice .woocommerce-message .mkc-add-to-cart-actions > .button:hover,
    body.single-product .dfw-6-cart-notice .woocommerce-message .mkc-add-to-cart-actions > .button:focus,
    body.single-product .woocommerce-message .mkc-add-to-cart-actions > .button:hover,
    body.single-product .woocommerce-message .mkc-add-to-cart-actions > .button:focus {
        width: 100% !important;
        min-width: 0 !important;
    }
}
