/*
 * Flatsome / WooCommerce / legacy-section bridge onto the mt components (DESIGN.md).
 * The ONLY file allowed to target Flatsome, WooCommerce, plugin or legacy .medi-* markup,
 * and the only mt file allowed to use !important (to beat inline plugin CSS or legacy
 * !important rules). Delete it when the shop moves to the next theme.
 * Values come from tokens.css; each block mirrors one component in components.css.
 * "html body" raises specificity over Flatsome and legacy section rules without !important.
 */

/* ---------- Button: base shape for every button-like control ---------- */
html body .button.alt,
html body .button.primary,
html body .button.is-outline,
html body .single_add_to_cart_button,
html body .checkout-button,
html body #place_order,
html body .woocommerce-form-login__submit,
html body .woocommerce-form-register__submit,
html body input.wpcf7-submit,
html body .button-continue-shopping,
html body button[name="update_cart"],
html body .medi-inquiry__button,
html body .medi-files__login,
html body .medi-lan-hub__button,
html body .medi-article-cta__button,
html body .medi-empty-cart__search button,
html body .medi-catalog-trigger,
html body .medi-catalog-toolbar__parent-link,
html body .medi-category-description__toggle,
html body .medi-home--sheet .medi-home-section .medi-home-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--mt-space-2);
    min-height: var(--mt-control-h);
    height: auto;
    margin-top: 0;
    padding: 0 20px;
    border: 1px solid var(--mt-green-text);
    border-radius: var(--mt-radius-control);
    box-shadow: none;
    font-family: var(--mt-font);
    font-size: var(--mt-text-15);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.2;
    text-transform: none;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

/* primary (filled) */
html body .button.alt,
html body .button.primary:not(.is-outline):not(.button-continue-shopping),
html body .single_add_to_cart_button,
html body .checkout-button,
html body #place_order,
html body .woocommerce-form-login__submit,
html body .woocommerce-form-register__submit,
html body input.wpcf7-submit,
html body .medi-inquiry__button,
html body .medi-files__login,
html body .medi-lan-hub__button--primary,
html body .medi-article-cta__button,
html body .medi-empty-cart__search button,
html body .medi-home--sheet .medi-home-section .medi-home-button:not(.medi-home-button--quiet) {
    border-color: var(--mt-green-text);
    background: var(--mt-green-text);
    color: var(--mt-surface) !important; /* legacy rules set colour with !important */
}

html body .button.alt:hover,
html body .button.primary:not(.is-outline):not(.button-continue-shopping):hover,
html body .single_add_to_cart_button:hover,
html body .checkout-button:hover,
html body #place_order:hover,
html body .woocommerce-form-login__submit:hover,
html body .woocommerce-form-register__submit:hover,
html body input.wpcf7-submit:hover,
html body .medi-inquiry__button:hover,
html body .medi-files__login:hover,
html body .medi-lan-hub__button--primary:hover,
html body .medi-article-cta__button:hover,
html body .medi-empty-cart__search button:hover,
html body .medi-home--sheet .medi-home-section .medi-home-button:not(.medi-home-button--quiet):hover {
    border-color: var(--mt-green-deep);
    background: var(--mt-green-deep);
    box-shadow: none;
}

/* secondary (outline) */
html body .button.is-outline,
html body .button-continue-shopping,
html body button[name="update_cart"],
html body .medi-lan-hub__button:not(.medi-lan-hub__button--primary),
html body .medi-catalog-trigger,
html body .medi-catalog-toolbar__parent-link,
html body .medi-category-description__toggle,
html body .medi-home--sheet .medi-home-section .medi-home-button--quiet {
    border-color: var(--mt-green-text);
    background: var(--mt-surface);
    color: var(--mt-green-text) !important;
}

html body .button.is-outline:hover,
html body .button-continue-shopping:hover,
html body button[name="update_cart"]:hover,
html body .medi-lan-hub__button:not(.medi-lan-hub__button--primary):hover,
html body .medi-catalog-trigger:hover,
html body .medi-catalog-toolbar__parent-link:hover,
html body .medi-category-description__toggle:hover,
html body .medi-home--sheet .medi-home-section .medi-home-button--quiet:hover {
    border-color: var(--mt-green-deep);
    background: var(--mt-green-soft);
    color: var(--mt-green-deep) !important;
}

/* "Zaktualizuj koszyk" is disabled until a quantity changes: read as secondary, not pale primary */
html body button[name="update_cart"]:disabled {
    opacity: .55;
}

/* small size: list rows, related cards, toolbars, sticky bar */
html body .medi-product-row .button,
html body .medi-related-card__button,
html body .sticky-add-to-cart .button,
html body .medi-catalog-trigger,
html body .medi-catalog-toolbar__parent-link,
html body .medi-category-description__toggle,
html body .button.small {
    min-height: var(--mt-control-h-sm);
    padding: 0 14px;
    font-size: var(--mt-text-14);
}

html body .medi-catalog-trigger {
    box-shadow: none;
}

/* focus */
html body .button:focus-visible,
html body #place_order:focus-visible,
html body input.wpcf7-submit:focus-visible,
html body .medi-inquiry__button:focus-visible,
html body .medi-files__login:focus-visible,
html body .medi-lan-hub__button:focus-visible,
html body .medi-article-cta__button:focus-visible,
html body .medi-catalog-trigger:focus-visible,
html body .medi-catalog-toolbar__parent-link:focus-visible,
html body .medi-category-description__toggle:focus-visible {
    outline: none;
    box-shadow: var(--mt-focus);
}

/* ---------- Icon buttons (zoom, prev/next, share circles, carousel arrows) ---------- */
html body .button.icon.circle,
html body .zoom-button,
html body .medi-brand-logo-carousel__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    border: 1px solid var(--mt-line-strong);
    border-radius: var(--mt-radius-pill);
    background: var(--mt-surface);
    box-shadow: none;
    color: var(--mt-green-text) !important;
    line-height: 1;
}

html body .button.icon.circle:hover,
html body .zoom-button:hover,
html body .medi-brand-logo-carousel__arrow:hover {
    border-color: var(--mt-green-text);
    background: var(--mt-green-soft);
}

/* on the dark title band the prev/next circles stay light-on-dark */
html body .page-title.dark .button.icon.circle {
    border-color: rgba(255, 255, 255, .6);
    background: transparent;
    color: var(--mt-surface) !important;
}

/* ---------- Quantity stepper: one 40px group ---------- */
html body .quantity.buttons_added {
    display: inline-flex;
    align-items: stretch;
    height: 40px;
    margin: 0;
    border: 1px solid var(--mt-line-strong);
    border-radius: var(--mt-radius-control);
    background: var(--mt-surface);
    overflow: hidden;
}

html body .quantity.buttons_added .button.minus,
html body .quantity.buttons_added .button.plus {
    width: 38px;
    min-width: 38px;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--mt-surface);
    box-shadow: none;
    color: var(--mt-ink) !important;
    font-size: 16px;
    font-weight: 700;
}

html body .quantity.buttons_added .button.minus:hover,
html body .quantity.buttons_added .button.plus:hover {
    background: var(--mt-green-soft);
}

html body .quantity.buttons_added input.qty {
    width: 44px;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-right: 1px solid var(--mt-line);
    border-left: 1px solid var(--mt-line);
    border-radius: 0;
    background: var(--mt-surface);
    box-shadow: none;
    color: var(--mt-ink);
    font-size: var(--mt-text-15);
    font-weight: 700;
}

/* ---------- Fields: checkout, account, contact form, on-page searches ---------- */
html body .woocommerce-checkout .form-row .input-text,
html body .woocommerce-checkout .form-row select,
html body .woocommerce-account .form-row .input-text,
html body .woocommerce-form-login .input-text,
html body .woocommerce-form-register .input-text,
html body .woocommerce-cart-form .input-text:not(.qty),
html body .wpcf7 input.wpcf7-form-control:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
html body .wpcf7 select.wpcf7-form-control,
html body .wpcf7 textarea.wpcf7-form-control {
    min-height: var(--mt-control-h);
    margin-bottom: 0;
    padding: 0 12px;
    border: 1px solid var(--mt-line-strong);
    border-radius: var(--mt-radius-control);
    background: var(--mt-surface);
    box-shadow: none;
    color: var(--mt-ink);
    font-family: var(--mt-font);
    font-size: var(--mt-text-15);
}

html body .woocommerce-checkout textarea.input-text,
html body .wpcf7 textarea.wpcf7-form-control {
    min-height: 120px;
    padding: 10px 12px;
}

/* focus: the same ring as buttons (--mt-focus); the old soft halo was 1.07:1 on white */
html body .woocommerce-checkout .form-row .input-text:focus,
html body .woocommerce-checkout .form-row select:focus,
html body .woocommerce-checkout .form-row textarea:focus,
html body .woocommerce-account .form-row .input-text:focus,
html body .woocommerce-account .form-row select:focus,
html body .woocommerce-form-login .input-text:focus,
html body .woocommerce-form-register .input-text:focus,
html body .woocommerce-cart-form .input-text:focus,
html body .wpcf7 .wpcf7-form-control:not([type="submit"]):focus {
    border-color: var(--mt-green-text);
    outline: none;
    box-shadow: var(--mt-focus);
}

html body .select2-container--focus .select2-selection--single,
html body .select2-container--open .select2-selection--single {
    border-color: var(--mt-green-text);
    box-shadow: var(--mt-focus);
}

html body .select2-container .select2-selection--single {
    height: var(--mt-control-h);
    border: 1px solid var(--mt-line-strong);
    border-radius: var(--mt-radius-control);
}

html body .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 42px;
    padding-left: 12px;
}

html body .select2-container .select2-selection--single .select2-selection__arrow {
    height: 42px;
}

/* on-page search fields: one pill, 44px */
html body .medi-category-filter-search input,
html body .medi-empty-cart__search input[type="search"],
html body .medi-lan-hub input[type="search"],
html body .medi-brand-hub input[type="search"] {
    min-height: var(--mt-control-h);
    height: var(--mt-control-h);
    border: 1px solid var(--mt-line-strong);
    border-radius: var(--mt-radius-pill);
    background: var(--mt-surface);
    box-shadow: none;
    font-size: var(--mt-text-15);
}

