{"id":20561,"date":"2026-04-16T15:22:49","date_gmt":"2026-04-16T15:22:49","guid":{"rendered":"https:\/\/marketplace-marketplace.com\/?page_id=20561"},"modified":"2026-04-20T15:32:28","modified_gmt":"2026-04-20T15:32:28","slug":"marketplace-3","status":"publish","type":"page","link":"https:\/\/marketplace-marketplace.com\/index.php\/marketplace-3\/","title":{"rendered":""},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"20561\" class=\"elementor elementor-20561\" data-elementor-settings=\"[]\">\n\t\t\t\t\t\t\t<div class=\"elementor-section-wrap\">\n\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-bf65fb6 elementor-section-full_width elementor-section-height-default elementor-section-height-default\" data-id=\"bf65fb6\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-no\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-bfebf76\" data-id=\"bfebf76\" 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-f3e6de1 elementor-widget elementor-widget-html\" data-id=\"f3e6de1\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<!DOCTYPE html>\r\n<html lang=\"en\">\r\n<head>\r\n<meta charset=\"UTF-8\">\r\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, viewport-fit=cover\">\r\n<title>Marketplace Platform - Complete Marketplace<\/title>\r\n<link href=\"https:\/\/fonts.googleapis.com\/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap\" rel=\"stylesheet\">\r\n<link rel=\"stylesheet\" href=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/font-awesome\/6.5.1\/css\/all.min.css\">\r\n<style>\r\n* { margin: 0; padding: 0; box-sizing: border-box; }\r\n:root {\r\n--primary: #6366f1;\r\n--primary-dark: #4f46e5;\r\n--secondary: #f093fb;\r\n--success: #10b981;\r\n--warning: #f59e0b;\r\n--danger: #ef4444;\r\n--dark: #0f172a;\r\n--gray: #64748b;\r\n--light: #f8fafc;\r\n--card-bg: #ffffff;\r\n--border: #e2e8f0;\r\n}\r\nbody {\r\nfont-family: 'Inter', sans-serif;\r\nbackground: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);\r\ncolor: #0f172a;\r\nline-height: 1.5;\r\nmin-height: 100vh;\r\n}\r\n.navbar {\r\nbackground: rgba(255, 255, 255, 0.98);\r\nbackdrop-filter: blur(12px);\r\npadding: 0.9rem 2rem;\r\ndisplay: flex;\r\njustify-content: space-between;\r\nalign-items: center;\r\nflex-wrap: wrap;\r\ngap: 1rem;\r\nposition: sticky;\r\ntop: 0;\r\nz-index: 120;\r\nborder-bottom: 1px solid rgba(102, 126, 234, 0.2);\r\nbox-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);\r\n}\r\n.logo {\r\ndisplay: flex;\r\nalign-items: center;\r\ngap: 0.5rem;\r\nfont-size: 1.4rem;\r\nfont-weight: 800;\r\nbackground: linear-gradient(135deg, #667eea, #f093fb);\r\n-webkit-background-clip: text;\r\nbackground-clip: text;\r\ncolor: transparent;\r\n}\r\n.logo i { background: none; -webkit-text-fill-color: #f093fb; font-size: 1.8rem; }\r\n.nav-links { display: flex; gap: 0.6rem; flex-wrap: wrap; }\r\n.nav-link {\r\npadding: 0.5rem 1.3rem;\r\nborder-radius: 60px;\r\nfont-weight: 600;\r\ncursor: pointer;\r\ntransition: all 0.3s;\r\nbackground: transparent;\r\ncolor: #4c1d95;\r\n}\r\n.nav-link i { margin-right: 8px; }\r\n.nav-link:hover, .nav-link.active {\r\nbackground: linear-gradient(135deg, #667eea, #f093fb);\r\ncolor: white;\r\nbox-shadow: 0 6px 14px rgba(102, 126, 234, 0.4);\r\ntransform: translateY(-2px);\r\n}\r\n.cart-icon { position: relative; }\r\n.cart-count {\r\nposition: absolute; top: -8px; right: -8px; background: #ff6b6b;\r\ncolor: white; border-radius: 40px; width: 20px; height: 20px;\r\nfont-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center;\r\n}\r\n.container { max-width: 1400px; margin: 0 auto; padding: 2rem 1.8rem; }\r\n\r\n\/* Ultra Modern Frames *\/\r\n.promo-modern {\r\nbackground: linear-gradient(135deg, #fffbeb, #fef3c7);\r\nborder-radius: 2rem;\r\npadding: 2rem;\r\nmargin-bottom: 1.8rem;\r\nborder: 1px solid #fde68a;\r\nbox-shadow: 0 20px 35px -12px rgba(245, 158, 11, 0.15);\r\nposition: relative;\r\noverflow: hidden;\r\n}\r\n.promo-modern::before { content: '\ud83c\udf81'; position: absolute; top: -30px; right: -30px; font-size: 150px; opacity: 0.08; pointer-events: none; }\r\n.promo-header { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1.2rem; }\r\n.promo-header i { font-size: 2.2rem; color: #f59e0b; }\r\n.promo-header h2 { font-size: 1.6rem; font-weight: 800; color: #b45309; }\r\n.promo-grid { display: flex; flex-wrap: wrap; gap: 2rem; }\r\n.promo-text { flex: 2; color: #78350f; font-size: 0.95rem; line-height: 1.6; }\r\n.promo-card-right { flex: 1; background: white; border-radius: 1.2rem; padding: 1.2rem; text-align: center; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08); }\r\n.gift-price { font-size: 2rem; font-weight: 900; color: #10b981; }\r\n.gift-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; margin: 0.8rem 0; }\r\n.gift-badge { background: #fef3c7; padding: 0.2rem 0.7rem; border-radius: 40px; font-size: 0.7rem; font-weight: 600; color: #92400e; }\r\n.btn-gift { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; border: none; border-radius: 60px; padding: 0.6rem 1.2rem; font-weight: 700; cursor: pointer; margin-top: 0.8rem; width: 100%; transition: 0.3s; }\r\n.shipping-modern {\r\nbackground: linear-gradient(135deg, #ecfdf5, #d1fae5);\r\nborder-radius: 1.5rem;\r\npadding: 1.5rem;\r\nmargin-bottom: 1.8rem;\r\nborder: 1px solid #a7f3d0;\r\ndisplay: flex;\r\nalign-items: center;\r\njustify-content: space-between;\r\nflex-wrap: wrap;\r\ngap: 1rem;\r\n}\r\n.shipping-left { display: flex; align-items: center; gap: 1rem; }\r\n.shipping-icon { background: white; width: 55px; height: 55px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: #10b981; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }\r\n.shipping-text h3 { font-size: 1.2rem; font-weight: 800; color: #064e3b; }\r\n.shipping-badge { background: #064e3b; color: white; padding: 0.5rem 1.2rem; border-radius: 60px; font-weight: 700; font-size: 0.85rem; display: flex; align-items: center; gap: 0.5rem; }\r\n.affiliate-modern {\r\nbackground: linear-gradient(135deg, #fdf2f8, #fce7f3);\r\nborder-radius: 1.8rem;\r\npadding: 1.8rem;\r\nmargin-bottom: 2rem;\r\nborder: 1px solid #fbcfe8;\r\nposition: relative;\r\noverflow: hidden;\r\n}\r\n.affiliate-modern::before { content: '\ud83d\udcb0'; position: absolute; top: -30px; right: -30px; font-size: 120px; opacity: 0.08; pointer-events: none; }\r\n.affiliate-header { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1rem; }\r\n.affiliate-header i { font-size: 2rem; color: #ec4899; }\r\n.affiliate-header h2 { font-size: 1.5rem; font-weight: 800; color: #831843; }\r\n.affiliate-grid { display: flex; flex-wrap: wrap; gap: 1.8rem; }\r\n.affiliate-text { flex: 2; color: #4a044e; font-size: 0.95rem; }\r\n.affiliate-text ul { margin: 0.8rem 0 0.8rem 1.2rem; }\r\n.affiliate-card-right { flex: 1; background: white; border-radius: 1.2rem; padding: 1.2rem; text-align: center; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08); }\r\n.commission-large { font-size: 2.2rem; font-weight: 900; color: #ec4899; }\r\n.affiliate-stats { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin: 0.8rem 0; }\r\n.affiliate-stat { background: #fce7f3; padding: 0.2rem 0.7rem; border-radius: 40px; font-size: 0.7rem; font-weight: 600; color: #be185d; }\r\n.btn-affiliate-modern { background: linear-gradient(135deg, #ec4899, #be185d); color: white; border: none; border-radius: 60px; padding: 0.6rem 1.2rem; font-weight: 700; cursor: pointer; width: 100%; text-decoration: none; display: inline-block; transition: 0.3s; }\r\n.hero {\r\nbackground: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);\r\nborder-radius: 2rem;\r\npadding: 2.5rem;\r\nmargin-bottom: 2rem;\r\ncolor: white;\r\n}\r\n.stats-badge { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }\r\n.stat-item { background: rgba(255,255,255,0.2); backdrop-filter: blur(10px); border-radius: 60px; padding: 0.3rem 1.2rem; font-size: 0.85rem; }\r\n.search-bar input {\r\nwidth: 100%;\r\npadding: 1rem 1.5rem;\r\nborder-radius: 80px;\r\nborder: none;\r\nbackground: white;\r\nfont-size: 1rem;\r\nbox-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);\r\n}\r\n.advanced-search {\r\nbackground: white;\r\nborder-radius: 1rem;\r\npadding: 1rem;\r\nmargin-bottom: 1.5rem;\r\ndisplay: flex;\r\nflex-wrap: wrap;\r\ngap: 1rem;\r\nalign-items: center;\r\nborder: 1px solid #e2e8f0;\r\n}\r\n.advanced-search input, .advanced-search select {\r\npadding: 0.6rem 1rem;\r\nborder: 1px solid #e2e8f0;\r\nborder-radius: 0.8rem;\r\nfont-size: 0.85rem;\r\nflex: 1;\r\nmin-width: 150px;\r\n}\r\n.advanced-search button {\r\nbackground: linear-gradient(135deg, #667eea, #f093fb);\r\nborder: none;\r\nborder-radius: 0.8rem;\r\npadding: 0.6rem 1.2rem;\r\ncolor: white;\r\nfont-weight: 600;\r\ncursor: pointer;\r\n}\r\n.niches-grid {\r\ndisplay: grid;\r\ngrid-template-columns: repeat(auto-fill, minmax(200px, 1fr));\r\ngap: 1.2rem;\r\nmargin: 1.5rem 0;\r\n}\r\n.niche-card {\r\nbackground: white;\r\nborder-radius: 1.2rem;\r\npadding: 1.2rem;\r\ncursor: pointer;\r\ntransition: all 0.3s;\r\nborder: 1px solid #e2e8f0;\r\ntext-align: center;\r\n}\r\n.niche-card:hover { transform: translateY(-5px); border-color: #667eea; box-shadow: 0 20px 30px -12px rgba(102,126,234,0.3); }\r\n.niche-icon { font-size: 2.2rem; margin-bottom: 0.5rem; color: #667eea; }\r\n.niche-name { font-weight: 700; font-size: 0.9rem; }\r\n.niche-stats { font-size: 0.65rem; color: #64748b; display: flex; justify-content: center; gap: 0.8rem; margin-top: 0.3rem; }\r\n.products-grid {\r\ndisplay: grid;\r\ngrid-template-columns: repeat(auto-fill, minmax(300px, 1fr));\r\ngap: 1.5rem;\r\nmargin: 1.5rem 0;\r\n}\r\n.product-card {\r\nbackground: white;\r\nborder-radius: 1.2rem;\r\noverflow: hidden;\r\ntransition: 0.3s;\r\nborder: 1px solid #e2e8f0;\r\n}\r\n.product-card:hover { transform: translateY(-5px); box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.15); }\r\n.product-img { width: 100%; height: 180px; object-fit: cover; background: linear-gradient(135deg, #667eea, #f093fb); display: flex; align-items: center; justify-content: center; font-size: 3rem; color: white; }\r\n.product-info { padding: 1rem; }\r\n.product-title { font-weight: 700; font-size: 0.95rem; }\r\n.product-price { color: #10b981; font-weight: 800; font-size: 1.2rem; }\r\n.product-seller { font-size: 0.7rem; color: #6b21a5; margin: 4px 0; }\r\n.product-type-badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 20px; font-size: 0.65rem; font-weight: 600; margin-right: 0.5rem; }\r\n.badge-physical { background: #3b82f620; color: #1e40af; }\r\n.badge-digital { background: #8b5cf620; color: #5b21b6; }\r\n.btn-primary {\r\nbackground: linear-gradient(135deg, #667eea, #f093fb);\r\nwidth: 100%;\r\nborder: none;\r\nborder-radius: 40px;\r\npadding: 0.6rem;\r\nfont-weight: 700;\r\ncolor: white;\r\ncursor: pointer;\r\ntransition: 0.2s;\r\n}\r\n.seller-hub {\r\nbackground: linear-gradient(135deg, #1e293b, #0f172a);\r\nborder-radius: 2rem;\r\npadding: 2rem;\r\nmargin-bottom: 2rem;\r\ncolor: white;\r\n}\r\n.dashboard-grid {\r\ndisplay: grid;\r\ngrid-template-columns: repeat(auto-fit, minmax(500px, 1fr));\r\ngap: 1.8rem;\r\nmargin-top: 1.5rem;\r\n}\r\n.dashboard-card {\r\nbackground: white;\r\nborder-radius: 1.5rem;\r\npadding: 1.5rem;\r\nbox-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);\r\nborder: 1px solid #eef2ff;\r\n}\r\n.dashboard-card h3 { color: #4c1d95; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; font-size: 1.2rem; }\r\n.free-notice { background: linear-gradient(135deg, #d1fae5, #a7f3d0); border-radius: 1rem; padding: 1rem; margin-bottom: 1.5rem; border-left: 6px solid #10b981; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }\r\n.free-badge-large { background: #10b981; color: white; padding: 0.3rem 1rem; border-radius: 40px; font-size: 0.7rem; font-weight: 700; display: inline-block; }\r\n.form-group { margin-bottom: 1rem; }\r\n.form-group label { display: block; margin-bottom: 0.3rem; font-weight: 600; font-size: 0.8rem; color: #6b21a5; }\r\n.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 0.7rem; border: 1px solid #e2e8f0; border-radius: 0.8rem; font-size: 0.9rem; }\r\n.btn-primary-action { background: linear-gradient(135deg, #667eea, #f093fb); width: 100%; border: none; border-radius: 60px; padding: 0.7rem; font-weight: 700; color: white; cursor: pointer; transition: 0.3s; }\r\n.dropzone { background: #faf9ff; border: 2px dashed #c4b5fd; border-radius: 1.2rem; padding: 1.4rem; text-align: center; cursor: pointer; transition: 0.2s; }\r\n.image-preview { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1rem; }\r\n.preview-img { width: 70px; height: 70px; object-fit: cover; border-radius: 12px; border: 1px solid #e9e4ff; }\r\n.products-list { max-height: 350px; overflow-y: auto; display: flex; flex-direction: column; gap: 0.8rem; }\r\n.product-item { display: flex; justify-content: space-between; align-items: center; padding: 0.8rem; background: #faf9ff; border-radius: 1rem; border: 1px solid #e9e4ff; }\r\n.product-item-title { font-weight: 600; color: #4c1d95; }\r\n.product-item-price { color: #f59e0b; font-weight: 700; }\r\n.delete-btn { background: #ff6b6b; color: white; border: none; border-radius: 40px; padding: 0.3rem 0.8rem; cursor: pointer; font-size: 0.7rem; }\r\n.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 1rem; }\r\n.stat-card { background: linear-gradient(135deg, #f5f0ff, #ede8ff); border-radius: 1rem; padding: 1rem; text-align: center; }\r\n.stat-number { font-size: 1.8rem; font-weight: 800; color: #667eea; }\r\n.shipping-rules { background: #f8fafc; border-radius: 1rem; padding: 1rem; margin-top: 1rem; border: 1px solid #e2e8f0; }\r\n.shipping-rule-row { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; align-items: center; flex-wrap: wrap; }\r\n.btn-small { background: #10b981; color: white; border: none; border-radius: 40px; padding: 0.3rem 0.8rem; font-size: 0.7rem; cursor: pointer; }\r\n.digital-fields { background: #f8fafc; border-radius: 1rem; padding: 1rem; margin-top: 1rem; border: 1px solid #e2e8f0; display: none; }\r\n.benefit-card { background: white; border-radius: 1.2rem; padding: 1.2rem; margin-top: 1rem; border: 1px solid #e2e8f0; transition: all 0.3s; }\r\n.benefit-card.ads { border-left: 4px solid #f59e0b; background: linear-gradient(135deg, #fff, #fffbeb); }\r\n.benefit-card.radio { border-left: 4px solid #0ea5e9; background: linear-gradient(135deg, #fff, #f0f9ff); }\r\n.benefit-card.website { border-left: 4px solid #10b981; background: linear-gradient(135deg, #fff, #ecfdf5); }\r\n.benefit-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.8rem; }\r\n.benefit-title { font-size: 1rem; font-weight: 800; display: flex; align-items: center; gap: 0.5rem; }\r\n.benefit-value { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; padding: 0.2rem 0.6rem; border-radius: 40px; font-size: 0.7rem; font-weight: 700; }\r\n.benefit-value.radio { background: linear-gradient(135deg, #0ea5e9, #0284c7); }\r\n.benefit-value.website { background: linear-gradient(135deg, #10b981, #059669); }\r\n.benefit-desc { color: #475569; font-size: 0.85rem; margin-bottom: 0.8rem; }\r\n.benefit-list { margin: 0.8rem 0 0.8rem 1.2rem; font-size: 0.8rem; }\r\n.price-tag { font-size: 1.2rem; font-weight: 800; color: #d97706; margin: 0.5rem 0; }\r\n.eligibility-msg { font-size: 0.7rem; padding: 0.4rem; border-radius: 8px; margin-top: 0.8rem; display: flex; align-items: center; gap: 0.4rem; background: #fef3c7; color: #92400e; border-left: 3px solid #f59e0b; }\r\n.btn-gold { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; border: none; border-radius: 40px; padding: 0.6rem 1rem; font-weight: 700; cursor: pointer; transition: 0.3s; width: 100%; margin-top: 0.5rem; }\r\n.btn-blue { background: linear-gradient(135deg, #0ea5e9, #0284c7); }\r\n.btn-green { background: linear-gradient(135deg, #10b981, #059669); }\r\n.store-card {\r\nbackground: white;\r\nborder-radius: 1.5rem;\r\npadding: 1.5rem;\r\ntransition: all 0.3s;\r\nborder: 1px solid #e2e8f0;\r\ncursor: pointer;\r\n}\r\n.store-card:hover { transform: translateY(-5px); border-color: #667eea; box-shadow: 0 20px 30px -12px rgba(102,126,234,0.2); }\r\n.store-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }\r\n.store-avatar { width: 60px; height: 60px; background: linear-gradient(135deg, #667eea, #f093fb); border-radius: 1rem; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: white; }\r\n.store-info { flex: 1; }\r\n.store-name { font-weight: 800; font-size: 1.1rem; margin-bottom: 0.2rem; }\r\n.store-niche { font-size: 0.7rem; color: #64748b; }\r\n.store-rating { display: flex; align-items: center; gap: 0.3rem; margin-top: 0.3rem; }\r\n.stars { color: #fbbf24; font-size: 0.7rem; }\r\n.stats-row { display: flex; justify-content: space-between; margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid #e2e8f0; }\r\n.stat-badge { text-align: center; flex: 1; }\r\n.stat-badge-value { font-weight: 800; font-size: 1.1rem; color: #4c1d95; }\r\n.stat-badge-label { font-size: 0.65rem; color: #64748b; }\r\n.order-item {\r\nbackground: #f8fafc;\r\nborder-radius: 1rem;\r\npadding: 1rem;\r\nmargin-bottom: 1rem;\r\nborder: 1px solid #e2e8f0;\r\n}\r\n.order-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-bottom: 0.8rem; padding-bottom: 0.5rem; border-bottom: 1px solid #e2e8f0; }\r\n.order-number { font-weight: 800; color: #4c1d95; font-size: 0.85rem; }\r\n.order-date { font-size: 0.7rem; color: #64748b; }\r\n.order-status { background: #10b98120; color: #065f46; padding: 0.2rem 0.6rem; border-radius: 20px; font-size: 0.7rem; font-weight: 600; }\r\n.order-earnings { display: flex; justify-content: space-between; margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid #e2e8f0; font-weight: 700; color: #10b981; }\r\n.view { display: none; }\r\n.view.active { display: block; }\r\n.btn-back {\r\nbackground: white;\r\nborder: 1px solid #e2e8f0;\r\nborder-radius: 40px;\r\npadding: 0.4rem 1.2rem;\r\nmargin-bottom: 1rem;\r\ncursor: pointer;\r\ndisplay: inline-flex;\r\nalign-items: center;\r\ngap: 6px;\r\n}\r\n.checkout-modal {\r\ndisplay: none;\r\nposition: fixed;\r\ntop: 0;\r\nleft: 0;\r\nwidth: 100%;\r\nheight: 100%;\r\nbackground: rgba(0, 0, 0, 0.85);\r\nbackdrop-filter: blur(8px);\r\nz-index: 2000;\r\njustify-content: center;\r\nalign-items: center;\r\npadding: 20px;\r\noverflow-y: auto;\r\n}\r\n.checkout-container {\r\nmax-width: 1100px;\r\nwidth: 100%;\r\nbackground: white;\r\nborder-radius: 2rem;\r\noverflow: hidden;\r\nbox-shadow: 0 30px 50px rgba(0, 0, 0, 0.3);\r\nanimation: modalSlideIn 0.3s ease;\r\n}\r\n@keyframes modalSlideIn {\r\nfrom { opacity: 0; transform: translateY(30px); }\r\nto { opacity: 1; transform: translateY(0); }\r\n}\r\n.checkout-header {\r\nbackground: linear-gradient(135deg, #667eea, #764ba2);\r\npadding: 1.2rem 2rem;\r\ncolor: white;\r\ndisplay: flex;\r\njustify-content: space-between;\r\nalign-items: center;\r\n}\r\n.close-checkout {\r\nbackground: rgba(255,255,255,0.2);\r\nborder: none;\r\nwidth: 36px;\r\nheight: 36px;\r\nborder-radius: 50%;\r\ncolor: white;\r\nfont-size: 1.2rem;\r\ncursor: pointer;\r\n}\r\n.checkout-body {\r\ndisplay: grid;\r\ngrid-template-columns: 1fr 320px;\r\ngap: 1.5rem;\r\npadding: 1.8rem;\r\n}\r\n@media (max-width: 800px) { .checkout-body { grid-template-columns: 1fr; } }\r\n.form-section {\r\nbackground: #f8fafc;\r\nborder-radius: 1.2rem;\r\npadding: 1.2rem;\r\nmargin-bottom: 1.2rem;\r\nborder: 1px solid #e2e8f0;\r\n}\r\n.form-section h3 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; color: #4c1d95; display: flex; align-items: center; gap: 0.5rem; }\r\n.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin-bottom: 0.8rem; }\r\n.form-group { margin-bottom: 0.8rem; }\r\n.form-group label { font-size: 0.7rem; font-weight: 600; color: #64748b; margin-bottom: 0.2rem; }\r\n.form-group input, .form-group select { width: 100%; padding: 0.6rem 0.8rem; border: 1px solid #e2e8f0; border-radius: 0.6rem; font-size: 0.85rem; }\r\n.payment-methods-grid {\r\ndisplay: grid;\r\ngrid-template-columns: repeat(5, 1fr);\r\ngap: 0.6rem;\r\nmargin-bottom: 1rem;\r\n}\r\n.payment-method-card {\r\ndisplay: flex;\r\nflex-direction: column;\r\nalign-items: center;\r\ngap: 0.3rem;\r\npadding: 0.6rem;\r\nborder: 2px solid #e2e8f0;\r\nborder-radius: 0.8rem;\r\ncursor: pointer;\r\nbackground: white;\r\ntext-align: center;\r\n}\r\n.payment-method-card.selected { border-color: #667eea; background: #f5f3ff; }\r\n.payment-icon { font-size: 1.3rem; }\r\n.payment-name { font-size: 0.7rem; font-weight: 600; }\r\n.payment-details { margin-top: 1rem; padding: 0.8rem; background: #f0fdf4; border-radius: 0.8rem; display: none; }\r\n.order-summary {\r\nbackground: linear-gradient(135deg, #1e293b, #0f172a);\r\nborder-radius: 1.2rem;\r\npadding: 1.2rem;\r\ncolor: white;\r\nposition: sticky;\r\ntop: 20px;\r\n}\r\n.cart-items-summary { max-height: 200px; overflow-y: auto; margin-bottom: 0.8rem; font-size: 0.75rem; }\r\n.cart-item-row { display: flex; justify-content: space-between; padding: 0.4rem 0; border-bottom: 1px solid #334155; }\r\n.totals-row { display: flex; justify-content: space-between; padding: 0.4rem 0; font-size: 0.85rem; }\r\n.totals-row.total { font-size: 1rem; font-weight: 800; border-top: 2px solid #f59e0b; margin-top: 0.4rem; padding-top: 0.6rem; color: #f59e0b; }\r\n.commission-note { font-size: 0.65rem; color: #94a3b8; text-align: center; margin-top: 0.8rem; }\r\n.place-order-btn {\r\nbackground: linear-gradient(135deg, #10b981, #059669);\r\nwidth: 100%;\r\nborder: none;\r\nborder-radius: 60px;\r\npadding: 0.8rem;\r\nfont-weight: 800;\r\ncolor: white;\r\nfont-size: 0.9rem;\r\ncursor: pointer;\r\nmargin-top: 0.8rem;\r\n}\r\n.toast-msg {\r\nposition: fixed;\r\nbottom: 20px;\r\nright: 20px;\r\nbackground: #1e293b;\r\ncolor: white;\r\npadding: 8px 16px;\r\nborder-radius: 40px;\r\nz-index: 2200;\r\nfont-size: 0.75rem;\r\n}\r\n@media (max-width: 768px) { .container { padding: 1rem; } .dashboard-grid { grid-template-columns: 1fr; } .payment-methods-grid { grid-template-columns: repeat(2, 1fr); } .promo-grid { flex-direction: column; } .affiliate-grid { flex-direction: column; } }\r\n<\/style>\r\n<\/head>\r\n<body>\r\n\r\n<div class=\"navbar\">\r\n<div class=\"logo\"><i class=\"fas fa-store\"><\/i> Marketplace Platform<br><span style=\"font-size:0.7rem;\">Buy and Sell Products<\/span><\/div>\r\n<div class=\"nav-links\">\r\n<a class=\"nav-link\" onclick=\"showView('home')\"><i class=\"fas fa-home\"><\/i> Home<\/a>\r\n<a class=\"nav-link\" onclick=\"showView('sellers')\"><i class=\"fas fa-store\"><\/i> Sellers<\/a>\r\n<a class=\"nav-link cart-icon\" onclick=\"showView('cart')\"><i class=\"fas fa-shopping-cart\"><\/i> Cart <span id=\"cartCount\" class=\"cart-count\" style=\"display:none;\">0<\/span><\/a>\r\n<a class=\"nav-link active\" onclick=\"showView('dashboard')\"><i class=\"fas fa-chart-line\"><\/i> Seller Hub<\/a>\r\n<\/div>\r\n<\/div>\r\n\r\n<div class=\"container\">\r\n<div id=\"homeView\" class=\"view\">\r\n<div class=\"promo-modern\"><div class=\"promo-header\"><i class=\"fas fa-gift\"><\/i><h2>\ud83c\udf81 SPECIAL BUYER PROMOTION \u2013 $1000 GIFT! \ud83c\udf81<\/h2><\/div><div class=\"promo-grid\"><div class=\"promo-text\"><p><strong>Dear buyers,<\/strong><\/p><p>If you shop and buy a product from any store placed on the Marketplace Platform for a period of <strong>one calendar year<\/strong> in the amount of at least <strong>$500<\/strong> and buy any product or service from the <strong>Marketing Plan (Individual 1, 2, 3 or Business - 1, 2, 3)<\/strong> or <strong>Decode Code<\/strong> in the amount of at least <strong>$500<\/strong>, you will receive a <strong>GIFT<\/strong> from the Marketplace Platform in the amount of <strong>$1000<\/strong>!<\/p><p>\ud83d\udce2 <strong>On Social Network - Facebook<\/strong> you will have your post or picture where they will have a minimum of <strong>10K likes, 7K shares and 5K comments<\/strong>.<\/p><p>\ud83d\udcb0 <strong>Price - $1000<\/strong>. Screenshots sent within 24 hours.<\/p><\/div><div class=\"promo-card-right\"><div class=\"gift-price\">$1000 GIFT<\/div><div class=\"gift-badges\"><span class=\"gift-badge\">\ud83d\udd25 10K+ Likes<\/span><span class=\"gift-badge\">\ud83d\udd04 7K+ Shares<\/span><span class=\"gift-badge\">\ud83d\udcac 5K+ Comments<\/span><span class=\"gift-badge\">\ud83d\udcf8 Proof<\/span><\/div><div style=\"background:#10b98120; padding:0.2rem 0.5rem; border-radius:40px; font-size:0.7rem;\">\u2713 24h Delivery<\/div><button class=\"btn-gift\" onclick=\"alert('\ud83c\udf81 GIFT CLAIMED! To qualify: Purchase $500+ products + $500+ Marketing Plan\/Decode Code within 1 year.')\">Claim My Gift<\/button><\/div><\/div><\/div>\r\n<div class=\"shipping-modern\"><div class=\"shipping-left\"><div class=\"shipping-icon\"><i class=\"fas fa-truck-fast\"><\/i><\/div><div class=\"shipping-text\"><h3>Shipping Information<\/h3><p>Shipping cost calculated at checkout based on your location. Delivery within <strong>15 working days<\/strong> from order confirmation.<\/p><\/div><\/div><div class=\"shipping-badge\"><i class=\"fas fa-globe\"><\/i> Worldwide Shipping<\/div><\/div>\r\n<div class=\"affiliate-modern\"><div class=\"affiliate-header\"><i class=\"fas fa-hand-holding-usd\"><\/i><h2>\ud83d\udcb8 AFFILIATE PROGRAM \u2013 EARN 10% COMMISSION! \ud83d\udcb8<\/h2><\/div><div class=\"affiliate-grid\"><div class=\"affiliate-text\"><p><strong>Become an Affiliate Partner!<\/strong><\/p><p>If the Buyer buys products totaling <strong>$500+<\/strong> in one year and buys Marketing Plan or Decode Code for <strong>$500+<\/strong>, you receive <strong>10% of the total amount<\/strong>.<\/p><ul><li>\u2705 Share your unique affiliate link<\/li><li>\u2705 Earn 10% commission on qualifying purchases<\/li><li>\u2705 Unlimited earnings, monthly payouts<\/li><\/ul><p><strong>Example:<\/strong> $1000 total = $100 commission!<\/p><\/div><div class=\"affiliate-card-right\"><div class=\"commission-large\">10% Commission<\/div><div class=\"affiliate-stats\"><span class=\"affiliate-stat\">\ud83d\udcb0 Unlimited<\/span><span class=\"affiliate-stat\">\ud83d\udcc8 Monthly<\/span><span class=\"affiliate-stat\">\ud83d\udd17 Unique Links<\/span><\/div><div style=\"background:#ec4899; padding:0.2rem 0.5rem; border-radius:40px; font-size:0.7rem;\">\u2713 Join For Free<\/div><a href=\"https:\/\/marketplace-marketplace.com\/index.php\/affiliate\/\" target=\"_blank\" class=\"btn-affiliate-modern\">Join Affiliate Program Now<\/a><\/div><\/div><\/div>\r\n<div class=\"hero\"><h1><i class=\"fas fa-store\"><\/i> Shop by Niche<\/h1><p>150+ categories \u00b7 7,500+ digital products \u00b7 5% marketplace fee<\/p><div class=\"stats-badge\"><span class=\"stat-item\"><i class=\"fas fa-store\"><\/i> <span id=\"totalSellersSpan\">0<\/span> Stores<\/span><span class=\"stat-item\"><i class=\"fas fa-box\"><\/i> <span id=\"totalProductsSpan\">0<\/span> Products<\/span><span class=\"stat-item\"><i class=\"fas fa-credit-card\"><\/i> 5 payment methods<\/span><span class=\"stat-item\"><i class=\"fas fa-download\"><\/i> Digital Products<\/span><\/div><\/div>\r\n<!-- Advanced Search -->\r\n<div class=\"advanced-search\">\r\n<input type=\"text\" id=\"searchKeyword\" placeholder=\"\ud83d\udd0d Search by product title, brand, or seller...\">\r\n<input type=\"number\" id=\"minPrice\" placeholder=\"Min price $\" step=\"1\">\r\n<input type=\"number\" id=\"maxPrice\" placeholder=\"Max price $\" step=\"1\">\r\n<select id=\"sortBy\">\r\n<option value=\"default\">Sort by: Default<\/option>\r\n<option value=\"price_asc\">Price: Low to High<\/option>\r\n<option value=\"price_desc\">Price: High to Low<\/option>\r\n<option value=\"newest\">Newest First<\/option>\r\n<option value=\"discount_high\">Highest Discount<\/option>\r\n<\/select>\r\n<button onclick=\"applyAdvancedSearch()\">Apply Filters<\/button>\r\n<button onclick=\"resetSearch()\">Reset<\/button>\r\n<\/div>\r\n<div class=\"search-bar\"><input type=\"text\" id=\"searchNicheInput\" placeholder=\"\ud83d\udd0d Search for a niche, store name, product title, brand or seller...\" oninput=\"filterNicheGrid()\"><\/div>\r\n<div class=\"niches-grid\" id=\"nichesGrid\"><\/div>\r\n<div style=\"margin:1.5rem 0 0.5rem;\"><h3><i class=\"fas fa-fire\" style=\"color:#f59e0b;\"><\/i> Featured Products<\/h3><\/div>\r\n<div class=\"products-grid\" id=\"globalProductsGrid\"><\/div>\r\n<\/div>\r\n\r\n<div id=\"sellersView\" class=\"view\"><button class=\"btn-back\" onclick=\"showView('home')\"><i class=\"fas fa-arrow-left\"><\/i> Home<\/button><div class=\"hero\" style=\"padding:1.5rem;\"><h2><i class=\"fas fa-store\"><\/i> All Stores<\/h2><p>Every seller has a dedicated storefront with ratings, sales, and product catalog<\/p><\/div><div class=\"search-bar\"><input type=\"text\" id=\"searchSellerInput\" placeholder=\"\ud83d\udd0d Search store name or niche...\" oninput=\"filterSellersList()\"><\/div><div class=\"niches-grid\" id=\"allSellersGrid\"><\/div><\/div>\r\n<div id=\"cartView\" class=\"view\"><button class=\"btn-back\" onclick=\"showView('home')\"><i class=\"fas fa-arrow-left\"><\/i> Continue shopping<\/button><div class=\"hero\"><h1>Your Cart<\/h1><\/div><div id=\"cartContainer\"><\/div><\/div>\r\n<div id=\"nicheView\" class=\"view\"><button class=\"btn-back\" onclick=\"showView('home')\"><i class=\"fas fa-arrow-left\"><\/i> All niches<\/button><div id=\"nicheHeader\"><\/div><div class=\"products-grid\" id=\"nicheProductsList\"><\/div><\/div>\r\n<div id=\"sellerStoreView\" class=\"view\"><button class=\"btn-back\" onclick=\"showView('sellers')\"><i class=\"fas fa-store\"><\/i> Back to sellers<\/button><div id=\"sellerStoreContainer\"><\/div><\/div>\r\n\r\n<div id=\"dashboardView\" class=\"view active\">\r\n<div class=\"seller-hub\"><h2><i class=\"fas fa-chart-line\"><\/i> Seller Hub Pro<\/h2><p>Manage your store, add physical or digital products \u2014 you earn 95%, we take 5% commission<\/p><\/div>\r\n<div class=\"dashboard-grid\">\r\n<div><div class=\"dashboard-card\"><h3><i class=\"fas fa-store\"><\/i> Register Your Store<\/h3><div class=\"free-notice\"><div><i class=\"fas fa-gift\" style=\"font-size:1.8rem; color:#10b981;\"><\/i><\/div><div><strong>COMPLETELY FREE \u2013 NO HIDDEN COSTS!<\/strong><br>Registration, store maintenance and placement of products is 100% FREE! You only pay 5% commission when you make a sale.<\/div><div><span class=\"free-badge-large\"><i class=\"fas fa-infinity\"><\/i> Forever Free<\/span><\/div><\/div><div class=\"form-group\"><label>Store Name<\/label><input type=\"text\" id=\"storeName\" placeholder=\"Your store name\"><\/div><div class=\"form-group\"><label>Owner Name<\/label><input type=\"text\" id=\"ownerName\" placeholder=\"Your full name\"><\/div><div class=\"form-group\"><label>Email<\/label><input type=\"email\" id=\"sellerEmail\" placeholder=\"your@email.com\"><\/div><div class=\"form-group\"><label>Select Your Niche<\/label><select id=\"sellerNicheSelect\"><\/select><\/div><div class=\"form-group\"><label>Store Description<\/label><textarea id=\"storeDescription\" rows=\"2\" placeholder=\"Tell customers about your store...\"><\/textarea><\/div><div class=\"form-group\"><label>\ud83d\udccd Your Country<\/label><select id=\"sellerCountry\"><option value=\"US\">United States<\/option><option value=\"UK\">United Kingdom<\/option><option value=\"CA\">Canada<\/option><option value=\"AU\">Australia<\/option><option value=\"DE\">Germany<\/option><option value=\"FR\">France<\/option><option value=\"IT\">Italy<\/option><option value=\"ES\">Spain<\/option><option value=\"JP\">Japan<\/option><option value=\"BR\">Brazil<\/option><option value=\"IN\">India<\/option><option value=\"CN\">China<\/option><option value=\"MX\">Mexico<\/option><option value=\"ZA\">South Africa<\/option><option value=\"NG\">Nigeria<\/option><option value=\"AE\">UAE<\/option><option value=\"SA\">Saudi Arabia<\/option><option value=\"TR\">Turkey<\/option><option value=\"RU\">Russia<\/option><option value=\"KR\">South Korea<\/option><option value=\"WORLD\">\ud83c\udf0d Other Country - World<\/option><\/select><\/div><button class=\"btn-primary-action\" onclick=\"registerStore()\">\ud83d\ude80 Register Store (Free)<\/button><\/div><div class=\"dashboard-card\"><h3><i class=\"fas fa-chart-line\"><\/i> Store Performance<\/h3><div class=\"stats-grid\"><div class=\"stat-card\"><div class=\"stat-number\" id=\"statProducts\">0<\/div><div>Products<\/div><\/div><div class=\"stat-card\"><div class=\"stat-number\" id=\"statSales\">0<\/div><div>Total Sales<\/div><\/div><div class=\"stat-card\"><div class=\"stat-number\" id=\"statEarnings\">$0<\/div><div>Earnings<\/div><\/div><div class=\"stat-card\"><div class=\"stat-number\" id=\"statCommission\">$0<\/div><div>Platform Fee<\/div><\/div><\/div><\/div><\/div>\r\n<div><div class=\"dashboard-card\"><h3><i class=\"fas fa-plus-circle\"><\/i> Add New Product<\/h3><div class=\"dropzone\" id=\"productDropZone\"><i class=\"fas fa-cloud-upload-alt fa-2x\"><\/i><div>Drag & drop images or click<\/div><button type=\"button\" id=\"browseBtn\" class=\"btn-small\">Browse Files<\/button><input type=\"file\" id=\"productFileInput\" multiple accept=\"image\/*\" style=\"display:none;\"><\/div><div id=\"imagePreviewContainer\" class=\"image-preview\"><\/div><div class=\"form-group\"><label>Product Title<\/label><input id=\"prodTitle\" placeholder=\"Product name\"><\/div><div class=\"form-group\"><label>Description<\/label><textarea id=\"prodDesc\" rows=\"2\" placeholder=\"Product description\"><\/textarea><\/div><div class=\"form-group\"><label>\ud83d\udce6 Product Type<\/label><select id=\"productType\" onchange=\"toggleProductTypeFields()\"><option value=\"physical\">\ud83d\udce6 Physical Product (shipping required)<\/option><option value=\"digital\">\ud83d\udcbb Digital Product (instant download, no shipping)<\/option><\/select><\/div>\r\n<div id=\"digitalFields\" class=\"digital-fields\"><h4>\ud83d\udcbe Digital Product Details<\/h4><div class=\"form-group\"><label>Download Link<\/label><input type=\"url\" id=\"downloadLink\" placeholder=\"https:\/\/...\"><\/div><div class=\"form-group\"><label>License Keys<\/label><textarea id=\"licenseKeys\" rows=\"2\" placeholder=\"KEY-XXXX-YYYY-ZZZZ\"><\/textarea><\/div><div class=\"form-group\"><label>File Size<\/label><input type=\"text\" id=\"fileSize\" placeholder=\"e.g., 25 MB\"><\/div><\/div>\r\n<div id=\"physicalShippingFields\" class=\"shipping-rules\"><h4><i class=\"fas fa-truck\"><\/i> Shipping Options (Physical Products Only)<\/h4><div class=\"shipping-option-row\"><label><input type=\"checkbox\" id=\"freeShippingWorldwide\" onchange=\"toggleFreeShipping()\"> <strong>Free Shipping Worldwide<\/strong><\/label><\/div><div id=\"customShippingSection\"><div class=\"form-group\"><label>Default Shipping Price ($)<\/label><input type=\"number\" id=\"defaultShippingPrice\" step=\"0.01\" value=\"5.99\"><\/div><div><label>Country-Specific Prices ($):<\/label><\/div><div id=\"shippingRulesList\"><\/div><div class=\"shipping-rule-row\"><select id=\"newRuleCountry\"><option value=\"US\">US<\/option><option value=\"CA\">Canada<\/option><option value=\"UK\">UK<\/option><option value=\"WORLD\">\ud83c\udf0d World<\/option><\/select><input type=\"number\" id=\"newRulePrice\" step=\"0.01\" value=\"0.30\" style=\"width:80px;\" placeholder=\"$\"><button class=\"btn-small\" onclick=\"addShippingRule()\">+ Add<\/button><\/div><\/div><\/div>\r\n<div class=\"form-group\"><label>\ud83d\udccb Product Condition<\/label><select id=\"productCondition\"><option value=\"New\">\ud83d\udfe2 New<\/option><option value=\"Like New\">\ud83d\udfe2 Like New<\/option><option value=\"Used - Good\">\ud83d\udfe1 Used - Good<\/option><option value=\"Used - Fair\">\ud83d\udfe0 Used - Fair<\/option><option value=\"Refurbished\">\ud83d\udd35 Refurbished<\/option><\/select><\/div>\r\n<div class=\"form-group\"><label>\ud83d\udccf Product Specifications<\/label><textarea id=\"productSpecs\" rows=\"3\" placeholder=\"Dimensions, weight, material, color, warranty...\"><\/textarea><\/div>\r\n<div class=\"form-group\"><label>\ud83d\udd22 SKU (Stock Keeping Unit)<\/label><input type=\"text\" id=\"productSku\" placeholder=\"SKU-12345-ABCDE\"><\/div>\r\n<div class=\"form-group\"><label>\ud83d\udcb0 Price ($)<\/label><input type=\"number\" id=\"prodPrice\" step=\"0.01\" placeholder=\"0.00\"><\/div>\r\n<div class=\"form-group\"><label>\ud83d\udce6 Stock<\/label><input type=\"number\" id=\"prodStock\" value=\"1\" min=\"1\"><\/div>\r\n<div class=\"form-group\"><label>\ud83c\udff7\ufe0f Discount (%)<\/label><input type=\"number\" id=\"productDiscount\" step=\"1\" min=\"0\" max=\"90\" value=\"0\" placeholder=\"0-90%\"><\/div>\r\n<button class=\"btn-primary-action\" onclick=\"publishProduct()\" style=\"margin-top:1rem;\">\ud83d\udce2 Publish Product<\/button><\/div>\r\n<div class=\"dashboard-card\"><h3><i class=\"fas fa-box\"><\/i> My Products<\/h3><div id=\"myProductsList\" class=\"products-list\"><p style=\"color:#94a3b8; text-align:center;\">No products yet. Add your first product.<\/p><\/div><div id=\"productCountMessage\" style=\"margin-top:0.8rem; font-size:0.75rem; text-align:center;\"><\/div><\/div>\r\n<div class=\"benefit-card ads\"><div class=\"benefit-header\"><div class=\"benefit-title\"><i class=\"fas fa-ad\"><\/i> \ud83d\ude80 Marketplace Ads Pro<\/div><div class=\"benefit-value\">Free $100 Value<\/div><\/div><div class=\"benefit-desc\"><strong>Sponsored Post - $100 value - FREE for eligible stores!<\/strong><br>A sponsored post for <strong>10 days<\/strong> for stores with minimum 20 products.<\/div><button class=\"btn-gold\" onclick=\"claimSponsoredPost()\">\ud83c\udfaf Claim Free Sponsored Post ($100)<\/button><div id=\"sponsoredEligibilityMsg\" class=\"eligibility-msg\"><i class=\"fas fa-exclamation-triangle\"><\/i> \u26a0\ufe0f Need 20 more products to unlock FREE sponsored post ($100 value)<\/div><\/div>\r\n<div class=\"benefit-card radio\"><div class=\"benefit-header\"><div class=\"benefit-title\"><i class=\"fas fa-radio\"><\/i> \ud83d\udcfb Marketplace Internet Radio<\/div><div class=\"benefit-value radio\">Free $50 Value<\/div><\/div><div class=\"benefit-desc\"><strong>Free Radio Advertisement - $50 value!<\/strong><br>Free advertisement for <strong>one month<\/strong> for stores with minimum 20 products.<\/div><button class=\"btn-gold btn-blue\" onclick=\"claimRadioAd()\">\ud83d\udce2 Claim Free Radio Ad ($50)<\/button><div id=\"radioEligibilityMsg\" class=\"eligibility-msg\"><i class=\"fas fa-exclamation-triangle\"><\/i> \u26a0\ufe0f Need 20 more products to unlock FREE radio ad ($50 value)<\/div><\/div>\r\n<div class=\"benefit-card website\"><div class=\"benefit-header\"><div class=\"benefit-title\"><i class=\"fas fa-globe\"><\/i> \ud83c\udf81 Free Website for Your Business!<\/div><div class=\"benefit-value website\">$1000 Value<\/div><\/div><div class=\"benefit-desc\"><strong>Marketplace Platform will create a professional website for your business completely FREE!<\/strong><\/div><ul class=\"benefit-list\"><li>\u2705 Professional website design<\/li><li>\u2705 Product catalog integration<\/li><li>\u2705 Secure payment gateway<\/li><li>\u2705 Mobile-responsive design<\/li><\/ul><div class=\"price-tag\">$50\/month<\/div><div style=\"font-size:0.7rem; color:#b45309;\">Domain + Hosting fee<\/div><button class=\"btn-gold btn-green\" onclick=\"requestFreeWebsite()\">\ud83c\udf81 Request Free Website ($1000 value)<\/button><div id=\"websiteEligibilityMsg\" class=\"eligibility-msg\"><i class=\"fas fa-exclamation-triangle\"><\/i> \u26a0\ufe0f Need 20 more products to unlock FREE website ($1000 value)<\/div><\/div>\r\n<div class=\"dashboard-card\"><h3><i class=\"fas fa-truck\"><\/i> \ud83d\udce6 Incoming Orders<\/h3><div id=\"sellerOrdersList\" style=\"max-height:400px; overflow-y:auto;\"><p style=\"text-align:center; color:#94a3b8;\">No orders yet.<\/p><\/div><\/div>marketplacebuyandsell@marketplace-marketplace.com\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n\r\n<div id=\"checkoutModal\" class=\"checkout-modal\"><div class=\"checkout-container\"><div class=\"checkout-header\"><h2><i class=\"fas fa-lock\"><\/i> Secure Checkout<\/h2><button class=\"close-checkout\" onclick=\"closeCheckoutModal()\"><i class=\"fas fa-times\"><\/i><\/button><\/div><div class=\"checkout-body\"><div><div class=\"form-section\"><h3><i class=\"fas fa-map-marker-alt\"><\/i> Shipping Address<\/h3><div class=\"form-row\"><div class=\"form-group\"><label>Full Name<\/label><input id=\"fullName\" placeholder=\"Full name\"><\/div><div class=\"form-group\"><label>Phone<\/label><input id=\"phoneNumber\" placeholder=\"Phone\"><\/div><\/div><div class=\"form-group\"><label>Street Address<\/label><input id=\"streetAddress\" placeholder=\"Street address\"><\/div><div class=\"form-group\"><label>Apartment<\/label><input id=\"apartment\" placeholder=\"Apt, suite\"><\/div><div class=\"form-row\"><div class=\"form-group\"><label>City<\/label><input id=\"city\" placeholder=\"City\"><\/div><div class=\"form-group\"><label>State<\/label><input id=\"state\" placeholder=\"State\"><\/div><\/div><div class=\"form-row\"><div class=\"form-group\"><label>ZIP<\/label><input id=\"zipCode\" placeholder=\"ZIP\"><\/div><div class=\"form-group\"><label>Country<\/label><select id=\"countrySelect\"><option value=\"US\">US<\/option><option value=\"UK\">UK<\/option><option value=\"CA\">Canada<\/option><option value=\"DE\">Germany<\/option><option value=\"FR\">France<\/option><option value=\"WORLD\">\ud83c\udf0d Other Country - World<\/option><\/select><\/div><\/div><div class=\"form-group\"><label>Email<\/label><input id=\"emailAddress\" placeholder=\"Email\"><\/div><\/div><div class=\"form-section\"><h3><i class=\"fas fa-credit-card\"><\/i> Payment Method<\/h3><div class=\"payment-methods-grid\"><div class=\"payment-method-card\" data-method=\"bank\"><div class=\"payment-icon\"><i class=\"fas fa-university\"><\/i><\/div><div class=\"payment-name\">Bank Transfer<\/div><\/div><div class=\"payment-method-card\" data-method=\"payoneer\"><div class=\"payment-icon\"><i class=\"fas fa-globe\"><\/i><\/div><div class=\"payment-name\">Payoneer<\/div><\/div><div class=\"payment-method-card\" data-method=\"crypto\"><div class=\"payment-icon\"><i class=\"fab fa-bitcoin\"><\/i><\/div><div class=\"payment-name\">Crypto<\/div><\/div><div class=\"payment-method-card\" data-method=\"visa\"><div class=\"payment-icon\"><i class=\"fab fa-cc-visa\"><\/i><\/div><div class=\"payment-name\">Visa<\/div><\/div><div class=\"payment-method-card\" data-method=\"mastercard\"><div class=\"payment-icon\"><i class=\"fab fa-cc-mastercard\"><\/i><\/div><div class=\"payment-name\">MasterCard<\/div><\/div><\/div><div id=\"bankDetails\" class=\"payment-details\"><i class=\"fas fa-building\"><\/i> Bank: Marketplace Bank<br>Account: 482919382938<\/div><div id=\"payoneerDetails\" class=\"payment-details\"><i class=\"fas fa-globe\"><\/i> Email: payments@marketplace.com<\/div><div id=\"cryptoDetails\" class=\"payment-details\"><i class=\"fab fa-bitcoin\"><\/i> BTC: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa<\/div><div id=\"cardDetails\" class=\"payment-details\"><input class=\"form-group\" id=\"cardNumber\" placeholder=\"Card Number\"><div class=\"form-row\"><input id=\"cardExpiry\" placeholder=\"MM\/YY\"><input id=\"cardCvv\" placeholder=\"CVV\"><\/div><\/div><\/div><\/div><div class=\"order-summary\"><h3>Order Summary<\/h3><div id=\"checkoutCartItems\"><\/div><div class=\"totals-row\"><span>Subtotal:<\/span><span id=\"checkoutSubtotal\">$0.00<\/span><\/div><div class=\"totals-row\"><span>Shipping:<\/span><span id=\"checkoutShipping\">$0.00<\/span><\/div><div class=\"totals-row\"><span>Commission (5%):<\/span><span id=\"checkoutFee\">$0.00<\/span><\/div><div class=\"totals-row total\"><span>Total to pay:<\/span><span id=\"checkoutTotal\">$0.00<\/span><\/div><button class=\"place-order-btn\" onclick=\"processSecurePayment()\">Place Order & Pay<\/button><\/div><\/div><\/div><\/div>\r\n\r\n<script>\r\nconst prohibitedTerms = ['violence', 'hate', 'racism', 'racist', 'anti-semitic', 'anti semitic', 'jew hate', 'drugs', 'drug', 'cocaine', 'heroin', 'meth', 'pedophilia', 'pedophile', 'anti-lgbt', 'anti lgbt', 'lgbt hate', 'nazi', 'hitler', 'kkk', 'white power', 'black power hate'];\r\nfunction moderateContent(text) {\r\nconst lowerText = text.toLowerCase();\r\nfor (let term of prohibitedTerms) {\r\nif (lowerText.includes(term)) {\r\nreturn { approved: false, reason: `Content contains prohibited term: ${term}` };\r\n}\r\n}\r\nreturn { approved: true, reason: '' };\r\n}\r\nconst marketplaceStoreName = \"Marketplace Platform - Buy and Sell Products\";\r\nconst marketplaceOwner = \"Marketplace Platform\";\r\nconst marketplaceEmail = \"support@marketplace-platform.com\";\r\n\r\nconst allNiches = [\"Airline\",\"Alcohol\",\"Antivirus\",\"Art\",\"Automotive\",\"Baby Products\",\"Banking\",\"Beauty\",\"Beer\",\"Beginner\",\"Bicycle\",\"Binary Options\",\"Blogger\",\"Book\",\"Boutique\",\"Budgeting\",\"Business\",\"Camping\",\"Candle\",\"Casino\",\"Cat\",\"CBD\",\"Cell Phone\",\"Charity\",\"Christian\",\"Cleaning\",\"Coffee\",\"Cooking\",\"Course\",\"Crafts\",\"Credit Card\",\"Credit Repair\",\"Cruise\",\"Crypto\",\"CRM\",\"Daily Paying\",\"Dental\",\"Dating\",\"Debt Settlement\",\"Diabetes\",\"Dog\",\"Drink\",\"Drone\",\"E-commerce\",\"Email marketing\",\"Education\",\"Electronics\",\"Entertainment\",\"Essential Oils\",\"Eyewear\",\"Fashion\",\"Financial\",\"Fishing\",\"Fitness\",\"Food\",\"Forex\",\"Fragrance\",\"Freight\",\"Gaming\",\"Gardening\",\"Gift\",\"Gift Basket\",\"Gluten Free\",\"Gold and Silver\",\"Golf\",\"Graphic Design\",\"Hair Care\",\"Health and Wellness\",\"Help Desk\",\"Herbal\",\"High Paying\",\"Home Improvement\",\"Home Decor\",\"Home Security\",\"Homeschool\",\"Hotel\",\"Hunting\",\"Hygiene\",\"Influencer\",\"Insurance\",\"Investing\",\"Identity Protection\",\"Internet Marketing\",\"Jewelry\",\"Job\",\"Keto\",\"Language\",\"Legal\",\"Luxury\",\"Loan\",\"Luggage\",\"Makeup\",\"Mattress\",\"Medical\",\"Meditation\",\"Metaphysical\",\"Mobile App\",\"Mortgage\",\"Mountain\",\"Music\",\"Nail Care\",\"Nutrition\",\"Organic Products\",\"Paleo\",\"Pay Per Call\",\"Pay Per Click\",\"Pet Niche\",\"Pharmacy\",\"Photography\",\"Podcast\",\"Pregnancy\",\"Productivity\",\"Psychic\",\"Personal Development\",\"Real Estate\",\"Recurring\",\"Restaurant\",\"SaaS\",\"SEO\",\"Self Defense\",\"Shaving\",\"Shoes\",\"Skincare\",\"Sleep\",\"Small Business\",\"Software\",\"Solar\",\"Sports\",\"Sports Betting\",\"Supplements\",\"Survival\",\"T-shirt\",\"Tax Preparation\",\"Tea\",\"Tech\",\"Toy\",\"Travel\",\"Vape\",\"Vegan\",\"Video\",\"VPN\",\"Watch\",\"Web Hosting\",\"Wedding\",\"Weight Loss\",\"Wine\",\"Women's Health\",\"WordPress\",\"Writing\",\"Yoga\"];\r\nconst nicheIcons = {\r\n\"Airline\":\"fas fa-plane\",\"Alcohol\":\"fas fa-wine-glass-alt\",\"Antivirus\":\"fas fa-shield-virus\",\"Art\":\"fas fa-palette\",\"Automotive\":\"fas fa-car\",\"Baby Products\":\"fas fa-baby\",\"Banking\":\"fas fa-university\",\"Beauty\":\"fas fa-spa\",\"Beer\":\"fas fa-beer\",\"Beginner\":\"fas fa-rocket\",\"Bicycle\":\"fas fa-bicycle\",\"Binary Options\":\"fas fa-chart-line\",\"Blogger\":\"fas fa-blog\",\"Book\":\"fas fa-book\",\"Boutique\":\"fas fa-store\",\"Budgeting\":\"fas fa-calculator\",\"Business\":\"fas fa-briefcase\",\"Camping\":\"fas fa-campground\",\"Candle\":\"fas fa-fire\",\"Casino\":\"fas fa-dice\",\"Cat\":\"fas fa-cat\",\"CBD\":\"fas fa-leaf\",\"Cell Phone\":\"fas fa-mobile-alt\",\"Charity\":\"fas fa-hands-helping\",\"Christian\":\"fas fa-church\",\"Cleaning\":\"fas fa-broom\",\"Coffee\":\"fas fa-coffee\",\"Cooking\":\"fas fa-utensils\",\"Course\":\"fas fa-graduation-cap\",\"Crafts\":\"fas fa-paint-brush\",\"Credit Card\":\"fas fa-credit-card\",\"Credit Repair\":\"fas fa-wrench\",\"Cruise\":\"fas fa-ship\",\"Crypto\":\"fab fa-bitcoin\",\"CRM\":\"fas fa-headset\",\"Daily Paying\":\"fas fa-calendar-day\",\"Dental\":\"fas fa-tooth\",\"Dating\":\"fas fa-heart\",\"Debt Settlement\":\"fas fa-balance-scale\",\"Diabetes\":\"fas fa-heartbeat\",\"Dog\":\"fas fa-dog\",\"Drink\":\"fas fa-glass-whiskey\",\"Drone\":\"fas fa-drone\",\"E-commerce\":\"fas fa-shopping-cart\",\"Email marketing\":\"fas fa-envelope\",\"Education\":\"fas fa-graduation-cap\",\"Electronics\":\"fas fa-microchip\",\"Entertainment\":\"fas fa-film\",\"Essential Oils\":\"fas fa-flask\",\"Eyewear\":\"fas fa-glasses\",\"Fashion\":\"fas fa-tshirt\",\"Financial\":\"fas fa-chart-pie\",\"Fishing\":\"fas fa-fish\",\"Fitness\":\"fas fa-dumbbell\",\"Food\":\"fas fa-hamburger\",\"Forex\":\"fas fa-money-bill-wave\",\"Fragrance\":\"fas fa-wind\",\"Freight\":\"fas fa-truck\",\"Gaming\":\"fas fa-gamepad\",\"Gardening\":\"fas fa-seedling\",\"Gift\":\"fas fa-gift\",\"Gift Basket\":\"fas fa-gifts\",\"Gluten Free\":\"fas fa-bread-slice\",\"Gold and Silver\":\"fas fa-gem\",\"Golf\":\"fas fa-golf-ball\",\"Graphic Design\":\"fas fa-paintbrush\",\"Hair Care\":\"fas fa-cut\",\"Health and Wellness\":\"fas fa-heartbeat\",\"Help Desk\":\"fas fa-headset\",\"Herbal\":\"fas fa-leaf\",\"High Paying\":\"fas fa-chart-line\",\"Home Improvement\":\"fas fa-hammer\",\"Home Decor\":\"fas fa-couch\",\"Home Security\":\"fas fa-shield-alt\",\"Homeschool\":\"fas fa-chalkboard\",\"Hotel\":\"fas fa-hotel\",\"Hunting\":\"fas fa-bullseye\",\"Hygiene\":\"fas fa-soap\",\"Influencer\":\"fas fa-star\",\"Insurance\":\"fas fa-shield-alt\",\"Investing\":\"fas fa-chart-line\",\"Identity Protection\":\"fas fa-id-card\",\"Internet Marketing\":\"fas fa-globe\",\"Jewelry\":\"fas fa-gem\",\"Job\":\"fas fa-briefcase\",\"Keto\":\"fas fa-bacon\",\"Language\":\"fas fa-language\",\"Legal\":\"fas fa-gavel\",\"Luxury\":\"fas fa-crown\",\"Loan\":\"fas fa-hand-holding-usd\",\"Luggage\":\"fas fa-suitcase\",\"Makeup\":\"fas fa-eye-shadow\",\"Mattress\":\"fas fa-bed\",\"Medical\":\"fas fa-hospital\",\"Meditation\":\"fas fa-spa\",\"Metaphysical\":\"fas fa-crystal-ball\",\"Mobile App\":\"fas fa-mobile-alt\",\"Mortgage\":\"fas fa-home\",\"Mountain\":\"fas fa-mountain\",\"Music\":\"fas fa-music\",\"Nail Care\":\"fas fa-hand-sparkles\",\"Nutrition\":\"fas fa-apple-alt\",\"Organic Products\":\"fas fa-leaf\",\"Paleo\":\"fas fa-drumstick-bite\",\"Pay Per Call\":\"fas fa-phone-alt\",\"Pay Per Click\":\"fas fa-mouse-pointer\",\"Pet Niche\":\"fas fa-paw\",\"Pharmacy\":\"fas fa-pills\",\"Photography\":\"fas fa-camera\",\"Podcast\":\"fas fa-podcast\",\"Pregnancy\":\"fas fa-baby-carriage\",\"Productivity\":\"fas fa-tasks\",\"Psychic\":\"fas fa-crystal-ball\",\"Personal Development\":\"fas fa-user-graduate\",\"Real Estate\":\"fas fa-building\",\"Recurring\":\"fas fa-redo\",\"Restaurant\":\"fas fa-utensils\",\"SaaS\":\"fas fa-cloud\",\"SEO\":\"fas fa-search\",\"Self Defense\":\"fas fa-user-shield\",\"Shaving\":\"fas fa-cut\",\"Shoes\":\"fas fa-shoe-prints\",\"Skincare\":\"fas fa-spa\",\"Sleep\":\"fas fa-bed\",\"Small Business\":\"fas fa-store\",\"Software\":\"fas fa-code\",\"Solar\":\"fas fa-sun\",\"Sports\":\"fas fa-futbol\",\"Sports Betting\":\"fas fa-dice\",\"Supplements\":\"fas fa-capsules\",\"Survival\":\"fas fa-campground\",\"T-shirt\":\"fas fa-tshirt\",\"Tax Preparation\":\"fas fa-file-invoice-dollar\",\"Tea\":\"fas fa-mug-hot\",\"Tech\":\"fas fa-microchip\",\"Toy\":\"fas fa-robot\",\"Travel\":\"fas fa-passport\",\"Vape\":\"fas fa-smoking\",\"Vegan\":\"fas fa-leaf\",\"Video\":\"fas fa-video\",\"VPN\":\"fas fa-user-secret\",\"Watch\":\"fas fa-clock\",\"Web Hosting\":\"fas fa-server\",\"Wedding\":\"fas fa-ring\",\"Weight Loss\":\"fas fa-weight\",\"Wine\":\"fas fa-wine-bottle\",\"Women's Health\":\"fas fa-female\",\"WordPress\":\"fas fa-wordpress\",\"Writing\":\"fas fa-pen-fancy\",\"Yoga\":\"fas fa-spa\"\r\n};\r\nlet sellers = [], products = [], cart = [], currentSeller = null, pendingImages = [], shippingRulesArray = [], orders = [];\r\nlet selectedPaymentMethod = 'bank', currentShippingCost = 0;\r\n\r\nfunction getProductShippingDisplay(product){\r\nif(product.productType === 'digital') return { text: \"\ud83d\udcbb Digital - No Shipping\", cost: 0, icon: \"fa-download\" };\r\nif(product.freeShippingWorldwide) return { text: \"\ud83d\ude9a FREE Shipping Worldwide\", cost: 0, icon: \"fa-truck\" };\r\nreturn { text: `\ud83d\udce6 Shipping from $${(product.defaultShippingPrice || 5.99).toFixed(2)}`, cost: product.defaultShippingPrice || 5.99, icon: \"fa-box\" };\r\n}\r\nfunction getShippingCostForProduct(product, countryCode){\r\nif(product.productType === 'digital') return 0;\r\nif(product.freeShippingWorldwide) return 0;\r\nif(product.shippingRules && product.shippingRules[countryCode]) return product.shippingRules[countryCode];\r\nreturn product.defaultShippingPrice || 5.99;\r\n}\r\nfunction getDiscountedPrice(price, discount) {\r\nif (!discount || discount <= 0) return price;\r\nreturn price * (1 - discount \/ 100);\r\n}\r\nfunction generateData() {\r\nlet storeId = 1;\r\nfor(let niche of allNiches){\r\nfor(let i = 1; i <= 50; i++){\r\nlet sellerId = storeId++;\r\nlet rating = (4.0 + Math.random() * 1.0).toFixed(1);\r\nlet totalSales = Math.floor(Math.random() * 5000) + 100;\r\nsellers.push({\r\nid: sellerId,\r\nstoreName: `${niche} Digital Store ${i}`,\r\nniche: niche,\r\nowner: marketplaceOwner,\r\nemail: marketplaceEmail,\r\nrating: parseFloat(rating),\r\ntotalSales: totalSales,\r\ntotalEarnings: totalSales * (Math.random() * 30 + 10),\r\nproductCount: 0,\r\ndigitalCount: 0,\r\nphysicalCount: 0,\r\ndescription: `Premium digital products in the ${niche} niche. Instant download after purchase.`\r\n});\r\nlet price = (Math.random() * 50 + 9.99).toFixed(2);\r\nlet discount = Math.random() > 0.7 ? Math.floor(Math.random() * 40) + 5 : 0;\r\nproducts.push({\r\nid: products.length + 1,\r\nsellerId: sellerId,\r\nname: `${niche} Digital Bundle ${i}`,\r\nbrand: `${niche} Brand`,\r\nprice: parseFloat(price),\r\ndiscount: discount,\r\ndiscountedPrice: getDiscountedPrice(parseFloat(price), discount),\r\nstock: 999,\r\nimageUrl: `https:\/\/picsum.photos\/240\/180?random=${products.length + 1000}`,\r\nsellerStoreName: `${niche} Digital Store ${i}`,\r\nniche: niche,\r\nproductType: 'digital',\r\ncondition: 'New',\r\nsku: `DIG-${niche.substring(0,3).toUpperCase()}-${i}`,\r\nfreeShippingWorldwide: true,\r\ndefaultShippingPrice: 0,\r\ndescription: `High-quality digital ${niche.toLowerCase()} resources, instant download.`,\r\ndownloadLink: `https:\/\/marketplace-platform.com\/downloads\/${niche.toLowerCase().replace(\/ \/g, '-')}-bundle-${i}.zip`,\r\nlicenseKeys: `LIC-${Date.now()}-${niche.substring(0,4).toUpperCase()}-${i}`,\r\nfileSize: `${Math.floor(Math.random() * 500 + 50)} MB`,\r\ncreatedAt: new Date(Date.now() - Math.random() * 30 * 24 * 60 * 60 * 1000)\r\n});\r\n}\r\n}\r\nsellers.forEach(seller => {\r\nseller.productCount = products.filter(p => p.sellerId === seller.id).length;\r\nseller.digitalCount = seller.productCount;\r\nseller.physicalCount = 0;\r\n});\r\ndocument.getElementById('totalSellersSpan').innerText = sellers.length;\r\ndocument.getElementById('totalProductsSpan').innerText = products.length;\r\nrenderNicheGrid(); renderFilteredProducts(); renderAllSellers();\r\n}\r\nfunction renderNicheGrid(){\r\nlet search = document.getElementById('searchNicheInput')?.value.toLowerCase()||\"\";\r\nlet filtered = allNiches.filter(n=>n.toLowerCase().includes(search));\r\ndocument.getElementById('nichesGrid').innerHTML = filtered.map(n=>{\r\nlet nicheProducts = products.filter(p=>p.niche===n);\r\nlet nicheSellers = sellers.filter(s=>s.niche===n);\r\nreturn `<div class=\"niche-card\" onclick=\"showNicheProducts('${n}')\"><div class=\"niche-icon\"><i class=\"${nicheIcons[n] || 'fas fa-tag'}\"><\/i><\/div><div class=\"niche-name\">${n}<\/div><div class=\"niche-stats\"><span>\ud83c\udfea ${nicheSellers.length} stores<\/span><span>\ud83d\udce6 ${nicheProducts.length} products<\/span><\/div><\/div>`;\r\n}).join('');\r\n}\r\nfunction applyAdvancedSearch() {\r\nrenderFilteredProducts();\r\n}\r\nfunction resetSearch() {\r\ndocument.getElementById('searchKeyword').value = '';\r\ndocument.getElementById('minPrice').value = '';\r\ndocument.getElementById('maxPrice').value = '';\r\ndocument.getElementById('sortBy').value = 'default';\r\nrenderFilteredProducts();\r\n}\r\nfunction renderFilteredProducts() {\r\nlet keyword = document.getElementById('searchKeyword')?.value.toLowerCase() || '';\r\nlet minPrice = parseFloat(document.getElementById('minPrice')?.value) || 0;\r\nlet maxPrice = parseFloat(document.getElementById('maxPrice')?.value) || Infinity;\r\nlet sortBy = document.getElementById('sortBy')?.value || 'default';\r\nlet filtered = products.filter(p => {\r\nlet matchesKeyword = keyword === '' || p.name.toLowerCase().includes(keyword) || (p.brand && p.brand.toLowerCase().includes(keyword)) || p.sellerStoreName.toLowerCase().includes(keyword);\r\nlet finalPrice = p.discount && p.discount > 0 ? p.discountedPrice : p.price;\r\nlet matchesPrice = finalPrice >= minPrice && finalPrice <= maxPrice;\r\nreturn matchesKeyword && matchesPrice;\r\n});\r\nif (sortBy === 'price_asc') filtered.sort((a, b) => (a.discount && a.discount > 0 ? a.discountedPrice : a.price) - (b.discount && b.discount > 0 ? b.discountedPrice : b.price));\r\nelse if (sortBy === 'price_desc') filtered.sort((a, b) => (b.discount && b.discount > 0 ? b.discountedPrice : b.price) - (a.discount && a.discount > 0 ? a.discountedPrice : a.price));\r\nelse if (sortBy === 'newest') filtered.sort((a, b) => new Date(b.createdAt) - new Date(a.createdAt));\r\nelse if (sortBy === 'discount_high') filtered.sort((a, b) => (b.discount || 0) - (a.discount || 0));\r\ndocument.getElementById('globalProductsGrid').innerHTML = filtered.slice(0, 20).map(p => productCardHTML(p)).join('');\r\n}\r\nfunction showNicheProducts(niche){\r\nlet filtered = products.filter(p=>p.niche===niche);\r\ndocument.getElementById('nicheHeader').innerHTML = `<div class=\"hero\"><h2><i class=\"${nicheIcons[niche] || 'fas fa-tag'}\"><\/i> ${niche}<\/h2><p>${filtered.length} digital products available for instant download<\/p><\/div>`;\r\ndocument.getElementById('nicheProductsList').innerHTML = filtered.map(p=>productCardHTML(p)).join('');\r\nshowView('niche');\r\n}\r\nfunction productCardHTML(p){\r\nlet shippingInfo = getProductShippingDisplay(p);\r\nlet typeBadge = p.productType === 'digital' ? '<span class=\"product-type-badge badge-digital\"><i class=\"fas fa-download\"><\/i> Digital<\/span>' : '<span class=\"product-type-badge badge-physical\"><i class=\"fas fa-box\"><\/i> Physical<\/span>';\r\nlet finalPrice = p.discount && p.discount > 0 ? p.discountedPrice : p.price;\r\nlet discountHTML = p.discount && p.discount > 0 ? `<span style=\"text-decoration:line-through; font-size:0.8rem; color:#ef4444;\">$${p.price.toFixed(2)}<\/span> <span style=\"color:#10b981;\">-${p.discount}%<\/span>` : '';\r\nreturn `<div class=\"product-card\"><img decoding=\"async\" src=\"${p.imageUrl}\" class=\"product-img\" onerror=\"this.src='https:\/\/picsum.photos\/240\/180?random=${p.id}'\"><div class=\"product-info\"><div class=\"product-title\">${p.name}<\/div><div class=\"product-price\">$${finalPrice.toFixed(2)} ${discountHTML}<\/div><div class=\"product-seller\"><i class=\"fas fa-store\"><\/i> ${p.sellerStoreName}<br><span style=\"font-size:0.65rem;\">by Marketplace Platform<\/span><\/div><div class=\"product-shipping-info\">${typeBadge} <i class=\"fas ${shippingInfo.icon}\"><\/i> ${shippingInfo.text}<\/div><button class=\"btn-primary\" onclick=\"addToCart(${p.id})\">Add to Cart<\/button><\/div><\/div>`;\r\n}\r\nfunction renderAllSellers(){\r\nlet search = document.getElementById('searchSellerInput')?.value.toLowerCase()||\"\";\r\nlet filtered = sellers.filter(s=>s.storeName.toLowerCase().includes(search) || s.niche.toLowerCase().includes(search));\r\ndocument.getElementById('allSellersGrid').innerHTML = filtered.map(s=>`<div class=\"store-card\" onclick=\"showSellerStore(${s.id})\"><div class=\"store-header\"><div class=\"store-avatar\"><i class=\"${nicheIcons[s.niche] || 'fas fa-store'}\"><\/i><\/div><div class=\"store-info\"><div class=\"store-name\">${s.storeName}<\/div><div class=\"store-niche\"><i class=\"${nicheIcons[s.niche] || 'fas fa-tag'}\"><\/i> ${s.niche}<\/div><div class=\"store-rating\"><span class=\"stars\">${'\u2605'.repeat(Math.floor(s.rating))}${'\u2606'.repeat(5-Math.floor(s.rating))}<\/span> <span style=\"font-size:0.7rem;\">(${s.rating})<\/span><\/div><\/div><\/div><div class=\"stats-row\"><div class=\"stat-badge\"><div class=\"stat-badge-value\">${s.totalSales.toLocaleString()}<\/div><div class=\"stat-badge-label\">Sales<\/div><\/div><div class=\"stat-badge\"><div class=\"stat-badge-value\">${s.productCount}<\/div><div class=\"stat-badge-label\">Products<\/div><\/div><div class=\"stat-badge\"><div class=\"stat-badge-value\">\ud83d\udcbb ${s.digitalCount} Digital | \ud83d\udce6 ${s.physicalCount} Physical<\/div><div class=\"stat-badge-label\">Digital | Physical<\/div><\/div><\/div><div style=\"margin-top:0.5rem; font-size:0.65rem; color:#6b21a5;\"><i class=\"fas fa-store\"><\/i> Operated by Marketplace Platform<\/div><\/div>`).join('');\r\n}\r\nfunction showSellerStore(id){\r\nlet seller = sellers.find(s=>s.id===id);\r\nlet sellerProds = products.filter(p=>p.sellerId===id);\r\ndocument.getElementById('sellerStoreContainer').innerHTML = `<div class=\"hero\"><h2><i class=\"${nicheIcons[seller.niche] || 'fas fa-store'}\"><\/i> ${seller.storeName}<\/h2><div class=\"store-rating\" style=\"margin-top:0.5rem;\"><span class=\"stars\">${'\u2605'.repeat(Math.floor(seller.rating))}${'\u2606'.repeat(5-Math.floor(seller.rating))}<\/span> \u2b50 ${seller.rating} \u00b7 ${seller.totalSales.toLocaleString()} sales \u00b7 ${seller.productCount} products (${seller.digitalCount} Digital, ${seller.physicalCount} Physical)<\/div><p>${seller.description}<\/p><div style=\"margin-top:0.5rem; font-size:0.8rem;\"><i class=\"fas fa-store\"><\/i> Store operated by: <strong>Marketplace Platform - Buy and Sell Products<\/strong><\/div><\/div><div class=\"products-grid\" id=\"sellerProductsGrid\"><\/div>`;\r\ndocument.getElementById('sellerProductsGrid').innerHTML = sellerProds.map(p=>productCardHTML(p)).join('');\r\nshowView('sellerStore');\r\n}\r\nfunction addToCart(id){\r\nlet p = products.find(p=>p.id===id);\r\nlet exist = cart.find(i=>i.id===id);\r\nif(exist) exist.quantity++;\r\nelse cart.push({...p, quantity:1, sellerId: p.sellerId, sellerStoreName: p.sellerStoreName, productType: p.productType, freeShippingWorldwide: p.freeShippingWorldwide, defaultShippingPrice: p.defaultShippingPrice, shippingRules: p.shippingRules});\r\nsaveCart(); showToast(`\u2705 ${p.name} added to cart`);\r\n}\r\nfunction saveCart(){ localStorage.setItem('marketplaceCart',JSON.stringify(cart)); updateCartIcon(); }\r\nfunction loadCart(){ let c = localStorage.getItem('marketplaceCart'); if(c) cart = JSON.parse(c); updateCartIcon(); }\r\nfunction updateCartIcon(){ let total = cart.reduce((s,i)=>s+i.quantity,0); let badge = document.getElementById('cartCount'); if(total>0){ badge.innerText=total; badge.style.display='flex'; } else badge.style.display='none'; }\r\nfunction renderCartPage(){\r\nif(cart.length===0){ document.getElementById('cartContainer').innerHTML='<div class=\"hero\">Cart empty<\/div>'; return; }\r\nlet total=0, html='<div style=\"background:white; border-radius:1.5rem; padding:1.5rem;\">';\r\ncart.forEach(item=>{\r\ntotal+=item.price*item.quantity;\r\nlet shippingInfo = getProductShippingDisplay(item);\r\nhtml+=`<div style=\"display:flex; justify-content:space-between; padding:0.8rem 0; border-bottom:1px solid #e2e8f0;\"><div><strong>${item.name}<\/strong><br>$${item.price.toFixed(2)} x ${item.quantity}<br><span style=\"font-size:0.65rem; color:#f59e0b;\"><i class=\"fas ${shippingInfo.icon}\"><\/i> ${shippingInfo.text}<\/span><\/div><div>$${(item.price*item.quantity).toFixed(2)}<br><button style=\"background:#ef4444; border:none; color:white; border-radius:40px; padding:0.2rem 0.8rem; margin-top:5px;\" onclick=\"removeCartItem(${item.id})\">Remove<\/button><\/div><\/div>`;\r\n});\r\nhtml+=`<div style=\"margin-top:1rem; padding-top:0.5rem;\"><strong>Subtotal: $${total.toFixed(2)}<\/strong><\/div><button class=\"btn-primary\" style=\"margin-top:1rem;\" onclick=\"openCheckoutModal()\">Proceed to Checkout<\/button><\/div>`;\r\ndocument.getElementById('cartContainer').innerHTML = html;\r\n}\r\nfunction removeCartItem(id){ cart = cart.filter(i=>i.id!==id); saveCart(); renderCartPage(); }\r\nfunction updateShippingCostForCart(){\r\nlet country = document.getElementById('countrySelect').value;\r\nlet totalShipping = 0;\r\nfor(let item of cart){\r\nlet product = products.find(p => p.id === item.id);\r\nif(product) totalShipping += getShippingCostForProduct(product, country) * item.quantity;\r\n}\r\ncurrentShippingCost = totalShipping;\r\nupdateOrderSummary();\r\n}\r\nfunction updateOrderSummary(){\r\nlet subtotal = cart.reduce((s,i)=>s+i.price*i.quantity,0);\r\nlet shipping = currentShippingCost;\r\nlet fee = subtotal * 0.05;\r\nlet total = subtotal + shipping;\r\ndocument.getElementById('checkoutSubtotal').innerText = `$${subtotal.toFixed(2)}`;\r\ndocument.getElementById('checkoutShipping').innerText = `$${shipping.toFixed(2)}`;\r\ndocument.getElementById('checkoutFee').innerText = `$${fee.toFixed(2)}`;\r\ndocument.getElementById('checkoutTotal').innerText = `$${total.toFixed(2)}`;\r\nlet itemsHtml = cart.map(i=>{ let si = getProductShippingDisplay(i); return `<div class=\"cart-item-row\"><span>${i.name} x${i.quantity}<br><span style=\"font-size:0.65rem;\">${si.text}<\/span><\/span><span>$${(i.price*i.quantity).toFixed(2)}<\/span><\/div>`; }).join('');\r\ndocument.getElementById('checkoutCartItems').innerHTML = itemsHtml || '<div>Cart empty<\/div>';\r\n}\r\nfunction openCheckoutModal(){\r\nif(cart.length===0){ alert(\"Your cart is empty\"); return; }\r\nupdateShippingCostForCart();\r\ndocument.querySelectorAll('.payment-method-card').forEach(c=>{\r\nc.addEventListener('click',function(){\r\ndocument.querySelectorAll('.payment-method-card').forEach(c=>c.classList.remove('selected'));\r\nthis.classList.add('selected');\r\nselectedPaymentMethod = this.dataset.method;\r\ndocument.getElementById('bankDetails').style.display = selectedPaymentMethod==='bank'?'block':'none';\r\ndocument.getElementById('payoneerDetails').style.display = selectedPaymentMethod==='payoneer'?'block':'none';\r\ndocument.getElementById('cryptoDetails').style.display = selectedPaymentMethod==='crypto'?'block':'none';\r\ndocument.getElementById('cardDetails').style.display = (selectedPaymentMethod==='visa'||selectedPaymentMethod==='mastercard')?'block':'none';\r\n});\r\n});\r\ndocument.querySelector('.payment-method-card')?.click();\r\ndocument.getElementById('countrySelect').addEventListener('change', updateShippingCostForCart);\r\nupdateOrderSummary();\r\ndocument.getElementById('checkoutModal').style.display='flex';\r\n}\r\nfunction closeCheckoutModal(){ document.getElementById('checkoutModal').style.display='none'; }\r\nfunction processSecurePayment(){\r\nif(!document.getElementById('fullName').value || !document.getElementById('streetAddress').value || !document.getElementById('city').value || !document.getElementById('emailAddress').value){ alert(\"Please fill all shipping fields\"); return; }\r\nlet subtotal = cart.reduce((s,i)=>s+i.price*i.quantity,0);\r\nlet totalPaid = subtotal + currentShippingCost;\r\nlet sellerGroups = {};\r\ncart.forEach(item => {\r\nif(!sellerGroups[item.sellerId]) sellerGroups[item.sellerId] = { sellerId: item.sellerId, sellerStoreName: item.sellerStoreName, items: [], subtotal: 0, shipping: 0 };\r\nsellerGroups[item.sellerId].items.push(item);\r\nsellerGroups[item.sellerId].subtotal += item.price * item.quantity;\r\nlet product = products.find(p => p.id === item.id);\r\nif(product) sellerGroups[item.sellerId].shipping += getShippingCostForProduct(product, document.getElementById('countrySelect').value) * item.quantity;\r\n});\r\nfor(let sellerId in sellerGroups){\r\nlet group = sellerGroups[sellerId];\r\nlet orderId = 'ORD-' + Date.now() + '-' + Math.random().toString(36).substr(2,6).toUpperCase() + '-' + sellerId;\r\nlet order = { id: orderId, date: new Date().toLocaleString(), customerName: document.getElementById('fullName').value, customerPhone: document.getElementById('phoneNumber').value, customerEmail: document.getElementById('emailAddress').value, address: { street: document.getElementById('streetAddress').value, apartment: document.getElementById('apartment').value, city: document.getElementById('city').value, state: document.getElementById('state').value, zip: document.getElementById('zipCode').value, country: document.getElementById('countrySelect').value }, items: group.items.map(i => ({ name: i.name, quantity: i.quantity, price: i.price, total: i.price * i.quantity, type: i.productType })), subtotal: group.subtotal, shippingCost: group.shipping, totalPaid: group.subtotal + group.shipping, commission: group.subtotal * 0.05, sellerEarnings: group.subtotal * 0.95, paymentMethod: selectedPaymentMethod, sellerId: parseInt(sellerId), sellerStoreName: group.sellerStoreName };\r\norders.push(order);\r\nlet seller = sellers.find(s => s.id === parseInt(sellerId));\r\nif(seller){ seller.totalSales = (seller.totalSales || 0) + 1; seller.totalEarnings = (seller.totalEarnings || 0) + order.sellerEarnings; }\r\n}\r\nalert(`\u2705 ORDER PLACED!\\n\\nTotal: $${totalPaid.toFixed(2)}\\nPayment: ${selectedPaymentMethod.toUpperCase()}\\nShipping: $${currentShippingCost.toFixed(2)}\\n\\nConfirmation sent to ${document.getElementById('emailAddress').value}`);\r\ncart = []; saveCart(); renderCartPage(); closeCheckoutModal(); showView('home');\r\nupdateSellerStats();\r\nshowToast(\"Order placed! Check your email for confirmation.\");\r\n}\r\nfunction renderOrdersList(){\r\nif(!currentSeller && sellers.length>0) currentSeller = sellers[0];\r\nif(!currentSeller) return;\r\nlet sellerOrders = orders.filter(o => o.sellerId === currentSeller.id);\r\nlet container = document.getElementById('sellerOrdersList');\r\nif(!container) return;\r\nif(sellerOrders.length === 0){ container.innerHTML = '<p style=\"text-align:center; color:#94a3b8; padding:2rem;\">No orders yet.<\/p>'; return; }\r\ncontainer.innerHTML = sellerOrders.map(order => `<div class=\"order-item\"><div class=\"order-header\"><span class=\"order-number\"><i class=\"fas fa-receipt\"><\/i> ${order.id}<\/span><span class=\"order-date\">${order.date}<\/span><span class=\"order-status\">Completed<\/span><\/div><div class=\"order-customer\"><strong>Customer:<\/strong> ${order.customerName}<\/div><div class=\"order-address\">${order.address.street}, ${order.address.city}, ${order.address.country}<\/div><div class=\"order-items\"><strong>Items:<\/strong>${order.items.map(item => `<div>${item.name} x${item.quantity} - $${item.total.toFixed(2)}<\/div>`).join('')}<\/div><div class=\"order-earnings\"><span>Your Earnings: $${order.sellerEarnings.toFixed(2)}<\/span><span>Shipping paid by buyer: $${order.shippingCost.toFixed(2)}<\/span><\/div><\/div>`).join('');\r\nif(sellerOrders.length > 0 && currentSeller) {\r\nshowToast(`\ud83d\udce6 New order received! You have ${sellerOrders.length} new order(s).`);\r\n}\r\n}\r\nfunction toggleFreeShipping() { let chk = document.getElementById('freeShippingWorldwide'); let section = document.getElementById('customShippingSection'); if(chk && section) section.style.display = chk.checked ? 'none' : 'block'; }\r\nfunction addShippingRule() { let country = document.getElementById('newRuleCountry').value, price = parseFloat(document.getElementById('newRulePrice').value); if(!country || isNaN(price)) return; shippingRulesArray.push({country, price}); renderShippingRulesList(); }\r\nfunction removeShippingRule(idx) { shippingRulesArray.splice(idx,1); renderShippingRulesList(); }\r\nfunction renderShippingRulesList() { let container = document.getElementById('shippingRulesList'); if(container) container.innerHTML = shippingRulesArray.map((r,i)=>`<div class=\"shipping-rule-row\"><span>${r.country}: $${r.price.toFixed(2)}<\/span><button class=\"btn-small\" style=\"background:#ef4444;\" onclick=\"removeShippingRule(${i})\">Remove<\/button><\/div>`).join(''); }\r\nfunction toggleProductTypeFields() { let type = document.getElementById('productType').value; document.getElementById('digitalFields').style.display = type==='digital'?'block':'none'; document.getElementById('physicalShippingFields').style.display = type==='physical'?'block':'none'; }\r\nfunction getProductTypeBadge(type) { return type==='digital'?'<span class=\"badge-product badge-digital\"><i class=\"fas fa-download\"><\/i> Digital<\/span>':'<span class=\"badge-product badge-physical\"><i class=\"fas fa-box\"><\/i> Physical<\/span>'; }\r\nfunction updateSellerStats() {\r\nif(!currentSeller && sellers.length>0) currentSeller = sellers[0];\r\nif(!currentSeller) return;\r\nlet sellerProducts = products.filter(p => p.sellerId === currentSeller.id);\r\nlet totalEarnings = orders.filter(o => o.sellerId === currentSeller.id).reduce((sum, o) => sum + o.sellerEarnings, 0);\r\ndocument.getElementById('statProducts').innerText = sellerProducts.length;\r\ndocument.getElementById('statSales').innerText = orders.filter(o => o.sellerId === currentSeller.id).length;\r\ndocument.getElementById('statEarnings').innerText = `$${totalEarnings.toFixed(2)}`;\r\ndocument.getElementById('statCommission').innerText = `$${(totalEarnings * 0.05 \/ 0.95).toFixed(2)}`;\r\nupdateEligibilityMessages(); renderOrdersList();\r\n}\r\nfunction updateEligibilityMessages() { if(!currentSeller) return; let productCount = products.filter(p => p.sellerId === currentSeller.id).length; let needed = 20 - productCount; let isEligible = productCount >= 20; ['websiteEligibilityMsg','sponsoredEligibilityMsg','radioEligibilityMsg'].forEach(id => { let el = document.getElementById(id); if(el) el.innerHTML = isEligible ? `\u2705 ELIGIBLE! You have ${productCount} products.` : `\u26a0\ufe0f Need ${needed} more products.`; }); let msg = document.getElementById('productCountMessage'); if(msg) msg.innerHTML = isEligible ? '\ud83c\udf89 You qualify for FREE benefits!' : `\ud83d\udce6 Add ${needed} more products to unlock FREE benefits!`; }\r\nfunction registerStore() {\r\nlet storeName = document.getElementById('storeName').value.trim(), owner = document.getElementById('ownerName').value.trim(), email = document.getElementById('sellerEmail').value.trim(), niche = document.getElementById('sellerNicheSelect').value;\r\nif(!storeName || !owner || !email || !niche) { alert(\"Fill all fields\"); return; }\r\nlet newId = Date.now();\r\nlet newStore = { id: newId, storeName, owner, email, niche, description: document.getElementById('storeDescription').value, rating: 5.0, totalSales: 0, totalEarnings: 0, productCount: 0, digitalCount: 0, physicalCount: 0 };\r\nsellers.push(newStore);\r\ncurrentSeller = newStore;\r\nupdateSellerStats();\r\nrenderNicheGrid();\r\nrenderAllSellers();\r\nupdateGlobalCounters();\r\nalert(`\u2705 Store \"${storeName}\" registered in ${niche} niche!`);\r\n}\r\nfunction publishProduct() {\r\nif(!currentSeller && sellers.length>0) currentSeller = sellers[sellers.length-1];\r\nif(!currentSeller) { alert(\"Register your store first.\"); return; }\r\nlet title = document.getElementById('prodTitle').value.trim(), desc = document.getElementById('prodDesc').value.trim(), price = parseFloat(document.getElementById('prodPrice').value);\r\nif(!title || !desc || isNaN(price) || price<=0){ alert(\"Complete all fields\"); return; }\r\nlet moderation = moderateContent(title + ' ' + desc);\r\nif (!moderation.approved) { alert(`Product rejected: ${moderation.reason}`); return; }\r\nlet imgUrl = pendingImages.length ? pendingImages[0] : `https:\/\/picsum.photos\/240\/180?random=${Date.now()}`;\r\nlet productType = document.getElementById('productType').value;\r\nlet freeShipping = productType === 'digital' ? true : (document.getElementById('freeShippingWorldwide')?.checked || false);\r\nlet defaultShipping = (productType === 'digital' || freeShipping) ? 0 : (parseFloat(document.getElementById('defaultShippingPrice').value) || 5.99);\r\nlet shippingRules = {};\r\nif(productType === 'physical' && !freeShipping){ shippingRulesArray.forEach(rule => { shippingRules[rule.country] = rule.price; }); }\r\nlet downloadLink = '', licenseKeys = '';\r\nif(productType === 'digital') {\r\ndownloadLink = document.getElementById('downloadLink').value || `https:\/\/marketplace.com\/downloads\/${Date.now()}.zip`;\r\nlicenseKeys = document.getElementById('licenseKeys').value || `LIC-${Date.now()}`;\r\n}\r\nlet discount = parseInt(document.getElementById('productDiscount').value) || 0;\r\nlet newProd = { id: Date.now(), sellerId: currentSeller.id, name: title, brand: title.split(' ')[0], price: price, discount: discount, discountedPrice: getDiscountedPrice(price, discount), stock: parseInt(document.getElementById('prodStock').value), imageUrl: imgUrl, sellerStoreName: currentSeller.storeName, niche: currentSeller.niche, productType: productType, condition: document.getElementById('productCondition').value, sku: document.getElementById('productSku').value || `SKU-${Date.now()}`, freeShippingWorldwide: freeShipping, defaultShippingPrice: defaultShipping, shippingRules: shippingRules, downloadLink: downloadLink, licenseKeys: licenseKeys, description: desc, createdAt: new Date() };\r\nproducts.push(newProd);\r\ncurrentSeller.productCount = products.filter(p=>p.sellerId === currentSeller.id).length;\r\nif(productType === 'physical') currentSeller.physicalCount++; else currentSeller.digitalCount++;\r\nlet shippingDisplay = productType === 'digital' ? \"\ud83d\udcbb Digital - No Shipping\" : (freeShipping ? \"FREE Shipping Worldwide\" : `Shipping from $${defaultShipping.toFixed(2)}`);\r\ndocument.getElementById('myProductsList').innerHTML = products.filter(p=>p.sellerId === currentSeller.id).map(p=>`<div class=\"product-item\"><div><div class=\"product-item-title\">${p.name}<\/div><div class=\"product-item-price\">$${p.price.toFixed(2)}<\/div><div>${getProductTypeBadge(p.productType)} ${p.condition} | SKU: ${p.sku}<br><span style=\"font-size:0.65rem;\">${p.productType === 'digital' ? '\ud83d\udcbb Digital - No Shipping' : (p.freeShippingWorldwide ? '\ud83d\ude9a FREE Shipping' : `\ud83d\udce6 Shipping from $${p.defaultShippingPrice?.toFixed(2) || \"5.99\"}`)}<\/span><\/div><\/div><button class=\"delete-btn\" onclick=\"deleteProduct(${p.id})\">Delete<\/button><\/div>`).join('');\r\nupdateGlobalCounters(); updateSellerStats(); renderNicheGrid(); renderFilteredProducts(); showToast(`\u2705 \"${title}\" published!`);\r\nshippingRulesArray = []; renderShippingRulesList(); pendingImages = []; renderPreviews();\r\n}\r\nfunction deleteProduct(id) { if(confirm('Delete product?')) { products = products.filter(p => p.id !== id); if(currentSeller){ currentSeller.productCount = products.filter(p=>p.sellerId === currentSeller.id).length; currentSeller.physicalCount = products.filter(p=>p.sellerId === currentSeller.id && p.productType === 'physical').length; currentSeller.digitalCount = products.filter(p=>p.sellerId === currentSeller.id && p.productType === 'digital').length; } document.getElementById('myProductsList').innerHTML = (currentSeller ? products.filter(p=>p.sellerId === currentSeller.id) : []).map(p=>`<div class=\"product-item\"><div><div class=\"product-item-title\">${p.name}<\/div><div class=\"product-item-price\">$${p.price.toFixed(2)}<\/div><div>${getProductTypeBadge(p.productType)} ${p.condition} | SKU: ${p.sku}<br><span style=\"font-size:0.65rem;\">${p.productType === 'digital' ? '\ud83d\udcbb Digital - No Shipping' : (p.freeShippingWorldwide ? '\ud83d\ude9a FREE Shipping' : `\ud83d\udce6 Shipping from $${p.defaultShippingPrice?.toFixed(2) || \"5.99\"}`)}<\/span><\/div><\/div><button class=\"delete-btn\" onclick=\"deleteProduct(${p.id})\">Delete<\/button><\/div>`).join(''); updateSellerStats(); renderNicheGrid(); renderFilteredProducts(); showToast('Product deleted'); } }\r\nfunction requestFreeWebsite() { let productCount = products.filter(p=>p.sellerId===currentSeller?.id).length; if(productCount<20){ alert(`Need ${20-productCount} more products`); return; } alert(\"Free website request submitted! ($1000 value)\"); }\r\nfunction claimSponsoredPost() { let productCount = products.filter(p=>p.sellerId===currentSeller?.id).length; if(productCount<20){ alert(`Need ${20-productCount} more products`); return; } alert(\"Free sponsored post ($100) activated for 10 days!\"); }\r\nfunction claimRadioAd() { let productCount = products.filter(p=>p.sellerId===currentSeller?.id).length; if(productCount<20){ alert(`Need ${20-productCount} more products`); return; } alert(\"Free radio ad ($50) activated for 1 month!\"); }\r\nfunction showToast(msg) { let t = document.createElement('div'); t.className='toast-msg'; t.innerText=msg; document.body.appendChild(t); setTimeout(()=>t.remove(),2800); }\r\nfunction renderPreviews() { document.getElementById('imagePreviewContainer').innerHTML = pendingImages.map((img,i)=>`<div><img decoding=\"async\" src=\"${img}\" class=\"preview-img\"><button onclick=\"removeImg(${i})\" style=\"background:#ef4444; color:white; border:none; border-radius:20px;\">\u2715<\/button><\/div>`).join(''); }\r\nfunction removeImg(idx) { pendingImages.splice(idx,1); renderPreviews(); }\r\nfunction showView(view) { document.querySelectorAll('.view').forEach(v=>v.classList.remove('active')); document.getElementById(`${view}View`).classList.add('active'); if(view==='cart') renderCartPage(); if(view==='sellers') renderAllSellers(); if(view==='home') renderFilteredProducts(); if(view==='dashboard') updateSellerStats(); }\r\nfunction updateGlobalCounters() { document.getElementById('totalSellersSpan').innerText = sellers.length; document.getElementById('totalProductsSpan').innerText = products.length; }\r\nfunction updateNicheSelect() { let sel = document.getElementById('sellerNicheSelect'); sel.innerHTML = '<option>-- Choose Niche --<\/option>'; allNiches.forEach(n => { let opt = document.createElement('option'); opt.value = n; opt.textContent = n; sel.appendChild(opt); }); }\r\nfunction filterNicheGrid(){ renderNicheGrid(); }\r\nfunction filterSellersList(){ renderAllSellers(); }\r\n\r\nconst dropZone = document.getElementById('productDropZone'), fileInput = document.getElementById('productFileInput');\r\ndropZone.addEventListener('click', () => fileInput.click());\r\nfileInput.addEventListener('change', e => { Array.from(e.target.files).filter(f=>f.type.startsWith('image\/')).forEach(f=>{ let r=new FileReader(); r.onload=ev=>{ pendingImages.push(ev.target.result); renderPreviews(); }; r.readAsDataURL(f); }); });\r\ndropZone.addEventListener('dragover', e=>{ e.preventDefault(); dropZone.classList.add('drag-over'); });\r\ndropZone.addEventListener('dragleave', ()=>dropZone.classList.remove('drag-over'));\r\ndropZone.addEventListener('drop', e=>{ e.preventDefault(); dropZone.classList.remove('drag-over'); Array.from(e.dataTransfer.files).filter(f=>f.type.startsWith('image\/')).forEach(f=>{ let r=new FileReader(); r.onload=ev=>{ pendingImages.push(ev.target.result); renderPreviews(); }; r.readAsDataURL(f); }); });\r\n\r\ngenerateData(); loadCart(); updateNicheSelect(); toggleFreeShipping(); toggleProductTypeFields();\r\nwindow.showView = showView; window.addToCart = addToCart; window.removeCartItem = removeCartItem; window.showNicheProducts = showNicheProducts; window.showSellerStore = showSellerStore; window.filterNicheGrid = filterNicheGrid; window.filterSellersList = filterSellersList; window.openCheckoutModal = openCheckoutModal; window.closeCheckoutModal = closeCheckoutModal; window.processSecurePayment = processSecurePayment; window.registerStore = registerStore; window.publishProduct = publishProduct; window.deleteProduct = deleteProduct; window.requestFreeWebsite = requestFreeWebsite; window.claimSponsoredPost = claimSponsoredPost; window.claimRadioAd = claimRadioAd; window.addShippingRule = addShippingRule; window.removeShippingRule = removeShippingRule; window.toggleFreeShipping = toggleFreeShipping; window.toggleProductTypeFields = toggleProductTypeFields; window.removeImg = removeImg; window.updateShippingCostForCart = updateShippingCostForCart; window.applyAdvancedSearch = applyAdvancedSearch; window.resetSearch = resetSearch;\r\n<\/script>\r\n<\/body>\r\n<\/html>\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<\/div>\n\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Marketplace Platform &#8211; Complete Marketplace Marketplace PlatformBuy and Sell Products Home Sellers Cart 0 Seller Hub \ud83c\udf81 SPECIAL BUYER PROMOTION \u2013 $1000 GIFT! \ud83c\udf81 Dear buyers, If you shop and buy a product from any store placed on the Marketplace Platform for a period of one calendar year in the amount of at least $500 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-20561","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/marketplace-marketplace.com\/index.php\/wp-json\/wp\/v2\/pages\/20561","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/marketplace-marketplace.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/marketplace-marketplace.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/marketplace-marketplace.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/marketplace-marketplace.com\/index.php\/wp-json\/wp\/v2\/comments?post=20561"}],"version-history":[{"count":17,"href":"https:\/\/marketplace-marketplace.com\/index.php\/wp-json\/wp\/v2\/pages\/20561\/revisions"}],"predecessor-version":[{"id":20671,"href":"https:\/\/marketplace-marketplace.com\/index.php\/wp-json\/wp\/v2\/pages\/20561\/revisions\/20671"}],"wp:attachment":[{"href":"https:\/\/marketplace-marketplace.com\/index.php\/wp-json\/wp\/v2\/media?parent=20561"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}