// Deal data for the Star Monitors dashboard.
// All product names and details are illustrative, modeled on real Home Depot data shapes.

const RETAILERS = [
  { id: 'homedepot',  name: 'Home Depot',  count: 3172591, color: '#f96302' },
  { id: 'lowes',      name: "Lowe's",      count:  847221, color: '#012169' },
  { id: 'costco',     name: 'Costco',      count:  412908, color: '#e31837', soon: true },
  { id: 'walmart',    name: 'Walmart',     count: 1284503, color: '#0071dc', soon: true },
  { id: 'target',     name: 'Target',      count:  612408, color: '#cc0000', soon: true },
  { id: 'walgreens',  name: 'Walgreens',   count:   88204, color: '#e31836', soon: true },
];

// Category → soft tinted swatch for the placeholder thumbnails.
const CAT_TINT = {
  Bath:                ['#8da3b8', '#3a5f81'],
  Kitchen:             ['#b59a6a', '#7d6235'],
  Flooring:            ['#a89884', '#5e5240'],
  Cleaning:            ['#7fb6a4', '#2f6e5c'],
  Appliances:          ['#9aa3ad', '#3f4953'],
  Outdoors:            ['#7c9d6e', '#3e5a32'],
  Tools:               ['#c2a753', '#7a661d'],
  Electronics:         ['#6b7da3', '#2c3a5a'],
  Hardware:            ['#a89884', '#5e4f32'],
  Lighting:            ['#d4b56a', '#7d6225'],
  Garage:              ['#6e7a82', '#2f3a42'],
  'Building Materials':['#9d8e7a', '#564a3a'],
  Plumbing:            ['#7da3b8', '#3a5f81'],
  Paint:               ['#b89cae', '#724766'],
  Electrical:          ['#c0a050', '#76621c'],
  'Doors & Windows':   ['#8aa874', '#42603a'],
  Garden:              ['#8aa874', '#42603a'],
  Workwear:            ['#a18daf', '#5b4666'],
  'Storage & Organization': ['#9ca0a7', '#454850'],
};

// Helper for repetitive sparkline shapes
const climb = (peak) => {
  const arr = []; for (let i = 0; i < 7; i++) arr.push(Math.round(peak * (0.25 + (i/6)*0.75)));
  return arr;
};