html body .medi-empty-cart__search button {
    height: var(--mt-control-h);
}

/* ---------- Cards: one radius, one border, one resting shadow ---------- */
html body .medi-related-card,
html body .medi-home-card,
html body .medi-brand-card,
html body .medi-blog-card,
html body .medi-article-cta,
html body .medi-article-faq,
html body .medi-lan-hub__category-card,
html body .medi-lan-hub__standard-card,
html body .medi-horizontal-filters__scroller > .widget,
html body .medi-brand-logo-carousel__item,
html body .medi-box-round-15,
html body .medi-single-product__summary,
html body .medi-single-product__gallery .woocommerce-product-gallery {
    border: 1px solid var(--mt-line);
    border-radius: var(--mt-radius-card);
    box-shadow: var(--mt-shadow-low);
}

/* Flatsome boxes on the contact page carried a heavy 0.2-alpha shadow */
html body .medi-box-round-15 .box,
html body .medi-box-round-15.box {
    box-shadow: none;
}

/* ---------- Headings: Flatsome grey #555 → ink; section heading scale ---------- */
html body h1,
html body h2,
html body h3,
html body h4 {
    color: var(--mt-ink);
}

html body .medi-related-products__title {
    margin: 0 0 var(--mt-space-4);
    color: var(--mt-ink);
    font-size: var(--mt-text-h2);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.2;
    text-transform: none;
}

/* ---------- Related products: aligned cards (template: woocommerce/medi-related-products.php) ---------- */
html body .medi-related-card {
    display: flex;
    flex-direction: column;
}

html body .medi-related-card__content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

html body .medi-related-card__name {
    display: -webkit-box;
    min-height: calc(2 * 1.35em);
    overflow: hidden;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

html body .medi-related-card__meta {
    min-height: calc(2 * 1.5em);
    line-height: 1.5;
}

html body .medi-related-card__footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(38px, auto) auto auto;
    align-items: end;
    gap: var(--mt-space-2);
    margin-top: auto;
}

html body .medi-related-card__price {
    min-height: 38px;
}

html body .medi-related-card__footer form,
html body .medi-related-card__footer .meditronik-cart-action {
    grid-column: 1 / -1;
    width: 100%;
    margin: 0;
}

html body .medi-related-card__button {
    grid-column: 1 / -1;
    width: 100%;
}

/* ---------- Cart lines everywhere (cart, checkout, header mini-cart): the product code ---------- */
/* "Indeks: …" under the name (functions.php woocommerce_get_item_data) */
html body .woocommerce-cart-form__contents dl.variation,
html body .woocommerce-checkout-review-order-table dl.variation,
html body .widget_shopping_cart dl.variation {
    display: flex;
    flex-wrap: wrap;
    gap: 0 var(--mt-space-1);
    margin: var(--mt-space-1) 0 0;
    padding: 0;
    border: 0;
    font-size: var(--mt-text-13);
    line-height: 1.4;
}

html body dl.variation dt.variation-Indeks {
    margin: 0;
    color: var(--mt-muted);
    font-weight: 400;
}

html body dl.variation dd.variation-Indeks,
html body dl.variation dd.variation-Indeks p {
    margin: 0;
    color: var(--mt-green-text);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Flatsome fades every dl to .9 opacity: muted labels then fall under 4.5:1 */
html body dl.variation {
    opacity: 1;
}

/* ---------- WooCommerce notices ---------- */
/* Woo focuses the notice (tabindex="-1", role="alert") so screen readers announce it; the
   browser then draws a black focus outline round a non-interactive box */
html body .woocommerce-message[tabindex="-1"]:focus,
html body .woocommerce-info[tabindex="-1"]:focus,
html body .woocommerce-error[tabindex="-1"]:focus {
    outline: none;
}

/* ---------- 12px floor for Flatsome widgets ---------- */
html body .badge .post-date-month,
html body .post-date-month.is-xsmall {
    font-size: var(--mt-text-12);
}

/* brand filter (Perfect WooCommerce Brands) labels rendered at 10.8px */
html body .pwb-filter-products label,
html body .pwb-filter-products label span {
    font-size: var(--mt-text-13);
}

/* ======================================================================
   Phase 2: catalogue density (DESIGN.md: parameters and prices first).
   Listing row (woocommerce/content-product.php), related card specs.
   ====================================================================== */

/* row: 112px image | body | 210px buy column; no fixed min-heights */
html body .category-page-row .products .medi-product-row,
html body .products .medi-product-row {
    grid-template-columns: 112px minmax(0, 1fr) 210px;
    gap: 16px;
    min-height: 0;
    margin: 0 0 var(--mt-space-2);
    padding: 12px !important; /* legacy rule uses !important */
    border: 1px solid var(--mt-line);
    border-radius: var(--mt-radius-card);
    box-shadow: var(--mt-shadow-low);
}

html body .category-page-row .products .medi-product-row:hover {
    border-color: var(--mt-line-strong);
    box-shadow: var(--mt-shadow-raised);
}

html body .medi-product-row__image .box-image {
    height: 112px;
    min-height: 0;
    padding: 4px;
    border: 0;
}

html body .medi-product-row__image img {
    max-height: 104px;
}

html body .medi-product-row__title {
    min-height: 0;
    margin: 0 0 4px;
    font-size: var(--mt-text-15);
    font-weight: 700;
}

html body .medi-product-row__meta {
    gap: 2px 14px;
    margin: 0 0 8px;
}

html body .medi-product-row__meta li {
    margin: 0;
    font-size: var(--mt-text-13);
}

/* parameters: a quiet "label value" list, not grey boxes (static facts) */
html body .medi-product-row__specs,
html body .medi-related-card__specs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    max-width: none;
    margin: 0;
}

html body .medi-product-row__spec,
html body .medi-related-card__specs > div {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
}

html body .medi-product-row__spec dt,
html body .medi-related-card__specs dt {
    margin: 0;
    color: var(--mt-muted);
    font-size: var(--mt-text-13);
    font-weight: 400;
    white-space: nowrap;
}

html body .medi-product-row__spec dd,
html body .medi-related-card__specs dd {
    display: inline;
    margin: 0;
    overflow: visible;
    color: var(--mt-ink);
    font-size: var(--mt-text-13);
    font-weight: 700;
    white-space: nowrap;
    -webkit-line-clamp: unset;
}

/* buy column */
html body .medi-product-row__buy {
    grid-template-rows: auto auto auto 1fr;
    row-gap: 4px;
    padding-left: 16px;
    border-left: 1px solid var(--mt-line);
}

html body .medi-product-row__price-slot {
    min-height: 0;
}

html body .medi-product-row__stock {
    font-size: var(--mt-text-14);
    font-weight: 700;
}

html body .medi-product-row__stock--empty,
html body .medi-product-row__availability--empty {
    display: none;
}

/* channels ("Sklep", "Dostawca") are facts: plain muted text, not pills */
html body .medi-product-row__availability {
    display: flex;
    flex-wrap: wrap;
    gap: 0 6px;
    min-height: 0;
}

html body .medi-product-row__availability-chip,
html body .medi-single-availability__chip {
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--mt-muted);
    font-size: var(--mt-text-13);
    font-weight: 400;
}

html body .medi-product-row__availability-chip + .medi-product-row__availability-chip::before,
html body .medi-single-availability__chip + .medi-single-availability__chip::before {
    content: "· ";
}

html body .medi-product-row__cta {
    align-self: end;
}

html body .medi-product-row__buy .button,
html body .medi-product-row__buy .add_to_cart_button {
    width: 100%;
    margin: 6px 0 0;
}

/* phones: image + body, then one buy bar (price left, button right) */
@media (max-width: 848px) {
    html body .category-page-row .products .medi-product-row,
    html body .products .medi-product-row {
        grid-template-columns: 80px minmax(0, 1fr);
        gap: 8px 12px;
        padding: 10px !important;
    }

    html body .medi-product-row__image .box-image {
        height: 80px;
        min-height: 0;
        padding: 2px;
    }

    html body .medi-product-row__image img {
        max-height: 76px;
    }

    html body .medi-product-row__title {
        font-size: var(--mt-text-14);
    }

    html body .medi-product-row__meta {
        display: flex;
        margin-bottom: 6px;
    }

    html body .medi-product-row__specs {
        grid-column: auto;
        gap: 2px 12px;
    }

    html body .medi-product-row__spec {
        display: inline-flex;
        min-height: 0;
        padding: 0;
    }

    html body .medi-product-row__spec dd {
        display: inline;
        white-space: nowrap;
    }

    html body .medi-product-row__buy {
        grid-column: 1 / -1;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        align-items: center;
        column-gap: 12px;
        padding: 8px 0 0;
        border-top: 1px solid var(--mt-line);
        border-left: 0;
    }

    html body .medi-product-row__price-slot {
        grid-column: 1;
        grid-row: 1 / span 2;
    }

    html body .medi-product-row__price-slot .price {
        font-size: var(--mt-text-17);
    }

    html body .medi-product-row__stock,
    html body .medi-product-row__availability {
        grid-column: 2;
        justify-self: end;
        text-align: right;
    }

    html body .medi-product-row__cta {
        grid-column: 1 / -1;
    }

    html body .medi-product-row__buy .button,
    html body .medi-product-row__buy .add_to_cart_button {
        margin-top: 6px;
    }
}

/* the add-to-cart form inside rows carried Flatsome's 1.3em form margin */
html body .medi-product-row__cta form,
html body .medi-product-row__cta > * {
    margin-bottom: 0;
}

html body .medi-product-row__meta li {
    display: inline;
    flex: 0 0 auto;
    width: auto;
}

html body .medi-product-row__cta .add-to-cart-button {
    margin-top: 6px;
}

html body .medi-product-row__buy .add-to-cart-button .button {
    margin-top: 0;
}

/* Flatsome UX Builder depth (box-shadow-1…5 / row-box-shadow-*): one card look instead of
   heavy 0.2-alpha drop shadows (contact page and other builder pages). */
