/*
 * BERKEI Theme Overrides - temporary bridge styles.
 *
 * Theme-like frontend fixes for BERKEI.de that are being separated from the
 * portable plugin styles. Move these rules into the BERKEI theme/child-theme
 * once the theme layer is ready, then disable the plugin bridge policy.
 *
 * @package BerkeiScriptCollection
 * @author  BERKEI
 * @created 2026-05-07
 * @version 1.20
 */

/* =========================================================
   COMPLIANZ - Cookie Wall Layout and Dismissal Skin
   Target owner: BERKEI theme/child-theme
   ========================================================= */

.cmplz-manage-consent.berkei-consent-source-hidden {
    position: fixed !important;
    top: auto !important;
    right: -9999px !important;
    bottom: auto !important;
    left: auto !important;
    width: 1px !important;
    height: 1px !important;
    min-width: 1px !important;
    min-height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.cmplz-cookiebanner.berkei-consent-proxy-hidden,
.cmplz-cookiebanner-container.berkei-consent-proxy-hidden,
.cmplz-modal.berkei-consent-proxy-hidden,
.cmplz-modal-backdrop.berkei-consent-proxy-hidden,
.cmplz-soft-cookiewall.berkei-consent-proxy-hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

body.berkei-cookie-consent-set:not(.berkei-cookie-consent-reopen) #cmplz-cookiebanner-container,
body.berkei-cookie-consent-set:not(.berkei-cookie-consent-reopen) .cmplz-cookiebanner,
body.berkei-cookie-consent-set:not(.berkei-cookie-consent-reopen) .cmplz-cookiebanner-container,
body.berkei-cookie-consent-set:not(.berkei-cookie-consent-reopen) .cmplz-modal,
body.berkei-cookie-consent-set:not(.berkei-cookie-consent-reopen) .cmplz-modal-backdrop,
body.berkei-cookie-consent-set:not(.berkei-cookie-consent-reopen) .cmplz-soft-cookiewall,
#cmplz-cookiebanner-container.berkei-consent-dismissed,
.cmplz-cookiebanner.berkei-consent-dismissed,
.cmplz-cookiebanner-container.berkei-consent-dismissed,
.cmplz-modal.berkei-consent-dismissed,
.cmplz-modal-backdrop.berkei-consent-dismissed,
.cmplz-soft-cookiewall.berkei-consent-dismissed,
#cmplz-cookiebanner-container .cmplz-cookiebanner.banner-1.berkei-consent-dismissed,
#cmplz-cookiebanner-container .cmplz-cookiebanner.banner-1.cmplz-dismissed,
#cmplz-cookiebanner-container .cmplz-cookiebanner.banner-1[aria-hidden="true"],
#cmplz-cookiebanner-container .cmplz-cookiebanner.banner-1[style*="display: none"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

#cmplz-cookiebanner-container .cmplz-cookiebanner.banner-1 {
    left: 50% !important;
    right: auto !important;
    bottom: clamp(12px, 2vw, 28px) !important;
    transform: translateX(-50%) !important;
    width: min(calc(100vw - 28px), 920px) !important;
    max-height: min(86vh, 680px) !important;
    overflow: auto !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px) !important;
    grid-template-areas:
        "header header"
        "body buttons"
        "categories categories"
        "links links" !important;
    gap: 14px 18px !important;
    padding: 18px !important;
    color: #172026 !important;
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid rgba(23, 32, 38, 0.14) !important;
    border-radius: 8px !important;
    box-shadow: 0 22px 70px rgba(12, 18, 22, 0.22) !important;
}

#cmplz-cookiebanner-container .cmplz-cookiebanner.banner-1.cmplz-hidden,
#cmplz-cookiebanner-container .cmplz-cookiebanner.banner-1.cmplz-dismissed {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

#cmplz-cookiebanner-container .cmplz-cookiebanner.banner-1 .cmplz-header {
    grid-area: header !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 16px !important;
    min-height: 0 !important;
}

#cmplz-cookiebanner-container .cmplz-cookiebanner.banner-1 .cmplz-logo {
    display: none !important;
}

#cmplz-cookiebanner-container .cmplz-cookiebanner.banner-1 .cmplz-title {
    margin: 0 !important;
    color: #172026 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    letter-spacing: 0 !important;
    text-align: left !important;
}

#cmplz-cookiebanner-container .cmplz-cookiebanner.banner-1 .cmplz-close {
    flex: 0 0 auto !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(23, 32, 38, 0.12) !important;
    background: #fff !important;
}

#cmplz-cookiebanner-container .cmplz-cookiebanner.banner-1 .cmplz-body {
    grid-area: body !important;
    display: block !important;
    margin: 0 !important;
}

#cmplz-cookiebanner-container .cmplz-cookiebanner.banner-1 .cmplz-message {
    max-width: none !important;
    margin: 0 !important;
    color: rgba(23, 32, 38, 0.78) !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
}

#cmplz-cookiebanner-container .cmplz-cookiebanner.banner-1 .cmplz-buttons {
    grid-area: buttons !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    align-self: start !important;
    margin: 0 !important;
}

#cmplz-cookiebanner-container .cmplz-cookiebanner.banner-1 .cmplz-btn {
    width: 100% !important;
    min-height: 42px !important;
    padding: 10px 14px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
}

#cmplz-cookiebanner-container .cmplz-cookiebanner.banner-1 .cmplz-accept {
    color: #fff !important;
    background: #172026 !important;
    border-color: #172026 !important;
}

#cmplz-cookiebanner-container .cmplz-cookiebanner.banner-1 .cmplz-deny,
#cmplz-cookiebanner-container .cmplz-cookiebanner.banner-1 .cmplz-view-preferences,
#cmplz-cookiebanner-container .cmplz-cookiebanner.banner-1 .cmplz-save-preferences {
    color: #172026 !important;
    background: #fff !important;
    border-color: rgba(23, 32, 38, 0.16) !important;
}

#cmplz-cookiebanner-container .cmplz-cookiebanner.banner-1 .cmplz-btn:hover,
#cmplz-cookiebanner-container .cmplz-cookiebanner.banner-1 .cmplz-btn:focus-visible {
    color: #fff !important;
    background: #177797 !important;
    border-color: #177797 !important;
    outline: none !important;
}

#cmplz-cookiebanner-container .cmplz-cookiebanner.banner-1 .cmplz-categories {
    grid-area: categories !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    max-height: 250px !important;
    margin-top: 12px !important;
    overflow: auto !important;
}

#cmplz-cookiebanner-container .cmplz-cookiebanner.banner-1 .cmplz-category {
    overflow: hidden !important;
    background: #f7f8f6 !important;
    border: 1px solid rgba(23, 32, 38, 0.1) !important;
    border-radius: 6px !important;
}

#cmplz-cookiebanner-container .cmplz-cookiebanner.banner-1 .cmplz-category-header {
    padding: 10px 12px !important;
}

#cmplz-cookiebanner-container .cmplz-cookiebanner.banner-1 .cmplz-description {
    padding: 0 12px 12px !important;
    color: rgba(23, 32, 38, 0.72) !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
}

#cmplz-cookiebanner-container .cmplz-cookiebanner.banner-1 .cmplz-links {
    grid-area: links !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    color: rgba(23, 32, 38, 0.64) !important;
    font-size: 12px !important;
}

#cmplz-cookiebanner-container .cmplz-cookiebanner.banner-1 .cmplz-links a {
    color: inherit !important;
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
}

@media (max-width: 720px) {
    #cmplz-cookiebanner-container .cmplz-cookiebanner.banner-1 {
        bottom: 10px !important;
        width: calc(100vw - 20px) !important;
        max-height: 88dvh !important;
        grid-template-columns: 1fr !important;
        grid-template-areas:
            "header"
            "body"
            "buttons"
            "categories"
            "links" !important;
        gap: 12px !important;
        padding: 16px !important;
    }

    #cmplz-cookiebanner-container .cmplz-cookiebanner.banner-1 .cmplz-categories {
        grid-template-columns: 1fr !important;
        max-height: 230px !important;
    }
}

