-- Catálogo de la tienda / regalos (django_wow.home_category + home_item).
-- Usado por /send-gift (y la futura /store). Precios en euros; item_id = id del
-- ítem en el juego; image_url = icono (se muestra en la ficha del objeto).
-- Idempotente: reusa categorías/ítems por su nombre / item_id único.

INSERT INTO home_category (name) VALUES
  ('Monturas'), ('Mascotas'), ('Consumibles'), ('Misceláneo')
ON DUPLICATE KEY UPDATE name = VALUES(name);

INSERT INTO home_item (category_id, name, price, item_id, image_url) VALUES
  ((SELECT id FROM home_category WHERE name='Monturas'),    'Riendas del protodraco azul', 5.00, 43599, 'https://wow.zamimg.com/images/wow/icons/large/ability_mount_drake_proto.jpg'),
  ((SELECT id FROM home_category WHERE name='Monturas'),    'Riendas del draco rojo',      5.00, 44151, 'https://wow.zamimg.com/images/wow/icons/large/ability_mount_drake_red.jpg'),
  ((SELECT id FROM home_category WHERE name='Mascotas'),    'Calabacín siniestro',         2.00, 44810, 'https://wow.zamimg.com/images/wow/icons/large/inv_misc_food_pumpkincookie.jpg'),
  ((SELECT id FROM home_category WHERE name='Mascotas'),    'Cría de espormurciélago',     2.00, 34425, 'https://wow.zamimg.com/images/wow/icons/large/ability_hunter_pet_bat.jpg'),
  ((SELECT id FROM home_category WHERE name='Consumibles'), 'Poción de curación rúnica',   1.00, 33447, 'https://wow.zamimg.com/images/wow/icons/large/inv_potion_167.jpg'),
  ((SELECT id FROM home_category WHERE name='Consumibles'), 'Poción de maná rúnica',       1.00, 33448, 'https://wow.zamimg.com/images/wow/icons/large/inv_potion_137.jpg'),
  ((SELECT id FROM home_category WHERE name='Misceláneo'),  'Bolsa de tela de niebla',     1.00, 41599, 'https://wow.zamimg.com/images/wow/icons/large/inv_misc_bag_29.jpg'),
  ((SELECT id FROM home_category WHERE name='Misceláneo'),  'Caja de regalo',              1.00, 21519, 'https://wow.zamimg.com/images/wow/icons/large/inv_holiday_christmaspresent_01.jpg')
ON DUPLICATE KEY UPDATE
  category_id = VALUES(category_id), name = VALUES(name), price = VALUES(price), image_url = VALUES(image_url);