html body [class*="row-box-shadow-"] .col-inner,
html body [class*="row-box-shadow-"] > .col > .col-inner,
html body .box-shadow-1, html body .box-shadow-2, html body .box-shadow-3,
html body .box-shadow-4, html body .box-shadow-5 {
    border: 1px solid var(--mt-line);
    border-radius: var(--mt-radius-card) !important; /* builder prints per-column #col-… radius */
    box-shadow: var(--mt-shadow-low);
}

/* ======================================================================
   Catalogue toolbar and filter panel: one option control everywhere.
   (WooCommerce layered nav links, stock filter, PWB brand checkboxes.)
   ====================================================================== */
html body .medi-catalog-toolbar {
    align-items: center;
    gap: var(--mt-space-3);
}

html body .medi-catalog-toolbar > * {
    height: var(--mt-control-h-sm);
    margin: 0;
}

/* columns: no inner cards, no fixed height; hairline dividers */
html body .medi-horizontal-filters__scroller {
    gap: 0;
}

html body .medi-horizontal-filters__scroller > .widget {
    flex: 0 0 220px;
    height: auto;
    min-height: 0;
    padding: 4px 20px 4px 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
}

html body .medi-horizontal-filters__scroller > .widget + .widget {
    padding-left: 20px;
    border-left: 1px solid var(--mt-line);
}

html body .medi-horizontal-filters__scroller > .widget .widget-title {
    margin: 0;
    color: var(--mt-ink);
    font-size: var(--mt-text-14);
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

html body .medi-horizontal-filters__facet-heading {
    margin-bottom: 6px;
}

html body .medi-horizontal-filters__scroller > .widget > .widget-title {
    display: block;
    margin-bottom: 6px;
}

html body .medi-horizontal-filters__scroller > .widget li + li {
    margin-top: 2px;
}

/* every option row: [box] label ........ count */
html body .medi-horizontal-filters__scroller > .widget li > a:where(:not(.medi-horizontal-filters__reset)),
html body .medi-horizontal-filters__option,
html body .medi-horizontal-filters__scroller .pwb-filter-products label {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 30px;
    margin: 0;
    padding: 0;
    color: var(--mt-ink);
    font-size: var(--mt-text-14);
    font-weight: 400;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
}

html body .medi-horizontal-filters__scroller .pwb-filter-products label span {
    font-size: var(--mt-text-14);
    font-weight: 400;
}

html body .medi-horizontal-filters__scroller > .widget li > a:where(:not(.medi-horizontal-filters__reset))::before,
html body .medi-horizontal-filters__option::before {
    content: "";
    display: inline-block;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    border: 1px solid var(--mt-line-strong);
    border-radius: 4px;
    background: var(--mt-surface);
    color: var(--mt-surface);
    font-size: 12px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
}

html body .medi-horizontal-filters__scroller .pwb-filter-products input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    display: inline-grid;
    place-content: center;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin: 0;
    border: 1px solid var(--mt-line-strong);
    border-radius: 4px;
    background: var(--mt-surface);
    cursor: pointer;
}

html body .medi-horizontal-filters__scroller .pwb-filter-products input[type="checkbox"]:checked {
    border-color: var(--mt-green-text);
    background: var(--mt-green-text);
}

html body .medi-horizontal-filters__scroller .pwb-filter-products input[type="checkbox"]:checked::before {
    content: "\2713";
    color: var(--mt-surface);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

html body .medi-horizontal-filters__scroller .pwb-filter-products input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: var(--mt-focus);
}

/* hover and chosen states */
html body .medi-horizontal-filters__scroller > .widget li > a:hover,
html body .medi-horizontal-filters__option:hover,
html body .medi-horizontal-filters__scroller .pwb-filter-products label:hover {
    color: var(--mt-green-text);
}

html body .medi-horizontal-filters__scroller > .widget li > a:hover::before,
html body .medi-horizontal-filters__option:hover::before,
html body .medi-horizontal-filters__scroller .pwb-filter-products label:hover input {
    border-color: var(--mt-green-text);
}

html body .medi-horizontal-filters__scroller .chosen > a,
html body .medi-horizontal-filters__scroller .chosen .medi-horizontal-filters__option {
    color: var(--mt-ink);
    font-weight: 700;
}

html body .medi-horizontal-filters__scroller .chosen > a::before,
html body .medi-horizontal-filters__scroller .chosen .medi-horizontal-filters__option::before,
html body .medi-horizontal-filters__scroller .woocommerce-widget-layered-nav-list__item--chosen > a::before {
    content: "\2713";
    border-color: var(--mt-green-text);
    border-radius: 4px;
    background: var(--mt-green-text);
    color: var(--mt-surface);
}

html body .medi-horizontal-filters__scroller > .widget .count {
    margin-left: auto;
    padding-left: 8px;
    color: var(--mt-muted);
    font-size: var(--mt-text-13);
    opacity: 1;
}

/* "Wyczyść" per group: a text action; "Wyczyść wszystkie filtry": a small secondary button */
html body .medi-horizontal-filters .medi-horizontal-filters__reset {
    min-height: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--mt-green-text);
    font-size: var(--mt-text-13);
    font-weight: 700;
}

html body .medi-horizontal-filters .medi-horizontal-filters__reset:hover {
    background: none;
    color: var(--mt-green-deep);
    text-decoration: underline;
    text-underline-offset: 3px;
}

html body .medi-horizontal-filters .medi-horizontal-filters__reset::before {
    content: none;
}

html body .medi-horizontal-filters__header > .medi-horizontal-filters__reset {
    min-height: var(--mt-control-h-sm);
    padding: 0 14px;
    border: 1px solid var(--mt-green-text);
    border-radius: var(--mt-radius-control);
    background: var(--mt-surface);
    font-size: var(--mt-text-14);
}

html body .medi-horizontal-filters__header > .medi-horizontal-filters__reset:hover {
    background: var(--mt-green-soft);
    text-decoration: none;
}

/* chosen option: must out-rank the generic option rule above and Flatsome's
   ".widget li.chosen a:before" (content "x", opacity .6, top -2px) */
html body .medi-horizontal-filters__scroller > .widget li.chosen > a:where(:not(.medi-horizontal-filters__reset))::before,
html body .medi-horizontal-filters__scroller > .widget li.woocommerce-widget-layered-nav-list__item--chosen > a::before {
    content: "\2713";
    top: 0;
    margin: 0;
    border-color: var(--mt-green-text);
    background: var(--mt-green-text);
    color: var(--mt-surface);
    font-family: var(--mt-font);
    opacity: 1;
}

html body .medi-horizontal-filters__scroller > .widget li > a:where(:not(.medi-horizontal-filters__reset))::before {
    position: static;
    margin: 0;
    opacity: 1;
}

/* dropdown-type facets (e.g. "Długość kabla") look like the other fields */
html body .medi-horizontal-filters__scroller select.woocommerce-widget-layered-nav-dropdown,
html body .medi-horizontal-filters__scroller .select2-container .select2-selection--single {
    width: 100%;
    height: var(--mt-control-h-sm);
    min-height: var(--mt-control-h-sm);
    margin: 0;
    padding: 0 10px;
    border: 1px solid var(--mt-line-strong);
    border-radius: var(--mt-radius-control);
    background-color: var(--mt-surface);
    box-shadow: none;
    color: var(--mt-ink);
    font-size: var(--mt-text-14);
}

/* phones: filter header as title row + action row, helper note hidden */
@media (max-width: 549px) {
    html body .medi-horizontal-filters__header {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: var(--mt-space-2) var(--mt-space-3);
    }

    html body .medi-horizontal-filters__toggle {
        flex: 1 1 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    html body .medi-horizontal-filters__toggle-copy {
        display: block;
    }

    html body .medi-horizontal-filters__note {
        display: none;
    }

    html body .medi-horizontal-filters__title {
        font-size: var(--mt-text-17);
    }

    html body .medi-horizontal-filters__header > .medi-horizontal-filters__reset {
        flex: 0 0 auto;
    }
}

/* ---------- Main category bar dropdowns (Main 2026 menu): one card list ---------- */
html body #wide-nav .nav-dropdown {
    min-width: 240px;
    padding: 8px;
    border: 1px solid var(--mt-line);
    border-radius: var(--mt-radius-card);
    background: var(--mt-surface);
    box-shadow: var(--mt-shadow-raised);
}

html body #wide-nav .nav-dropdown > li {
    border: 0;
}

html body #wide-nav .nav-dropdown > li > a,
html body #wide-nav .nav-dropdown .nav-dropdown-col > a {
    display: block;
    margin: 0;
    padding: 9px 12px;
    border: 0;
    border-radius: var(--mt-radius-control);
    color: var(--mt-ink) !important; /* legacy bridge-less rule sets #009b3a with !important */
    font-size: var(--mt-text-14);
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.3;
    text-transform: none;
}

html body #wide-nav .nav-dropdown > li > a:hover,
html body #wide-nav .nav-dropdown > li > a:focus-visible {
    background: var(--mt-green-soft);
    color: var(--mt-green-text) !important;
}

html body #wide-nav .nav-dropdown.nav-dropdown-bold > li > a,
html body #wide-nav .nav-dropdown-has-border .nav-dropdown {
    border-right: 0;
}

html body #wide-nav .nav-dropdown::before,
html body #wide-nav .nav-dropdown::after {
    display: none;
}

/* the last items open towards the left so they stay on screen at 1280px */
html body #wide-nav .header-bottom-nav > li:nth-last-child(-n+4) > .nav-dropdown {
    right: 0;
    left: auto;
}

/* ---------- Phone off-canvas menu (Main 2026 mobile): readable rows ---------- */
html body #main-menu .nav-sidebar > li > a {
    display: flex;
    align-items: center;
    min-height: var(--mt-control-h);
    padding: 0 20px;
    color: var(--mt-ink);
    font-size: var(--mt-text-15);
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

html body #main-menu .nav-sidebar > li > a:hover,
html body #main-menu .nav-sidebar > li.active > a {
    color: var(--mt-green-text);
}

html body #main-menu .nav-sidebar > li {
    border-top: 1px solid var(--mt-line);
}

/* keyboard: a focused top-level item opens its dropdown (Flatsome opens on hover only) */
html body #wide-nav .header-bottom-nav > li.has-dropdown:focus-within > .nav-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    left: auto;
}