.is-layout-constrained > #cmplz-document,
.is-layout-constrained > .cmplz-document {
    max-width: 80rem !important;
}

/* =========================================================
   MY ACCOUNT - Bestelldetails, Adressen, Sendungen
   Target owner: BERKEI theme/child-theme
   ========================================================= */

/* ---------- Account-Navigation ---------- */
.woocommerce-account .woocommerce {
    display: flex;
    align-items: flex-start;
    gap: 32px;
}

.woocommerce-account .woocommerce-MyAccount-navigation {
    flex: 0 0 clamp(220px, 24%, 280px);
    float: none !important;
    width: auto !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation li {
    float: none;
    width: 100%;
    margin: 0;
    padding: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    color: #222;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    text-decoration: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation a:hover,
.woocommerce-account .woocommerce-MyAccount-navigation a:focus,
.woocommerce-account .woocommerce-MyAccount-navigation .is-active a {
    border-color: #c9d6e6;
    background: #f7f8fa;
    color: #111;
}

.woocommerce-account .woocommerce-MyAccount-content {
    flex: 1 1 auto;
    float: none !important;
    width: auto !important;
    min-width: 0;
}

/* ---------- Bestelldetails-Tabelle ---------- */
.woocommerce-table--order-details {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    font-size: 15px;
}

.woocommerce-table--order-details thead th {
    background: #f7f8fa;
    padding: 14px 16px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #555;
    border-bottom: 2px solid #e0e0e0;
}

.woocommerce-table--order-details tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}

.woocommerce-table--order-details .product-name {
    line-height: 1.5;
}

.woocommerce-table--order-details .product-quantity {
    margin-left: 4px;
    color: #555;
    font-size: 13px;
    white-space: nowrap;
}

.woocommerce-table--order-details .delivery-time-info {
    margin: 8px 0 0;
    color: #666;
    font-size: 13px;
    line-height: 1.4;
}

.woocommerce-table--order-details .delivery-time-inner,
.woocommerce-table--order-details .wc-item-meta li {
    display: grid;
    grid-template-columns: minmax(72px, max-content) 1fr;
    align-items: baseline;
    column-gap: 6px;
}

.woocommerce-table--order-details .wc-item-meta-label {
    color: #444;
    font-weight: 600;
}

.woocommerce-table--order-details .delivery-time-data,
.woocommerce-table--order-details .wc-item-meta li p {
    color: #333;
    font-weight: 500;
}

.woocommerce-table--order-details tfoot th,
.woocommerce-table--order-details tfoot td {
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.woocommerce-table--order-details tfoot tr:last-child th,
.woocommerce-table--order-details tfoot tr:last-child td {
    border-bottom: none;
}

/* Item meta (Groesse, Farbe etc.) */
.woocommerce-table--order-details .wc-item-meta {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    font-size: 13px;
    color: #666;
}

.woocommerce-table--order-details .wc-item-meta li {
    margin-bottom: 2px;
}

.woocommerce-table--order-details .wc-item-meta li p {
    display: inline;
    margin: 0;
}

/* Aktionen-Zeile in der Tabelle */
.woocommerce-table--order-details .order-actions--heading {
    font-weight: 600;
}

.woocommerce-table--order-details .order-actions-button,
.woocommerce-table--order-details tfoot .button,
.woocommerce-table--order-details tfoot a.button {
    display: inline-block;
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 6px;
    white-space: nowrap;
}

/* "Erneut bestellen" Button */
.order-again .button {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 8px;
    margin-top: 12px;
}

/* ---------- Adressen auf My Account ---------- */
.woocommerce-Addresses,
.woocommerce-columns--addresses {
    display: flex !important;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 24px;
}

.woocommerce-Addresses .woocommerce-Address,
.woocommerce-columns--addresses .woocommerce-column {
    box-sizing: border-box;
    flex: 1 1 0;
    float: none !important;
    width: auto !important;
    max-width: none;
    min-width: 280px;
    margin: 0;
    background: #f7f8fa;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
}

.woocommerce-Addresses .woocommerce-Address header,
.woocommerce-columns--addresses .woocommerce-column header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.woocommerce-Addresses h2,
.woocommerce-columns--addresses h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 12px;
}

.woocommerce-Addresses .edit,
.woocommerce-columns--addresses .edit {
    margin-left: auto;
    font-size: 13px;
    color: #2271b1;
    text-decoration: none;
    text-align: right;
}

.woocommerce-Addresses .edit:hover,
.woocommerce-columns--addresses .edit:hover {
    text-decoration: underline;
}

.woocommerce-Addresses address,
.woocommerce-columns--addresses address {
    font-style: normal;
    line-height: 1.7;
    color: #333;
    margin: 0;
}

/* ---------- Sendungen-Tabelle ---------- */
.woocommerce-shipments-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    font-size: 14px;
    margin-top: 12px;
}

.woocommerce-shipments-table thead th {
    background: #f7f8fa;
    padding: 12px 14px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #555;
    border-bottom: 2px solid #e0e0e0;
}

.woocommerce-shipments-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid #f0f0f0;
}

.woocommerce-shipments-table tbody tr:last-child td {
    border-bottom: none;
}

.woocommerce-shipments-list__title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 32px;
    margin-bottom: 8px;
}

/* ---------- Bestelldetails-Ueberschrift ---------- */
.woocommerce-order-details__title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.woocommerce-column__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

/* ---------- Responsive: Mobile My Account ---------- */
@media (max-width: 640px) {
    .woocommerce-account .woocommerce {
        display: block;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation {
        margin-bottom: 24px;
    }

    .woocommerce-Addresses,
    .woocommerce-columns--addresses {
        flex-direction: column;
    }

    .woocommerce-Addresses .woocommerce-Address,
    .woocommerce-columns--addresses .woocommerce-column {
        min-width: 0;
    }

    .woocommerce-Addresses .woocommerce-Address header,
    .woocommerce-columns--addresses .woocommerce-column header {
        align-items: flex-start;
    }

    .woocommerce-Addresses .edit,
    .woocommerce-columns--addresses .edit {
        margin-left: 0;
        text-align: left;
    }

    .woocommerce-table--order-details,
    .woocommerce-shipments-table {
        font-size: 13px;
    }

    .woocommerce-table--order-details thead th,
    .woocommerce-table--order-details tbody td,
    .woocommerce-table--order-details tfoot th,
    .woocommerce-table--order-details tfoot td,
    .woocommerce-shipments-table thead th,
    .woocommerce-shipments-table tbody td {
        padding: 10px 12px;
    }
}

/* =========================================================
   PRODUCT PAGE - Summary, Meta, Delivery Time, Payment Note
   Target owner: BERKEI theme/child-theme
   ========================================================= */

.single-product .berkei-product-gallery {
    position: relative;
    width: 100%;
    max-width: 760px;
    box-sizing: border-box;
}

.single-product .berkei-product-gallery *,
.single-product .berkei-product-gallery *::before,
.single-product .berkei-product-gallery *::after {
    box-sizing: border-box;
}

.single-product .berkei-product-gallery__frame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 4 / 5;
    min-height: 420px;
    padding: clamp(12px, 2vw, 18px);
    overflow: hidden;
    background: #f0ecea;
    border: 1px solid #f0ecea;
    border-radius: 8px;
}

.single-product .berkei-product-gallery__main-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f0ecea;
    border-radius: 6px;
    text-decoration: none;
}

.single-product .berkei-product-gallery__main-image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.single-product .berkei-product-gallery__badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 13px;
    color: #fff;
    background: #1d2327;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    box-shadow: 0 12px 24px rgba(15, 23, 32, 0.18);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
}

.single-product .berkei-product-gallery__thumb-slider {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    margin-top: 10px;
}

.single-product .berkei-product-gallery__thumbs {
    --berkei-gallery-thumb-offset: 0px;
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: hidden;
    scrollbar-width: none;
    touch-action: pan-y;
}