const DEALS = [
  { sku:'202041027', upc:'712216018921',
    img:'../assets/products/spax-structural-screws-4581020701007-64_100.jpg',
    name:'SPAX 1/4 in. x 4 in. Interior Washer Head Structural Wood Lag Screws  Powerlags Torx T-Star (1 EA)', cat:'Hardware', subcat:'Fasteners',
    was:'$1.54', now:'$0.40', discount:74, added:'6h ago', stores:1, stock:34,
    cities:['Fresno, CA'],
    sparkline:[19,28,37,46,56,65,74] },
  { sku:'202041028', upc:'712216018938',
    img:'../assets/products/spax-structural-screws-4581020701277-64_100.jpg',
    name:'SPAX 1/4 in. x 5 in. Interior Washer Head Structural Wood Lag Screws  Powerlags Torx T-Star (1 EA)', cat:'Hardware', subcat:'Fasteners',
    was:'$1.72', now:'$0.50', discount:71, added:'6h ago', stores:2, stock:89,
    cities:['Fresno, CA', 'Brooklyn, NY'],
    sparkline:[18,27,36,44,53,62,71] },
  { sku:'203754400', upc:'884392559465',
    img:'../assets/products/safety-1st-child-proof-safety-locks-latches-hs148-64_100.jpg',
    name:'Safety 1st Multi-Purpose Decor Appliance Lock (2-Pack)', cat:'Tools', subcat:'Safety & Security',
    was:'$11.46', now:'$2.50', discount:78, added:'6h ago', stores:9, stock:45,
    cities:['Multi-state · 9 stores'],
    sparkline:[20,29,39,49,59,68,78] },
  { sku:'302366254', upc:'712216022263',
    img:'../assets/products/spax-screwdriver-bits-5000002016309-64_100.jpg',
    name:'SPAX T30 x 1 in. Screw Drill Bit Torx T-Star Torx Drive Head Torx T-Star (1 Each)', cat:'Hardware', subcat:'Fasteners',
    was:'$3.21', now:'$0.90', discount:72, added:'6h ago', stores:1, stock:5,
    cities:['Fresno, CA'],
    sparkline:[18,27,36,45,54,63,72] },
  { sku:'304881401', upc:'884392601973',
    img:'../assets/products/safety-1st-child-safety-accessories-hs275-64_100.jpg',
    name:'Safety 1st OutSmart Outlet Sheild', cat:'Tools', subcat:'Safety & Security',
    was:'$9.09', now:'$2.00', discount:78, added:'6h ago', stores:8, stock:35,
    cities:['Multi-state · 8 stores'],
    sparkline:[20,29,39,49,59,68,78] },
  { sku:'304881514', upc:'884392613570',
    img:'../assets/products/safety-1st-child-safety-accessories-hs2890602-64_100.jpg',
    name:'Safety 1st OutSmart Lever Handle Lock', cat:'Tools', subcat:'Safety & Security',
    was:'$29.73', now:'$6.50', discount:78, added:'6h ago', stores:8, stock:83,
    cities:['Multi-state · 8 stores'],
    sparkline:[20,29,39,49,59,68,78] },
  { sku:'304881517', upc:'884392613433',
    img:'../assets/products/safety-1st-child-safety-accessories-hs288-64_100.jpg',
    name:'Safety 1st OutSmart Toilet Lock', cat:'Tools', subcat:'Safety & Security',
    was:'$22.57', now:'$4.90', discount:78, added:'6h ago', stores:9, stock:48,
    cities:['Multi-state · 9 stores'],
    sparkline:[20,29,39,49,59,68,78] },
  { sku:'304901793', upc:'884392617202',
    img:'../assets/products/safety-1st-child-safety-accessories-hs304-64_100.jpg',
    name:'Safety 1st Furniture Wall Straps', cat:'Tools', subcat:'Safety & Security',
    was:'$21.36', now:'$4.70', discount:78, added:'6h ago', stores:6, stock:49,
    cities:['Green Bay, WI', 'Machesney Park, IL', 'Onalaska, WI', 'Oregon City, OR', 'Powell, OH', 'Ankeny, IA'],
    sparkline:[20,29,39,49,59,68,78] },
  { sku:'312479634', upc:'884392620516',
    img:'../assets/products/safety-1st-child-proof-safety-locks-latches-hs310-64_100.jpg',
    name:'Safety 1st Adhesive Cabinet Latch (4-Pack)', cat:'Tools', subcat:'Safety & Security',
    was:'$22.57', now:'$4.90', discount:78, added:'6h ago', stores:10, stock:79,
    cities:['Multi-state · 10 stores'],
    sparkline:[20,29,39,49,59,68,78] },
  { sku:'313894707', upc:'712216025004',
    img:'../assets/products/spax-screwdriver-bits-5000009285309-64_100.jpg',
    name:'SPAX T30 x 2 in. Screw Drill Bit Torx T-Star Plus Torx Drive Head Torx T-Star Plus (2 Each)', cat:'Hardware', subcat:'Fasteners',
    was:'$6.00', now:'$1.50', discount:75, added:'6h ago', stores:1, stock:5,
    cities:['Fresno, CA'],
    sparkline:[19,28,38,47,56,66,75] },
  { sku:'315164068', upc:'712216023789',
    img:'../assets/products/spax-wood-screws-4101010500904-64_100.jpg',
    name:'SPAX #10 x 3-1/2 in. Interior Flat Head Wood Screws Construction Phillips Square Unidrive (57 Each) 1 LB Bit Included', cat:'Hardware', subcat:'Fasteners',
    was:'$12.80', now:'$3.20', discount:75, added:'6h ago', stores:1, stock:2,
    cities:['Fresno, CA'],
    sparkline:[19,28,38,47,56,66,75] },
  { sku:'315169576', upc:'712216021273',
    img:'../assets/products/spax-wood-screws-4191020400604-64_100.jpg',
    name:'SPAX #8 x 2-1/2 in. Interior Flat Head Wood Screws Construction Framing Torx T-Star Plus (133 Each) 1 LB Bit Included', cat:'Hardware', subcat:'Fasteners',
    was:'$12.80', now:'$3.20', discount:75, added:'6h ago', stores:1, stock:11,
    cities:['Fresno, CA'],
    sparkline:[19,28,38,47,56,66,75] },
  { sku:'315173654', upc:'712216022218',
    img:'../assets/products/spax-wood-screws-4191670500504-64_100.jpg',
    name:'SPAX #10 x 2 in. Exterior Flat Head Deck Wood Screws Construction Torx T-Star Plus (99 Each) 1 LB Bit Included', cat:'Hardware', subcat:'Fasteners',
    was:'$15.00', now:'$3.90', discount:74, added:'6h ago', stores:1, stock:1,
    cities:['Fresno, CA'],
    sparkline:[19,28,37,46,56,65,74] },
  { sku:'315182827', upc:'712216021402',
    img:'../assets/products/spax-cabinet-screws-4281020400504-64_100.jpg',
    name:'SPAX #8 x 2 in. Interior Wafer Head Wood Screws Cabinet Torx T-Star Plus (140 Each) 1 LB Bit Included', cat:'Hardware', subcat:'Fasteners',
    was:'$12.80', now:'$3.20', discount:75, added:'6h ago', stores:1, stock:6,
    cities:['Fresno, CA'],
    sparkline:[19,28,38,47,56,66,75] },
  { sku:'315183408', upc:'712216023345',
    img:'../assets/products/spax-wood-screws-4281670400324-64_100.jpg',
    name:'SPAX #8 x 1-1/4 in. Exterior Wafer Head Wood Screws Construction Torx T-Star Plus (195 Each) 1 LB Bit Included', cat:'Hardware', subcat:'Fasteners',
    was:'$15.00', now:'$3.60', discount:76, added:'6h ago', stores:1, stock:10,
    cities:['Fresno, CA'],
    sparkline:[19,29,38,48,57,67,76] },
  { sku:'315183413', upc:'712216023369',
    img:'../assets/products/spax-wood-screws-4281670400504-64_100.jpg',
    name:'SPAX #8 x 2 in. Exterior Wafer Head Wood Screws Construction Torx T-Star Plus (140 Each) 1 LB Bit Included', cat:'Hardware', subcat:'Fasteners',
    was:'$15.00', now:'$3.90', discount:74, added:'6h ago', stores:1, stock:3,
    cities:['Fresno, CA'],
    sparkline:[19,28,37,46,56,65,74] },
  { sku:'315183414', upc:'712216023376',
    img:'../assets/products/spax-wood-screws-4281670500604-64_100.jpg',
    name:'SPAX #10 x 2-1/2 in. Exterior Wafer Head Wood Screws Construction Torx T-Star Plus (77 Each) 1 LB Bit Included', cat:'Hardware', subcat:'Fasteners',
    was:'$15.00', now:'$3.90', discount:74, added:'6h ago', stores:1, stock:4,
    cities:['Fresno, CA'],
    sparkline:[19,28,37,46,56,65,74] },
  { sku:'322631547', upc:'044376297633',
    img:'../assets/products/spire-built-in-grills-740-0781p-64_100.jpg',
    name:'SPIRE 6-Burner Built-In Propane Gas Island Grill Head in Stainless Steel with Rear Burner', cat:'Outdoors', subcat:'Outdoor Cooking',
    was:'$1405.08', now:'$899.25', discount:36, added:'6h ago', stores:1, stock:2,
    cities:['Bethesda, MD'],
    sparkline:[9,14,18,23,27,32,36] },
  { sku:'322631585', upc:'044376297626',
    img:'../assets/products/spire-built-in-grills-740-0788p-64_100.jpg',
    name:'SPIRE 5-Burner Built-In Propane Gas Island Grill Head in Stainless Steel with Rear Burner', cat:'Outdoors', subcat:'Outdoor Cooking',
    was:'$1208.47', now:'$500.00', discount:58, added:'6h ago', stores:3, stock:6,
    cities:['Norwalk, CT', 'Bethesda, MD', 'White Lake, MI'],
    sparkline:[15,22,29,36,44,51,58] },
  { sku:'327068362', upc:'024654512023',
    img:'../assets/products/natural-safer-brand-citronella-candles-torches-sh1200r4r-64_100.jpg',
    name:'Safer Brand Indoor/Outdoor Mosquito Repellent Lantern Refills (4-Pack)', cat:'Outdoors', subcat:'Pest Control',
    was:'$25.00', now:'$2.00', discount:92, added:'6h ago', stores:10, stock:168,
    cities:['Multi-state · 10 stores'],
    sparkline:[23,35,46,58,69,81,92] },
  { sku:'327714296', upc:'046500047114',
    img:'../assets/products/stem-bug-spray-scj368000-64_100.jpg',
    name:'STEM Insect Repellent, Mosquito And Tick Repellent For Your Skin, Fragrance-Free, 6 oz.', cat:'Outdoors', subcat:'Pest Control',
    was:'$14.00', now:'$0.14', discount:99, added:'6h ago', stores:8, stock:142,
    cities:['Multi-state · 8 stores'],
    sparkline:[25,37,50,62,74,87,99] },
  { sku:'328532380', upc:'712216023994',
    img:'../assets/products/spax-wood-screws-41010104002042-64_100.jpg',
    name:'SPAX #8 x 3/4 in. Interior Flat Head Wood Screws Construction Phillips Square Unidrive (100 Each)', cat:'Hardware', subcat:'Fasteners',
    was:'$8.80', now:'$2.20', discount:75, added:'6h ago', stores:2, stock:6,
    cities:['Fresno, CA', 'Willmar, MN'],
    sparkline:[19,28,38,47,56,66,75] },
  { sku:'328532971', upc:'712216026292',
    img:'../assets/products/spax-structural-screws-4581820701557-64_100.jpg',
    name:'SPAX 1/4 in. x 4-1/2 in. Exterior Washer Head Structural Wood Lag Screws  Powerlags Torx T-Star (1 EA)', cat:'Hardware', subcat:'Fasteners',
    was:'$1.43', now:'$0.40', discount:72, added:'6h ago', stores:1, stock:37,
    cities:['Fresno, CA'],
    sparkline:[18,27,36,45,54,63,72] },
  { sku:'328532991', upc:'712216026308',
    img:'../assets/products/spax-structural-screws-4581820800907-64_100.jpg',
    name:'SPAX 5/16 in. x 3-1/2 in. Exterior Washer Head Structural Wood Lag Screws  Powerlags Torx T-Star (1 EA)', cat:'Hardware', subcat:'Fasteners',
    was:'$1.61', now:'$0.50', discount:69, added:'6h ago', stores:1, stock:24,
    cities:['Fresno, CA'],
    sparkline:[17,26,35,43,52,60,69] },
  { sku:'333648529', upc:'783987165008',
    img:'../assets/products/bbq-sauces-rubs-ow16500-64_100.jpg',
    name:'Unbranded SMOKE \'N MAGIC CHICKEN RUB 12.5 oz.', cat:'Outdoors', subcat:'Outdoor Cooking',
    was:'$11.00', now:'$5.06', discount:54, added:'6h ago', stores:10, stock:155,
    cities:['Multi-state · 9 stores'],
    sparkline:[14,20,27,34,41,47,54] }
];

window.RETAILERS = RETAILERS;
window.CAT_TINT = CAT_TINT;
window.DEALS = DEALS;