html body #wide-nav .header-bottom-nav > li > a:focus-visible {
    outline: 2px solid var(--mt-surface);
    outline-offset: -4px;
}

/* ======================================================================
   Article body (Flatsome single post + block editor markup) → mt-prose.
   One article template: no eyebrows, no gradient bars, no dots, no boxed lists,
   one table style. Article-specific legacy components stay quiet cards.
   ====================================================================== */
html body.single-post .blog-single {
    padding-top: 0;
    background: none;
}

html body.single-post .blog-single .large-10.col {
    flex-basis: 100%;
    max-width: 820px;
    margin: 0 auto;
    padding: 0 var(--mt-space-4);
}

html body.single-post .article-inner {
    margin: 0 0 var(--mt-space-section);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
}

html body.single-post .article-inner::before,
html body.single-post .article-inner::after,
html body.single-post .entry-content h2::after,
html body.single-post .entry-content h2::before,
html body.single-post .entry-content h3::before,
html body.single-post .entry-content h3::after,
html body.single-post .entry-header .entry-title::after {
    content: none;
    display: none;
}

html body.single-post .entry-content {
    max-width: 64ch;
    margin: 0;
    padding: 0;
    color: var(--mt-ink);
    font-size: var(--mt-text-17);
    line-height: 1.65;
}

html body.single-post .entry-content > p,
html body.single-post .entry-content p {
    max-width: none;
    margin: 0 0 1em;
    font-size: inherit;
    line-height: inherit;
}

html body.single-post .entry-content h2 {
    margin: 2.2em 0 .5em;
    padding: 0;
    color: var(--mt-ink);
    font-size: var(--mt-text-h2);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.2;
    text-transform: none;
}

html body.single-post .entry-content h3,
html body.single-post .entry-content > h3 {
    margin: 1.6em 0 .4em;
    padding: 0;
    color: var(--mt-ink);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
    text-transform: none;
}

html body.single-post .entry-content ul,
html body.single-post .entry-content ol {
    margin: 0 0 1em;
    padding: 0 0 0 1.3em;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
}

html body.single-post .entry-content li {
    margin: 0 0 .35em;
    padding: 0;
    border: 0;
    font-size: inherit;
}

html body.single-post .entry-content li::before {
    content: none;
}

html body.single-post .entry-content a:not(.button):not(.mt-btn):not(.medi-article-cta__button) {
    color: var(--mt-green-text);
    font-weight: 400;
    text-decoration: underline;
    text-underline-offset: 3px;
}

html body.single-post .entry-content strong,
html body.single-post .entry-content b {
    color: var(--mt-ink);
    font-weight: 700;
}

/* tables: the mt-table look; wide tables may use the full column */
html body.single-post .entry-content table,
html body.single-post .entry-content > table {
    width: 100%;
    margin: 0 0 1.4em;
    border: 1px solid var(--mt-line);
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--mt-radius-card);
    background: var(--mt-surface);
    box-shadow: none;
    font-size: var(--mt-text-14);
    font-variant-numeric: tabular-nums;
}

html body.single-post .entry-content table th,
html body.single-post .entry-content table td {
    padding: 10px 14px;
    border: 0;
    border-bottom: 1px solid var(--mt-line);
    color: var(--mt-ink);
    text-align: left;
    vertical-align: top;
}

html body.single-post .entry-content table th,
html body.single-post .entry-content table thead td {
    background: var(--mt-bg);
    color: var(--mt-muted);
    font-size: var(--mt-text-13);
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

html body.single-post .entry-content table tr:last-child > * {
    border-bottom: 0;
}

html body.single-post .entry-content .has-text-align-center {
    text-align: left;
}

html body.single-post .entry-content figure.wp-block-table {
    margin: 0 0 1.4em;
    overflow-x: auto;
}

/* in-article call-to-action and FAQ blocks: quiet cards, no eyebrow label */
html body.single-post .medi-article-cta,
html body.single-post .medi-article-faq {
    margin: 1.6em 0;
    padding: var(--mt-space-5);
    border: 1px solid var(--mt-line);
    border-radius: var(--mt-radius-card);
    background: var(--mt-surface);
    box-shadow: none;
}

html body.single-post .medi-article-cta__eyebrow {
    display: none;
}

/* author box and previous/next navigation */
html body.single-post .entry-author.author-box {
    margin: var(--mt-space-6) 0 0;
    padding: var(--mt-space-4) 0 0;
    border: 0;
    border-top: 1px solid var(--mt-line);
    border-radius: 0;
    background: none;
    box-shadow: none;
}

@media (max-width: 549px) {
    html body.single-post .entry-content {
        font-size: 16px;
    }
}

/* ==========================================================================
   Rack size guide plugin ([meditronik_rack_guide], not in repo) → mt-table.
   Its own intro repeats the article lead, so it is hidden; each size table
   becomes a plain mt-table-wrap card with sentence-case headings.
   ========================================================================== */
html body .medi-rack-guide {
    gap: var(--mt-space-6);
    margin: var(--mt-space-5) 0 var(--mt-space-6);
}

html body .medi-rack-guide__intro {
    display: none;
}

html body .medi-rack-table {
    background: var(--mt-surface);
    border: 1px solid var(--mt-line);
    border-left: 1px solid var(--mt-line);
    border-radius: var(--mt-radius-card);
    box-shadow: none;
}

html body .medi-rack-table__header {
    padding: var(--mt-space-5) var(--mt-space-5) var(--mt-space-3);
}

html body .medi-rack-table h2,
html body.single-post .entry-content .medi-rack-table h2 {
    color: var(--mt-ink);
    font-size: var(--mt-text-18);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.3;
    margin: 0 0 6px;
}

html body .medi-rack-table__header p {
    color: var(--mt-muted);
    font-size: var(--mt-text-14);
    margin: 0;
}

html body .medi-rack-table table {
    font-variant-numeric: tabular-nums;
}

@media (min-width: 850px) {
    html body .medi-rack-table table {
        min-width: 0;
    }
}

html body .medi-rack-table th,
html body .medi-rack-table td {
    border-top: 0;
    border-bottom: 1px solid var(--mt-line);
    color: var(--mt-ink);
    padding: 10px 14px;
}

html body .medi-rack-table th {
    background: var(--mt-bg);
    color: var(--mt-muted);
    font-size: var(--mt-text-13);
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

html body .medi-rack-table tbody tr:last-child > * {
    border-bottom: 0;
}

html body .medi-rack-table tbody tr:hover {
    background: var(--mt-bg);
}

html body .medi-rack-table__link {
    display: inline;
    border-radius: 0;
    color: var(--mt-green-text) !important;
    font-size: var(--mt-text-14);
    font-weight: 700;
}

html body .medi-rack-table__link:hover {
    color: var(--mt-green-deep) !important;
    text-decoration: underline;
}

html body .medi-rack-table__muted {
    color: var(--mt-muted);
}

/* Article author (child template-parts/posts/content-single.php prints a <p>, not an <h5>). */
html body.single-post .author-box .author-name {
    margin: 0 0 4px;
    padding: 0;
    color: var(--mt-ink);
    font-size: var(--mt-text-15);
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

html body.single-post .author-box .author-desc {
    margin: 0;
    color: var(--mt-muted);
    font-size: var(--mt-text-14);
    line-height: 1.5;
}

/* ======================================================================
   Header (audit 2026-11-28): the main row and the category bar share the content
   container, the search field has a measure, account and cart are 44px sentence-case
   controls with drawn icons. Markup: Flatsome header builder (Customizer).
   ====================================================================== */

/* same edges as the page content at every width (Customizer "Full Width" header) */
html body .header-full-width #masthead > .container,
html body .header-full-width #masthead .header-inner,
html body .header-full-width #wide-nav > .container,
html body .header-full-width .header-wrapper > .container {
    max-width: 1570px !important;
}

/* surface and height */
html body #header .header-bg-color,
html body #masthead {
    background-color: var(--mt-surface) !important;
}

@media (min-width: 850px) {
    html body #masthead.header-main {
        height: 72px;
    }

    html body .stuck #masthead.header-main {
        height: 60px !important;
    }
}

/* search: a centred field of fixed measure, the green button attached on the right */
@media (min-width: 850px) {
    html body #masthead .flex-col.flex-left.flex-grow {
        display: flex;
        justify-content: center;
        padding: 0 var(--mt-space-6);
    }

    html body #masthead .flex-col.flex-left.flex-grow > .header-nav {
        width: 100%;
        max-width: 720px;
    }

    html body #masthead .header-search-form {
        width: 100%;
        margin: 0;
    }

    html body #masthead .header-search-form-wrapper,
    html body #masthead .searchform-wrapper {
        width: 100%;
    }
}

html body #masthead .searchform .search-field {
    height: var(--mt-control-h);
    min-height: var(--mt-control-h);
    padding: 0 var(--mt-space-4) 0 20px;
    border: 1px solid var(--mt-line-strong) !important;
    border-right: 0 !important;
    border-radius: var(--mt-radius-pill) 0 0 var(--mt-radius-pill);
    background: var(--mt-surface) !important;
    box-shadow: none;
    color: var(--mt-ink) !important;
    font-size: var(--mt-text-15);
}

/* Flatsome pads the button's column 4px on the right: the pill's focus ring then curved
   4px outside the button */
html body #header .searchform > .flex-row > .flex-col:last-child {
    padding-right: 0;
}

html body #masthead .searchform .ux-search-submit {
    width: 52px;
    height: var(--mt-control-h);
    min-height: var(--mt-control-h);
    margin: 0;
    border: 0;
    border-radius: 0 var(--mt-radius-pill) var(--mt-radius-pill) 0 !important;
    background: var(--mt-green-text) !important;
    color: var(--mt-surface) !important;
    box-shadow: none;
}

html body #masthead .searchform .ux-search-submit:hover {
    background: var(--mt-green-deep) !important;
}

/* focus ring around the whole pill (field + button), not the field's square right edge */
html body #header .searchform .search-field:focus,
html body #header .searchform .search-field:focus-visible {
    border-color: var(--mt-green-text) !important;
    outline: none;
    box-shadow: none;
}