.single-product .berkei-product-gallery__thumbs::-webkit-scrollbar {
    display: none;
}

.single-product .berkei-product-gallery__thumb-strip {
    display: flex;
    gap: 10px;
    width: max-content;
    max-width: none;
    cursor: grab;
    user-select: none;
}

.single-product .berkei-product-gallery__thumbs.is-dragging .berkei-product-gallery__thumb-strip {
    cursor: grabbing;
}

.single-product .berkei-product-gallery__thumb {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 clamp(118px, 28%, 148px);
    width: clamp(118px, 28%, 148px);
    aspect-ratio: 1 / 1;
    padding: 4px;
    cursor: pointer;
    background: #fff;
    border: 1px solid #d9dfe5;
    border-radius: 6px;
    scroll-snap-align: start;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.single-product .berkei-product-gallery__thumb-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    cursor: pointer;
    color: #1d2327;
    background: #fff;
    border: 1px solid #d9dfe5;
    border-radius: 6px;
    box-shadow: 0 8px 18px rgba(15, 23, 32, 0.08);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.single-product .berkei-product-gallery__thumb-nav span {
    display: block;
    margin-top: -2px;
    font-size: 28px;
    line-height: 1;
}

.single-product .berkei-product-gallery__thumb-nav:hover,
.single-product .berkei-product-gallery__thumb-nav:focus-visible {
    border-color: #177797;
    box-shadow: 0 0 0 2px rgba(23, 119, 151, 0.16);
    outline: none;
}

.single-product .berkei-product-gallery__thumb-nav:disabled {
    cursor: default;
    opacity: 0.34;
    box-shadow: none;
}

.single-product .berkei-product-gallery__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    pointer-events: none;
}

.single-product .berkei-product-gallery__thumb.is-active,
.single-product .berkei-product-gallery__thumb:hover,
.single-product .berkei-product-gallery__thumb:focus-visible {
    border-color: #177797;
    box-shadow: 0 0 0 2px rgba(23, 119, 151, 0.16);
    outline: none;
}

@media (max-width: 780px) {
    .single-product .berkei-product-gallery__frame {
        aspect-ratio: 1 / 1;
        min-height: 0;
    }

    .single-product .berkei-product-gallery__thumb-slider {
        grid-template-columns: 32px minmax(0, 1fr) 32px;
        gap: 6px;
    }

    .single-product .berkei-product-gallery__thumb-nav {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }

    .single-product .berkei-product-gallery__thumb {
        flex-basis: clamp(92px, 28vw, 116px);
        width: clamp(92px, 28vw, 116px);
    }
}

/* ---------- Variation table spacing ---------- */
table.variations {
    margin-bottom: 8px;
    border-spacing: 0;
    border-collapse: collapse;
    width: 100%;
}

table.variations tr {
    display: block;
    margin-bottom: 0;
}

.variations_form table.variations tr {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
}

.single-product form.cart table.variations tr,
.single-product form.cart table.variations th.label,
.single-product form.cart table.variations td.value {
    display: block !important;
    width: 100% !important;
}

.variations_form table.variations th.label,
.variations_form table.variations td.value {
    display: block !important;
    width: 100% !important;
    float: none !important;
    clear: both !important;
}

table.variations th.label {
    display: block;
    padding: 0;
    white-space: nowrap;
    width: 100%;
    flex-shrink: 0;
    margin: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

table.variations th.label label {
    display: block;
    margin: 0;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.1;
}

table.variations td.value {
    padding: 0;
    display: block;
    width: 100%;
    margin-top: 0 !important;
    margin-bottom: 1px !important;
}

table.variations td.value .berkei-swatches-container {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.single-product form.cart table.variations td.value {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.variations_form table.variations .reset_variations {
    margin-top: 1px !important;
}

table.variations td.value ul {
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
}

table.variations td.value select {
    margin: 0;
    display: block;
    width: 100%;
}

table.variations .reset_variations {
    margin: 0;
    font-size: 0.8em;
}

/* Product meta rows (categories / brands): aligned labels, inline values */
.single-product .taxonomy-product_cat.wp-block-post-terms,
.single-product .taxonomy-product_brand.wp-block-post-terms {
    display: block !important;
    padding-left: 8.5em !important;
    margin: 0 0 6px 0 !important;
    font-size: 0.95rem;
    line-height: 1.45;
    font-weight: 400;
}

/* SKU row: flex layout collapses whitespace text nodes between label and value. */
.single-product .wc-block-components-product-sku.wp-block-post-terms {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 0;
    padding-left: 8.5em !important;
    margin: 0 0 6px 0 !important;
    font-size: 0.95rem;
    line-height: 1.45;
    font-weight: 400;
}

.single-product .wc-block-components-product-sku .wp-block-post-terms__prefix {
    flex: 0 0 8.5em;
    margin-left: -8.5em;
    margin-right: 0;
}

.single-product .wp-block-woocommerce-gzd-product-delivery-time {
    display: block !important;
    padding-left: 8.5em !important;
    margin: 0 0 6px 0 !important;
    font-size: 0.95rem;
    line-height: 1.45;
    font-weight: 400;
}

.single-product .wp-block-post-terms__prefix {
    display: inline-block;
    width: 8.5em;
    margin-left: -8.5em;
    white-space: nowrap;
}

.single-product .wc-block-components-product-sku.wp-block-post-terms:last-child,
.single-product .taxonomy-product_cat.wp-block-post-terms:last-child,
.single-product .taxonomy-product_brand.wp-block-post-terms:last-child,
.single-product .wp-block-woocommerce-gzd-product-delivery-time:last-child {
    margin-bottom: 0 !important;
}

.single-product .wp-block-post-terms__prefix,
.single-product .wc-block-components-product-sku .wp-block-post-terms__prefix {
    font-size: inherit;
    line-height: inherit;
    font-weight: 600;
}

.single-product .wp-block-woocommerce-gzd-product-delivery-time .delivery-time-info,
.single-product .wp-block-woocommerce-gzd-product-delivery-time .wc-gzd-block-components-product-delivery-time {
    padding: 0 !important;
    margin: 0 !important;
}

.single-product .wp-block-woocommerce-gzd-product-delivery-time .delivery-time-info,
.single-product .wp-block-woocommerce-gzd-product-delivery-time .wc-gzd-block-components-product-delivery-time {
    font-size: inherit !important;
    font-family: inherit !important;
    line-height: inherit !important;
    font-weight: 400;
}

.single-product .wp-block-woocommerce-gzd-product-delivery-time .delivery-time-inner {
    display: block;
    font-size: 0 !important;
    font-family: inherit !important;
    line-height: inherit !important;
    padding: 0 !important;
    margin: 0 !important;
}

.single-product .wp-block-woocommerce-gzd-product-delivery-time .delivery-time-inner::before {
    content: 'Lieferzeit:';
    display: inline-block;
    width: 8.5em;
    margin-left: -8.5em;
    white-space: nowrap;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.45;
}

.single-product .wp-block-woocommerce-gzd-product-delivery-time .delivery-time-data {
    font-size: 0.95rem !important;
    font-family: inherit !important;
    line-height: 1.45 !important;
    font-weight: 400;
}

.single-product .wc-block-components-product-sku .sku,
.single-product .taxonomy-product_cat.wp-block-post-terms a,
.single-product .taxonomy-product_brand.wp-block-post-terms a {
    font-size: inherit;
    line-height: inherit;
}

@media (max-width: 782px) {
    .variations_form table.variations tr {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .variations_form table.variations th.label,
    .variations_form table.variations td.value {
        display: block !important;
        width: 100% !important;
        float: none !important;
        clear: both !important;
    }

    .single-product form.cart table.variations tr,
    .single-product form.cart table.variations th.label,
    .single-product form.cart table.variations td.value {
        display: block !important;
        width: 100% !important;
    }

    table.variations th.label {
        padding-bottom: 0;
    }

    table.variations td.value {
        margin-bottom: 0 !important;
    }
}

/* Stripe / Klarna payment message - inline with price */
#payment-method-message {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.single-product .wp-block-woocommerce-product-price {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.summary .price {
    display: inline;
}

.summary .price + #payment-method-message,
.summary .woocommerce-product-details__short-description ~ #payment-method-message {
    display: inline-block;
    vertical-align: middle;
    margin-left: 8px;
}

#payment-method-message .__PrivateStripeElement {
    min-width: 280px;
}

/* =========================================================
   PRODUCT PAGE - Detail Tabs, Description, Attributes, GPSR
   Target owner: BERKEI theme/child-theme
   ========================================================= */

/* ---------- Grundlayout: Grid ---------- */
.single-product .wc-block-product-description,
.single-product .woocommerce-Tabs-panel--description {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.9fr);
    gap: 44px;
    align-items: start;
    padding: 0;
    font-size: 16px;
    line-height: 1.75;
    color: #1f1f1f;
}

