/* Product page — optional installation product */
body#product .pi-installation-addon {
    width: 100%;
    margin: 22px 0 18px;
}

body#product .pi-installation-addon__title {
    margin: 0 0 12px;
    font-family: 'Syne', sans-serif !important;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.25;
    color: #292929;
}

body#product .pi-installation-addon__option {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    cursor: pointer;
}

body#product .pi-installation-addon__checkbox {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

body#product .pi-installation-addon__switch {
    position: relative;
    display: block;
    flex: 0 0 44px;
    width: 44px;
    height: 26px;
    background: #777;
    border-radius: 999px;
    transition: background-color .2s ease;
}

body#product .pi-installation-addon__switch::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s ease;
}

body#product .pi-installation-addon__checkbox:checked + .pi-installation-addon__switch {
    background: #086cff;
}

body#product .pi-installation-addon__checkbox:checked + .pi-installation-addon__switch::before {
    transform: translateX(18px);
}

body#product .pi-installation-addon__checkbox:focus-visible + .pi-installation-addon__switch {
    outline: 3px solid rgba(8, 108, 255, .22);
    outline-offset: 3px;
}

body#product .pi-installation-addon__label {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #292929;
}

body#product .pi-installation-addon__price {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #086cff;
}

@media (max-width: 575px) {
    body#product .pi-installation-addon__option {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr) auto;
        width: 100%;
    }
}

/* ==========================================================================
   INSTALACJA NAD PRZYCISKIEM „DODAJ DO KOSZYKA”
   ========================================================================== */

body#product .product__actions-qty-add {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;

    width: 100% !important;
}

/* Cały blok opcji w osobnym wierszu nad przyciskiem */
body#product
.product__actions-qty-add
> .pi-installation-addon {
    order: -1 !important;

    flex: 0 0 100% !important;

    width: 100% !important;
    min-width: 0 !important;

    margin: 0 0 20px !important;
}

/* Ilość i przycisk dodania do koszyka poniżej */
body#product
.product__actions-qty-add
> :not(.pi-installation-addon) {
    order: 1;
}