html body #header .searchform .ux-search-submit:focus-visible {
    outline: none;
    box-shadow: none !important;
}

html body #header .searchform > .flex-row {
    border-radius: var(--mt-radius-pill);
}

html body #header .searchform > .flex-row:has(:focus-visible) {
    box-shadow: var(--mt-focus);
}

/* phones: the field is an 8px box on the green bar, where a green ring would not show */
@media (max-width: 849px) {
    html body #header .header-bottom .searchform > .flex-row {
        border-radius: var(--mt-radius-control);
    }

    html body #header .header-bottom .searchform > .flex-row:has(:focus-visible) {
        box-shadow: 0 0 0 2px var(--mt-green-night), 0 0 0 4px var(--mt-surface);
    }
}

/* account and cart: 44px, sentence case, drawn icons */
html body #masthead .header-nav-main > li > a.nav-top-link {
    display: inline-flex;
    align-items: center;
    gap: var(--mt-space-2);
    min-height: var(--mt-control-h);
    padding: 0 var(--mt-space-2);
    border-radius: var(--mt-radius-control);
    color: var(--mt-ink);
    font-size: var(--mt-text-14);
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

html body #masthead .header-nav-main > li > a.nav-top-link:hover {
    background: var(--mt-green-soft);
    color: var(--mt-green-text);
}

html body #masthead .header-nav-main > li > a.nav-top-link:focus-visible {
    outline: none;
    box-shadow: var(--mt-focus);
}

html body #masthead .header-nav-main .header-divider {
    display: none;
}

html body #masthead .account-item > a.nav-top-not-logged-in::before,
html body #masthead .account-item > a.nav-top-link:not(.nav-top-not-logged-in)::before {
    content: "";
    position: static;
    opacity: 1 !important; /* Flatsome fades the other items' a::before while one is hovered */
    transform: none !important;
    flex: none;
    width: 22px;
    height: 22px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4.4 3.6-7 8-7s8 2.6 8 7'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4.4 3.6-7 8-7s8 2.6 8 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

html body #masthead .account-item > a i,
html body #masthead .account-item > a .image-icon {
    display: none;
}

/* cart: icon with a round count, then "Koszyk" over the net amount */
html body #masthead .header-nav-main > li.cart-item > a.header-cart-link {
    flex-direction: row-reverse;
    gap: 22px; /* room for the count badge that sits over the icon's corner */
    padding-right: var(--mt-space-3);
}

html body #masthead .header-cart-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

html body #masthead .header-cart-title::before {
    content: "Koszyk";
    color: var(--mt-muted);
    font-size: var(--mt-text-12);
    font-weight: 400;
}

html body #masthead .header-cart-title .cart-price {
    color: var(--mt-ink);
    font-size: var(--mt-text-14);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

html body #masthead .header-cart-title .medi-price__label {
    color: var(--mt-muted);
    font-size: var(--mt-text-12);
    font-weight: 400;
}

html body #header .cart-item .cart-icon {
    position: relative;
    display: inline-flex;
    width: 24px;
    height: 24px;
    margin: 0;
}

html body #header .cart-item .cart-icon::before {
    content: "";
    width: 24px;
    height: 24px;
    background: var(--mt-ink);
    -webkit-mask: var(--mt-icon-cart) center / contain no-repeat;
    mask: var(--mt-icon-cart) center / contain no-repeat;
}

html body #header .cart-item .cart-icon strong {
    position: absolute;
    top: -8px;
    right: -10px;
    min-width: 20px;
    height: 20px;
    margin: 0;
    padding: 0 5px;
    border: 0 !important;
    border-radius: var(--mt-radius-pill);
    background: var(--mt-green-text);
    color: var(--mt-surface);
    font-size: var(--mt-text-12);
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

html body #header .cart-item .cart-icon strong::after {
    display: none;
}

/* phones: hamburger and cart are 44px targets */
@media (max-width: 849px) {
    html body #masthead .mobile-nav > li > a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: var(--mt-control-h);
        min-height: var(--mt-control-h);
    }

    html body #header .mobile-nav .cart-item .cart-icon strong {
        top: -6px;
        right: -8px;
    }
}

/* ---------- Header account dropdown: the category bar's card list (woocommerce/myaccount/account-links.php) ---------- */
html body #masthead .account-item .nav-dropdown {
    min-width: 248px;
    padding: 8px;
    border: 1px solid var(--mt-line) !important;
    border-radius: var(--mt-radius-card);
    background: var(--mt-surface);
    box-shadow: var(--mt-shadow-raised);
    text-align: left;
}

html body #masthead .account-item .nav-dropdown::before,
html body #masthead .account-item .nav-dropdown::after {
    display: none;
}

html body #masthead .account-item .nav-dropdown > li {
    margin: 0;
    border: 0;
}

html body #masthead .account-item .nav-dropdown > li > a {
    display: block;
    margin: 0;
    padding: 9px 12px;
    border-radius: var(--mt-radius-control);
    color: var(--mt-ink);
    font-size: var(--mt-text-14);
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.3;
    text-transform: none;
}

html body #masthead .account-item .nav-dropdown > li > a:hover,
html body #masthead .account-item .nav-dropdown > li > a:focus-visible {
    background: var(--mt-green-soft);
    color: var(--mt-green-text);
}

html body #masthead .account-item .nav-dropdown > li.is-active > a,
html body #masthead .account-item .nav-dropdown > li > a[aria-current="page"] {
    background: var(--mt-green-soft);
    color: var(--mt-green-text);
    font-weight: 700;
}

html body #masthead .account-item .medi-account-dd__who {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0 0 6px;
    padding: 6px 12px 12px;
    border-bottom: 1px solid var(--mt-line);
}

html body #masthead .medi-account-dd__name {
    overflow: hidden;
    color: var(--mt-ink);
    font-size: var(--mt-text-15);
    font-weight: 700;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html body #masthead .medi-account-dd__type {
    color: var(--mt-green-text);
    font-size: var(--mt-text-13);
    font-weight: 700;
}

html body #masthead .account-item .nav-dropdown > li.medi-account-dd__logout {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--mt-line);
}

html body #masthead .account-item .nav-dropdown > li.medi-account-dd__logout > a {
    color: var(--mt-muted);
}

/* the menu opens under the button, inside the screen (the cart is to its right) */
html body #masthead .account-item.has-dropdown:hover > .nav-dropdown,
html body #masthead .account-item.current-dropdown > .nav-dropdown {
    right: 0;
    left: auto;
}

/* keyboard: focus inside the account item opens the menu (Flatsome opens on hover only) */
html body #masthead .account-item.has-dropdown:focus-within > .nav-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    right: 0;
    left: auto;
}

/* ---------- Header mini-cart: a full preview (owner request 2026-11-28, Speckable pattern) ----------
   Template woocommerce/cart/mini-cart.php, stepper assets/js/medi-mini-cart.js. Wide (header
   dropdown): a table with no., product, price, quantity, value, remove. Narrow (phone/tablet
   off-canvas, or a dropdown squeezed by a small window): the same rows as cards, decided by
   the width of the cart itself (container query), not the screen. */
html body #masthead .cart-item .nav-dropdown {
    width: min(880px, calc(100vw - 30px));
    padding: var(--mt-space-4) var(--mt-space-5) var(--mt-space-5);
    border: 1px solid var(--mt-line) !important;
    border-radius: var(--mt-radius-card);
    box-shadow: var(--mt-shadow-raised);
}

/* the cart is the last item of the row: the card opens to the left, inside the screen */
html body #masthead .cart-item.current-dropdown > .nav-dropdown,
html body #masthead .cart-item.has-dropdown:hover > .nav-dropdown {
    right: 0;
    left: auto;
}

html body .medi-mini-cart {
    display: flex;
    flex-direction: column;
    container-type: inline-size;
    text-align: left;
}

/* long carts scroll inside the card; the header row and the footer stay */
html body #masthead .medi-mini-cart__scroll {
    max-height: calc(100vh - 340px);
    min-height: 160px;
    overflow-x: hidden; /* collapsed table borders round 1px wider; only the vertical scroll is meant */
    overflow-y: auto;
    overscroll-behavior: contain;
}

html body .medi-mini-cart__table {
    display: table;
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-size: var(--mt-text-14);
}

html body .medi-mini-cart__table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: var(--mt-space-2) var(--mt-space-3);
    border-bottom: 1px solid var(--mt-line-strong);
    background: var(--mt-surface);
    color: var(--mt-muted);
    font-size: var(--mt-text-13);
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
}

html body .medi-mini-cart__table td {
    padding: var(--mt-space-3);
    border-bottom: 1px solid var(--mt-line);
    vertical-align: middle;
}

html body .medi-mini-cart__table th:first-child,
html body .medi-mini-cart__table td:first-child {
    padding-left: 0;
}

html body .medi-mini-cart__table th:last-child,
html body .medi-mini-cart__table td:last-child {
    padding-right: 0;
}

html body .medi-mini-cart__no {
    width: 32px;
    color: var(--mt-muted);
    font-variant-numeric: tabular-nums;
}

html body .medi-mini-cart__item {
    display: flex;
    gap: var(--mt-space-3);
    align-items: center;
    min-width: 0;
}

html body .medi-mini-cart__thumb {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    overflow: hidden;
    border: 1px solid var(--mt-line);
    border-radius: var(--mt-radius-control);
    background: var(--mt-surface);
}

html body .medi-mini-cart__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0 !important;
    object-fit: contain;
}

html body .medi-mini-cart__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