.single-product .woocommerce-product-details__short-description {
    font-size: 16px;
    line-height: 1.75;
    color: #1f1f1f;
}

/* Stock status - prominent on single product pages */
.single-product p.stock {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    margin: 12px 0;
}

.single-product p.stock.out-of-stock {
    color: #c00;
}

.single-product p.stock.in-stock {
    color: #0a8a0a;
}

/* Box-sizing sauber */
.single-product .wc-block-product-description .berkei-desc,
.single-product .berkei-product-tabs__panel .berkei-desc,
.single-product .wc-block-product-description .berkei-desc *,
.single-product .berkei-product-tabs__panel .berkei-desc *,
.single-product .wc-block-product-description .berkei-desc *::before,
.single-product .berkei-product-tabs__panel .berkei-desc *::before,
.single-product .wc-block-product-description .berkei-desc *::after,
.single-product .berkei-product-tabs__panel .berkei-desc *::after {
    box-sizing: border-box;
}

/* ---------- Kein Background vorhanden: Einspaltiges Layout ---------- */
.single-product .wc-block-product-description:not(:has(.berkei-desc--background)),
.single-product .woocommerce-Tabs-panel--description:not(:has(.berkei-desc--background)) {
    grid-template-columns: 1fr;
}

/* ---------- Linke Textspalte ---------- */
.single-product .wc-block-product-description .berkei-desc--lang,
.single-product .woocommerce-Tabs-panel--description .berkei-desc--lang,
.single-product .berkei-product-tabs__panel .berkei-desc--lang {
    min-width: 0;
}

/* ---------- Rechte Background-Card ---------- */
.single-product .wc-block-product-description .berkei-desc--background,
.single-product .woocommerce-Tabs-panel--description .berkei-desc--background,
.single-product .berkei-product-tabs__panel .berkei-desc--background {
    background: #f7f8fa;
    border: 1px solid #d9dfe5;
    border-radius: 18px;
    padding: 24px;
    min-width: 0;
    position: sticky;
    top: 120px;
    box-shadow: 0 8px 26px rgba(15, 23, 32, 0.04);
}

.single-product .berkei-product-tabs__panel .berkei-desc--background {
    position: relative;
    top: auto;
}

/* ---------- Headings allgemein (Produktseite) ---------- */
.single-product .wc-block-product-description h5,
.single-product .woocommerce-Tabs-panel--description .berkei-desc h5,
.single-product .berkei-product-tabs__panel .berkei-desc h5 {
    margin: 0 0 14px;
    font-size: 1.05rem;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #0f1720;
}

/* Orange Akzentlinie unter Standard-Sections */
.single-product .wc-block-product-description .berkei-desc--lang h5::after,
.single-product .woocommerce-Tabs-panel--description .berkei-desc--lang h5::after,
.single-product .berkei-product-tabs__panel .berkei-desc--lang h5::after,
.single-product .wc-block-product-description > h5::after {
    content: "";
    display: block;
    width: 44px;
    height: 3px;
    margin-top: 10px;
    border-radius: 999px;
    background: #E56B26;
}

/* ---------- Erster Header = Produktname ---------- */
.single-product .wc-block-product-description .berkei-desc--lang h5:first-child,
.single-product .woocommerce-Tabs-panel--description .berkei-desc--lang h5:first-child,
.single-product .berkei-product-tabs__panel .berkei-desc--lang h5:first-child,
.single-product .wc-block-product-description > h5:first-child {
    font-size: clamp(1.25rem, 1.8vw, 1.5rem);
    line-height: 1.15;
    font-weight: 800;
    text-transform: none;
    letter-spacing: 0.01em;
    margin-bottom: 14px;
    color: #111827;
}

.single-product .wc-block-product-description .berkei-desc--lang h5:first-child::after,
.single-product .woocommerce-Tabs-panel--description .berkei-desc--lang h5:first-child::after,
.single-product .berkei-product-tabs__panel .berkei-desc--lang h5:first-child::after,
.single-product .wc-block-product-description > h5:first-child::after {
    display: none;
}

/* ---------- Fliesstext allgemein ---------- */
.single-product .wc-block-product-description .berkei-desc p,
.single-product .woocommerce-Tabs-panel--description .berkei-desc p,
.single-product .berkei-product-tabs__panel .berkei-desc p,
.single-product .wc-block-product-description > p {
    margin: 0 0 18px;
    font-size: 1rem;
    line-height: 1.78;
    color: #20262d;
    max-width: 72ch;
}

/* ---------- Trennung der unteren Text-Sektionen ---------- */
.single-product .wc-block-product-description .berkei-desc--lang h5:not(:first-child),
.single-product .woocommerce-Tabs-panel--description .berkei-desc--lang h5:not(:first-child),
.single-product .berkei-product-tabs__panel .berkei-desc--lang h5:not(:first-child),
.single-product .wc-block-product-description > h5:not(:first-child) {
    margin-top: 34px;
    padding-top: 20px;
    border-top: 1px solid #e4e8ed;
}

/* Letzter Absatz im linken Block ohne Extra-Abstand */
.single-product .wc-block-product-description .berkei-desc--lang p:last-child,
.single-product .woocommerce-Tabs-panel--description .berkei-desc--lang p:last-child,
.single-product .berkei-product-tabs__panel .berkei-desc--lang p:last-child,
.single-product .wc-block-product-description > p:last-child {
    margin-bottom: 0;
}

/* ---------- Background-Card Headings ---------- */
.single-product .wc-block-product-description .berkei-desc--background h5,
.single-product .woocommerce-Tabs-panel--description .berkei-desc--background h5,
.single-product .berkei-product-tabs__panel .berkei-desc--background h5 {
    margin-bottom: 16px;
    font-size: 1.55rem;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
    color: #111827;
}

/* Keine orange Linie in der Background-Card */
.single-product .wc-block-product-description .berkei-desc--background h5::after,
.single-product .woocommerce-Tabs-panel--description .berkei-desc--background h5::after,
.single-product .berkei-product-tabs__panel .berkei-desc--background h5::after {
    display: none;
}

/* Optionales Bild in der Background-Card */
.single-product .wc-block-product-description .berkei-desc--background img,
.single-product .woocommerce-Tabs-panel--description .berkei-desc--background img,
.single-product .berkei-product-tabs__panel .berkei-desc--background img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
    margin: 0 0 18px;
    object-fit: cover;
}

/* Background-Texte */
.single-product .wc-block-product-description .berkei-desc--background p,
.single-product .woocommerce-Tabs-panel--description .berkei-desc--background p,
.single-product .berkei-product-tabs__panel .berkei-desc--background p {
    max-width: none;
    font-size: 0.98rem;
    line-height: 1.82;
    color: #33404c;
    margin: 0 0 16px;
}

.single-product .wc-block-product-description .berkei-desc--background p:last-child,
.single-product .woocommerce-Tabs-panel--description .berkei-desc--background p:last-child,
.single-product .berkei-product-tabs__panel .berkei-desc--background p:last-child {
    margin-bottom: 0;
}

