/* Mobile navigation must not inherit the desktop mega-menu columns. */
@media (max-width: 1200px) {
    #header .on_menu .navbar,
    #header .on_menu .navbar > div,
    #header .on_menu ul {
        display: block;
        width: 100%;
        min-width: 0;
        margin: 0;
    }
    #header .on_menu ul { padding: 0; }
    #header .on_menu ul li {
        display: block;
        float: none;
        flex: 0 0 100%;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
        text-align: left;
    }
    #header .on_menu ul li::before,
    #header .on_menu ul li::after { display: none; }
    #header .on_menu ul li > a {
        display: block;
        width: 100%;
        padding: 12px 0;
        font-size: 16px;
        line-height: 1.4;
        text-align: left;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    #header .on_menu ul .sub-menu,
    #header .on_menu ul li:hover > .sub-menu {
        position: static;
        display: block;
        width: 100%;
        padding: 0 0 0 16px;
        border-left: 1px solid #dce8df;
        opacity: 1;
        visibility: visible;
        transform: none;
        pointer-events: auto;
        box-shadow: none;
    }
}

@media (max-width: 767px) {
    #shop.heatdecor-catalog .product_list,
    .single-product #polecane .related > .product_list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px 12px;
        margin: 0;
        padding: 0;
    }
    #shop.heatdecor-catalog .product_list > .product,
    .single-product #polecane .related > .product_list > .product {
        width: 100%;
        min-width: 0;
        max-width: none;
        margin: 0;
        padding: 0;
        float: none;
    }
    .single-product .category-products-slider .product_list {
        margin: 0;
        padding: 0;
    }
    .single-product .category-products-slider .product_list > .product {
        width: 100%;
        padding: 0;
        margin: 0;
    }
    #shop .product_list .product .product_img img,
    .single-product .product_list .product .product_img img {
        height: 150px;
        padding: 10px;
        object-fit: contain;
    }
    #shop .product_list .product .product-info,
    .single-product .product_list .product .product-info { padding: 8px; }
    #shop .product_list .product .product-info a,
    .single-product .product_list .product .product-info a {
        font-size: 13px;
        line-height: 1.4;
        height: 74px;
        overflow-wrap: anywhere;
    }
    #shop .product_list .product .price,
    .single-product .product_list .product .price {
        padding: 0 6px;
        flex-wrap: wrap;
        gap: 4px;
        font-size: 14px;
        overflow-wrap: anywhere;
    }
    #shop .product_list .product .price .amount,
    .single-product .product_list .product .price .amount { font-size: 16px; }
    #shop .product_list .product .price ins .amount bdi,
    .single-product .product_list .product .price ins .amount bdi { padding-right: 0; }
    #shop .product_list .product .price del bdi,
    .single-product .product_list .product .price del bdi { font-size: 12px; }
    #shop .product_list .add_cart a,
    .single-product .product_list .add_cart a {
        min-height: 44px;
        padding: 10px 6px;
        font-size: 12px;
        white-space: normal;
    }

    .single-product #product .dodaj_do_koszyka {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 44px;
        align-items: start;
        gap: 10px 8px;
    }
    .single-product #product .dodaj_do_koszyka > * { grid-column: 1 / -1; }
    .single-product #product .dodaj_do_koszyka > form.cart {
        grid-column: 1;
        grid-row: 1;
        display: flex;
        align-items: center;
        gap: 6px;
        min-width: 0;
        margin: 0;
    }
    .single-product #product .quantity-wrapper { gap: 0; flex-shrink: 0; }
    .single-product #product .quantity-wrapper button {
        width: 28px !important;
        height: 44px !important;
    }
    .single-product #product .quantity-wrapper .quantity { margin: 0; float: none; }
    .single-product #product .quantity-wrapper .qty {
        width: 36px;
        height: 44px;
        padding: 4px 0;
        font-size: 14px;
    }
    .single-product #product .dodaj_do_koszyka form.cart .single_add_to_cart_button {
        flex: 1;
        min-width: 0;
        min-height: 44px;
        height: auto;
        margin: 0;
        padding: 10px 6px;
        font-size: 12px;
        line-height: 1.3;
        white-space: normal;
    }
    .single-product #product .dodaj_do_koszyka > .yith-wcwl-add-to-wishlist,
    .single-product #product .dodaj_do_koszyka > .yith-add-to-wishlist-button-block {
        grid-column: 2;
        grid-row: 1;
        width: 44px;
        height: 44px;
        margin: 0;
    }
    .single-product #product .dodaj_do_koszyka > .yith-add-to-wishlist-button-block {
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #13803f;
        border-radius: 6px;
    }
    .single-product #product .dodaj_do_koszyka .yith-wcwl-add-to-wishlist-button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        margin: 0;
        padding: 0;
    }
    .single-product #product .dodaj_do_koszyka .zapytajoprodukt {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        min-height: 44px;
        font-size: 14px;
        border: 1px solid #13803f;
        border-radius: 6px;
    }

    #parametry .nowe_atrybuty .row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin: 0;
    }
    #parametry .nowe_atrybuty .row > .nazwa_kategorii { grid-column: 1 / -1; }
    #parametry .nowe_atrybuty .parametr-box,
    #parametry .nowe_atrybuty .parametr-box:hover {
        display: flex;
        flex-direction: column;
        width: 100%;
        min-width: 0;
        min-height: 110px;
        padding: 12px 10px;
    }
    #parametry .nowe_atrybuty .parametr-title {
        margin: 0 0 12px;
        font-size: 12px;
        line-height: 1.4;
        overflow-wrap: anywhere;
    }
    #parametry .nowe_atrybuty .value-box { margin-top: auto; text-align: left; }
    #parametry .nowe_atrybuty .parametr-value {
        position: static;
        margin: 0;
        font-size: 18px;
        line-height: 1.4;
        overflow-wrap: anywhere;
    }
    #parametry .nowe_atrybuty .value-metrics { font-size: 14px; line-height: inherit; }
    #parametry .nowe_atrybuty .value-image {
        width: 30px;
        max-height: 30px;
        padding-right: 6px;
        object-fit: contain;
    }
    .single-product #product .gallery-top,
    .single-product #product .gallery-thumbs {
        height: clamp(200px, 32svh, 270px);
    }
    .single-product #product .gallery-top .swiper-slide > a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
    }
    .single-product #product .gallery-top .swiper-slide img {
        width: 100%;
        height: 100%;
        max-height: 100%;
        object-fit: contain;
        padding: 8px;
    }
}
