This study introduces a novel two-stage stochastic programming model tailored for the unique infrastructure of two-story container ports, a design that significantly enhances land productivity and operational efficiency. Our model, addressing uncertainties in vessel arrival times and container loads, incorporates advanced features like innovative quay cranes, rooftop solar panels, and dense container storage. An efficient metaheuristic is designed for large-scale applications, demonstrating a 25.63% reduction in operational costs compared to traditional decision rules. We also distill key managerial insights, notably the advantage of adopting solar power technology with consistent energy output throughout the day, offering practical guidance for port operators contemplating vertical expansion strategies.