Gibraltar is a separate customs territory. When returning to Spain you pass through Spanish customs, which apply allowances on tobacco, alcohol, perfumes and high-value goods like electronics.
These limits are personal and per crossing — splitting purchases among the group does not multiply the allowance arbitrarily, and Spanish officers can and do check.
Tobacco is the most common reason for stops. Carrying more than the personal allowance, even ‘for friends’, can result in seizure and a fine.
Receipts help. Keep them visible if you are crossing back with shopping, and never accept to carry items for strangers — even small ones.