html body .medi-mini-cart__name {
    display: -webkit-box;
    overflow: hidden;
    color: var(--mt-ink) !important;
    font-size: var(--mt-text-14);
    font-weight: 600;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

html body a.medi-mini-cart__name:hover {
    color: var(--mt-green-text) !important;
    text-decoration: underline;
}

html body .medi-mini-cart__sku {
    color: var(--mt-muted);
    font-size: var(--mt-text-13);
}

html body .medi-mini-cart__sku strong {
    color: var(--mt-ink);
    font-weight: 600;
}

html body .widget_shopping_cart .medi-mini-cart__stock .stock {
    margin: 0;
    font-size: var(--mt-text-13) !important;
    line-height: 1.4;
}

html body .medi-mini-cart__price,
html body .medi-mini-cart__total {
    width: 140px;
    text-align: right;
    white-space: nowrap;
}

html body .medi-mini-cart__table thead .medi-mini-cart__price,
html body .medi-mini-cart__table thead .medi-mini-cart__total {
    text-align: right;
}

html body .medi-mini-cart .medi-price {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.3;
}

html body .medi-mini-cart .medi-price__net {
    color: var(--mt-ink);
    font-weight: 600;
}

html body .medi-mini-cart__total .medi-price__net {
    font-weight: 700;
}

html body .medi-mini-cart .medi-price__gross {
    color: var(--mt-muted);
    font-size: var(--mt-text-13);
}

html body .medi-mini-cart__qty {
    width: 136px;
    text-align: center;
}

html body .medi-mini-cart__qty-fixed {
    color: var(--mt-muted);
}

/* quantity stepper: three 44px targets in one control */
html body .medi-qty {
    display: inline-flex;
    align-items: stretch;
    height: auto; /* 44px buttons inside the 1px border */
    border: 1px solid var(--mt-line-strong);
    border-radius: var(--mt-radius-control);
    background: var(--mt-surface);
}

html body .medi-qty__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--mt-control-h);
    height: var(--mt-control-h);
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: var(--mt-radius-control);
    background: transparent;
    color: var(--mt-green-text);
    font-size: var(--mt-text-18);
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}

html body .medi-qty__btn:hover:not(:disabled) {
    background: var(--mt-green-soft);
}

html body .medi-qty__btn:disabled {
    color: var(--mt-disabled);
    cursor: default;
}

html body .medi-qty__btn:focus-visible,
html body .medi-qty__input[type="number"]:focus-visible {
    position: relative;
    z-index: 1;
    outline: 0;
    box-shadow: var(--mt-focus);
}

html body .medi-qty__input[type="number"] {
    width: 44px;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-right: 1px solid var(--mt-line);
    border-left: 1px solid var(--mt-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--mt-ink);
    font-size: var(--mt-text-input);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}

html body .medi-qty__input::-webkit-inner-spin-button,
html body .medi-qty__input::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

html body .medi-mini-cart__row.is-updating .medi-mini-cart__price,
html body .medi-mini-cart__row.is-updating .medi-mini-cart__total {
    opacity: .45;
}

html body .medi-mini-cart__remove {
    width: 44px;
    text-align: right;
}

/* remove: the cart page's trash, at a 44px target */
html body .widget_shopping_cart a.remove.medi-mini-cart__trash {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--mt-control-h);
    height: var(--mt-control-h);
    margin: 0;
    border: 0 !important;
    border-radius: var(--mt-radius-control);
    background: transparent;
    color: var(--mt-muted) !important;
    font-size: 0 !important;
    line-height: 1;
    opacity: 1;
    transform: none;
}

html body .widget_shopping_cart a.remove.medi-mini-cart__trash::before {
    content: "";
    width: 20px;
    height: 20px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M10 11v6M14 11v6M6 7l1 12a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-12M9 7V4h6v3'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M10 11v6M14 11v6M6 7l1 12a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-12M9 7V4h6v3'/%3E%3C/svg%3E") center / contain no-repeat;
}

html body .widget_shopping_cart a.remove.medi-mini-cart__trash:hover {
    background: var(--mt-bg);
    color: var(--mt-danger) !important;
}

html body .widget_shopping_cart a.remove.medi-mini-cart__trash:focus-visible {
    outline: 0;
    box-shadow: var(--mt-focus);
}

/* footer: how much is in the cart and what it costs, then the two ways on */
html body .medi-mini-cart__footer {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--mt-space-2) var(--mt-space-4);
    align-items: center;
    padding-top: var(--mt-space-4);
}

html body .medi-mini-cart__footer > :not(.medi-mini-cart__count):not(.medi-mini-cart__sum):not(.medi-mini-cart__buttons) {
    grid-column: 1 / -1;
}

html body .medi-mini-cart__count {
    margin: 0;
    color: var(--mt-muted);
    font-size: var(--mt-text-14);
}

html body .widget_shopping_cart .medi-mini-cart__sum {
    display: flex;
    gap: var(--mt-space-3);
    align-items: baseline;
    justify-content: flex-end;
    margin: 0;
    padding: 0;
    border: 0;
    text-align: right;
}

html body .medi-mini-cart__sum-label {
    color: var(--mt-ink);
    font-size: var(--mt-text-15);
    font-weight: 600;
}

html body .medi-mini-cart__sum .medi-price__net {
    font-size: var(--mt-text-21);
    font-weight: 700;
}

html body .medi-mini-cart__sum .medi-price__label {
    font-size: var(--mt-text-14);
    font-weight: 600;
}

html body .widget_shopping_cart .medi-mini-cart__buttons {
    display: flex;
    grid-column: 1 / -1;
    gap: var(--mt-space-3);
    justify-content: flex-end;
    margin: var(--mt-space-2) 0 0;
}

html body .widget_shopping_cart .medi-mini-cart__buttons .button {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 200px;
    min-height: var(--mt-control-h);
    margin: 0;
    padding: 0 var(--mt-space-5);
    border-radius: var(--mt-radius-control);
    font-size: var(--mt-text-15);
    letter-spacing: 0;
    line-height: 1.2;
    text-transform: none;
}

html body .widget_shopping_cart .medi-mini-cart__buttons .button:not(.checkout) {
    border: 1px solid var(--mt-green-text) !important;
    background: var(--mt-surface) !important;
    color: var(--mt-green-text) !important;
}

/* narrow: every line is a card; labels come from data-label */
@container (max-width: 600px) {
    html body .medi-mini-cart__table,
    html body .medi-mini-cart__table tbody {
        display: block;
    }

    html body .medi-mini-cart__table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    html body .medi-mini-cart__table tr.medi-mini-cart__row {
        display: grid;
        grid-template-columns: 24px minmax(0, 1fr) auto var(--mt-control-h);
        grid-template-areas:
            "no product product remove"
            ". price price price"
            ". qty total total";
        gap: var(--mt-space-2) 0;
        align-items: center;
        padding: var(--mt-space-4) 0;
        border-bottom: 1px solid var(--mt-line);
    }

    html body .medi-mini-cart__row > td {
        display: block;
        width: auto;
        padding: 0;
        border: 0;
    }

    html body .medi-mini-cart__table td.medi-mini-cart__no {
        grid-area: no;
        align-self: start;
        padding-top: 2px;
    }

    html body .medi-mini-cart__table td.medi-mini-cart__product {
        grid-area: product;
    }

    html body .medi-mini-cart__item {
        align-items: flex-start;
    }

    html body .medi-mini-cart__table td.medi-mini-cart__remove {
        grid-area: remove;
        align-self: start;
        margin-top: -10px;
    }

    html body .medi-mini-cart__table td.medi-mini-cart__price {
        grid-area: price;
        padding-left: 68px;
        text-align: left;
    }

    html body .medi-mini-cart__table td.medi-mini-cart__qty {
        grid-area: qty;
        padding-left: 68px;
        text-align: left;
    }

    html body .medi-mini-cart__table td.medi-mini-cart__total {
        display: flex;
        flex-direction: column;
        grid-area: total;
        align-items: flex-end;
    }

    html body .medi-mini-cart__table td[data-label]::before {
        content: attr(data-label);
        color: var(--mt-muted);
        font-size: var(--mt-text-13);
    }

    html body .medi-mini-cart__table td.medi-mini-cart__qty::before,
    html body .medi-mini-cart__table td.medi-mini-cart__price::before {
        content: none;
    }

    /* unit price: one quiet line under the product, "24,58 zł netto · 30,23 zł brutto / szt." */
    html body .medi-mini-cart__table td.medi-mini-cart__price .medi-price {
        display: inline;
        color: var(--mt-muted);
        font-size: var(--mt-text-13);
    }

    html body .medi-mini-cart__table td.medi-mini-cart__price .medi-price__net,
    html body .medi-mini-cart__table td.medi-mini-cart__price .medi-price__gross {
        display: inline;
        color: var(--mt-muted);
        font-size: var(--mt-text-13);
        font-weight: 400;
    }

    html body .medi-mini-cart__table td.medi-mini-cart__price .medi-price__gross::before {
        content: " · ";
    }

    html body .medi-mini-cart__table td.medi-mini-cart__price .medi-price::after {
        content: " / szt.";
    }

    html body .medi-mini-cart__footer {
        grid-template-columns: 1fr;
    }

    html body .widget_shopping_cart .medi-mini-cart__sum {
        justify-content: space-between;
    }

    html body .widget_shopping_cart .medi-mini-cart__count {
        order: -1;
    }

    html body .widget_shopping_cart .medi-mini-cart__buttons {
        flex-direction: column-reverse;
    }

    html body .widget_shopping_cart .medi-mini-cart__buttons .button {
        width: 100%;
        min-width: 0;
    }
}

/* phones and tablets: the off-canvas cart is wide enough for the cards */
/* Flatsome sets the drawer width on .mfp-content.off-canvas-cart (theme mod cart_drawer_width, 360px) */
html body .off-canvas .mfp-content.off-canvas-cart {
    --drawer-width: min(440px, 100vw);
    background-color: var(--mt-surface);
}

html body .cart-popup-inner .medi-mini-cart__table {
    margin-bottom: 0;
}

html body .cart-popup-inner .medi-mini-cart {
    flex: 1;
}

html body .cart-popup-inner .medi-mini-cart__scroll {
    flex: 1;
}

html body .off-canvas-cart .medi-mini-cart__footer {
    padding-top: var(--mt-space-4);
}

/* live search availability: 12px text needs 4.5:1 (it was #6b9d58 3.1:1 and #ef7b00 2.7:1 in
   style.css); "Dostępny" in green-text, "Do potwierdzenia" in the status token */
html body .medi-search-product__availability {
    color: var(--mt-status-confirm);
}

html body .medi-search-product__availability.is-available {
    color: var(--mt-green-text);
}

/* category counts in the panel: muted, not #8a9792 (2.96:1 at 12px) */
html body .medi-search-category__count {
    color: var(--mt-muted);
}