/* ---------- Optische Veredelung ---------- */
.single-product .woocommerce-tabs,
.single-product .wc-block-product-description {
    margin-top: 20px;
}

/* Single product: tabbed detail sections converted from block-theme accordion */
.single-product .berkei-product-tabs {
    margin: 34px 0 44px;
    padding: 0;
}

.single-product .berkei-product-tabs__nav {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding: 0 0 12px;
    border-bottom: 1px solid rgba(29, 35, 39, 0.12);
    scrollbar-width: thin;
}

.single-product .berkei-product-tabs__tab {
    flex: 0 0 auto;
    margin: 0;
    padding: 11px 16px 10px;
    border: 1px solid rgba(29, 35, 39, 0.14);
    border-bottom: 2px solid rgba(29, 35, 39, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: rgba(29, 35, 39, 0.76);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.2;
    text-align: left;
    text-transform: uppercase;
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease;
    white-space: nowrap;
}

.single-product .berkei-product-tabs__tab[aria-selected="true"] {
    border-color: #111827;
    border-bottom-color: #177797;
    background: #111827;
    color: #fff;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.14);
}

.single-product .berkei-product-tabs__tab:hover {
    border-color: rgba(23, 119, 151, 0.45);
    background: rgba(23, 119, 151, 0.08);
    color: #177797;
    transform: translateY(-1px);
}

.single-product .berkei-product-tabs__tab[aria-selected="true"]:hover {
    background: #177797;
    border-color: #177797;
    color: #fff;
}

.single-product .berkei-product-tabs__tab:focus-visible {
    color: #177797;
    outline: 2px solid rgba(23, 119, 151, 0.3);
    outline-offset: 4px;
}

.single-product .berkei-product-tabs__panel {
    margin-top: 22px;
    padding: clamp(22px, 3vw, 34px);
    border: 1px solid #d9dfe5;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(15, 23, 32, 0.04);
}

.single-product .berkei-product-tabs__panel-title,
.single-product .berkei-related-products-override h2,
.single-product .berkei-recently-viewed h2 {
    margin: 0 0 18px;
    color: #111827;
    font-family: Montserrat, sans-serif;
    font-size: clamp(1.25rem, 1.9vw, 1.7rem);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.16;
}

.single-product .berkei-product-tabs__panel[hidden] {
    display: none !important;
}

.single-product .berkei-product-tabs__panel > *:first-child,
.single-product .berkei-product-tabs__panel .woocommerce-Reviews > *:first-child,
.single-product .berkei-product-tabs__panel .wc-gzd-additional-info > *:first-child,
.single-product .berkei-product-tabs__panel .wp-block-woocommerce-product-specifications > *:first-child,
.single-product .berkei-product-tabs__panel .wp-block-woocommerce-product-reviews > *:first-child {
    margin-top: 0 !important;
}

.single-product .berkei-product-tabs__panel :where(h2, h3, h4, h5, h6),
.single-product .berkei-product-tabs__panel .woocommerce-Reviews-title,
.single-product .berkei-product-tabs__panel .wc-gzd-manufacturer-eu-title {
    margin: 0 0 18px !important;
    color: #111827;
    font-size: clamp(1.18rem, 1.7vw, 1.45rem);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.18;
    text-transform: none;
}

.single-product .berkei-product-tabs__panel :where(p, ul, ol, table, .woocommerce-Reviews, .comment-respond):last-child,
.single-product .berkei-product-tabs__panel .wc-gzd-additional-info > *:last-child {
    margin-bottom: 0 !important;
}

.single-product .berkei-product-tabs__panel .wp-block-woocommerce-product-specifications,
.single-product .berkei-product-tabs__panel .wp-block-woocommerce-product-reviews,
.single-product .berkei-product-tabs__panel .woocommerce-Reviews,
.single-product .berkei-product-tabs__panel .wc-gzd-additional-info,
.single-product .berkei-product-tabs__panel .safety-instructions.wc-gzd-additional-info {
    margin-left: 0;
    margin-right: 0;
}

.single-product .berkei-product-tabs__panel .wc-block-product-description,
.single-product .berkei-product-tabs__panel .woocommerce-Tabs-panel--description,
.single-product .berkei-product-tabs__panel .wc-block-product-description:not(:has(.berkei-desc--background)),
.single-product .berkei-product-tabs__panel .woocommerce-Tabs-panel--description:not(:has(.berkei-desc--background)) {
    margin: 0;
}

.single-product .berkei-product-tabs__panel .wp-block-woocommerce-product-specifications table {
    width: 100%;
}

.single-product .berkei-product-safety-docs-empty {
    margin: 0;
    color: #646970;
    font-size: 0.96rem;
    line-height: 1.7;
}

/* ---------- Design-Sektion: Attribut-Bild + Text ---------- */
.berkei-desc-design-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.berkei-desc-design-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid #e4e8ed;
    background: #f7f8fa;
    flex-shrink: 0;
}

.berkei-desc-design-body {
    flex: 1;
    min-width: 0;
}

@media (max-width: 480px) {
    .berkei-desc-design-header {
        flex-direction: column;
        gap: 12px;
    }
    .berkei-desc-design-img {
        width: 80px;
        height: 80px;
    }
}

.single-product .wc-block-product-description strong {
    color: #111827;
}

.single-product .wc-block-product-description a {
    color: #147798;
    text-decoration: none;
}

.single-product .wc-block-product-description a:hover {
    text-decoration: underline;
}

/* Spacing before "Verantwortliche Person in der EU" heading */
.wc-gzd-manufacturer-eu-title {
    margin-top: 1.2em;
}

/* In safety blocks, match berkei-desc to surrounding product text style */
.safety-instructions .berkei-desc {
    font-size: 16px;
    line-height: 1.75;
    color: #1f1f1f;
}

.single-product .wp-block-accordion-panel .wp-block-woocommerce-product-specifications table {
    width: 100%;
}

/* Modernized feature lists */
.single-product .woocommerce-Tabs-panel--description .berkei-desc--lang ul,
.single-product .woocommerce-Tabs-panel--description .berkei-desc--gpsr ul,
.single-product .wp-block-woocommerce-product-description .berkei-desc--lang ul,
.single-product .wp-block-woocommerce-product-description .berkei-desc--gpsr ul,
.single-product .wc-block-product-description > ul {
    list-style: none;
    padding-left: 0;
    margin: 1.5rem 0 2rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 0.75rem 1rem;
}

.single-product .woocommerce-Tabs-panel--description .berkei-desc--lang li,
.single-product .woocommerce-Tabs-panel--description .berkei-desc--gpsr li,
.single-product .wp-block-woocommerce-product-description .berkei-desc--lang li,
.single-product .wp-block-woocommerce-product-description .berkei-desc--gpsr li,
.single-product .wc-block-product-description > ul > li {
    position: relative;
    padding: 0.9rem 1rem 0.9rem 2.2rem;
    background: #fafafa;
    border: 1px solid #ececec;
    border-radius: 14px;
    margin: 0;
}

.single-product .woocommerce-Tabs-panel--description .berkei-desc--lang li::before,
.single-product .woocommerce-Tabs-panel--description .berkei-desc--gpsr li::before,
.single-product .wp-block-woocommerce-product-description .berkei-desc--lang li::before,
.single-product .wp-block-woocommerce-product-description .berkei-desc--gpsr li::before,
.single-product .wc-block-product-description > ul > li::before {
    content: "\2713";
    position: absolute;
    left: 0.9rem;
    top: 0.9rem;
    color: #e56b26;
    font-weight: 700;
}

/* Additional information tables */
.single-product .shop_attributes,
.single-product .woocommerce-product-attributes {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid #ececec;
    border-radius: 14px;
    background: #fff;
}

.single-product .shop_attributes th,
.single-product .shop_attributes td,
.single-product .woocommerce-product-attributes th,
.single-product .woocommerce-product-attributes td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #f1f1f1;
}

