.elementor-3406 .elementor-element.elementor-element-36beef3{--display:flex;}:root{--page-title-display:none;}@media(min-width:769px){.elementor-3406 .elementor-element.elementor-element-36beef3{--content-width:50%;}}/* Start custom CSS for html, class: .elementor-element-c040612 */<style>
    @import url('https://fonts.googleapis.com/css2?family=Mulish:wght@400;600;700;800&family=Rubik:wght@700;800&display=swap');

    .enbo-calc-container {
        --primary: #4BA3FF;
        --primary-dark: #052B42;
        --bg-card: #FDFDFC;
        --bg-input: #FDFDFC;
        --bg-soft: #f4f8fb;
        --text-main: #052B42;
        --text-muted: #5d7282;
        --border: #d9e4ec;
        --success: #1f7a4d;
        font-family: 'Mulish', sans-serif;
        font-size: 16px;
        line-height: 1.5;
        padding: 20px;
        display: flex;
        justify-content: center;
        background: #FDFDFC;
    }

    .enbo-calc-card {
        width: 100%;
        max-width: 500px;
        background: var(--bg-card);
        border-radius: 0;
        box-shadow: 0 10px 25px -5px rgba(5, 43, 66, 0.08);
        border: 1px solid var(--border);
        overflow: hidden;
    }

    .enbo-header {
        background: #052B42;
        padding: 25px;
        color: white;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .enbo-header h2 {
        margin: 0;
        font-size: 1.25rem;
        font-weight: 700;
        font-family: 'Rubik', sans-serif;
        letter-spacing: 0;
        color: #ffffff;
    }

    .enbo-body {
        padding: 25px;
        font-family: 'Mulish', sans-serif;
        font-size: 1rem;
    }

    .enbo-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        margin-bottom: 20px;
    }

    .enbo-input-group {
        margin-bottom: 15px;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .enbo-input-group label {
        font-size: 14px;
        font-weight: 700;
        color: var(--text-main);
        font-family: 'Mulish', sans-serif;
        line-height: 1.4;
        text-transform: none;
    }

    .en-select-wrapper {
        position: relative;
        display: flex;
        align-items: center;
    }

    .color-dot {
        position: absolute;
        left: 12px;
        width: 14px;
        height: 14px;
        border-radius: 0;
        z-index: 2;
    }

    .color-dot.viztiszta { background: #e9eef2; border: 1px solid #cfd9e1; }
    .color-dot.bronz { background: #a87e43; }
    .color-dot.antracit { background: #334155; }

    select,
    input {
        width: 100%;
        padding: 12px 15px;
        border-radius: 0;
        border: 2px solid var(--border);
        background: var(--bg-input);
        color: var(--text-main);
        font-size: 1rem;
        font-weight: 600;
        font-family: 'Mulish', sans-serif;
        line-height: 1.5;
        outline: none;
        transition: all 0.2s;
        box-sizing: border-box;
    }

    #poly-color { padding-left: 35px; }

    select:focus,
    input:focus {
        border-color: var(--primary);
        background: #ffffff;
    }

    .enbo-result-panel {
        background: var(--bg-soft);
        border-radius: 0;
        padding: 20px;
        margin-top: 10px;
    }

    .enbo-details {
        display: flex;
        justify-content: space-between;
        margin-bottom: 15px;
        gap: 20px;
    }

    .detail-item {
        display: flex;
        flex-direction: column;
    }

    .detail-item span {
        font-size: 14px;
        color: var(--text-muted);
        font-family: 'Mulish', sans-serif;
        line-height: 1.4;
    }

    .detail-item strong {
        color: var(--text-main);
        font-family: 'Mulish', sans-serif;
        font-size: 16px;
        font-weight: 700;
        line-height: 1.5;
    }

    .enbo-divider {
        height: 1px;
        background: var(--border);
        margin-bottom: 15px;
    }

    .enbo-total-section {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 20px;
    }

    .total-label span {
        color: var(--text-main);
        font-family: 'Mulish', sans-serif;
        font-size: 16px;
        font-weight: 700;
        line-height: 1.5;
    }

    .total-label small {
        display: block;
        color: var(--text-muted);
        font-family: 'Mulish', sans-serif;
        font-size: 14px;
        line-height: 1.4;
    }

    .total-price {
        font-size: 1.75rem;
        font-weight: 800;
        color: var(--primary);
        text-align: right;
        font-family: 'Rubik', sans-serif;
        line-height: 1.2;
    }

    .enbo-cart-actions {
        margin-top: 20px;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .enbo-cart-button {
        width: 100%;
        border: 0;
        border-radius: 0;
        background: var(--primary);
        color: #FDFDFC;
        padding: 14px 18px;
        font-family: 'Mulish', sans-serif;
        font-size: 16px;
        font-weight: 700;
        line-height: 1.4;
        cursor: pointer;
        transition: background-color 0.2s ease, opacity 0.2s ease;
    }

    .enbo-cart-button:hover {
        opacity: 0.92;
    }

    .enbo-cart-button:active {
        background: var(--primary-dark);
        opacity: 1;
    }

    .enbo-cart-button.is-added {
        background: var(--primary-dark);
    }

    .enbo-cart-message {
        min-height: 22px;
        font-size: 14px;
        color: var(--success);
        font-weight: 700;
    }

    @media (max-width: 450px) {
        .enbo-grid {
            grid-template-columns: 1fr;
        }

        .enbo-details,
        .enbo-total-section {
            flex-direction: column;
            align-items: flex-start;
        }

        .total-price {
            text-align: left;
        }
    }
</style>

<script>
(function() {
    const polyPricing = {
        viztiszta: { 10: 5000, 16: 8001 },
        bronz:     { 10: 5207, 16: 8509 },
        antracit:  { 10: 5969, 16: 8890 }
    };

    const polyPriceList = {
        viztiszta: {
            10: {
                1050: { 2000: 10500, 3000: 15750, 4000: 21000, 5000: 26250, 6000: 31500 },
                2100: { 2000: 21000, 3000: 31500, 4000: 42000, 5000: 52500, 6000: 63000 }
            },
            16: {
                1050: { 2000: 16802, 3000: 25203, 4000: 33604, 5000: 42006, 6000: 50406 },
                2100: { 2000: 33604, 3000: 50406, 4000: 67208, 5000: 84011, 6000: 100812 }
            }
        },
        bronz: {
            10: {
                1050: { 2000: 10935, 3000: 16402, 4000: 21870, 5000: 27337, 6000: 32804 },
                2100: { 2000: 21870, 3000: 32804, 4000: 43739, 5000: 54674, 6000: 65608 }
            },
            16: {
                1050: { 2000: 17869, 3000: 26803, 4000: 35738, 5000: 44672, 6000: 53607 },
                2100: { 2000: 35738, 3000: 53607, 4000: 71476, 5000: 89344, 6000: 107213 }
            }
        },
        antracit: {
            10: {
                1050: { 2000: 12535, 3000: 18802, 4000: 25070, 5000: 31337, 6000: 37605 },
                2100: { 2000: 25070, 3000: 37605, 4000: 50140, 5000: 62675, 6000: 75209 }
            },
            16: {
                1050: { 2000: 18669, 3000: 28003, 4000: 37338, 5000: 46672, 6000: 56007 },
                2100: { 2000: 37338, 3000: 56007, 4000: 74676, 5000: 93345, 6000: 112014 }
            }
        }
    };

    function getCurrentConfig() {
        const colorVal = document.getElementById('poly-color').value;
        const colorLabel = document.getElementById('poly-color').selectedOptions[0].text;
        const thickVal = document.getElementById('poly-thick').value;
        const widthVal = parseInt(document.getElementById('poly-width').value, 10);
        const lengthVal = parseInt(document.getElementById('poly-length').value, 10);
        const qtyVal = Math.max(1, parseInt(document.getElementById('poly-qty').value, 10) || 1);

        const unitPrice = polyPricing[colorVal][thickVal];
        const areaOne = (widthVal / 1000) * (lengthVal / 1000);
        const areaTotal = areaOne * qtyVal;

        let total = 0;

        if (
            polyPriceList[colorVal] &&
            polyPriceList[colorVal][thickVal] &&
            polyPriceList[colorVal][thickVal][widthVal] &&
            polyPriceList[colorVal][thickVal][widthVal][lengthVal] !== undefined
        ) {
            const sheetPriceOne = polyPriceList[colorVal][thickVal][widthVal][lengthVal];
            total = sheetPriceOne * qtyVal;
        } else {
            total = Math.round(areaTotal * unitPrice);
        }

        return {
            colorVal,
            colorLabel,
            thickVal,
            widthVal,
            lengthVal,
            qtyVal,
            unitPrice,
            areaOne,
            areaTotal,
            total
        };
    }

    function updatePoly() {
        const data = getCurrentConfig();

        const preview = document.getElementById('color-preview');
        preview.className = 'color-dot ' + data.colorVal;

        document.getElementById('poly-res-unit').innerText =
            data.unitPrice.toLocaleString('hu-HU') + ' Ft / m²';

        document.getElementById('poly-res-area').innerText =
            data.areaTotal.toFixed(2).replace('.', ',') + ' m²';

        document.getElementById('poly-res-total').innerText =
            data.total.toLocaleString('hu-HU') + ' Ft';

        document.getElementById('poly-cart-message').innerText = '';
        document.getElementById('poly-add-cart').classList.remove('is-added');
    }

    function addToCart() {
        const data = getCurrentConfig();

        const cartItem = {
            id: 'poly-' + Date.now(),
            name: 'Polikarbonát lap',
            variant: data.colorLabel + ', ' + data.thickVal + ' mm, ' + data.widthVal + ' × ' + data.lengthVal + ' mm',
            color: data.colorVal,
            colorLabel: data.colorLabel,
            thickness: Number(data.thickVal),
            width: data.widthVal,
            length: data.lengthVal,
            quantity: data.qtyVal,
            unitPriceM2: data.unitPrice,
            area: Number(data.areaTotal.toFixed(2)),
            totalPrice: data.total
        };

        const existingCart = JSON.parse(localStorage.getItem('enbo_poly_cart') || '[]');
        existingCart.push(cartItem);
        localStorage.setItem('enbo_poly_cart', JSON.stringify(existingCart));

        const button = document.getElementById('poly-add-cart');
        button.classList.add('is-added');

        document.getElementById('poly-cart-message').innerText =
            'A kiválasztott termék bekerült a kosárba.';
    }

    function init() {
        const inputs = ['poly-color', 'poly-thick', 'poly-width', 'poly-length', 'poly-qty'];

        inputs.forEach(id => {
            const el = document.getElementById(id);
            if (el) {
                el.addEventListener('change', updatePoly);
                el.addEventListener('input', updatePoly);
            }
        });

        const addCartBtn = document.getElementById('poly-add-cart');
        if (addCartBtn) {
            addCartBtn.addEventListener('click', addToCart);
        }

        updatePoly();
    }

    if (document.readyState === 'loading') {
        document.addEventListener('DOMContentLoaded', init);
    } else {
        init();
    }
})();
</script>/* End custom CSS */