/* live search panel: under the field, inside the screen (it was off-screen at 1024 and
   covered the field on phones) */
@media (min-width: 850px) {
    /* the panel's box is the whole header row, so it can be wider than the field */
    html body #masthead .flex-col.flex-left.flex-grow,
    html body #masthead .flex-col.flex-left.flex-grow > .header-nav,
    html body #masthead .header-search-form,
    html body #masthead .header-search-form-wrapper,
    html body #masthead .searchform-wrapper,
    html body #masthead .searchform,
    html body #masthead .searchform > .flex-row {
        position: static !important; /* Flatsome .relative is position:relative!important */
    }

    html body #masthead .header-inner {
        position: relative;
    }

    html body #masthead .medi-search-panel {
        top: calc(100% - 8px);
        left: 50%;
        width: min(920px, calc(100% - 30px));
        transform: translateX(-50%);
    }
}

/* panel labels and buttons in sentence case like the rest of the shop */
html body .medi-search-panel h2,
html body .medi-search-panel h3,
html body .medi-search-panel [class*="__title"],
html body .medi-search-panel [class*="__heading"],
html body .medi-search-panel button,
html body .medi-search-panel a,
html body .medi-search-panel .button {
    letter-spacing: 0;
    text-transform: none;
}

@media (max-width: 849px) {
    html body #header .header-bottom .searchform {
        position: relative;
    }

    html body #header .header-bottom .medi-search-panel {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: 0;
        width: auto;
        max-height: calc(100vh - 140px);
    }
}

/* category bar in one row down to 1024: tighter item spacing, same 14px labels */
@media (min-width: 850px) and (max-width: 1279px) {
    html body #wide-nav .header-bottom-nav > li {
        margin: 0;
    }

    html body #wide-nav .header-bottom-nav > li > a {
        padding-right: 4px; /* "Poradniki" (was "Blog") still fits one row at 1024 */
        padding-left: 4px;
    }

    /* the dropdown carets cost ~170px here; the items still open (aria-haspopup stays) */
    html body #wide-nav .header-bottom-nav > li > a > .icon-angle-down {
        display: none;
    }
}

/* 1280-1439: with the carets back, items need tighter padding to stay in one row */
@media (min-width: 1280px) and (max-width: 1439px) {
    html body #wide-nav .header-bottom-nav > li > a {
        padding-right: 6px;
        padding-left: 6px;
    }
}

/* category bar spread across the content width: "Sieci LAN" starts under the logo,
   "Kontakt" ends under the cart (owner decision 2026-11-28) */
@media (min-width: 850px) {
    html body #wide-nav > .flex-row > .flex-col.flex-left {
        flex: 1 1 auto;
    }

    html body #wide-nav .header-bottom-nav {
        justify-content: space-between;
        width: 100%;
    }

    /* Flatsome's right-hand bar column is empty here but takes the flex space; if the
       Customizer ever puts elements into "Header Bottom: Right", remove this rule */
    html body #wide-nav > .flex-row > .flex-col.flex-right {
        display: none;
    }
}


/* ---------- Footer (template-parts/footer/footer.php; audit + critique 2026-11-28) ----------
   A directory on green-night: Dane firmy, Kontakt, Zakupy, Firma, Kategorie on the header's
   content edges, sentence-case h2 titles without divider bars, then a legal row. */
html body .footer-wrapper {
    background: var(--mt-green-night);
}

/* short pages (Moje konto, empty cart) on tall screens: the footer sits at the bottom of the
   window instead of leaving Flatsome's grey html background (#4d4d4d) under it; the html
   background matches the footer for overscroll */
html {
    background-color: var(--mt-green-night) !important;
    /* the scrollbar is always there, so a short page (Zamówienia, empty cart) does not shift the
       whole layout sideways by half its width against a long one (Pulpit, Dane konta) */
    overflow-y: scroll;
}

html body #wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: calc(100svh - var(--wp-admin--admin-bar--height, 0px));
}

html body #wrapper > #main {
    flex: 1 0 auto;
}

/* WooCommerce's 1px screen-reader live region sits after #wrapper and added 1px of scroll */
html body > .widget_shopping_cart_live_region {
    top: 0;
}

html body .medi-footer {
    background: var(--mt-green-night);
    color: var(--mt-on-dark);
    font-size: var(--mt-text-14);
    line-height: 1.55;
}

html body .medi-footer .container {
    max-width: 1570px; /* the header's edges */
}

/* Flatsome's .container clearfix pseudo-elements would be extra grid/flex items */
html body .medi-footer .container::before,
html body .medi-footer .container::after {
    content: none;
}

/* wide: five columns; Kontakt (labels + e-mail addresses) and Kategorie (two sub-columns)
   are the wide tracks, so every column ends at about the same height */
html body .medi-footer__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.6fr);
    gap: var(--mt-space-6);
    padding-top: var(--mt-space-section);
    padding-bottom: var(--mt-space-6);
}

html body .medi-footer__title {
    margin: 0 0 var(--mt-space-3);
    color: var(--mt-on-dark-strong);
    font-size: var(--mt-text-15);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.3;
    text-transform: none;
}

html body .medi-footer a {
    color: var(--mt-on-dark);
    text-decoration: none;
}

html body .medi-footer a:hover {
    color: var(--mt-on-dark-strong);
    text-decoration: underline;
    text-underline-offset: 3px;
}

html body .medi-footer a:focus-visible,
html body .medi-footer button:focus-visible {
    border-radius: 2px;
    outline: 2px solid var(--mt-on-dark-accent);
    outline-offset: 2px;
}

/* link lists: 36px rows (dense list), 44px on phones */
html body .medi-footer__links {
    margin: 0;
    padding: 0;
    list-style: none;
}

html body .medi-footer__links li {
    margin: 0;
    padding: 0;
}

html body .medi-footer__links a {
    display: inline-flex;
    align-items: center;
    min-height: var(--mt-control-h-sm);
    line-height: 1.35;
}

/* nine categories in two sub-columns where the track is wide enough */
@media (min-width: 1024px) {
    html body .medi-footer__col--categories .medi-footer__links {
        columns: 2;
        column-gap: var(--mt-space-5);
    }

    html body .medi-footer__col--categories .medi-footer__links li {
        break-inside: avoid;
    }
}

/* the "footer-about-us" block, split into Dane firmy and Kontakt (it is also used on the
   Kontakt page, where style.css colours it for a light surface) */
html body .medi-footer .medi-footer-about {
    font-size: var(--mt-text-14);
}

html body .medi-footer .medi-footer-about p,
html body .medi-footer .medi-footer-about address {
    margin: 0 0 var(--mt-space-3);
}

html body .medi-footer .medi-footer-about__company {
    color: var(--mt-on-dark-strong);
}

html body .medi-footer .medi-footer-about__hours span,
html body .medi-footer .medi-footer-about__contacts span {
    color: var(--mt-on-dark);
    opacity: .8;
}

html body .medi-footer .medi-footer-about__contacts {
    margin: 0 !important;
}

html body .medi-footer .medi-footer-about__contacts li {
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: baseline; /* labels stay on the first line of a wrapped value */
    margin: 0 !important;
}

html body .medi-footer .medi-footer-about__contacts a {
    display: inline-flex;
    align-items: center;
    min-height: var(--mt-control-h-sm);
    color: var(--mt-on-dark-strong) !important;
    overflow-wrap: normal; /* break only at the <wbr> before "@" */
    word-break: normal;
}

/* legal row: copyright, then the legal links, from the left edge; the right end stays
   clear for the back-to-top circle */
html body .medi-footer__legal {
    border-top: 1px solid color-mix(in srgb, var(--mt-on-dark) 16%, transparent);
}

html body .medi-footer__legal-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0 var(--mt-space-6);
    align-items: center;
    justify-content: flex-start;
    padding-top: var(--mt-space-3);
    padding-bottom: var(--mt-space-3);
}

html body .medi-footer__copyright {
    margin: 0;
    font-size: var(--mt-text-13);
}

html body .medi-footer__legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0 var(--mt-space-5);
    margin: 0;
    padding: 0;
    list-style: none;
}

html body .medi-footer__legal-links li {
    margin: 0;
}

html body .medi-footer__legal-links a,
html body .medi-footer .medi-footer__consent {
    display: inline-flex;
    align-items: center;
    min-height: var(--mt-control-h);
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--mt-on-dark);
    font: inherit;
    font-size: var(--mt-text-13);
    letter-spacing: 0;
    line-height: 1.3;
    text-transform: none;
    cursor: pointer;
}

html body .medi-footer .medi-footer__consent:hover {
    color: var(--mt-on-dark-strong);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* back to top: a 44px circle in the system */
html body #top-link {
    width: var(--mt-control-h);
    height: var(--mt-control-h);
    min-height: 0;
    padding: 0;
    border: 1px solid var(--mt-line) !important;
    border-radius: var(--mt-radius-pill);
    background: var(--mt-surface) !important;
    box-shadow: var(--mt-shadow-raised);
    color: var(--mt-green-text) !important;
    line-height: 1;
}

html body #top-link:hover {
    border-color: var(--mt-green-text) !important;
}

/* its raised shadow used to replace the .button focus ring (id beats class) */
html body #top-link:focus-visible {
    outline: none;
    box-shadow: var(--mt-focus), var(--mt-shadow-raised);
}

/* 768-1439: three columns; Dane firmy + Kontakt (two tracks) on the first row (below 1440
   the five-column contact track is too narrow for the longest e-mail address) */
@media (max-width: 1439px) {
    html body .medi-footer__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    html body .medi-footer__col--contact {
        grid-column: span 2;
    }
}

/* 550-767: two columns, Kontakt full width */
@media (max-width: 767px) {
    html body .medi-footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--mt-space-5);
    }

    html body .medi-footer__col--contact {
        grid-column: auto;
        grid-row: 2;
        grid-column-end: span 2;
    }
}

