{"id":8614,"date":"2025-05-27T17:16:19","date_gmt":"2025-05-27T14:16:19","guid":{"rendered":"https:\/\/pharmacista-sa.com\/skin-ai-2\/"},"modified":"2025-05-27T19:19:16","modified_gmt":"2025-05-27T16:19:16","slug":"skin-ai-2","status":"publish","type":"page","link":"https:\/\/pharmacista-sa.com\/en\/skin-ai-2\/","title":{"rendered":"skin ai"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"8614\" class=\"elementor elementor-8614 elementor-8457\">\n\t\t\t\t<div class=\"wd-negative-gap elementor-element elementor-element-d1a8dc3 e-flex e-con-boxed e-con e-parent\" data-id=\"d1a8dc3\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t<div class=\"elementor-element elementor-element-b901f88 e-con-full e-flex e-con e-child\" data-id=\"b901f88\" data-element_type=\"container\">\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-b364c5b e-con-full e-flex e-con e-child\" data-id=\"b364c5b\" data-element_type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-a2fa6b9 elementor-widget__width-inherit elementor-widget elementor-widget-shortcode\" data-id=\"a2fa6b9\" data-element_type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\">    <div class=\"form-container\">\r\n        <div id=\"user-details\">\r\n            <div id=\"detail-step-container\" class=\"fade-in\">\r\n                <div class=\"question\" id=\"detail-question\">Enter Your Details<\/div>\r\n        \r\n                <div id=\"step-1\" class=\"detail-step\">\r\n                    <label for=\"name\">Full Name:<\/label>\r\n                    <input type=\"text\" id=\"name\" name=\"name\" placeholder=\"Full Name\" class=\"input-field\">\r\n                <\/div>\r\n        \r\n                <div id=\"step-2\" class=\"detail-step hidden\">\r\n                    <label for=\"phone\">Phone Number:<\/label>\r\n                    <input type=\"tel\" id=\"phone\" name=\"phone\" placeholder=\"Phone Number\" class=\"input-field\">\r\n                <\/div>\r\n        \r\n                <div id=\"step-3\" class=\"detail-step hidden\">\r\n                    <label for=\"email\">Email Address:<\/label>\r\n                    <input type=\"email\" id=\"email\" name=\"email\" placeholder=\"Email Address\" class=\"input-field\">\r\n                <\/div>\r\n        \r\n                <button onclick=\"nextDetailStep()\">Next<\/button>\r\n            <\/div>\r\n        <\/div>\r\n        \r\n        <div id=\"question-container\" class=\"hidden\"><\/div>\r\n        \r\n        <div id=\"result\" class=\"result hidden\">\r\n            <h3>Here are our advice to help you:<\/h3>\r\n            <ul id=\"advice-list\"><\/ul>\r\n        <\/div>\r\n    <\/div>\r\n\t<style>\r\n\t\t.form-container {\r\n\t\t\tbackground: #62ae62 !important;\r\n\t\t\tcolor: white !important;\r\n\t\t\tborder-radius: 10px !important;\r\n\t\t\tbox-shadow: 0 8px 16px rgba(0,0,0,0.2) !important;\r\n\t\t\tpadding: 30px !important;\r\n\t\t\twidth: 100% !important;\r\n\t\t\tmax-width: 700px !important;\r\n\t\t\tmin-width: 700px !important;\r\n\t\t\tposition: relative !important;\r\n\t\t\toverflow: hidden !important;\r\n\t\t\tfont-size: 18px !important;\r\n\t\t}\r\n\r\n\t\t@media (max-width: 600px) {\r\n\t\t\t.form-container {\r\n\t\t\t\tmax-width: 90% !important; \r\n\t\t\t\tmin-width: unset !important;\r\n\t\t\t\twidth: 90% !important;\r\n\t\t\t\tpadding: 20px !important;\r\n\t\t\t\tfont-size: 16px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.form-container .question {\r\n\t\t\tfont-weight: bold !important;\r\n\t\t\tmargin-bottom: 20px !important;\r\n\t\t\tfont-size: 24px !important;\r\n\t\t}\r\n\r\n\t\t.form-container .option {\r\n\t\t\tdisplay: block !important;\r\n\t\t\tbackground: #346734 !important;\r\n\t\t\tcolor: white !important;\r\n\t\t\tpadding: 15px !important;\r\n\t\t\tmargin-bottom: 15px !important;\r\n\t\t\tborder-radius: 6px !important;\r\n\t\t\tcursor: pointer !important;\r\n\t\t\ttransition: background 0.3s !important;\r\n\t\t\tfont-size: 18px !important;\r\n\t\t\ttext-align: center !important;\r\n\t\t}\r\n\r\n\t\t.form-container .option:hover {\r\n\t\t\tbackground: #264b26 !important;\r\n\t\t}\r\n\r\n\t\t.form-container .hidden {\r\n\t\t\tdisplay: none !important;\r\n\t\t}\r\n\r\n\t\t.form-container .fade-in {\r\n\t\t\tanimation: fadeIn 0.5s forwards !important;\r\n\t\t}\r\n\r\n\t\t.form-container .fade-out {\r\n\t\t\tanimation: fadeOut 0.5s forwards !important;\r\n\t\t}\r\n\r\n\t\t.form-container .result {\r\n\t\t\tbackground: #ffffff !important;\r\n\t\t\tcolor: #62ae62 !important;\r\n\t\t\tpadding: 25px !important;\r\n\t\t\tborder-radius: 10px !important;\r\n\t\t\tmargin-top: 25px !important;\r\n\t\t\tbox-shadow: 0 4px 8px rgba(0,0,0,0.2) !important;\r\n\t\t\tfont-size: 18px !important;\r\n\t\t}\r\n\r\n\t\t.form-container .result h3 {\r\n\t\t\tmargin-bottom: 20px !important;\r\n\t\t\tfont-size: 22px !important;\r\n\t\t}\r\n\r\n\t\t.form-container .result ul {\r\n\t\t\tpadding-left: 20px !important;\r\n\t\t}\r\n\r\n\t\t.form-container .result ul li {\r\n\t\t\tmargin-bottom: 15px !important;\r\n\t\t\tline-height: 1.7 !important;\r\n\t\t\tlist-style: disc !important;\r\n\t\t}\r\n\r\n\t\t.form-container .result ul li::marker {\r\n\t\t\tcolor: #62ae62 !important;\r\n\t\t}\r\n\r\n\t\t@keyframes fadeIn {\r\n\t\t\tfrom { opacity: 0; transform: translateX(50px); }\r\n\t\t\tto { opacity: 1; transform: translateX(0); }\r\n\t\t}\r\n\t\t@keyframes fadeOut {\r\n\t\t\tfrom { opacity: 1; transform: translateX(0); }\r\n\t\t\tto { opacity: 0; transform: translateX(-50px); }\r\n\t\t}\r\n\r\n\t\t.form-container .detail-step {\r\n\t\t\tmargin-bottom: 20px !important;\r\n\t\t}\r\n\r\n\t\t.form-container label {\r\n\t\t\tdisplay: block !important;\r\n\t\t\tfont-weight: bold !important;\r\n\t\t\tmargin-bottom: 5px !important;\r\n\t\t\tcolor: white !important;\r\n\t\t}\r\n\r\n\t\t.form-container .input-field {\r\n\t\t\twidth: 100% !important;\r\n\t\t\tpadding: 10px 0 10px 10px !important;\r\n\t\t\tmargin: 5px 0 !important;\r\n\t\t\tborder-radius: 5px !important;\r\n\t\t\tborder: none !important;\r\n\t\t\tfont-size: 16px !important;\r\n\t\t\tbackground: white !important;\r\n\t\t\tcolor: grey !important;\r\n\t\t}\r\n\r\n\t\t.form-container button {\r\n\t\t\tbackground: #346734 !important;\r\n\t\t\tcolor: white !important;\r\n\t\t\tpadding: 10px 15px !important;\r\n\t\t\tborder: none !important;\r\n\t\t\tcursor: pointer !important;\r\n\t\t\tborder-radius: 5px !important;\r\n\t\t\tfont-size: 16px !important;\r\n\t\t\ttransition: background 0.3s !important;\r\n\t\t}\r\n\r\n\t\t.form-container button:hover {\r\n\t\t\tbackground: #264b26 !important;\r\n\t\t}\r\n\t<\/style>\r\n    <script>\r\n        const questions = [\r\n            {\r\n                question: \"How do you describe your food regime?\",\r\n                options: [\r\n                    { text: \"Balanced & healthy diet\", advice: \"\" },\r\n                    { text: \"Fast food (Junk food).\", advice: \"If you're not consuming a balanced diet, consider supplementing with 1) Multivitamins and 2) Probiotics.\" },\r\n                    { text: \"I am vegan \/ vegetarian.\", advice: \"It is highly recommended for vegans to take Vitamin B12, Iron, Omega-3, and Vitamin D3 1000.\" },\r\n                    { text: \"Keto diet.\", advice: \"For those following a keto diet, it is essential to 1) Take fibers, 2) Magnesium, and 3) Vitamin D3.\" }\r\n                ]\r\n            },\r\n            {\r\n                question: \"How do you describe your skin?\",\r\n                options: [\r\n                    { text: \"Loss of firmness \/ wrinkles \/ loss of elasticity.\", advice: \"To fight early signs of skin aging consider taking Collagen Peptides, Hyaluronic Acid, Vitmin C, Viamin E & Zinc\" },\r\n                    { text: \"Dark spots.\", advice: \"Protect your skin from UV rays, use Vitamin C and niacinamide serums, and consider supplements like Vitamin C, Vitamin E, Zinc, and Glutathione to reduce dark spots and improve skin tone.\" },\r\n                    { text: \"Acne \/ White haeds \/ Black heads\", advice: \"Cleanse Twice Daily:\u00a0Use a gentle, oil-free cleanser and consider adding Zinc & Vitamin B3 (Niacinamide) to your routine.\" },\r\n                    { text: \"Normal to dry.\", advice: \"Keep your skin hydrated by using moisturizers with hyaluronic acid and ceramides, and consider supplements like Omega-3, Vitamin E, and Biotin to support healthy, supple skin.\" }\r\n                ]\r\n            },\r\n            {\r\n                question: \"Do you suffer from hairloss ?\",\r\n                options: [\r\n                    { text: \"Yes I have severe hair fall.\", advice: \"Boost your hair, skin, and nail health with Biotin, Zinc, Copper, Omega-3, and please check your vitamin D & Ferritin levels\" },\r\n                    { text: \"I have hair fall specially in the crown area\", advice: \"Consult a Dermatologist:\u00a0Early diagnosis can help manage the condition effectively. For personalized guidance, you can easily access our online medical consultation through the link below.\" },\r\n                    { text: \"No hair fall but my hair is weak.\", advice: \"Maintain a Balanced Diet: Include Biotin, Zinc, Iron, Vitamin D, and Omega-3-rich foods to support hair health.\" },\r\n                    { text: \"No my hair is strong\", advice: \"\" }\r\n                ]\r\n            },\r\n            {\r\n                question: \"How often do you exercise?\",\r\n                options: [\r\n                    { text: \"Daily\", advice: \"Keep up the great work! Consider taking protein supplements for muscle recovery.\" },\r\n                    { text: \"A few times a week\", advice: \"Maintain consistency and stay hydrated for better performance.\" },\r\n                    { text: \"Rarely\", advice: \"Consider light exercises and start with short sessions to build a routine.\" }\r\n                ]\r\n            },\r\n            {\r\n                question: \"How many working hours do you have per day?\",\r\n                options: [\r\n                    { text: \"less than 5 hours\/day\", advice: \"\" },\r\n                    { text: \"8 hours\", advice: \"For those working 8 hours a day, consider taking 1) Multivitamins and 2) Omega-3 to support energy levels and overall health\" },\r\n                    { text: \"I am workholic (8-12hours)\", advice: \"As a workaholic working 8-12 hours a day, consider taking 1) Multivitamins, 2) Omega-3, and 3) Ashwagandha to support your energy, focus, and stress levels.\" }\r\n                ]\r\n            },\r\n            {\r\n                question: \"How do you describe your stress level?\",\r\n                options: [\r\n                    { text: \"Not stressed. I am relaxed\", advice: \"\" },\r\n                    { text: \"Modertae\", advice: \"For moderate stress, consider taking 1) Ashwagandha or 2) Valerian root to help manage stress and promote relaxation.\" },\r\n                    { text: \"I am so stressed and anxious\", advice: \"If you're feeling stressed and anxious, consider taking 1) Valerian root, 2) Vitamin B complex, and 3) Folic acid to help calm the mind and support overall well-being.\" }\r\n                ]\r\n            },\r\n            {\r\n                question: \"Do you feel as though you lack energy and stamina?\",\r\n                options: [\r\n                    { text: \"Never\", advice: \"\" },\r\n                    { text: \"Rarely\", advice: \"\" },\r\n                    { text: \"Often\", advice: \"For lack of stamina and energy, consider taking 1) Ginseng, 2) Multivitamins, 3) Vitamin B complex, and 4) Magnesium to boost energy levels and improve overall vitality.\" },\r\n                    { text: \"Always\", advice: \"For lack of stamina and energy, consider taking 1) Ginseng, 2) Multivitamins, 3) Vitamin B complex, 4) Vitamin D3, 5) Omega-3, and 6) Magnesium to enhance energy, support overall health, and improve vitality. You can easily access our online medical consultation through the link below for more help.\" }\r\n                ]\r\n            }\r\n        ];\r\n\r\n        let currentQuestion = 0;\r\n        const selectedAdvice = [];\r\n\t\tconst selectedAnswers = [];\r\n\r\n\t\tfunction displayQuestion(index) {\r\n\t\t\tconst questionContainer = document.getElementById(\"question-container\");\r\n\t\t\tquestionContainer.innerHTML = '';\r\n\r\n\t\t\tconst questionObj = questions[index];\r\n\t\t\tconst questionEl = document.createElement(\"div\");\r\n\t\t\tquestionEl.className = \"question\";\r\n\t\t\tquestionEl.innerText = questionObj.question;\r\n\t\t\tquestionContainer.appendChild(questionEl);\r\n\r\n\t\t\tquestionObj.options.forEach(option => {\r\n\t\t\t\tconst optionEl = document.createElement(\"div\");\r\n\t\t\t\toptionEl.className = \"option\";\r\n\t\t\t\toptionEl.innerText = option.text;\r\n\t\t\t\toptionEl.onclick = function() {\r\n\t\t\t\t\tselectedAnswers[index] = option.text;\r\n\t\t\t\t\tif (option.advice) {\r\n\t\t\t\t\t\tselectedAdvice.push(option.advice);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tnextQuestion();\r\n\t\t\t\t}\r\n\t\t\t\tquestionContainer.appendChild(optionEl);\r\n\t\t\t});\r\n\r\n\t\t\tquestionContainer.classList.add(\"fade-in\");\r\n\t\t}\r\n\r\n\r\n        function nextQuestion() {\r\n            const questionContainer = document.getElementById(\"question-container\");\r\n            questionContainer.classList.remove(\"fade-in\");\r\n            questionContainer.classList.add(\"fade-out\");\r\n\r\n            setTimeout(() => {\r\n                questionContainer.classList.remove(\"fade-out\");\r\n                currentQuestion++;\r\n                if (currentQuestion < questions.length) {\r\n                    displayQuestion(currentQuestion);\r\n                } else {\r\n                    showResult();\r\n                }\r\n            }, 200);\r\n        }\r\n\t\t\r\n\t\tfunction showResult() {\r\n\t\t\tdocument.getElementById(\"question-container\").classList.add(\"hidden\");\r\n\t\t\tconst resultEl = document.getElementById(\"result\");\r\n\t\t\tresultEl.classList.remove(\"hidden\");\r\n\r\n\t\t\tconst adviceList = document.getElementById(\"advice-list\");\r\n\t\t\tadviceList.innerHTML = '';\r\n\r\n\t\t\tlet name = document.getElementById(\"name\").value.trim() || \"Empty\";\r\n\t\t\tlet email = document.getElementById(\"email\").value.trim() || \"Empty\";\r\n\t\t\tlet phone = document.getElementById(\"phone\").value.trim() || \"Empty\";\r\n\r\n\r\n\t\t\tlet answers = questions.map((q, index) => {\r\n\t\t\t\tlet selectedOption = q.options.find(opt => opt.text === selectedAnswers[index]);\r\n\r\n\t\t\t\treturn {\r\n\t\t\t\t\tquestion: q.question,\r\n\t\t\t\t\toption: selectedOption.text,\r\n\t\t\t\t\tadvice: selectedOption.advice && selectedOption.advice.trim() !== \"\" ? selectedOption.advice : \"N\/A\"\r\n\t\t\t\t};\r\n\r\n\t\t\t});\r\n\r\n\t\t\tconst postData = {\r\n\t\t\t\tname: name,\r\n\t\t\t\temail: email,\r\n\t\t\t\tphone: phone,\r\n\t\t\t\ttype: 'AI',\r\n\t\t\t\tanswers: answers\r\n\t\t\t};\r\n\r\n\t\t\tfetch(\"https:\/\/sys.3alab-cosmo.com\/entries.php\", {\r\n\t\t\t\tmethod: \"POST\",\r\n\t\t\t\theaders: {\r\n\t\t\t\t\t\"Content-Type\": \"application\/json\"\r\n\t\t\t\t},\r\n\t\t\t\tbody: JSON.stringify(postData)\r\n\t\t\t})\r\n\t\t\t.then(response => response.json())\r\n\t\t\t.then(data => {\r\n\t\t\t})\r\n\t\t\t.catch(error => {\r\n\t\t\t});\r\n\r\n\t\t\tselectedAdvice.forEach(advice => {\r\n\t\t\t\tif (advice && advice !== \"N\/A\") {\r\n\t\t\t\t\tconst listItem = document.createElement(\"li\");\r\n\t\t\t\t\tlistItem.innerText = advice;\r\n\t\t\t\t\tadviceList.appendChild(listItem);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\tlet currentDetailStep = 1;\r\n        const totalDetailSteps = 3;\r\n\r\n        function nextDetailStep() {\r\n            const currentStep = document.getElementById(`step-${currentDetailStep}`);\r\n            currentStep.classList.remove(\"fade-in\");\r\n            currentStep.classList.add(\"fade-out\");\r\n\r\n            setTimeout(() => {\r\n                currentStep.classList.add(\"hidden\");\r\n                currentStep.classList.remove(\"fade-out\");\r\n\r\n                currentDetailStep++;\r\n                if (currentDetailStep <= totalDetailSteps) {\r\n                    const nextStep = document.getElementById(`step-${currentDetailStep}`);\r\n                    nextStep.classList.remove(\"hidden\");\r\n                    nextStep.classList.add(\"fade-in\");\r\n                } else {\r\n                    document.getElementById(\"user-details\").classList.add(\"hidden\");\r\n                    document.getElementById(\"question-container\").classList.remove(\"hidden\");\r\n                    displayQuestion(currentQuestion);\r\n                }\r\n            }, 200);\r\n        }\r\n\r\n        displayQuestion(currentQuestion);\r\n    <\/script>\r\n    <\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-1ae7702 e-con-full e-flex e-con e-child\" data-id=\"1ae7702\" data-element_type=\"container\">\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-30e456a e-con-full wd-section-stretch-content e-flex e-con e-parent\" data-id=\"30e456a\" data-element_type=\"container\">\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"","protected":false},"author":147,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-8614","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/pharmacista-sa.com\/en\/wp-json\/wp\/v2\/pages\/8614","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pharmacista-sa.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/pharmacista-sa.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/pharmacista-sa.com\/en\/wp-json\/wp\/v2\/users\/147"}],"replies":[{"embeddable":true,"href":"https:\/\/pharmacista-sa.com\/en\/wp-json\/wp\/v2\/comments?post=8614"}],"version-history":[{"count":0,"href":"https:\/\/pharmacista-sa.com\/en\/wp-json\/wp\/v2\/pages\/8614\/revisions"}],"wp:attachment":[{"href":"https:\/\/pharmacista-sa.com\/en\/wp-json\/wp\/v2\/media?parent=8614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}