{"id":6528,"date":"2025-01-02T15:11:21","date_gmt":"2025-01-02T14:11:21","guid":{"rendered":"https:\/\/www.spectar.pl\/?page_id=6528"},"modified":"2025-01-16T17:55:29","modified_gmt":"2025-01-16T16:55:29","slug":"wheelhub-2","status":"publish","type":"page","link":"https:\/\/www.spectar.pl\/en\/wheelhub-2\/","title":{"rendered":"Wheelhub"},"content":{"rendered":"<div data-elementor-type=\"wp-page\" data-elementor-id=\"6528\" class=\"elementor elementor-6528\" data-elementor-post-type=\"page\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-e613ddb elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"e613ddb\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-09d8c17\" data-id=\"09d8c17\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-2a1ba80 elementor-hidden-desktop elementor-hidden-tablet elementor-hidden-mobile elementor-widget elementor-widget-html\" data-id=\"2a1ba80\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<div id=\"custom-form\">\n  <label for=\"brand-select\">Marka pojazdu:<\/label><br>\n  <select id=\"brand-select\">\n    <option value=\"\">-- Wybierz mark\u0119 --<\/option>\n  <\/select>\n  <br><br>\n\n  <label for=\"model-select\">Model:<\/label><br>\n  <select id=\"model-select\" disabled>\n    <option value=\"\">-- Najpierw wybierz mark\u0119 --<\/option>\n  <\/select>\n  <br><br>\n\n  <label for=\"body-select\">Rodzaj nadwozia:<\/label><br>\n  <select id=\"body-select\" disabled>\n    <option value=\"\">-- Najpierw wybierz model --<\/option>\n  <\/select>\n  <br><br>\n\n  <label for=\"email\">Tw\u00f3j adres e-mail:<\/label><br>\n  <input type=\"email\" id=\"email\" required><br><br>\n\n  <label for=\"phone\">Tw\u00f3j numer telefonu:<\/label><br>\n  <input type=\"tel\" id=\"phone\" required><br><br>\n\n  <p>Wa\u017cne jest dla mnie:<\/p>\n  <label>Cena:<\/label>\n  <input type=\"range\" id=\"priority-price\" min=\"1\" max=\"10\" value=\"5\"><br>\n  <label>Ekonomia:<\/label>\n  <input type=\"range\" id=\"priority-economy\" min=\"1\" max=\"10\" value=\"5\"><br>\n  <label>Wyposa\u017cenie:<\/label>\n  <input type=\"range\" id=\"priority-equipment\" min=\"1\" max=\"10\" value=\"5\"><br>\n  <label>Moc silnika:<\/label>\n  <input type=\"range\" id=\"priority-power\" min=\"1\" max=\"10\" value=\"5\"><br>\n  <label>Wygl\u0105d:<\/label>\n  <input type=\"range\" id=\"priority-design\" min=\"1\" max=\"10\" value=\"5\"><br><br>\n\n  <button id=\"submit-button\">WheelHub, znajd\u017a mi auto!<\/button>\n<\/div>\n\n<script>\nconst carData = {\n  \"Audi\": {\n    \"A1\": [\"hatchback\"], \"A3\": [\"hatchback\",\"sedan\"], \"A4\": [\"sedan\",\"kombi\"],\n    \"A5\": [\"liftback\",\"coupe\",\"kabriolet\"], \"A6\": [\"sedan\",\"kombi\"],\n    \"A7\": [\"liftback\"], \"A8\": [\"sedan\"], \"Q2\": [\"SUV\"], \"Q3\": [\"SUV\"],\n    \"Q4 e-tron\": [\"SUV\"], \"Q5\": [\"SUV\"], \"Q7\": [\"SUV\"], \"Q8\": [\"SUV\"],\n    \"Q8 e-tron\": [\"SUV\"], \"e-tron GT\": [\"liftback\"], \"TT\": [\"coupe\",\"roadster\"]\n  },\n  \"BMW\": {\n    \"1 Series\": [\"hatchback\"], \"2 Series\": [\"coupe\",\"sedan\",\"minivan\"],\n    \"3 Series\": [\"sedan\",\"kombi\"], \"4 Series\": [\"coupe\",\"kabriolet\",\"hatchback\"],\n    \"5 Series\": [\"sedan\",\"kombi\"], \"6 Series\": [\"hatchback\"],\n    \"7 Series\": [\"sedan\"], \"8 Series\": [\"coupe\",\"kabriolet\",\"sedan\"],\n    \"X1\": [\"SUV\"], \"X2\": [\"SUV\"], \"X3\": [\"SUV\"], \"X4\": [\"SUV\"],\n    \"X5\": [\"SUV\"], \"X6\": [\"SUV\"], \"X7\": [\"SUV\"],\n    \"i4\": [\"hatchback\"], \"i5\": [\"sedan\",\"kombi\"], \"i7\": [\"sedan\"],\n    \"iX1\": [\"SUV\"], \"iX3\": [\"SUV\"], \"iX\": [\"SUV\"]\n  },\n  \"KIA\": {\n    \"Picanto\": [\"hatchback\"], \"Ceed\": [\"hatchback\",\"kombi\"],\n    \"ProCeed\": [\"kombi\"], \"XCeed\": [\"SUV\"], \"Stonic\": [\"SUV\"], \"Niro\": [\"SUV\"],\n    \"EV3\": [\"SUV\"], \"EV6\": [\"SUV\"], \"EV9\": [\"SUV\"], \"Sportage\": [\"SUV\"], \"Sorento\": [\"SUV\"]\n  }\n};\n\nconst brandDealersMap = {\n  \"Audi\": [\"AUDI WARSZAWA\", \"AUDI GDA\u0143SK\", \"AUDI P\u0141OCK\"],\n  \"BMW\": [\"BMW ONE\", \"BMW TWO\", \"BMW THREE\"],\n  \"KIA\": [\"KIA mija\", \"KIA smakija\", \"KIA zabija\"]\n};\n\nconst brandSelect = document.getElementById('brand-select');\nconst modelSelect = document.getElementById('model-select');\nconst bodySelect = document.getElementById('body-select');\nconst submitButton = document.getElementById('submit-button');\n\nObject.keys(carData).forEach(brand => {\n  const option = document.createElement('option');\n  option.value = brand;\n  option.textContent = brand;\n  brandSelect.appendChild(option);\n});\n\nbrandSelect.addEventListener('change', () => {\n  modelSelect.innerHTML = '<option value=\"\">-- Wybierz model --<\/option>';\n  bodySelect.innerHTML = '<option value=\"\">-- Najpierw wybierz model --<\/option>';\n\n  if (brandSelect.value) {\n    modelSelect.disabled = false;\n    const models = Object.keys(carData[brandSelect.value]);\n    models.forEach(model => {\n      const opt = document.createElement('option');\n      opt.value = model;\n      opt.textContent = model;\n      modelSelect.appendChild(opt);\n    });\n  } else {\n    modelSelect.disabled = true;\n    bodySelect.disabled = true;\n  }\n});\n\nmodelSelect.addEventListener('change', () => {\n  bodySelect.innerHTML = '<option value=\"\">-- Wybierz rodzaj nadwozia --<\/option>';\n  if (modelSelect.value) {\n    bodySelect.disabled = false;\n    const bodies = carData[brandSelect.value][modelSelect.value];\n    bodies.forEach(body => {\n      const opt = document.createElement('option');\n      opt.value = body;\n      opt.textContent = body;\n      bodySelect.appendChild(opt);\n    });\n  } else {\n    bodySelect.disabled = true;\n  }\n});\n\nsubmitButton.addEventListener('click', e => {\n  e.preventDefault();\n\n  const brand = brandSelect.value;\n  const model = modelSelect.value;\n  const body = bodySelect.value;\n  const email = document.getElementById('email').value;\n  const phone = document.getElementById('phone').value;\n\n  const priorities = {\n    price: document.getElementById('priority-price').value,\n    economy: document.getElementById('priority-economy').value,\n    equipment: document.getElementById('priority-equipment').value,\n    power: document.getElementById('priority-power').value,\n    design: document.getElementById('priority-design').value\n  };\n\n  if (!brand || !model || !body || !email || !phone) {\n    alert(\"Wype\u0142nij wszystkie pola formularza.\");\n    return;\n  }\n\n  const fd = new FormData();\n  fd.append('action', 'wheelhub_new_inquiry');\n  fd.append('security', myAjax.nonce);\n  fd.append('brand', brand);\n  fd.append('model', model);\n  fd.append('body', body);\n  fd.append('email', email);\n  fd.append('phone', phone);\n  fd.append('priorities', JSON.stringify(priorities));\n\n  fetch(myAjax.ajaxUrl, { method: 'POST', body: fd })\n    .then(res => res.json())\n    .then(resp => {\n      if (resp.success) {\n        alert(`Twoje zapytanie wys\u0142ali\u015bmy do ${brandDealersMap[brand].length} diler\u00f3w z ca\u0142ej Polski. Daj im chwil\u0119 na odpowied\u017a. W najbli\u017cszym czasie na e-mail od ka\u017cdego z nich otrzymasz po jednej, najlepszej ofercie, przygotowanej specjalnie dla Ciebie.`);\n      } else {\n        alert(\"B\u0142\u0105d: \" + resp.data);\n      }\n    })\n    .catch(err => {\n      console.error(err);\n      alert(\"B\u0142\u0105d sieci.\");\n    });\n});\n<\/script>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3e85ea7 elementor-widget elementor-widget-html\" data-id=\"3e85ea7\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<!-- G\u0141\u00d3WNY KONTENER FORMULARZA -->\n<div id=\"wheelhub-form\">\n\n  <!-- KROK 1: Marka, Model, Nadwozie -->\n  <div id=\"wheelhub-step1\">\n    <div class=\"wheelhub-row\">\n      <select id=\"brand-select\">\n        <option value=\"\">Marka<\/option>\n      <\/select>\n\n      <select id=\"model-select\" disabled>\n        <option value=\"\">Model<\/option>\n      <\/select>\n\n      <select id=\"body-select\" disabled>\n        <option value=\"\">Nadwozie<\/option>\n      <\/select>\n\n      <!-- Przycisk PRZEJ\u015aCIA DO KROKU 2 -->\n      <button id=\"next-button\"><b>WheelHub<\/b> znajd\u017a mi auto<\/button>\n    <\/div>\n  <\/div>\n\n  <!-- KROK 2: E-mail, Telefon, Suwaki + SUBMIT -->\n  <div id=\"wheelhub-step2\" style=\"display: none;\">\n    \n    <div class=\"wheelhub-row2\">\n      <label for=\"email\">Tw\u00f3j adres e-mail:<\/label><br>\n      <input type=\"email\" id=\"email\" required><br><br>\n\n      <label for=\"phone\">Tw\u00f3j numer telefonu:<\/label><br>\n      <input type=\"tel\" id=\"phone\" required><br><br>\n\n      <p>Wa\u017cne jest dla mnie:<\/p>\n      <label>Cena:<\/label>\n      <input type=\"range\" id=\"priority-price\" min=\"1\" max=\"10\" value=\"5\"><br>\n      <label>Ekonomia:<\/label>\n      <input type=\"range\" id=\"priority-economy\" min=\"1\" max=\"10\" value=\"5\"><br>\n      <label>Wyposa\u017cenie:<\/label>\n      <input type=\"range\" id=\"priority-equipment\" min=\"1\" max=\"10\" value=\"5\"><br>\n      <label>Moc silnika:<\/label>\n      <input type=\"range\" id=\"priority-power\" min=\"1\" max=\"10\" value=\"5\"><br>\n      <label>Wygl\u0105d:<\/label>\n      <input type=\"range\" id=\"priority-design\" min=\"1\" max=\"10\" value=\"5\"><br><br>\n    <\/div>\n\n    <!-- Wsp\u00f3lny rz\u0105d na dole: przycisk + link \"cofnij\" -->\n    <div class=\"wheelhub-row2-end\">\n      <button id=\"submit-button\">Prosz\u0119 o oferty<\/button>\n      <a href=\"#\" id=\"back-button\" class=\"wheelhub-back\">cofnij<\/a>\n    <\/div>\n\n  <\/div>\n\n<\/div>\n\n<style>\n  \/* OGRANICZENIE WP\u0141YWU STYLI DO #wheelhub-form *\/\n  #wheelhub-form {\n    font-family: 'Cairo', sans-serif; \/* za\u0142\u00f3\u017cmy, \u017ce Cairo jest podpi\u0119te w <head> *\/\n    font-size: 18px;\n    color: #000;\n    font-weight: 700;\n  }\n\n  \/* KROK 1: rz\u0105d z selectami i przyciskiem *\/\n  #wheelhub-form .wheelhub-row {\n    display: flex;\n    align-items: center;\n    gap: 1rem;            \/* odst\u0119p mi\u0119dzy elementami *\/\n    margin-bottom: 1rem;\n  }\n\n  \/*****************************************************\/\n  \/* STYL SELECT\u00d3W                                     *\/\n  \/*****************************************************\/\n  #wheelhub-form select {\n    min-width: 120px;\n    padding: 0.4rem 1.6rem 0.4rem 0.6rem; \/* extra padding po prawej na ikonk\u0119 strza\u0142ki *\/\n    border: 0px;                         \/* brak obramowania *\/\n    border-radius: 0px;                  \/* brak zaokr\u0105glenia *\/\n    background-color: #fff;              \n    \/* Usuwamy systemowe strza\u0142ki w r\u00f3\u017cnych przegl\u0105darkach: *\/\n    -webkit-appearance: none;\n    -moz-appearance: none;\n    appearance: none;\n    \/* W\u0142asna ikonka w tle (base64 z czarn\u0105 strza\u0142k\u0105 w d\u00f3\u0142) *\/\n    background-image: url(\"data:image\/svg+xml;charset=utf8,%3Csvg width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http:\/\/www.w3.org\/2000\/svg'%3E%3Cpath d='M6 9l6 6 6-6'%3E%3C\/path%3E%3C\/svg%3E\");\n    background-repeat: no-repeat;\n    background-position: calc(100% - 0.6rem) center; \/* strza\u0142ka po prawej *\/\n    background-size: 20px;\n    cursor: pointer;\n    font-weight: 700;\n    font-size: 18px;\n  }\n\n  \/*****************************************************\/\n  \/* PRZYCISK PIERWSZY (NEXT-BUTTON)                   *\/\n  \/*****************************************************\/\n  #wheelhub-form #next-button {\n    background-color: #000;\n    color: #fff;\n    font-size: 17px;\n    border: none;\n    border-radius: 30px;\n    padding: 0.5rem 1rem;\n    cursor: pointer;\n  }\n\n  \/*****************************************************\/\n  \/* KROK 2 \u2013 styl kontenera, pola e-mail, telefon itp.*\/\n  \/*****************************************************\/\n  #wheelhub-step2 {\n    margin-top: 1rem;\n  }\n  \/* Aby zachowa\u0107 sp\u00f3jno\u015b\u0107, tworzymy drugi \"row\" *\/\n  #wheelhub-form .wheelhub-row2 {\n    display: flex;\n    flex-direction: column;\n    gap: 0.5rem;\n  }\n\n  #wheelhub-step2 input[type=\"email\"],\n  #wheelhub-step2 input[type=\"tel\"] {\n    width: 100%;\n    max-width: 300px;\n    padding: 0.4rem;\n    margin-top: 0.3rem;\n    margin-bottom: 1rem;\n    border: 1px solid #ccc;\n    border-radius: 4px;\n    font-weight: 400;    \/* troche l\u017cejsze w \u015brodku *\/\n  }\n\n  #wheelhub-step2 input[type=\"range\"] {\n    margin-bottom: 0.5rem;\n  }\n\n  \/*****************************************************\/\n  \/* OSTATNI RZ\u0104D W KROKU 2: PRZYCISK + LINK 'COFNIJ'   *\/\n  \/*****************************************************\/\n  #wheelhub-form .wheelhub-row2-end {\n    display: flex;\n    align-items: center;\n    gap: 1rem;\n  }\n\n  \/* PRZYCISK DRUGI (SUBMIT-BUTTON) *\/\n  #wheelhub-form #submit-button {\n    background-color: #000;\n    color: #fff;\n    border: none;\n    border-radius: 30px;\n    padding: 0.5rem 1rem;\n    cursor: pointer;\n  }\n\n  \/* LINK COFNIJ *\/\n  #wheelhub-form .wheelhub-back {\n    color: #777;\n    font-size: 16px;\n    text-decoration: none;\n  }\n  #wheelhub-form .wheelhub-back:hover {\n    text-decoration: underline;\n  }\n<\/style>\n\n<script>\n\/* ---------------------------------------------------\n   DANE: carData \u2013 WSZYSTKIE WYMIENIONE MARKI\/MODELE\n   ---------------------------------------------------*\/\nconst carData = {\n  \"Alfa Romeo\": {\n    \"Giulia\": [\"sedan\"],\n    \"Junior\": [\"SUV\"],\n    \"Tonale\": [\"SUV\"],\n    \"Stelvio\": [\"SUV\"]\n  },\n  \"Audi\": {\n    \"A1\": [\"hatchback\"],\n    \"A3\": [\"hatchback\",\"sedan\"],\n    \"A4\": [\"sedan\",\"kombi\"],\n    \"A5\": [\"liftback\",\"coupe\",\"kabriolet\"],\n    \"A6\": [\"sedan\",\"kombi\"],\n    \"A7\": [\"liftback\"],\n    \"A8\": [\"sedan\"],\n    \"Q2\": [\"SUV\"],\n    \"Q3\": [\"SUV\"],\n    \"Q4 e-tron\": [\"SUV\"],\n    \"Q5\": [\"SUV\"],\n    \"Q7\": [\"SUV\"],\n    \"Q8\": [\"SUV\"],\n    \"Q8 e-tron\": [\"SUV\"],\n    \"e-tron GT\": [\"liftback\"],\n    \"TT\": [\"coupe\",\"roadster\"]\n  },\n  \"BAIC\": {\n    \"Beijing 3\": [\"SUV\"],\n    \"Beijing 5\": [\"SUV\"],\n    \"Beijing 7\": [\"SUV\"]\n  },\n  \"BMW\": {\n    \"1 Series\": [\"hatchback\"],\n    \"2 Series\": [\"coupe\",\"sedan\",\"minivan\"],\n    \"3 Series\": [\"sedan\",\"kombi\"],\n    \"4 Series\": [\"coupe\",\"kabriolet\",\"hatchback\"],\n    \"5 Series\": [\"sedan\",\"kombi\"],\n    \"6 Series\": [\"hatchback\"],\n    \"7 Series\": [\"sedan\"],\n    \"8 Series\": [\"coupe\",\"kabriolet\",\"sedan\"],\n    \"X1\": [\"SUV\"],\n    \"X2\": [\"SUV\"],\n    \"X3\": [\"SUV\"],\n    \"X4\": [\"SUV\"],\n    \"X5\": [\"SUV\"],\n    \"X6\": [\"SUV\"],\n    \"X7\": [\"SUV\"],\n    \"i4\": [\"hatchback\"],\n    \"i5\": [\"sedan\",\"kombi\"],\n    \"i7\": [\"sedan\"],\n    \"iX1\": [\"SUV\"],\n    \"iX3\": [\"SUV\"],\n    \"iX\": [\"SUV\"]\n  },\n  \"BYD\": {\n    \"Dolphin\": [\"hatchback\"],\n    \"Seal\": [\"sedan\"],\n    \"Seal U\": [\"SUV\"]\n  },\n  \"Citro\u00ebn\": {\n    \"C3\": [\"hatchback\"],\n    \"C3 Aircross\": [\"SUV\"],\n    \"C4\": [\"hatchback\"],\n    \"C4 X\": [\"sedan\"],\n    \"C5 X\": [\"liftback\"],\n    \"C5 Aircross\": [\"SUV\"],\n    \"Berlingo\": [\"minivan\"],\n    \"SpaceTourer\": [\"minivan\"]\n  },\n  \"Cupra\": {\n    \"Born\": [\"hatchback\"],\n    \"Leon\": [\"hatchback\",\"kombi\"],\n    \"Formentor\": [\"SUV\"],\n    \"Ateca\": [\"SUV\"],\n    \"Tavascan\": [\"SUV\"],\n    \"Terramar\": [\"SUV\"]\n  },\n  \"Dacia\": {\n    \"Spring\": [\"hatchback\"],\n    \"Sandero\": [\"hatchback\"],\n    \"Sandero Stepway\": [\"hatchback\"],\n    \"Logan\": [\"sedan\"],\n    \"Jogger\": [\"kombi\"],\n    \"Duster\": [\"SUV\"]\n  },\n  \"DS Automobiles\": {\n    \"DS 3\": [\"hatchback\",\"SUV\"],\n    \"DS 4\": [\"hatchback\"],\n    \"DS 7\": [\"SUV\"],\n    \"DS 9\": [\"sedan\"]\n  },\n  \"Fiat\": {\n    \"500\": [\"hatchback\"],\n    \"500C\": [\"kabriolet\"],\n    \"500X\": [\"SUV\"],\n    \"Panda\": [\"hatchback\"],\n    \"Tipo\": [\"hatchback\",\"sedan\",\"kombi\"],\n    \"600\": [\"SUV\"],\n    \"Dobl\u00f2\": [\"minivan\"],\n    \"Ducato\": [\"van\"],\n    \"Scudo\": [\"van\"],\n    \"Fiorino\": [\"van\"]\n  },\n  \"Ford\": {\n    \"Fiesta\": [\"hatchback\"],\n    \"Focus\": [\"hatchback\",\"kombi\"],\n    \"Mondeo\": [\"sedan\",\"kombi\"],\n    \"Mustang\": [\"coupe\",\"kabriolet\"],\n    \"Puma\": [\"SUV\"],\n    \"Kuga\": [\"SUV\"],\n    \"Edge\": [\"SUV\"],\n    \"Explorer\": [\"SUV\"],\n    \"Ranger\": [\"pickup\"],\n    \"Transit\": [\"van\"]\n  },\n  \"Forthing\": {\n    \"T5\": [\"SUV\"],\n    \"T5 Evo\": [\"SUV\"],\n    \"T5L\": [\"SUV\"]\n  },\n  \"Hyundai\": {\n    \"i10\": [\"hatchback\"],\n    \"i20\": [\"hatchback\"],\n    \"i30\": [\"hatchback\",\"kombi\"],\n    \"Elantra\": [\"sedan\"],\n    \"Sonata\": [\"sedan\"],\n    \"Kona\": [\"SUV\"],\n    \"Tucson\": [\"SUV\"],\n    \"Santa Fe\": [\"SUV\"],\n    \"Palisade\": [\"SUV\"],\n    \"Bayon\": [\"SUV\"]\n  },\n  \"Jeep\": {\n    \"Renegade\": [\"SUV\"],\n    \"Compass\": [\"SUV\"],\n    \"Cherokee\": [\"SUV\"],\n    \"Grand Cherokee\": [\"SUV\"],\n    \"Wrangler\": [\"terenowy\"],\n    \"Gladiator\": [\"pickup\"]\n  },\n  \"Kia\": {\n    \"Picanto\": [\"hatchback\"],\n    \"Rio\": [\"hatchback\"],\n    \"Stonic\": [\"SUV\"],\n    \"Ceed\": [\"hatchback\"],\n    \"Ceed SW\": [\"kombi\"],\n    \"ProCeed\": [\"kombi\"],\n    \"XCeed\": [\"SUV\"],\n    \"Niro\": [\"SUV\"],\n    \"Sportage\": [\"SUV\"],\n    \"Sorento\": [\"SUV\"],\n    \"Stinger\": [\"sedan\"],\n    \"EV6\": [\"SUV\"],\n    \"EV9\": [\"SUV\"]\n  },\n  \"Land Rover\": {\n    \"Defender\": [\"terenowy\"],\n    \"Discovery\": [\"SUV\"],\n    \"Discovery Sport\": [\"SUV\"],\n    \"Range Rover\": [\"SUV\"],\n    \"Range Rover Sport\": [\"SUV\"],\n    \"Range Rover Velar\": [\"SUV\"],\n    \"Range Rover Evoque\": [\"SUV\"]\n  },\n  \"Lexus\": {\n    \"UX\": [\"SUV\"],\n    \"NX\": [\"SUV\"],\n    \"RX\": [\"SUV\"],\n    \"GX\": [\"SUV\"],\n    \"LX\": [\"SUV\"],\n    \"ES\": [\"sedan\"],\n    \"IS\": [\"sedan\"],\n    \"LS\": [\"sedan\"],\n    \"RC\": [\"coupe\"],\n    \"LC\": [\"coupe\",\"kabriolet\"]\n  },\n  \"Mazda\": {\n    \"Mazda2\": [\"hatchback\"],\n    \"Mazda3\": [\"hatchback\",\"sedan\"],\n    \"Mazda6\": [\"sedan\",\"kombi\"],\n    \"CX-3\": [\"SUV\"],\n    \"CX-30\": [\"SUV\"],\n    \"CX-5\": [\"SUV\"],\n    \"CX-60\": [\"SUV\"],\n    \"CX-90\": [\"SUV\"],\n    \"MX-30\": [\"SUV\"],\n    \"MX-5\": [\"coupe\",\"kabriolet\"]\n  },\n  \"Mercedes\": {\n    \"AMG GT\": [\"coupe\",\"roadster\"],\n    \"Citan\": [\"minivan\"],\n    \"CLA\": [\"sedan\"],\n    \"CLE\": [\"coupe\",\"kabriolet\"],\n    \"EQA\": [\"SUV\"],\n    \"EQB\": [\"SUV\"],\n    \"EQE\": [\"sedan\"],\n    \"EQS\": [\"sedan\"],\n    \"EQV\": [\"van\"],\n    \"GLA\": [\"SUV\"],\n    \"GLB\": [\"SUV\"],\n    \"GLC\": [\"SUV\"],\n    \"GLE\": [\"SUV\"],\n    \"GLS\": [\"SUV\"],\n    \"Klasa A\": [\"hatchback\"],\n    \"Klasa B\": [\"minivan\"],\n    \"Klasa C\": [\"sedan\",\"kombi\"],\n    \"Klasa E\": [\"sedan\",\"kombi\"],\n    \"Klasa G\": [\"terenowy\"],\n    \"Klasa S\": [\"sedan\"],\n    \"Klasa T\": [\"minivan\"],\n    \"Klasa V\": [\"van\"],\n    \"Maybach GLS\": [\"SUV\"],\n    \"Maybach S\": [\"sedan\"],\n    \"SL\": [\"roadster\"],\n    \"Sprinter\": [\"van\"],\n    \"Vito\": [\"van\"]\n  },\n  \"MG\": {\n    \"MG3\": [\"hatchback\"],\n    \"ZS\": [\"SUV\"],\n    \"HS\": [\"SUV\"],\n    \"Marvel R\": [\"SUV\"],\n    \"MG4\": [\"hatchback\"]\n  },\n  \"Mini\": {\n    \"3 Door\": [\"hatchback\"],\n    \"5 Door\": [\"hatchback\"],\n    \"Clubman\": [\"kombi\"],\n    \"Countryman\": [\"SUV\"],\n    \"Convertible\": [\"kabriolet\"]\n  },\n  \"Nissan\": {\n    \"Micra\": [\"hatchback\"],\n    \"Juke\": [\"SUV\"],\n    \"Qashqai\": [\"SUV\"],\n    \"X-Trail\": [\"SUV\"],\n    \"Ariya\": [\"SUV\"],\n    \"Leaf\": [\"hatchback\"],\n    \"Navara\": [\"pickup\"]\n  },\n  \"Omoda\": {\n    \"Omoda 5\": [\"SUV\"]\n  },\n  \"Opel\": {\n    \"Astra\": [\"hatchback\",\"kombi\"],\n    \"Corsa\": [\"hatchback\"],\n    \"Crossland\": [\"SUV\"],\n    \"Grandland\": [\"SUV\"],\n    \"Mokka\": [\"SUV\"],\n    \"Insignia\": [\"sedan\",\"kombi\"],\n    \"Combo Life\": [\"minivan\"],\n    \"Vivaro-e Life\": [\"minivan\"]\n  },\n  \"Peugeot\": {\n    \"208\": [\"hatchback\"],\n    \"308\": [\"hatchback\",\"kombi\"],\n    \"408\": [\"liftback\"],\n    \"508\": [\"sedan\",\"kombi\"],\n    \"2008\": [\"SUV\"],\n    \"3008\": [\"SUV\"],\n    \"5008\": [\"SUV\"],\n    \"Rifter\": [\"minivan\"],\n    \"Traveller\": [\"minivan\"]\n  },\n  \"Porsche\": {\n    \"718 Cayman\": [\"coupe\"],\n    \"718 Boxster\": [\"roadster\"],\n    \"911\": [\"coupe\",\"kabriolet\"],\n    \"Taycan\": [\"sedan\",\"kombi\"],\n    \"Macan\": [\"SUV\"],\n    \"Cayenne\": [\"SUV\"],\n    \"Panamera\": [\"sedan\",\"kombi\"]\n  },\n  \"Renault\": {\n    \"Clio\": [\"hatchback\"],\n    \"Captur\": [\"SUV\"],\n    \"Arkana\": [\"SUV\"],\n    \"Megane\": [\"hatchback\"],\n    \"Austral\": [\"SUV\"],\n    \"Kadjar\": [\"SUV\"],\n    \"Koleos\": [\"SUV\"],\n    \"Trafic\": [\"minivan\"],\n    \"Espace\": [\"SUV\"]\n  },\n  \"Seat\": {\n    \"Ibiza\": [\"hatchback\"],\n    \"Leon\": [\"hatchback\",\"kombi\"],\n    \"Arona\": [\"SUV\"],\n    \"Ateca\": [\"SUV\"],\n    \"Tarraco\": [\"SUV\"]\n  },\n  \"Skoda\": {\n    \"Fabia\": [\"hatchback\"],\n    \"Scala\": [\"hatchback\"],\n    \"Kamiq\": [\"SUV\"],\n    \"Octavia\": [\"liftback\"],\n    \"Karoq\": [\"SUV\"],\n    \"Superb\": [\"liftback\"],\n    \"Kodiaq\": [\"SUV\"],\n    \"Enyaq iV\": [\"SUV\"]\n  },\n  \"SsangYong\": {\n    \"Tivoli\": [\"SUV\"],\n    \"Korando\": [\"SUV\"],\n    \"Rexton\": [\"SUV\"],\n    \"Musso\": [\"pickup\"]\n  },\n  \"Suzuki\": {\n    \"Swift\": [\"hatchback\"],\n    \"Baleno\": [\"hatchback\"],\n    \"Ignis\": [\"SUV\"],\n    \"Vitara\": [\"SUV\"],\n    \"S-Cross\": [\"SUV\"],\n    \"Jimny\": [\"terenowy\"]\n  },\n  \"Tesla\": {\n    \"Model 3\": [\"sedan\"],\n    \"Model S\": [\"liftback\"],\n    \"Model X\": [\"SUV\"],\n    \"Model Y\": [\"SUV\"]\n  },\n  \"Toyota\": {\n    \"Aygo X\": [\"hatchback\"],\n    \"Yaris\": [\"hatchback\"],\n    \"Corolla\": [\"hatchback\",\"sedan\",\"kombi\"],\n    \"C-HR\": [\"SUV\"],\n    \"RAV4\": [\"SUV\"],\n    \"Highlander\": [\"SUV\"],\n    \"Land Cruiser\": [\"terenowy\"],\n    \"Hilux\": [\"pickup\"]\n  },\n  \"Volkswagen\": {\n    \"Polo\": [\"hatchback\"],\n    \"Golf\": [\"hatchback\",\"kombi\"],\n    \"Passat\": [\"sedan\",\"kombi\"],\n    \"Arteon\": [\"liftback\",\"kombi\"],\n    \"Tiguan\": [\"SUV\"],\n    \"Touareg\": [\"SUV\"],\n    \"T-Cross\": [\"SUV\"],\n    \"T-Roc\": [\"SUV\"],\n    \"ID.3\": [\"hatchback\"],\n    \"ID.4\": [\"SUV\"],\n    \"ID.5\": [\"SUV\"],\n    \"ID.7\": [\"sedan\"]\n  },\n  \"Volvo\": {\n    \"XC40\": [\"SUV\"],\n    \"XC60\": [\"SUV\"],\n    \"XC90\": [\"SUV\"],\n    \"S60\": [\"sedan\"],\n    \"S90\": [\"sedan\"],\n    \"V60\": [\"kombi\"],\n    \"V90\": [\"kombi\"],\n    \"C40\": [\"SUV\"],\n    \"EX90\": [\"SUV\"]\n  }\n};\n\n\/* ---------------------------------------------------\n   Mapa diler\u00f3w \u2013 (rozbudowane przyk\u0142ady)\n   ---------------------------------------------------*\/\nconst brandDealersMap = {\n  \"Alfa Romeo\": [\"Alfa Salon Warszawa\", \"Alfa Dealer Krak\u00f3w\"],\n  \"Audi\": [\"AUDI WARSZAWA\", \"AUDI GDA\u0143SK\", \"AUDI P\u0141OCK\"],\n  \"BAIC\": [\"BAIC Salon Pozna\u0144\"],\n  \"BMW\": [\"BMW ONE\", \"BMW TWO\", \"BMW THREE\"],\n  \"BYD\": [\"BYD Center Wroc\u0142aw\"],\n  \"Citro\u00ebn\": [\"Citro\u00ebn Salon \u0141\u00f3d\u017a\", \"Citro\u00ebn Dealer Katowice\"],\n  \"Cupra\": [\"Cupra Pozna\u0144\", \"Cupra Official Warszawa\"],\n  \"Dacia\": [\"Dacia Bia\u0142ystok\", \"Dacia Toru\u0144\"],\n  \"DS Automobiles\": [\"DS Exclusive Gda\u0144sk\"],\n  \"Fiat\": [\"Fiat Toru\u0144\", \"Fiat Bydgoszcz\"],\n  \"Ford\": [\"Ford Olsztyn\", \"Ford Dealer Krak\u00f3w\"],\n  \"Forthing\": [\"Forthing Showroom Opole\"],\n  \"Hyundai\": [\"Hyundai Center Szczecin\", \"Hyundai Dealer Kielce\"],\n  \"Jeep\": [\"Jeep Dealer Lublin\"],\n  \"Kia\": [\"KIA mija\", \"KIA smakija\", \"KIA zabija\"],\n  \"Land Rover\": [\"Land Rover Gdynia\", \"Land Rover Exclusive Pozna\u0144\"],\n  \"Lexus\": [\"Lexus Dealer Warszawa\", \"Lexus Exclusive Gdynia\"],\n  \"Mazda\": [\"Mazda Elbl\u0105g\", \"Mazda Premium Krak\u00f3w\"],\n  \"Mercedes\": [\"Mercedes Gda\u0144sk\", \"Mercedes Warszawa\", \"Mercedes Dealer Rzesz\u00f3w\"],\n  \"MG\": [\"MG Dealer Radom\"],\n  \"Mini\": [\"Mini Store Pozna\u0144\", \"Mini Showroom Gda\u0144sk\"],\n  \"Nissan\": [\"Nissan Bia\u0142ystok\", \"Nissan Official Szczecin\"],\n  \"Omoda\": [\"Omoda VIP \u0141\u00f3d\u017a\"],\n  \"Opel\": [\"Opel P\u0142ock\", \"Opel Dealer Zielona G\u00f3ra\"],\n  \"Peugeot\": [\"Peugeot Official Krak\u00f3w\", \"Peugeot Dealer Warszawa\"],\n  \"Porsche\": [\"Porsche Sopot\", \"Porsche Warszawa\"],\n  \"Renault\": [\"Renault Katowice\", \"Renault \u0141\u00f3d\u017a\"],\n  \"Seat\": [\"Seat Dealer Pozna\u0144\", \"Seat Official Gliwice\"],\n  \"Skoda\": [\"Skoda Pi\u0142a\", \"Skoda W\u0142oc\u0142awek\"],\n  \"SsangYong\": [\"SsangYong Warszawa\"],\n  \"Suzuki\": [\"Suzuki Gda\u0144sk\", \"Suzuki Wroc\u0142aw\"],\n  \"Tesla\": [\"Tesla Showroom Warszawa\"],\n  \"Toyota\": [\"Toyota Krak\u00f3w\", \"Toyota Warszawa\"],\n  \"Volkswagen\": [\"VW Lublin\", \"VW Toru\u0144\"],\n  \"Volvo\": [\"Volvo Dealer Gdynia\", \"Volvo Premium Krak\u00f3w\"]\n};\n\n\/* ---------------------------------------------------\n   POBRANIE ELEMENT\u00d3W \n   ---------------------------------------------------*\/\nconst brandSelect = document.getElementById('brand-select');\nconst modelSelect = document.getElementById('model-select');\nconst bodySelect  = document.getElementById('body-select');\n\nconst nextButton   = document.getElementById('next-button');\nconst submitButton = document.getElementById('submit-button');\nconst backButton   = document.getElementById('back-button');  \/\/ Link \"cofnij\"\n\nconst step1 = document.getElementById('wheelhub-step1');\nconst step2 = document.getElementById('wheelhub-step2');\n\n\/* ---------------------------------------------------\n   UZUPE\u0141NIENIE SELECTA MARK\u0104\n   ---------------------------------------------------*\/\nObject.keys(carData).forEach(brand => {\n  const option = document.createElement('option');\n  option.value = brand;\n  option.textContent = brand;\n  brandSelect.appendChild(option);\n});\n\n\/* ---------------------------------------------------\n   OBS\u0141UGA ZMIANY MARKI\n   ---------------------------------------------------*\/\nbrandSelect.addEventListener('change', () => {\n  \/\/ Wyczy\u015b\u0107 Model\n  modelSelect.innerHTML = '<option value=\"\">Model<\/option>';\n  \/\/ Wyczy\u015b\u0107 Nadwozie\n  bodySelect.innerHTML  = '<option value=\"\">Nadwozie<\/option>';\n\n  if (brandSelect.value) {\n    modelSelect.disabled = false;\n    const models = Object.keys(carData[brandSelect.value]);\n    models.forEach(model => {\n      const opt = document.createElement('option');\n      opt.value = model;\n      opt.textContent = model;\n      modelSelect.appendChild(opt);\n    });\n  } else {\n    modelSelect.disabled = true;\n    bodySelect.disabled  = true;\n  }\n});\n\n\/* ---------------------------------------------------\n   OBS\u0141UGA ZMIANY MODELU\n   ---------------------------------------------------*\/\nmodelSelect.addEventListener('change', () => {\n  bodySelect.innerHTML = '<option value=\"\">Nadwozie<\/option>';\n\n  if (modelSelect.value) {\n    bodySelect.disabled = false;\n    const bodies = carData[brandSelect.value][modelSelect.value];\n    bodies.forEach(body => {\n      const opt = document.createElement('option');\n      opt.value = body;\n      opt.textContent = body;\n      bodySelect.appendChild(opt);\n    });\n  } else {\n    bodySelect.disabled = true;\n  }\n});\n\n\/* ---------------------------------------------------\n   OBS\u0141UGA PRZYCISKU (KROK 1) \u2013 PRZEJ\u015aCIE DO KROKU 2\n   ---------------------------------------------------*\/\nnextButton.addEventListener('click', e => {\n  e.preventDefault();\n\n  const brand = brandSelect.value;\n  const model = modelSelect.value;\n  const body  = bodySelect.value;\n\n  \/\/ Prosta walidacja kroku 1\n  if (!brand || !model || !body) {\n    alert(\"Wype\u0142nij pola: marka, model, nadwozie.\");\n    return;\n  }\n\n  \/\/ Krok 1 ukrywamy, Krok 2 pokazujemy\n  step1.style.display = 'none';\n  step2.style.display = 'block';\n});\n\n\/* ---------------------------------------------------\n   OBS\u0141UGA LINKU \"COFNIJ\" \u2013 WR\u00d3\u0106 DO KROKU 1\n   ---------------------------------------------------*\/\nbackButton.addEventListener('click', e => {\n  e.preventDefault();\n\n  \/\/ Powr\u00f3t do kroku 1\n  step2.style.display = 'none';\n  step1.style.display = 'block';\n});\n\n\/* ---------------------------------------------------\n   OBS\u0141UGA PRZYCISKU (KROK 2) \u2013 WYS\u0141ANIE FORMULARZA\n   ---------------------------------------------------*\/\nsubmitButton.addEventListener('click', e => {\n  e.preventDefault();\n\n  \/\/ Dane z Kroku 1\n  const brand = brandSelect.value;\n  const model = modelSelect.value;\n  const body  = bodySelect.value;\n\n  \/\/ Dane z Kroku 2\n  const email = document.getElementById('email').value;\n  const phone = document.getElementById('phone').value;\n\n  const priorities = {\n    price:     document.getElementById('priority-price').value,\n    economy:   document.getElementById('priority-economy').value,\n    equipment: document.getElementById('priority-equipment').value,\n    power:     document.getElementById('priority-power').value,\n    design:    document.getElementById('priority-design').value\n  };\n\n  \/\/ Walidacja \n  if (!brand || !model || !body || !email || !phone) {\n    alert(\"Wype\u0142nij wszystkie pola formularza (obie sekcje).\");\n    return;\n  }\n\n  \/\/ Przygotowanie FormData do wys\u0142ania AJAX-em\n  const fd = new FormData();\n  fd.append('action', 'wheelhub_new_inquiry');\n  fd.append('security', myAjax.nonce); \n  fd.append('brand', brand);\n  fd.append('model', model);\n  fd.append('body', body);\n  fd.append('email', email);\n  fd.append('phone', phone);\n  fd.append('priorities', JSON.stringify(priorities));\n\n  \/\/ Wysy\u0142ka AJAX\n  fetch(myAjax.ajaxUrl, { method: 'POST', body: fd })\n    .then(res => res.json())\n    .then(resp => {\n      if (resp.success) {\n        alert(`Twoje zapytanie wys\u0142ali\u015bmy do ${\n          (brandDealersMap[brand] || []).length\n        } diler\u00f3w z ca\u0142ej Polski (o ile s\u0105 zdefiniowani w brandDealersMap).\nDaj im chwil\u0119 na odpowied\u017a. W najbli\u017cszym czasie otrzymasz od ka\u017cdego z nich jedn\u0105, najlepsz\u0105 ofert\u0119, przygotowan\u0105 specjalnie dla Ciebie.`);\n      } else {\n        alert(\"B\u0142\u0105d: \" + resp.data);\n      }\n    })\n    .catch(err => {\n      console.error(err);\n      alert(\"B\u0142\u0105d sieci.\");\n    });\n});\n<\/script>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>Marka pojazdu: &#8212; Wybierz mark\u0119 &#8212; Model: &#8212; Najpierw wybierz mark\u0119 &#8212; Rodzaj nadwozia: &#8212; Najpierw wybierz model &#8212; Tw\u00f3j adres e-mail: Tw\u00f3j numer telefonu: Wa\u017cne jest dla mnie: Cena: Ekonomia: Wyposa\u017cenie: Moc silnika: Wygl\u0105d: WheelHub, znajd\u017a mi auto! Marka Model Nadwozie WheelHub znajd\u017a mi auto Tw\u00f3j adres e-mail: Tw\u00f3j numer telefonu: Wa\u017cne jest dla &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.spectar.pl\/en\/wheelhub-2\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8222;Wheelhub&#8221;<\/span><\/a><\/p>","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_canvas","meta":{"footnotes":""},"acf":[],"_links":{"self":[{"href":"https:\/\/www.spectar.pl\/en\/wp-json\/wp\/v2\/pages\/6528"}],"collection":[{"href":"https:\/\/www.spectar.pl\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.spectar.pl\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.spectar.pl\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.spectar.pl\/en\/wp-json\/wp\/v2\/comments?post=6528"}],"version-history":[{"count":19,"href":"https:\/\/www.spectar.pl\/en\/wp-json\/wp\/v2\/pages\/6528\/revisions"}],"predecessor-version":[{"id":6583,"href":"https:\/\/www.spectar.pl\/en\/wp-json\/wp\/v2\/pages\/6528\/revisions\/6583"}],"wp:attachment":[{"href":"https:\/\/www.spectar.pl\/en\/wp-json\/wp\/v2\/media?parent=6528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}