.single-product .shop_attributes tr:last-child th,
.single-product .shop_attributes tr:last-child td,
.single-product .woocommerce-product-attributes tr:last-child th,
.single-product .woocommerce-product-attributes tr:last-child td {
    border-bottom: 0;
}

/* ---------- Responsive: 2-Spalten-Layout Breakpoints ---------- */
@media (max-width: 1080px) {
    .single-product .wc-block-product-description,
    .single-product .woocommerce-Tabs-panel--description {
        gap: 28px;
        grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
    }
}

@media (max-width: 980px) {
    .single-product .wc-block-product-description,
    .single-product .woocommerce-Tabs-panel--description {
        display: block;
        max-width: 100%;
    }

    .single-product .wc-block-product-description .berkei-desc--background,
    .single-product .woocommerce-Tabs-panel--description .berkei-desc--background {
        position: static;
        margin-top: 28px;
    }
}

@media (max-width: 640px) {
    .single-product .berkei-product-tabs {
        margin-top: 28px;
    }

    .single-product .berkei-product-tabs__nav {
        gap: 8px;
    }

    .single-product .berkei-product-tabs__tab {
        font-size: 0.78rem;
        padding: 9px 12px 8px;
    }

    .single-product .berkei-product-tabs__panel {
        margin-top: 18px;
        padding: 18px;
        border-radius: 14px;
    }

    .single-product .wc-block-product-description .berkei-desc--lang h5:first-child,
    .single-product .woocommerce-Tabs-panel--description .berkei-desc--lang h5:first-child {
        font-size: 1.6rem;
    }

    .single-product .wc-block-product-description .berkei-desc--background,
    .single-product .woocommerce-Tabs-panel--description .berkei-desc--background {
        padding: 18px;
        border-radius: 14px;
    }

    .single-product .woocommerce-Tabs-panel--description .berkei-desc--lang ul,
    .single-product .woocommerce-Tabs-panel--description .berkei-desc--gpsr ul,
    .single-product .wc-block-product-description .berkei-desc--lang ul,
    .single-product .wc-block-product-description .berkei-desc--gpsr ul {
        grid-template-columns: 1fr;
    }
}

/* Single product: Add-to-cart button */
.single-product .product .single_add_to_cart_button.button {
    background-color: #147798;
    color: #ffffff;
    border-radius: 3px;
    padding: 10px 20px;
}

.single-product .product .single_add_to_cart_button.button:hover {
    background-color: #439daa;
}

.single-product .product .single_add_to_cart_button.button:disabled,
.single-product .product .single_add_to_cart_button.button.disabled {
    background-color: #3f7a8b;
    color: #ffffff;
    cursor: not-allowed;
    opacity: 1;
}

/* Single product: clean list indentation in product description block */
.single-product .wp-block-woocommerce-product-description ul,
.single-product .wp-block-woocommerce-product-description ol {
    margin-left: 0 !important;
    padding-left: 1.25rem !important;
    padding-inline-start: 1.25rem !important;
    list-style-position: outside;
}

.single-product .wp-block-woocommerce-product-description li {
    margin-left: 0 !important;
    margin-bottom: 0.1rem;
}

.single-product .wp-block-woocommerce-product-description li:last-child {
    margin-bottom: 0;
}

/* Germanized GPSR: override code/pre tags in safety instructions */
.wc-gzd-product-safety-instructions code,
.wc-gzd-product-safety-instructions pre,
.wc-gzd-product-safety-information code,
.wc-gzd-product-safety-information pre,
.wc-gzd-additional-info code,
.wc-gzd-additional-info pre {
    font-family: inherit;
    font-size: inherit;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    color: inherit;
    display: inline;
}

/* =========================================================
   SHOP ARCHIVES - Premium Grid Layout
   Target owner: BERKEI theme/child-theme
   ========================================================= */

body.berkei-premium-shop-layout.post-type-archive-product .wp-site-blocks > .wp-block-group.has-global-padding,
body.berkei-premium-shop-layout.tax-product_cat .wp-site-blocks > .wp-block-group.has-global-padding,
body.berkei-premium-shop-layout.tax-product_tag .wp-site-blocks > .wp-block-group.has-global-padding {
    padding-left: clamp(14px, 2vw, 32px);
    padding-right: clamp(14px, 2vw, 32px);
}

body.berkei-premium-shop-layout .wc-block-breadcrumbs .woocommerce-breadcrumb,
body.berkei-premium-shop-layout .wp-block-breadcrumbs .woocommerce-breadcrumb {
    margin: 0;
}