@media (max-width: 549px) {
    html body .medi-footer__grid {
        grid-template-columns: minmax(0, 1fr);
        padding-top: var(--mt-space-6);
        padding-bottom: var(--mt-space-5);
    }

    html body .medi-footer__col--contact {
        grid-column: auto;
        grid-row: auto;
    }

    html body .medi-footer__links a,
    html body .medi-footer .medi-footer-about__contacts a {
        min-height: var(--mt-control-h);
    }

    html body .medi-footer .medi-footer-about__contacts li {
        grid-template-columns: 88px minmax(0, 1fr);
    }

    /* one link a line, and room on the right for the back-to-top circle */
    html body .medi-footer__legal-inner {
        flex-direction: column-reverse;
        align-items: flex-start;
        padding-right: 72px;
    }

    html body .medi-footer__legal-links {
        flex-direction: column;
    }
}

/* ======================================================================
   The Icon Button Rule (DESIGN.md, owner request 2026-11-28): an action shown only as an
   icon is a circle — 36px (44px on touch screens), surface ground, 1px line border, an 18px
   drawn icon in the exact centre; hover tints green-soft; a destructive action (remove)
   turns its icon and border to the danger colour on hover; focus shows the mt focus ring.
   One look for the cart page's and the mini-cart's remove, the gallery zoom, the product
   prev/next arrows. Flatsome lifts every font icon in a button by 1.5px (".button i
   {top:-1.5px}"), which is why these sat high: icons are centred by flex, not nudged.
   ====================================================================== */
html body .button.icon.circle,
html body .zoom-button,
html body .woocommerce-cart-form .product-remove a.remove,
html body .widget_shopping_cart a.remove.medi-mini-cart__trash {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 36px;
    min-width: 0;
    height: 36px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 1px solid var(--mt-line) !important;
    border-radius: var(--mt-radius-pill);
    background: var(--mt-surface) !important;
    box-shadow: none;
    color: var(--mt-green-text) !important;
    line-height: 1;
    opacity: 1;
    transform: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

html body .button.icon.circle > i,
html body .zoom-button i,
html body .back-to-top i {
    position: static;
    top: 0;
    display: block;
    margin: 0 !important;
    font-size: 18px;
    line-height: 1;
}

html body .button.icon.circle:hover,
html body .zoom-button:hover {
    border-color: var(--mt-line-strong) !important;
    background: var(--mt-green-soft) !important;
}

/* remove: one trash in both carts, neutral until it is pointed at */
html body .woocommerce-cart-form .product-remove a.remove,
html body .widget_shopping_cart a.remove.medi-mini-cart__trash {
    position: relative;
    overflow: hidden;
    color: var(--mt-muted) !important;
    font-size: var(--mt-text-14) !important;
    text-indent: 200%; /* "×" / words stay the link text for screen readers; no 0px text */
    white-space: nowrap;
}

html body .woocommerce-cart-form .product-remove a.remove::before,
html body .widget_shopping_cart a.remove.medi-mini-cart__trash::before {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 18px;
    height: 18px;
}

html body .woocommerce-cart-form .product-remove a.remove:hover,
html body .widget_shopping_cart a.remove.medi-mini-cart__trash:hover {
    border-color: color-mix(in srgb, var(--mt-danger) 40%, var(--mt-line)) !important;
    background: color-mix(in srgb, var(--mt-danger) 5%, var(--mt-surface)) !important;
    color: var(--mt-danger) !important;
}

html body .button.icon.circle:focus-visible,
html body .zoom-button:focus-visible,
html body .woocommerce-cart-form .product-remove a.remove:focus-visible,
html body .widget_shopping_cart a.remove.medi-mini-cart__trash:focus-visible {
    outline: 0;
    box-shadow: var(--mt-focus);
}

/* the floating "do góry" keeps its 44px and centres its arrow the same way */
html body .back-to-top {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

@media (max-width: 848px) {
    html body .button.icon.circle,
    html body .zoom-button,
    html body .woocommerce-cart-form .product-remove a.remove,
    html body .widget_shopping_cart a.remove.medi-mini-cart__trash {
        width: var(--mt-control-h);
        height: var(--mt-control-h);
    }
}

/* the quantity steppers' "−" and "+": drawn marks in the middle, not text glyphs that sit on
   the font's baseline (the minus was 1.5px low) */
html body .medi-qty__btn {
    font-size: 0;
}

html body .medi-qty__btn::before {
    content: "";
    width: 14px;
    height: 14px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M2 7h10M7 2v10'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M2 7h10M7 2v10'/%3E%3C/svg%3E") center / contain no-repeat;
}

html body .medi-qty__btn[data-step="-1"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M2 7h10'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M2 7h10'/%3E%3C/svg%3E");
}

/* on dark ground (the green title bar: previous / next product) the circle is outlined in the
   on-dark colour and the icon is white */
html body .dark .button.icon.circle {
    border-color: color-mix(in srgb, var(--mt-on-dark-strong) 55%, transparent) !important;
    background: transparent !important;
    color: var(--mt-on-dark-strong) !important;
}

html body .dark .button.icon.circle:hover {
    border-color: var(--mt-on-dark-strong) !important;
    background: color-mix(in srgb, var(--mt-on-dark-strong) 12%, transparent) !important;
}

html body .dark .button.icon.circle > i {
    color: inherit !important;
}

/* the cart page's own 36px rule (bridge/cart.css) comes later: phones get the 44px circle too */
@media (max-width: 848px) {
    html body .woocommerce-cart-form .product-remove a.remove.remove {
        width: var(--mt-control-h);
        height: var(--mt-control-h);
    }
}

/* ======================================================================
   The Code Rule (DESIGN.md, owner request 2026-11-28): a product code is one unbreakable
   group — the code, then a quiet 24px "copy" icon (assets/js/medi-code-copy.js). The group
   moves to the next line whole; in a cell too narrow for it the code ends in an ellipsis
   (the full code is in its title and is what gets copied), it never splits.
   ====================================================================== */
html body .medi-code-group {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    max-width: 100%;
    vertical-align: bottom;
    white-space: nowrap;
}

html body .medi-code__value,
html body .medi-code {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

html body .medi-code-copy {
    position: relative;
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-height: 0;
    margin: -4px 0;
    padding: 0;
    border: 0;
    border-radius: var(--mt-radius-pill);
    background: transparent;
    box-shadow: none;
    color: var(--mt-muted);
    line-height: 1;
    vertical-align: middle;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

html body .medi-code-copy svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

html body .medi-code-copy:hover {
    background: var(--mt-green-soft);
    color: var(--mt-green-text);
}

html body .medi-code-copy:focus-visible {
    outline: 0;
    box-shadow: var(--mt-focus);
}

/* copied: a tick for a moment */
html body .medi-code-copy.is-done {
    color: var(--mt-green-text);
}

html body .medi-code-copy.is-done svg {
    display: none;
}

html body .medi-code-copy.is-done::before {
    content: "";
    width: 14px;
    height: 14px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Stock bars (functions.php meditronik_stock_bars_html): a signal-strength mark
   before the availability status; green by quantity, amber 2 bars for "Do potwierdzenia" ---------- */
html body .medi-stock-bars {
    display: inline-flex;
    flex: none;
    align-items: flex-end;
    margin: 0 6px 0 0;
    vertical-align: -1px;
    line-height: 1;
}

html body .medi-stock-bars svg {
    display: block;
    width: 18px;
    height: 16px;
}

html body .medi-stock-bars rect.is-off {
    fill: var(--mt-line-strong);
}

html body .medi-stock-bars.is-ok rect.is-on {
    fill: var(--mt-green-text);
}

html body .medi-stock-bars.is-confirm rect.is-on {
    fill: var(--mt-status-confirm-mark);
}

/* the stock line puts the bars and the word on one line */
html body .medi-product-row__stock,
html body .medi-related-card__stock,
html body .medi-single-availability__status,
html body .medi-inquiry__title {
    display: flex;
    align-items: center;
}

/* final audit 2026-11-28: no text under 12px — post dates in search results (Flatsome 0.8em)
   and superscripts in descriptions ("90°", "m²") */
html body .post-meta.is-small {
    font-size: max(12px, .8em);
}

html body sup,
html body sub {
    font-size: max(12px, .75em);
}

/* content pages: the page title is the h1 (functions.php, final audit) */
html body .medi-page-title {
    margin: 0 0 var(--mt-space-5);
    color: var(--mt-ink);
}

html body .pwb-brand-description .medi-brand-heading {
    margin: 0 0 var(--mt-space-2);
    font-size: var(--mt-text-21);
    line-height: 1.3;
}


/* final audit: standalone short links get a 24px target (WCAG 2.5.8) — the home page's contact
   facts and the order number in the account's orders list */
html body .medi-home-contact__facts dd a,
html body .medi-orders__number a {
    display: inline-block;
    min-height: 24px;
    padding: 4px 0;
    line-height: 1.25;
}

/* remove in both carts: the link's text ("×" / words) stays for screen readers but is not
   painted; the trash is drawn in its own colour (neutral, danger on hover) */
html body .woocommerce-cart-form .product-remove a.remove,
html body .widget_shopping_cart a.remove.medi-mini-cart__trash {
    --medi-remove-ink: var(--mt-muted);
    color: transparent !important;
}

html body .woocommerce-cart-form .product-remove a.remove:hover,
html body .widget_shopping_cart a.remove.medi-mini-cart__trash:hover {
    --medi-remove-ink: var(--mt-danger);
}

html body .woocommerce-cart-form .product-remove a.remove::before,
html body .widget_shopping_cart a.remove.medi-mini-cart__trash::before {
    background: var(--medi-remove-ink) !important;
}

/* reading measure (final audit, Impeccable line-length): running text on content pages, the
   producer's description and product descriptions stays at ~75 characters */
html body.page:not(.home) .entry-content p,
html body.page:not(.home) .entry-content li,
html body.page:not(.home) #content .col-inner > p,
html body .pwb-brand-description p,
html body .medi-product-description {
    max-width: 62ch; /* Lato at 15–16px: under 80 characters a line */
    text-wrap: pretty;
}

html body .entry-content li,
html body .wp-block-list li {
    text-wrap: pretty;
}

html body .medi-search-more__title {
    margin: var(--mt-space-6) 0 var(--mt-space-3);
    color: var(--mt-ink);
    font-size: var(--mt-text-21);
    font-weight: 700;
    text-transform: none;
}