body.berkei-premium-shop-layout.post-type-archive-product .berkei-filter-edge-columns,
body.berkei-premium-shop-layout.tax-product_cat .berkei-filter-edge-columns,
body.berkei-premium-shop-layout.tax-product_tag .berkei-filter-edge-columns,
body.berkei-premium-shop-layout.post-type-archive-product .wp-block-woocommerce-product-collection,
body.berkei-premium-shop-layout.tax-product_cat .wp-block-woocommerce-product-collection,
body.berkei-premium-shop-layout.tax-product_tag .wp-block-woocommerce-product-collection {
    width: 100% !important;
    max-width: min(1600px, 100%) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

body.berkei-premium-shop-layout.post-type-archive-product .berkei-shop-controls,
body.berkei-premium-shop-layout.tax-product_cat .berkei-shop-controls,
body.berkei-premium-shop-layout.tax-product_tag .berkei-shop-controls,
body.berkei-premium-shop-layout.post-type-archive-product .wc-block-product-template,
body.berkei-premium-shop-layout.tax-product_cat .wc-block-product-template,
body.berkei-premium-shop-layout.tax-product_tag .wc-block-product-template,
body.berkei-premium-shop-layout.post-type-archive-product .woocommerce ul.products,
body.berkei-premium-shop-layout.tax-product_cat .woocommerce ul.products,
body.berkei-premium-shop-layout.tax-product_tag .woocommerce ul.products {
    width: 100% !important;
    max-width: 100% !important;
}

body.berkei-premium-shop-layout.post-type-archive-product .wc-block-product-template,
body.berkei-premium-shop-layout.tax-product_cat .wc-block-product-template,
body.berkei-premium-shop-layout.tax-product_tag .wc-block-product-template {
    --berkei-collection-zoom-scale: 1.018;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 34px 18px !important;
}

body.berkei-premium-shop-layout.post-type-archive-product .wc-block-product-template li.wc-block-product,
body.berkei-premium-shop-layout.tax-product_cat .wc-block-product-template li.wc-block-product,
body.berkei-premium-shop-layout.tax-product_tag .wc-block-product-template li.wc-block-product {
    min-width: 0;
    gap: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

body.berkei-premium-shop-layout.post-type-archive-product .wc-block-product-template .wp-block-group,
body.berkei-premium-shop-layout.tax-product_cat .wc-block-product-template .wp-block-group,
body.berkei-premium-shop-layout.tax-product_tag .wc-block-product-template .wp-block-group {
    width: 100%;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.berkei-premium-shop-layout.post-type-archive-product .wc-block-product-template .wp-block-group.alignfull,
body.berkei-premium-shop-layout.tax-product_cat .wc-block-product-template .wp-block-group.alignfull,
body.berkei-premium-shop-layout.tax-product_tag .wc-block-product-template .wp-block-group.alignfull {
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.berkei-premium-shop-layout.post-type-archive-product .wc-block-product-template .is-content-justification-center,
body.berkei-premium-shop-layout.tax-product_cat .wc-block-product-template .is-content-justification-center,
body.berkei-premium-shop-layout.tax-product_tag .wc-block-product-template .is-content-justification-center {
    justify-content: flex-start !important;
}

body.berkei-premium-shop-layout.post-type-archive-product .wc-block-product-template .has-text-align-center,
body.berkei-premium-shop-layout.tax-product_cat .wc-block-product-template .has-text-align-center,
body.berkei-premium-shop-layout.tax-product_tag .wc-block-product-template .has-text-align-center {
    text-align: left !important;
}

body.berkei-premium-shop-layout.post-type-archive-product .wc-block-product-template .wp-block-spacer,
body.berkei-premium-shop-layout.tax-product_cat .wc-block-product-template .wp-block-spacer,
body.berkei-premium-shop-layout.tax-product_tag .wc-block-product-template .wp-block-spacer {
    height: 7px !important;
    min-height: 0 !important;
}

body.berkei-premium-shop-layout.post-type-archive-product .wc-block-product-template .wc-block-components-product-image,
body.berkei-premium-shop-layout.tax-product_cat .wc-block-product-template .wc-block-components-product-image,
body.berkei-premium-shop-layout.tax-product_tag .wc-block-product-template .wc-block-components-product-image,
body.berkei-premium-shop-layout.post-type-archive-product .wc-block-product-template .wc-block-components-product-image > a,
body.berkei-premium-shop-layout.tax-product_cat .wc-block-product-template .wc-block-components-product-image > a,
body.berkei-premium-shop-layout.tax-product_tag .wc-block-product-template .wc-block-components-product-image > a {
    aspect-ratio: 4 / 5;
    min-height: 0 !important;
    background: #f7f7f5;
}

body.berkei-premium-shop-layout.post-type-archive-product .wc-block-product-template .wc-block-components-product-image img,
body.berkei-premium-shop-layout.tax-product_cat .wc-block-product-template .wc-block-components-product-image img,
body.berkei-premium-shop-layout.tax-product_tag .wc-block-product-template .wc-block-components-product-image img {
    height: 100% !important;
    object-fit: cover;
}

body.berkei-premium-shop-layout.post-type-archive-product .wc-block-product-template .wp-block-post-title,
body.berkei-premium-shop-layout.tax-product_cat .wc-block-product-template .wp-block-post-title,
body.berkei-premium-shop-layout.tax-product_tag .wc-block-product-template .wp-block-post-title {
    display: -webkit-box;
    margin-top: 9px !important;
    margin-bottom: 4px !important;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    color: #1d2327;
    font-size: clamp(0.72rem, 0.68rem + 0.18vw, 0.86rem) !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    line-height: 1.28 !important;
    text-transform: uppercase;
}

body.berkei-premium-shop-layout.post-type-archive-product .wc-block-product-template .wp-block-post-title a,
body.berkei-premium-shop-layout.tax-product_cat .wc-block-product-template .wp-block-post-title a,
body.berkei-premium-shop-layout.tax-product_tag .wc-block-product-template .wp-block-post-title a {
    color: inherit;
    text-decoration: none;
}

body.berkei-premium-shop-layout.post-type-archive-product .wc-block-product-template .wp-block-post-title a:hover,
body.berkei-premium-shop-layout.tax-product_cat .wc-block-product-template .wp-block-post-title a:hover,
body.berkei-premium-shop-layout.tax-product_tag .wc-block-product-template .wp-block-post-title a:hover {
    color: #177797;
}

body.berkei-premium-shop-layout.post-type-archive-product .wc-block-product-template .wp-block-woocommerce-product-price,
body.berkei-premium-shop-layout.tax-product_cat .wc-block-product-template .wp-block-woocommerce-product-price,
body.berkei-premium-shop-layout.tax-product_tag .wc-block-product-template .wp-block-woocommerce-product-price,
body.berkei-premium-shop-layout.post-type-archive-product .wc-block-product-template .wc-block-components-product-price,
body.berkei-premium-shop-layout.tax-product_cat .wc-block-product-template .wc-block-components-product-price,
body.berkei-premium-shop-layout.tax-product_tag .wc-block-product-template .wc-block-components-product-price {
    color: rgba(29, 35, 39, 0.78);
    font-size: 0.78rem !important;
    font-weight: 600;
    line-height: 1.25;
    text-align: left !important;
}

body.berkei-premium-shop-layout.post-type-archive-product .wc-block-product-template .wp-block-woocommerce-product-price,
body.berkei-premium-shop-layout.tax-product_cat .wc-block-product-template .wp-block-woocommerce-product-price,
body.berkei-premium-shop-layout.tax-product_tag .wc-block-product-template .wp-block-woocommerce-product-price {
    justify-content: flex-start !important;
}

body.berkei-premium-shop-layout.post-type-archive-product .wc-block-product-template .wc-block-components-product-sale-badge,
body.berkei-premium-shop-layout.tax-product_cat .wc-block-product-template .wc-block-components-product-sale-badge,
body.berkei-premium-shop-layout.tax-product_tag .wc-block-product-template .wc-block-components-product-sale-badge,
body.berkei-premium-shop-layout.post-type-archive-product .wc-block-product-template .onsale,
body.berkei-premium-shop-layout.tax-product_cat .wc-block-product-template .onsale,
body.berkei-premium-shop-layout.tax-product_tag .wc-block-product-template .onsale {
    border: 1px solid rgba(29, 35, 39, 0.12) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.92) !important;
    color: #1d2327 !important;
    font-size: 0.68rem !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
    text-transform: uppercase !important;
}

@media (max-width: 1180px) {
    body.berkei-premium-shop-layout.post-type-archive-product .wc-block-product-template,
    body.berkei-premium-shop-layout.tax-product_cat .wc-block-product-template,
    body.berkei-premium-shop-layout.tax-product_tag .wc-block-product-template {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 32px 16px !important;
    }
}

@media (max-width: 680px) {
    body.berkei-premium-shop-layout.post-type-archive-product .wp-site-blocks > .wp-block-group.has-global-padding,
    body.berkei-premium-shop-layout.tax-product_cat .wp-site-blocks > .wp-block-group.has-global-padding,
    body.berkei-premium-shop-layout.tax-product_tag .wp-site-blocks > .wp-block-group.has-global-padding {
        padding-left: 12px;
        padding-right: 12px;
    }

    body.berkei-premium-shop-layout.post-type-archive-product .wc-block-product-template,
    body.berkei-premium-shop-layout.tax-product_cat .wc-block-product-template,
    body.berkei-premium-shop-layout.tax-product_tag .wc-block-product-template {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 24px 12px !important;
    }
}

/* =========================================================
   SHOP ARCHIVES - WooCommerce and ProductX Compatibility
   Target owner: BERKEI theme/child-theme
   ========================================================= */

/* WooCommerce block filter renders inline on the shop page; hide its broken overlay trigger. */
.wc-block-product-filters__open-overlay,
.woocommerce .wc-block-product-filters__open-overlay,
.woocommerce-page .wc-block-product-filters__open-overlay {
    display: none !important;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
    margin: 0 12px 12px 0;
    padding: 12px 18px;
    line-height: 1.2;
    box-sizing: border-box;
}

.woocommerce .woocommerce-ordering,
.woocommerce-page .woocommerce-ordering {
    margin: 0 0 16px;
}

select.orderby,
.woocommerce .woocommerce-ordering select.orderby,
.woocommerce-page .woocommerce-ordering select.orderby {
    min-width: 48px;
    min-height: 48px;
    margin: 0 0 12px;
    padding: 10px 42px 10px 14px;
    line-height: 1.4;
    box-sizing: border-box;
}

[class*="wopb-filter"],
[class*="wopb-product-filter"],
[class*="wopb-search"] {
    display: none !important;
}

/* =========================================================
   FLOATING ACTION RAIL - Third-party Placement
   Target owner: BERKEI theme/child-theme
   ========================================================= */

body.berkei-floating-toolbar-ready .xoo-wsc-basket {
    position: fixed !important;
    top: calc(50% + 126px) !important;
    right: 14px !important;
    bottom: auto !important;
    margin: 0 !important;
    width: 64px !important;
    height: 64px !important;
    min-width: 64px !important;
    min-height: 64px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(29, 35, 39, 0.12) !important;
    background: rgba(255, 255, 255, 0.96) !important;
    box-shadow: 0 18px 50px rgba(15, 23, 32, 0.16) !important;
    color: #1d2327 !important;
    z-index: 100021 !important;
}

body.berkei-floating-toolbar-ready .xoo-wsc-basket .xoo-wsc-bki {
    color: #1d2327 !important;
}

body.berkei-floating-toolbar-ready .xoo-wsc-basket .xoo-wsc-items-count {
    top: -7px !important;
    left: -7px !important;
    right: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    border: 2px solid #fff !important;
    border-radius: 999px !important;
    background: #177797 !important;
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(15, 23, 32, 0.2) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
}

body.berkei-floating-toolbar-ready .xoo-wsc-basket:hover,
body.berkei-floating-toolbar-ready .xoo-wsc-basket:focus-visible {
    border-color: #177797 !important;
    background: #fff !important;
    color: #177797 !important;
}

body.berkei-shop-action-rail-enabled .grecaptcha-badge {
    right: -186px !important;
    bottom: 88px !important;
    width: 256px !important;
    height: 60px !important;
    min-width: 256px !important;
    min-height: 60px !important;
    border: 1px solid rgba(29, 35, 39, 0.12) !important;
    border-radius: 999px 0 0 999px !important;
    background: rgba(255, 255, 255, 0.96) !important;
    box-shadow: 0 18px 50px rgba(15, 23, 32, 0.16) !important;
    overflow: hidden !important;
    transition: none !important;
    z-index: 100019 !important;
}

body.berkei-recaptcha-badge-ready.berkei-shop-action-rail-enabled .grecaptcha-badge {
    right: -178px !important;
    height: 64px !important;
    min-height: 64px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
    -webkit-mask-image: radial-gradient(circle 32px at 32px 32px, #000 99%, transparent 100%) !important;
    mask-image: radial-gradient(circle 32px at 32px 32px, #000 99%, transparent 100%) !important;
    filter: drop-shadow(0 18px 32px rgba(15, 23, 32, 0.16)) !important;
}

body.berkei-recaptcha-badge-ready.berkei-shop-action-rail-enabled .grecaptcha-badge::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    box-sizing: border-box;
    width: 64px;
    height: 64px;
    border: 1px solid rgba(29, 35, 39, 0.12);
    border-radius: 999px;
    pointer-events: none;
}

body.berkei-shop-action-rail-enabled .grecaptcha-badge iframe {
    width: 256px !important;
    height: 60px !important;
    max-width: none !important;
    border-radius: 0 !important;
}

body.berkei-recaptcha-badge-ready.berkei-shop-action-rail-enabled .grecaptcha-badge iframe {
    transform: translate(0, 2px) !important;
}

body.berkei-filter-drawer-open.berkei-floating-toolbar-ready .xoo-wsc-basket {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    z-index: 100010 !important;
}

body.berkei-filter-drawer-open.berkei-floating-toolbar-ready .xoo-wsc-basket .xoo-wsc-items-count {
    opacity: 0 !important;
    visibility: hidden !important;
}

@media (max-width: 781px) {
    body.berkei-floating-toolbar-ready .xoo-wsc-basket {
        right: 12px !important;
        top: auto !important;
        bottom: 90px !important;
        margin: 0 !important;
        width: 60px !important;
        height: 60px !important;
        min-width: 60px !important;
        min-height: 60px !important;
    }

    /* On single-product pages the floating cart overlaps the gallery slider arrows;
       the header mini-cart already provides cart access. */
    body.single-product.berkei-floating-toolbar-ready .xoo-wsc-basket {
        display: none !important;
    }

    body.berkei-shop-action-rail-enabled .grecaptcha-badge {
        right: -196px !important;
        bottom: 84px !important;
        width: 256px !important;
        height: 60px !important;
        min-width: 256px !important;
        min-height: 60px !important;
    }

    body.berkei-recaptcha-badge-ready.berkei-shop-action-rail-enabled .grecaptcha-badge {
        right: -184px !important;
        -webkit-mask-image: radial-gradient(circle 30px at 30px 30px, #000 99%, transparent 100%) !important;
        mask-image: radial-gradient(circle 30px at 30px 30px, #000 99%, transparent 100%) !important;
    }

    body.berkei-recaptcha-badge-ready.berkei-shop-action-rail-enabled .grecaptcha-badge::after {
        width: 60px;
        height: 60px;
    }

    body.berkei-recaptcha-badge-ready.berkei-shop-action-rail-enabled .grecaptcha-badge iframe {
        transform: none !important;
    }
}

/* =========================================================
   HEADER LOGO - BERKEI wordmark with letter-spacing fix
   Target owner: BERKEI theme/child-theme

   The logo is authored as a wp-block-heading with
   letter-spacing: 0.45em and an underlined <a>. CSS
   letter-spacing adds a trailing gap after the last letter,
   which (1) shifts the optical centre to the left and
   (2) makes the native text-decoration underline extend
   past the final "I". The block-editor margin-left: 0.45em
   inline style only re-centres the box, leaving the underline
   tail visible.

   Fix:
   - Remove the compensating inline margin-left.
   - Add padding-inline-start equal to one letter-space so
     the optical centre of the visible glyphs matches the
     container centre.
   - Replace the native link underline with an ::after
     pseudo-underline that stops one letter-space before
     the end of the link box.
   ========================================================= */
h1.wp-block-heading:has(> a > strong) {
    margin-left: 0 !important;
    padding-inline-start: 0.45em;
}

h1.wp-block-heading:has(> a > strong) > a {
    display: inline-block;
    position: relative;
    text-decoration: none;
}

h1.wp-block-heading:has(> a > strong) > a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0.45em;
    bottom: 0.02em;
    height: 0.045em;
    background: currentColor;
    pointer-events: none;
}

h1.wp-block-heading:has(> a > strong) > a:hover,
h1.wp-block-heading:has(> a > strong) > a:focus {
    text-decoration: none;
}

/* =========================================================
   WC MINI CART DRAWER - Title layout fix
   Target owner: BERKEI theme/child-theme

   The block-based mini-cart drawer renders its title as
   an h2 flex container with two block-level spans:
   "Dein Warenkorb" and "(Artikel: n)". At a typical drawer
   width (~480px) and the theme's default h2 font-size
   (32px), both spans shrink to their min-content (longest
   word), forcing each to wrap internally. The result looks
   like the item-count is on its own line, and the absolute-
   positioned close button overlaps the text on the right.

   Fix: reduce the title font-size, reserve space for the
   close button, and prevent the label/counter from wrapping
   internally so they stay on a single line.
   ========================================================= */
.wp-block-woocommerce-mini-cart-contents .wc-block-mini-cart__title {
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 0.4em;
    padding-right: 48px;
    font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem);
    line-height: 1.2;
}

.wp-block-woocommerce-mini-cart-contents .wp-block-woocommerce-mini-cart-title-label-block,
.wp-block-woocommerce-mini-cart-contents .wp-block-woocommerce-mini-cart-title-items-counter-block {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.wp-block-woocommerce-mini-cart-contents .wp-block-woocommerce-mini-cart-title-items-counter-block {
    flex: 0 0 auto;
    font-weight: 400;
    opacity: 0.7;
    font-size: 0.85em;
}

.wp-block-woocommerce-mini-cart-contents .wp-block-woocommerce-mini-cart-title-label-block {
    flex: 0 1 auto;
}

/* The hanging-indent "Lieferzeit:" pseudo-label is only valid
   inside the product summary's GZD block. In the mini-cart
   drawer the same .delivery-time-inner markup is rendered
   without the 8.5em padding-left, so the pseudo escapes to
   the left and the real text remains hidden by font-size: 0.
   Restore default rendering for any .delivery-time-inner
   that is not inside the product summary GZD block. */
.wp-block-woocommerce-mini-cart-contents .delivery-time-inner,
.xoo-wsc-modal .delivery-time-inner {
    display: inline !important;
    font-size: inherit !important;
    margin: 0 !important;
    padding: 0 !important;
}

.wp-block-woocommerce-mini-cart-contents .delivery-time-inner::before,
.xoo-wsc-modal .delivery-time-inner::before {
    content: none !important;
}
